Formatting code for FileSystemGlusterFS


show source only

{{parent page="LinuxFileSystem"}}

===GlusterFS===
This could be a better alternative than NFS. Apparently, aside from simple export-mount, one can do replication (mirroring data on multiple remotes) or distributed storage (storing files on multiple remotes), or combine these two to form a RAID-10 like storage on the network (mirroring of distributed remotes). This example creates 1 server that exports a directory, and a client which mounts it.

==Download==
http://www.gluster.org/
http://fuse.sourceforge.net/

==Server ==
install glusterfs
%%
./configure --prefix=/usr
make && make install
%%

For this example, I'm exporting a dedicated filesystem, but it should work on a regular directory. Create this config file
%%(text;/etc/glusterfs/glusterfsd.vol)
volume posix
type storage/posix
option directory /gfs
end-volume

volume locks
type features/locks
subvolumes posix
end-volume

volume brick
type performance/io-threads
option thread-count 8
subvolumes locks
end-volume

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

Start glusterfsd with **service glusterfsd start**

==Client==
Install fuse and then glusterfs

fuse
%%
./configure --prefix=/usr --enable-kernel-module --enable-lib --enable-util
make && make install
modprobe fuse
%%

glusterfs
%%
./configure --prefix=/usr
make && make install
%%

Create this config file
%%(text; /etc/glusterfs/glusterfsd.vol)
volume remote1
type protocol/client
option transport-type tcp
option remote-host 10.0.0.26
option remote-subvolume brick
end-volume

volume writebehind
type performance/write-behind
option window-size 4MB
subvolumes remote1
end-volume

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

Mount it
%%
glusterfs -f /etc/glusterfs/glusterfs.vol /gfs
%%

Or put it in /etc/fstab then mount with **mount -a**
%%(text;fstab)
/etc/glusterfs/glusterfs.vol /gfs glusterfs defaults 0 0
%%

==Netstat==
Just in case you're on a firewall-ed network:
%%
tcp 0 0 10.0.0.20:1022 10.0.0.26:6996 ESTABLISHED 21408/glusterfs
tcp 0 0 10.0.0.20:1023 10.0.0.26:6996 ESTABLISHED 21408/glusterfs
%%

Very easy!
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki