M
Myatu
Guest
(Note: this is resolved. Solution at the end.)
Okay, so I'm playing with an experimental setup where one VM is a GlusterFS server and another VM a GlusterFS client (the idea is to replace the current NFS with GlusterFS).
It's *almost* working, I'm just running into a problem with FUSE on the "client" VM, which is actually more important than the server part... Here's what I have done so far (would make a nice Wiki if this finally works):
To prepare the GlusterFS Server VM ("Server", VEID 105) I did this on the Host Node:
(Note: without "sys_adminn" I get errors starting the GlusterFS daemon.)
Then I enter the Server (debian-5.0-standard_5.0-1 template) and do the following:
I used the "--disable-fuse-client" option, as I do not need it for a dedicated GlusterFS server. Additionally, the "libibverbs-dev" package is not required if you're not using Infiniband.
I create a simple configuration:
Make the directory:
Finally fire up the GlusterFS Daemon on the server:
Okay, so that's the Server squared away. On to the the GlusterFS Client.
To prepare the GusterFS Client VM ("Client", VEID 106), I did this on the Host Node:
I enter the Client (debian-4.0-i386-minimal template) and first get the required packages to compile:
Next up, I compile the GlusterFS-patched FUSE library:
(Note: --disable-kernel-module is required, given that it's inside a VM container).
Then, I compile GlusterFS for the Client:
The configuration file looks as following:
And finally, I create a mount point:
Now, at *this* point is where I'm hitting a wall. I should be able to do a mount like this:
But no such luck. So I had a look at what's going on with:
And the log file will return this:
As you can see, it fails at "No such device on mount point /mnt/test", yet I did the "vzctl set 106 --devices c:10:229:rw --save" followed by a "mknod /dev/fuse c 10 229" on the client. /dev/fuse shows up OK.
tune2fs reports the following error:
... And I did the "modprobe fuse" on the HN.
... So, what's the last step I'm missing?
[RESOLVED] -Aha! I answered my own question here. The answer is that in addition to the server, a client with GlusterFS also needs "--sysadminn". Thus, on the Host Node (where 106 is the VEID of the Client) you use:
After this, everything works like a charm. GlusterFS is much faster than NFS (especially in a container) and it gives you a whole range new options! Have a look at http://www.gluster.org.
One thing though: what's the drawback of "sys_adminn" and is it possible to do this differently?
Okay, so I'm playing with an experimental setup where one VM is a GlusterFS server and another VM a GlusterFS client (the idea is to replace the current NFS with GlusterFS).
It's *almost* working, I'm just running into a problem with FUSE on the "client" VM, which is actually more important than the server part... Here's what I have done so far (would make a nice Wiki if this finally works):
To prepare the GlusterFS Server VM ("Server", VEID 105) I did this on the Host Node:
Code:
# vzctl set 105 --capability sys_admin:on --save
# vzctl restart 105
Then I enter the Server (debian-5.0-standard_5.0-1 template) and do the following:
Code:
# aptitude install build-essential flex bison libdb4.6-dev libibverbs-dev
# wget http://ftp.gluster.com/pub/gluster/glusterfs/2.0/LATEST/glusterfs-2.0.0rc7.tar.gz
# tar -xzf glusterfs-2.0.0rc7.tar.gz
# cd glusterfs-2.0.0rc7
# ./configure --prefix=/usr --disable-fuse-client >/dev/null
# make && make install
I create a simple configuration:
Code:
# cat /etc/glusterfs/glusterfs-server.vol
volume brick
type storage/posix
option directory /data/test
end-volume
volume server
type protocol/server
option transport-type tcp
option auth.addr.brick.allow * # No restrictions
subvolumes brick
end-volume
Code:
# mkdir -p /data/test
Code:
# glusterfs -f /etc/glusterfs/glusterfs-server.vol -l /var/log/glusterfs.log
To prepare the GusterFS Client VM ("Client", VEID 106), I did this on the Host Node:
Code:
# modprobe fuse
# lsmod | grep fuse
fuse 65680 2
# vzctl set 106 --devices c:10:229:rw --save
# vzctl exec 106 mknod /dev/fuse c 10 229
Code:
# aptitude -y install build-essential flex bison libdb4.6-dev libibverbs-dev
Code:
# wget http://ftp.gluster.com/pub/gluster/glusterfs/fuse/fuse-2.7.4glfs11.tar.gz
# tar -xzf fuse-2.7.4glfs11.tar.gz
# cd fuse-2.7.4glfs11
# ./configure --prefix=/usr --disable-kernel-module
# make && make install
Then, I compile GlusterFS for the Client:
Code:
# wget http://ftp.gluster.com/pub/gluster/glusterfs/2.0/LATEST/glusterfs-2.0.0rc7.tar.gz
# tar -xzf glusterfs-2.0.0rc7.tar.gz
# cd glusterfs-2.0.0rc7
# ./configure --prefix=/usr >/dev/null
GlusterFS configure summary
===========================
FUSE client : yes
Infiniband verbs : yes
epoll IO multiplex : yes
Berkeley-DB : yes
libglusterfsclient : yes
mod_glusterfs : no ()
argp-standalone : no
# make && make install
Code:
# cat /etc/glusterfs/glusterfs-client.vol
volume test
type protocol/client
option transport-type tcp
option remote-host 10.10.101.5 # IP address of the Server
option remote-subvolume brick
end-volume
Code:
# mkdir /mnt/test
Code:
# mount -t glusterfs /etc/glusterfs/glusterfs-client.vol /mnt/test
Code:
# glusterfs -f /etc/glusterfs/glusterfs-client.vol -l /var/log/glusterfs.log -L DEBUG /mnt/test
Code:
Version : glusterfs 2.0.0rc7 built on Mar 30 2009 18:42:28
TLA Revision : 4e5c297d7c3480d0d3ab1c0c2a184c6a4fb801ef
Starting Time: 2009-03-30 18:47:26
Command line : glusterfs -f /etc/glusterfs/glusterfs-client.vol -l /var/log/glusterfs.log -L DEBUG /mnt/test
PID : 21370
System name : Linux
Nodename : gfsclient
Kernel Release : 2.6.24-2-pve
Hardware Identifier: i686
Given volfile:
( ... cut out ... )
2009-03-30 18:47:26 D [spec.y:188:new_section] parser: New node for 'test'
2009-03-30 18:47:26 D [xlator.c:469:xlator_set_type] xlator: attempt to load file /usr/lib/glusterfs/2.0.0rc7/xlator/protocol/client.so
2009-03-30 18:47:26 D [spec.y:214:section_type] parser: Type:test:protocol/client
2009-03-30 18:47:26 D [spec.y:243:section_option] parser: Option:test:transport-type:tcp
2009-03-30 18:47:26 D [spec.y:243:section_option] parser: Option:test:remote-host:10.10.101.6
2009-03-30 18:47:26 D [spec.y:243:section_option] parser: Option:test:remote-subvolume:brick
2009-03-30 18:47:26 D [spec.y:327:section_end] parser: end:test
2009-03-30 18:47:26 D [xlator.c:469:xlator_set_type] xlator: attempt to load file /usr/lib/glusterfs/2.0.0rc7/xlator/mount/fuse.so
2009-03-30 18:47:26 D [glusterfsd.c:1115:main] glusterfs: running in pid 21371
2009-03-30 18:47:26 D [client-protocol.c:6559:init] test: defaulting transport-timeout to 600
2009-03-30 18:47:26 D [client-protocol.c:6570:init] test: defaulting ping-timeout to 10
2009-03-30 18:47:26 D [transport.c:141:transport_load] transport: attempt to load file /usr/lib/glusterfs/2.0.0rc7/transport/socket.so
2009-03-30 18:47:26 D [transport.c:141:transport_load] transport: attempt to load file /usr/lib/glusterfs/2.0.0rc7/transport/socket.so
2009-03-30 18:47:26 D [xlator.c:599:xlator_init_rec] test: Initialization done
2009-03-30 18:47:26 E [fuse-bridge.c:2838:init] glusterfs-fuse: fuse_mount() failed with error No such device on mount point /mnt/test
2009-03-30 18:47:26 E [xlator.c:611:xlator_init_rec] xlator: initialization of volume 'fuse' failed, review your volfile again
2009-03-30 18:47:26 E [glusterfsd.c:494:_xlator_graph_init] glusterfs: initializing translator failed
2009-03-30 18:47:26 E [glusterfsd.c:1127:main] glusterfs: translator initialization failed. exiting
tune2fs reports the following error:
Code:
# tune2fs -l /dev/fuse
tune2fs 1.41.3 (12-Oct-2008)
tune2fs: Illegal seek while trying to open /dev/fuse
Couldn't find valid filesystem superblock.
... So, what's the last step I'm missing?
[RESOLVED] -Aha! I answered my own question here. The answer is that in addition to the server, a client with GlusterFS also needs "--sysadminn". Thus, on the Host Node (where 106 is the VEID of the Client) you use:
Code:
# vzctl set 106 --capability sys_admin:on --save
# vzctl restart 106
One thing though: what's the drawback of "sys_adminn" and is it possible to do this differently?
Last edited by a moderator: