内容纲要
nfs在前面已经说了,这次说一下使用原生的glusterFS来挂载卷
1.首先建立一个卷v1并开启
gluster volume create v1 node1:/data/xx node2:/data/xx force
gluster volume start v1
2.安装glusterFS客户端工具
yum install glusterfs glusterfs-fuse -y
3.使用原生的glusterFS挂载v1
mount -t glusterfs node1:/v1 /v1
[root@client /]# df -hT
文件系统 类型 容量 已用 可用 已用% 挂载点
/dev/vda1 xfs 20G 1.3G 19G 7% /
devtmpfs devtmpfs 488M 0 488M 0% /dev
tmpfs tmpfs 497M 0 497M 0% /dev/shm
tmpfs tmpfs 497M 13M 484M 3% /run
tmpfs tmpfs 497M 0 497M 0% /sys/fs/cgroup
tmpfs tmpfs 100M 0 100M 0% /run/user/0
node1:/v1 fuse.glusterfs 4.0G 65M 4.0G 2% /v1
4.设置客户端可以以什么文件系统来挂载v1
gluster volume set v1 auth.allow ip \\对那个ip启用gluster方式挂载
gluster volume set v1 nfs.disable on \\禁用nfs方式挂载
gluster volume set v1 nfs.disable off \\启用对nfs的支持
gluster volume restart v1 nfs.disable \\关闭对nfs的限制