Archive for 八月, 2021


1、使用NFSv4.1以上协议来挂载
2、更改主机名为不重复的
3、modprobe nfs nfs4_unique_id=$RANDOM && echo “options nfs nfs4_unique_id=$RANDOM” > /etc/modprobe.d/nfsc.conf
4、mount.nfs -v -o migration 1.1.1.1:/test /xxx

以上4种方法都能解决centos7高版本挂载NFSv4.0协议读写报错的问题。

原因是NFSv4.0使用SETCLIENTID来区分用户,而NFSv4.1以上使用EXCHANGE_ID来区别用户。

sed -i ‘s/$releasever/6.10/g’ /etc/yum.repos.d/CentOS-Base.repo
sed -i ‘s/centos/centos-vault/g’ /etc/yum.repos.d/CentOS-Base.repo

sed -i ‘s/epel/epel-archive/g’ /etc/yum.repos.d/epel.repo