NUFA with single process

From GlusterDocumentation

This information is out of date
and does not contain information related to the current version of Gluster

Documentation Home



NUFA has been deprecated. As of 3.0 both the client and server processes run as a single daemon. --Craig Carl 19:46, 11 May 2010 (PDT)



Introduction

In versions preceeding 1.3.8, GlusterFS required two separate binaries, one for the server (glusterfsd) and one for the client (glusterfs). Beginning with v1.3.8, the GlusterFS team combined the functionality of both the server and client into a single binary. For the sake of compatibility glusterfsd is now a symlink to glusterfs.

The reasons why this was done are as follows:

  1. In NUFA kind of setup (where a machine is both client and server), the context switch overhead due to two process was causing lot of performance bottleneck.
  2. Ease of management with single process.
  3. Saves lot of CPU cycle in forming protocol, memory allocation for that, and freeing the same.
  4. Now, fuse is made as a translator, which earlier was linked with client binary.
  5. This will reduce the number of packages in case of RPMs too (just single glusterfs binary RPM).
  6. 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 translator.

Example volfile

This example considers that there are only 4 machines which are used as both client and servers. Also note that hostnames 'node0[1-4]' are used with current volume, change it accordingly in your setup.

bash# cat /etc/glusterfs/nufa.vol
volume posix
 type storage/posix
 option directory /tmp/exports
end-volume

volume locks
  type features/locks
  subvolumes posix
end-volume

volume brick
 type performance/io-threads
 subvolumes locks
end-volume

volume server
 type protocol/server
 option transport-type tcp
 option auth.addr.brick.allow *
 subvolumes brick
end-volume

volume node01
 type protocol/client
 option transport-type tcp
 option remote-host node01
 option remote-subvolume brick
end-volume

volume node02
 type protocol/client
 option transport-type tcp
 option remote-host node02
 option remote-subvolume brick
end-volume

volume node03
 type protocol/client
 option transport-type tcp
 option remote-host node03
 option remote-subvolume brick
end-volume

volume node04
 type protocol/client
 option transport-type tcp
 option remote-host node04
 option remote-subvolume brick
end-volume

volume nufa
 type cluster/nufa
 option local-volume-name `hostname` # note the backquote, so 'hostname' output will be used as the option. 
 subvolumes node01 node02 node03 node04
end-volume

volume writebehind
  type performance/write-behind
  option cache-size 1MB
  subvolumes nufa
end-volume

volume cache
  type performance/io-cache
  option cache-size 512MB
  subvolumes writebehind
end-volume

NOTE

  1. 'nufa' is an cluster translator from 2.0 release. Earlier to this version, one needed to use nufa scheduler with unify translator.
  2. client/protocol will automatically understand that its talking to one of the volumes exported by the same process ( 'brick' in this case), and attach to that volume bypassing the protocol layer.
  3. specially in case of nufa translator, each subvolumes of cluster/nufa should be hostname of the corresponding machine its talking, so the `hostname` command can be used for getting the name of local-volume. This way, even in a cluster of 100+ nodes, glusterfs can be started with just one volfile.
  4. to see the storage pool from other nodes which doesn't export any partitions, change the 'cluster/nufa' to 'cluster/dht' in the above volume file (without local-volume-name option)

NUFA with Unify and multiple local drives

bash# cat /etc/glusterfs/unify-nufa.vol
volume posix-sda1
 type storage/posix
 option directory /mnt/sda1/exports
end-volume

volume brick-sda1
 type performance/io-threads
 subvolumes posix-sda1
end-volume

volume posix-sda2
 type storage/posix
 option directory /mnt/sda2/exports
end-volume

volume brick-sda2
 type performance/io-threads
 subvolumes posix-sda2
end-volume

volume posix-sda3
 type storage/posix
 option directory /mnt/sda3/exports
end-volume

volume brick-sda3
 type performance/io-threads
 subvolumes posix-sda3
end-volume

volume node02
 type protocol/client
 option transport-type tcp
 option remote-host node02
 option remote-subvolume brick
end-volume

volume node03
 type protocol/client
 option transport-type tcp
 option remote-host node03
 option remote-subvolume brick
end-volume

volume node04
 type protocol/client
 option transport-type tcp
 option remote-host node04
 option remote-subvolume brick
end-volume

volume unify
 type cluster/unify
 option scheduler.local-volume-name  brick-sda1,brick-sda2,brick-sda3
 subvolumes brick-sda1 brick-sda2 brick-sda3 node02 node03 node04
end-volume  

volume server
 type protocol/server
 option transport-type tcp
 option auth.addr.unify.allow *
 subvolumes unify
end-volume

This information is out of date
and does not contain information related to the current version of Gluster

Documentation Home

 

Copyright © Gluster, Inc. All Rights Reserved.