glusterfs 建disperse卷

我的测试环境配置有4台brick。这次建的卷为dispersed卷(类似raid5)

gluster官方建议最佳配置6brick中2台redundancy。

我的环境现在只用1redundancy。

我先在4台BRICK中都mkdir了相同的目录结构。

/export/gfs/vm(这个卷就是给kvm用的,嘿嘿)

gluster volume create kvm_vol disperse 4 10.32.109.101:/export/gfs/vm 10.32.109.102:/export/gfs/vm 10.32.109.103:/export/gfs/vm 10.32.109.104:/export/gfs/vm

如果你不加redundancy参数,系统会问你要不要用1台做redundancy

There isn't an optimal redundancy value for this configuration. Do you want to create the volume with redundancy 1 ? (y/n)

接下来就是要启NFS了。

我们使用了ganesha,所以可以很简单的用ganesha提供的脚本生成配置文件

sh /usr/libexec/ganesha/create-export-ganesha.sh /etc/ganesha/ on kvm_vol

生成以下配置文件


glusterfs 建disperse卷_第1张图片

修改ACL和PROTOCOLS配置

Disable_ACL = FALSE

Protocols把4删掉,我们只用nfs v3

不过存储只是单一用处,而且不会有别的服务器挂载的话,ACL可以不用修改。

最后systemctl reload nfs-ganesha,如果没启动就直接 start启动nfs-ganesha

别忘记了,还要启动volume 

gluster volume start kvm_vol

到此,完成。

你可能感兴趣的:(glusterfs 建disperse卷)