Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

When I mount using the sync option:

sudo mount -o vers=4,soft,sync,sec=none -t nfs 192.168.1.198:/js.js /mnt/self

the sync option doesn't seem to get applied:

$ cat /proc/mounts | grep nfs
192.168.1.198:/js.js /mnt/self nfs4 rw,relatime,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,soft,proto=tcp,port=0,timeo=600,retrans=2,sec=null,clientaddr=192.168.1.198,local_lock=none,addr=192.168.1.198 0 0

However, if I use the noac option, which implies sync:

sudo mount -o vers=4,soft,noac,sec=none -t nfs 192.168.1.198:/js.js /mnt/self

then I do see it being applied:

$ cat /proc/mounts | grep nfs
192.168.1.198:/js.js /mnt/self nfs4 rw,sync,relatime,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,acregmin=0,acregmax=0,acdirmin=0,acdirmax=0,soft,noac,proto=tcp,port=0,timeo=600,retrans=2,sec=null,clientaddr=192.168.1.198,local_lock=none,addr=192.168.1.198 0 0

Also, if I mount the root of the server instead of a subdirectory:

sudo mount -o vers=4,sync,sec=none -t nfs 192.168.1.198:/ /mnt/self

then I also see the sync option being applied:

$ cat /proc/mounts | grep nfs
192.168.1.198:/ /mnt/self nfs4 rw,sync,relatime,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=null,clientaddr=192.168.1.198,local_lock=none,addr=192.168.1.198 0 0

This is with kernel 3.8.0-28-generic on Ubuntu. When I try the same thing using 2.6.32 on CentOS, the sync option is applied in all cases.

How do I enable sync mode without noac mode in newer versions of the kernel and when mounting a subdirectory?

share|improve this question
    
Please describe what you want to achieve –  tigran Jul 21 '14 at 8:05
    
The question at the end of the post: How do I enable sync mode without noac mode in newer versions of the kernel and when mounting a subdirectory? –  jterrace Jul 21 '14 at 14:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.