Unify NUFA with single process
From GlusterDocumentation
Contents |
Introduction
Earlier (before v1.3.8) GlusterFS needed two separate binary for both server part (glusterfsd) and client part (glusterfs). With v1.3.8, GlusterFS team came up with a single binary for both server part and client part. (now for compatibility sake, glusterfsd is a symlink to glusterfs).
Few important things why team developed this feature,
- In NUFA kind of setup (where a machine is both client and server), the context switch over head due to two process was causing lot of performance bottleneck.
- Ease of management with single process.
- Saves lot of CPU cycle in forming protocol, memory allocation for that, and freeing the same.
- Now, fuse is made as a translator.
- This will reduce the number of packages in case of RPMs too (just single glusterfs binary RPM).
- Running one command will start both server and client, hence simple entry in /etc/fstab, and mount/umount is enough to start and stop glusterfs.
Next sections shows the example of NUFA scheduler with Unify. But you can use this concept with any or all translators.
Example
This example considers that there are only 4 machines which are used as both client and servers. Also note that hostnames are used with current config, change it accordingly in your setup.
NOTE: If you are using AFR or stripe with single process spec file (ie, both client spec file and server spec file merged in one), note that the order of subvolumes in all nodes should remain constant.
node01
volume posix type storage/posix option directory /tmp/exports end-volume volume brick type performance/io-threads subvolumes posix end-volume volume brick-ns type storage/posix option directory /tmp/exports-namespace end-volume volume server type protocol/server option transport-type tcp/server option auth.ip.brick.allow * option auth.ip.brick-ns.allow * subvolumes brick brick-ns end-volume volume client-02 type protocol/client option transport-type tcp/client option remote-host node02 option remote-subvolume brick end-volume volume client-03 type protocol/client option transport-type tcp/client option remote-host node03 option remote-subvolume brick end-volume volume client-04 type protocol/client option transport-type tcp/client option remote-host node04 option remote-subvolume brick end-volume volume unify type cluster/unify option namespace brick-ns option scheduler nufa option nufa.local-volume-name brick option nufa.limits.min-free-disk 10% subvolumes brick client-02 client-03 client-04 end-volume
node02
volume posix type storage/posix option directory /tmp/exports end-volume volume brick type performance/io-threads subvolumes posix end-volume volume server type protocol/server option transport-type tcp/server option auth.ip.brick.allow * subvolumes brick end-volume volume client-01 type protocol/client option transport-type tcp/client option remote-host node01 option remote-subvolume brick end-volume volume client-03 type protocol/client option transport-type tcp/client option remote-host node03 option remote-subvolume brick end-volume volume client-04 type protocol/client option transport-type tcp/client option remote-host node04 option remote-subvolume brick end-volume volume client-ns type protocol/client option transport-type tcp/client option remote-host node01 # this is because we need a common namespace. you can choose to afr this. option remote-subvolume brick-ns end-volume volume unify type cluster/unify option namespace client-ns option scheduler nufa option nufa.local-volume-name brick option nufa.limits.min-free-disk 10% subvolumes brick client-01 client-03 client-04 end-volume
node03
volume posix type storage/posix option directory /tmp/exports end-volume volume brick type performance/io-threads subvolumes posix end-volume volume server type protocol/server option transport-type tcp/server option auth.ip.brick.allow * subvolumes brick end-volume volume client-01 type protocol/client option transport-type tcp/client option remote-host node01 option remote-subvolume brick end-volume volume client-02 type protocol/client option transport-type tcp/client option remote-host node02 option remote-subvolume brick end-volume volume client-04 type protocol/client option transport-type tcp/client option remote-host node04 option remote-subvolume brick end-volume volume client-ns type protocol/client option transport-type tcp/client option remote-host node01 # this is because we need a common namespace. you can choose to afr this. option remote-subvolume brick-ns end-volume volume unify type cluster/unify option namespace client-ns option scheduler nufa option nufa.local-volume-name brick option nufa.limits.min-free-disk 10% subvolumes brick client-01 client-02 client-04 end-volume
node04
volume posix type storage/posix option directory /tmp/exports end-volume volume brick type performance/io-threads subvolumes posix end-volume volume server type protocol/server option transport-type tcp/server option auth.ip.brick.allow * subvolumes brick end-volume volume client-01 type protocol/client option transport-type tcp/client option remote-host node01 option remote-subvolume brick end-volume volume client-02 type protocol/client option transport-type tcp/client option remote-host node02 option remote-subvolume brick end-volume volume client-03 type protocol/client option transport-type tcp/client option remote-host node03 option remote-subvolume brick end-volume volume client-ns type protocol/client option transport-type tcp/client option remote-host node01 # this is because we need a common namespace. you can choose to afr this. option remote-subvolume brick-ns end-volume volume unify type cluster/unify option namespace client-ns option scheduler nufa option nufa.local-volume-name brick option nufa.limits.min-free-disk 10% subvolumes brick client-01 client-02 client-03 end-volume

