linux挂载nfs显示nobady,CentOS-6.x配置NFS时,客户端UID显示为nobody的解决办法

linux挂载nfs显示nobady,CentOS-6.x配置NFS时,客户端UID显示为nobody的解决办法CentOS6 x 的 NFS 配置跟 CentOS5 x 不太一样 不光是安装包及服务名变了 还总有各种古怪的事情 今天遇到了 NFS 客户端 mount NFS 之后目录的属主变成了 nobody nobody 折腾了半天 终于找到了解决办法 本次案例 OS CentOS 6 5

大家好,我是讯享网,很高兴认识大家。

CentOS6.x的NFS配置跟CentOS5.x不太一样,不光是安装包及服务名变了,还总有各种古怪的事情,今天遇到了NFS客户端mount NFS之后目录的属主变成了nobody:nobody,折腾了半天,终于找到了解决办法:

本次案例:

OS: CentOS-6.5

NFS Server: 192.168.100.101 nfsserver.sudops.com

NFS Client: 192.168.100.102 nfsclient.sudops.com

服务端配置:

# cat /etc/exports

/data/storage 192.168.100.0/255.255.255.0(rw,sync,all_squash,anonuid=0,anongid=0)

# cat /etc/idmapd.conf

[General]

#Verbosity = 0

# The following should be set to the local NFSv4 domain name

# The default is the host's DNS domain name.

#Domain = local.domain.edu

1

2

3

4

5

6

7

8

9

# cat /etc/exports

/data/storage192.168.100.0/255.255.255.0(rw,sync,all_squash,anonuid=0,anongid=0)

# cat /etc/idmapd.conf

[General]

#Verbosity = 0

# The following should be set to the local NFSv4 domain name

# The default is the host's DNS domain name.

#Domain = local.domain.edu

改成

[General]

#Verbosity = 0

# The following should be set to the local NFSv4 domain name

# The default is the host's DNS domain name.

#Domain = local.domain.edu

Domain = sudops.com

1


讯享网

2

3

4

5

6

[General]

#Verbosity = 0

# The following should be set to the local NFSv4 domain name

# The default is the host's DNS domain name.

#Domain = local.domain.edu

Domain=sudops.com

重启NFS服务端

# /etc/init.d/nfs restart

# /etc/init.d/rpcbind restart

# /etc/init.d/rpcidmapd restart

1

2

3

# /etc/init.d/nfs restart

# /etc/init.d/rpcbind restart

# /etc/init.d/rpcidmapd restart

客户端配置:

跟服务端一样也要修改/etc/idmapd.conf

重启客户端应用

# /etc/init.d/rpcbind restart

# /etc/init.d/rpcidmapd restart

1

2

# /etc/init.d/rpcbind restart

# /etc/init.d/rpcidmapd restart

重新mount

# umount -l /local/storage

# mount -t nfs 192.168.100.101:/data/storage/ /local/storage

1

2

# umount -l /local/storage

# mount -t nfs 192.168.100.101:/data/storage/ /local/storage

这次终于跟NFS的export目录属主保持一致啦!

小讯
上一篇 2025-01-16 16:05
下一篇 2025-02-21 23:10

相关推荐

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容,请联系我们,一经查实,本站将立刻删除。
如需转载请保留出处:https://51itzy.com/kjqy/40357.html