[[GlusterFS]]
構築した&color(magenta){GlusterFS};の''ストレージボリューム''をクライアントから利用する。
単純にNFSサーバへのmount操作を行えばいいだけみたい。
fuse(Filesystem in Userspace)を経由してmountする方法とvfs(Virtual File System)経由でNFSv3でmountする方法がある。
どっちが有利かは分からない。っが、どちらもglusterfsのパッケージは共に必要みたい。
#code(nonumber){{
[root@client ~]# yum localinstall \
./glusterfs-3.6.1-1.el6.x86_64.rpm \
./glusterfs-libs-3.6.1-1.el6.x86_64.rpm \
./glusterfs-api-3.6.1-1.el6.x86_64.rpm \
./glusterfs-fuse-3.6.1-1.el6.x86_64.rpm
[root@client ~]#
}}
以上でクライアントの準備は完了。っで、実際にマウントを行ってみる。
***fuse経由でmount [#k77f580e]
mount コマンドで指定するファイルシステムタイプは「&color(magenta){glusterfs};」となる。
#code(nonumber){{
[root@client ~]# mount -t glusterfs n1:gv0 /home
[root@client ~]# df -Th
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda3 ext4 6.3G 1020M 5.0G 17% /
tmpfs tmpfs 939M 0 939M 0% /dev/shm
/dev/sda1 ext4 477M 47M 405M 11% /boot
n1:gv0 fuse.glusterfs 16G 33M 16G 1% /home
[root@client ~]#
}}
mount先は信頼されたプール「trusted pool」であればどれでもいいみたい。
n1の他にn2、n3、n4と&color(magenta){peer probe};されたサイトならどれでも。
&color(red){*};&size(10){加えて&color(green){''Brick''};を拠出してない&color(magenta){peer probe};なサイトでもOK};
&color(red){*};&size(10){mount 先を''n1:gv0''としているが、''n1:/gv0''としてもOKみたい};
#code(nonumber){{
[root@client ~]# umount /home
[root@client ~]# df -Th
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda3 ext4 6.3G 1020M 5.0G 17% /
tmpfs tmpfs 939M 0 939M 0% /dev/shm
/dev/sda1 ext4 477M 47M 405M 11% /boot
n2:gv0 fuse.glusterfs 16G 33M 16G 1% /home
[root@client ~]# mount
(略)
n2:gv0 on /home type fuse.glusterfs (rw,default_permissions,allow_other,max_read=131072)
[root@client ~]#
}}
とn2でも同様にmountできた。
mountパラメータに注目
***NFSv3でmount [#w63d3a58]
通常のマウント操作と同じ。
#code(nonumber){{
[root@client ~]# umount /home
[root@client ~]# mount -t nfs -o vers=3 n1:gv0 /home
[root@client ~]# df -Th
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda3 ext4 6.3G 1020M 5.0G 17% /
tmpfs tmpfs 939M 0 939M 0% /dev/shm
/dev/sda1 ext4 477M 47M 405M 11% /boot
n1:gv0 nfs 16G 32M 16G 1% /home
[root@client ~]#
}}
同じプール「trusted pool」なら別のサイトを指定しても同じようにmount可能である。
#code(nonumber){{
[root@client ~]# umount /home
[root@client ~]# mount -t nfs -o vers=3 n2:gv0 /home
[root@client ~]# df -Th
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda3 ext4 6.3G 1020M 5.0G 17% /
tmpfs tmpfs 939M 0 939M 0% /dev/shm
/dev/sda1 ext4 477M 47M 405M 11% /boot
n2:gv0 nfs 16G 32M 16G 1% /home
[root@client ~]#
[root@client ~]# mount
(略)
n2:gv0 on /home type nfs (rw,vers=3,addr=192.168.0.53)
[root@client ~]#
}}
mountパラメータはNFSv3で行ったのと同様な値を示す。