[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 520
  • Last Modified:

NFS write Error

I have an NFS server where /home is exported. On the Client I can mount the FS with NFS4. But I am not able to write anything on the NFS imported share.

On server:
# cat /etc/exports
/exports        *(ro,sync,insecure,root_squash,no_subtree_check,fsid=0)
/exports/home   *(rw,nohide,sync,insecure,root_squash,no_subtree_check)
# df -h |grep home
/dev/mapper/VolGroup00-home  194G   36M  184G   1% /home


On client
# df -h|grep home
Server:/home          194G   36M  184G   1% /home_new

I am able to see the files but I am not able to write to share from client

0
mnis2008
Asked:
mnis2008
  • 2
2 Solutions
 
wesly_chenCommented:
> /exports        *(ro,sync,insecure,root_squash,no_subtree_check,fsid=0)
On NFS server, take out this line.
do
# chmod 755 /exports
# exportfs -a
0
 
wesly_chenCommented:
Is this related to (root_squash) , which cause root can not write it on the client side?

By default, root_squash is set,
If you want root on the client side to be able to write to NFS mount, you need to export as no_root_squash.
However, no_root_squash will cause root user on client side to delete the files on NFS share.
0
 
ivailojCommented:
In man of "exports" is given exaple:

/home/joe       pc001(rw,all_squash,anonuid=150,anongid=100)

anonuid and anongid
              These options explicitly set the uid and gid of the anonymous account.   This  option  is  primarily  useful  for PC/NFS  clients, where you might want all requests appear to be from one user. As an example, consider the export entry for /home/joe in the example section below, which maps all requests to uid 150 (which is supposedly that of user joe).

and

/               master(rw) trusty(rw,no_root_squash)

       The  first  line  exports  the  entire  filesystem  to machines master and trusty.  In addition to write access, all uid squashing is turned off for host trusty.

0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now