【环境信息】
系统:arm,x86虚拟机
内存:4g
cpu:4核
OS版本:
openeulerversion=openEuler-22.03-LTS
compiletime=2022-03-12-09-10-52
gccversion=10.3.1-9.oe1
kernelversion=5.10.0-60.9.0.40.oe1
openjdkversion=1.8.0.312.b07-11.oe1
备注:需要2个节点的机器,每个节点添加1个10G磁盘,节点1:172.168.216.47,节点2:172.168.224.165
【问题复现步骤】
1、安装glusterfs和nfs相关包
(1)节点1安装glusterfs相关包和nfs-utils包:dnf install glusterfs* -y
(2)节点2安装nfs-utils包:dnf install nfs-utils -y
2、节点1环境准备
mkdir -p /data/glusterfs/brick1
cp /etc/hosts /etc/hosts-bak
echo "172.168.216.47 server1" >>/etc/hosts
systemctl stop firewalld
getenforce | grep Enforcing && setenforce 0
systemctl start glusterd
3、节点2环境准备
cp /etc/hosts /etc/hosts-bak
echo '172.168.216.47 server1' >>/etc/hosts
4、查看节点1添加的磁盘名称,测试环境中为TEST_DISK=/dev/vdb
5、节点1上执行
(1)创建pv:pvcreate ${TEST_DISK}
(2)创建vg:vgcreate dummyvg ${TEST_DISK}
(3)创建thin pool:lvcreate -L 5G -T dummyvg/dummyvgpool -c 256k --poolmetadatasize 100M
(4)查看lvs:lvs -a | grep dummyvgpool
(5)创建空间为3G的thin lv:lvcreate -V 3G -T dummyvg/dummyvgpool -n dummylv
(6)创建文件系统:mkfs.ext4 /dev/dummyvg/dummylv
(7)创建brick 挂载:mount /dev/dummyvg/dummylv /data/glusterfs/brick1
(8)创建分布式卷:gluster volume create mylv server1:/data/glusterfs/brick1 force
(9)手动启用nfs,并重启volume mylv:
echo y| gluster volume set mylv nfs.disable off
gluster volume start mylv
gluster volume info mylv | grep 'Status: Started'
(10)创建测试文件:touch /data/glusterfs/brick1/test
(11)创建快照:gluster snapshot create mysnap mylv
(12)查看快照,获取快照名mysnap_name:mysnap_name=$(gluster snapshot list | grep mysnap)
6、节点2上执行:
(1)使用nfs挂载glusterfs创建的分布式卷mylv:mount -o mountproto=tcp -t nfs server1:mylv /mnt
(2)nfs挂载后查看节点1的新建的test文件是否共享成功:ls /mnt/test
(3)删除测试文件:
rm -rf /mnt/test
umount /mnt
7、节点1执行:
(1)从快照恢复
umount /mnt
echo y | gluster volume stop mylv
echo y | gluster snapshot restore "${mysnap_name}"
gluster volume start mylv
8、节点2执行:
(1)再次挂载:
mount -o mountproto=tcp -t nfs server1:mylv /mnt
ls /mnt/test
【预期结果】
步骤1-5:执行成功,分布式卷mylv创建成功,快照创建成功;
步骤6:nfs挂载glusterfs创建的分布式卷mylv成功,并能看到节点1上的测试文件test
步骤7-8:删除测试文件以后,能够成功恢复快照
【实际结果】
步骤1-5:执行成功,分布式卷mylv创建成功,快照创建成功;
步骤6:nfs挂载glusterfs创建的分布式卷mylv失败,并报错:mount.nfs: requested NFS version or transport protocol is not supported
步骤7-8:删由于步骤6失败了,此步骤执行结果全部失败
【附件信息】
Hi emily_liuliu, welcome to the openEuler Community.
I'm the Bot here serving you. You can find the instructions on how to interact with me at Here.
If you have any questions, please contact the SIG: Storage, and any of the maintainers: @liuzhiqiang , @linfeilong835 , @louhongxiang , @zero
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
根因分析:
1.glusterfs软件包在升级到10.0版本后,spec文件变动较大,gNFS作为可选子包编译在编译过程中宏未开启,OE暂不提供glusterfs-gnfs子包,不支持gnfs的相关功能。
2.gNFS相关功能配置软件包glusterfs-ganesha,是基于NFS-Ganesh提供使用glusterfs作为NFS服务端的功能,目前已在提交PR:!22:Remove unnecessary subpackages 中删除使用,不支持gnfs挂载
适配方案建议:
将脚本挂载方案更改为glusterfs方式挂载,如:
mount -o mountproto=tcp -t glusterfs server1:mylv /mnt
将脚本挂载方案更改为glusterfs方式挂载,mount -t glusterfs server1:mylv /mnt,用例执行通过:
登录 后才可以发表评论