Wind River Support Network

HomeDefectsLIN6-14724
Fixed

LIN6-14724 : sync option doesn't work for nfsv4 on wrl6

Created: Jul 12, 2018    Updated: Dec 16, 2018
Resolved Date: Nov 18, 2018
Found In Version: 6.0.0.17
Fix Version: 6.0.0.38
Severity: Standard
Applicable for: Wind River Linux 6
Component/s: Kernel, Networking

Description

We are using nfs server cent-os 7 and as nfs client wrl6

NFS mounts by default a-synchronous, the “mount -v” printout or /proc/mounts does not explicitly report a-sync mounts.
If wanted we can mount synchronously by specifying mount opion “sync”, this option is reported in the “mount -v” and /proc/mounts printouts.

However we have discovered that we cannot execute a synchronous mount when using NFS version 4 – NFS 3 works just fine

Example of NFS 3 synchronous mount (so successful situation)
root@mEB42:/usr/asm/data.EB42> mount 40.40.40.2:/another_XFS /mountpoint -o nfsvers=3,sync
root@mEB42:/usr/asm/data.EB42> mount -v | grep another_XFS
40.40.40.2:/another_XFS on /mountpoint type nfs (rw,relatime,sync,vers=3,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=40.40.40.2,mountvers=3,mountport=20048,mountproto=udp,local_lock=none,addr=40.40.40.2)
root@mEB42:/usr/asm/data.EB42> grep -i mountpoint /proc/mounts
40.40.40.2:/another_XFS /mountpoint nfs rw,sync,relatime,vers=3,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=40.40.40.2,mountvers=3,mountport=20048,mountproto=udp,local_lock=none,addr=40.40.40.2 0 0
root@mEB42:/usr/asm/data.EB42>
root@mEB42:/usr/asm/data.EB42> umount /mountpoint/

A-synchronous mount is not reported (which is correct because this is the default)
root@mEB42:/usr/asm/data.EB42> mount 40.40.40.2:/another_XFS /mountpoint -o nfsvers=3,async
root@mEB42:/usr/asm/data.EB42> mount -v | grep another_XFS
40.40.40.2:/another_XFS on /mountpoint type nfs (rw,relatime,vers=3,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=40.40.40.2,mountvers=3,mountport=20048,mountproto=udp,local_lock=none,addr=40.40.40.2)
root@mEB42:/usr/asm/data.EB42> grep -i mountpoint /proc/mounts
40.40.40.2:/another_XFS /mountpoint nfs rw,relatime,vers=3,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=40.40.40.2,mountvers=3,mountport=20048,mountproto=udp,local_lock=none,addr=40.40.40.2 0 0
root@mEB42:/usr/asm/data.EB42> umount /mountpoint

Attempt to synchronous mount by using NFS version 4 – “sync” option is not reported in the printouts
root@mEB42:/usr/asm/data.EB42> mount 40.40.40.2:/another_XFS /mountpoint -o nfsvers=4,sync
root@mEB42:/usr/asm/data.EB42> mount -v | grep another_XFS
40.40.40.2:/another_XFS on /mountpoint type nfs4 (rw,relatime,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=40.40.40.1,local_lock=none,addr=40.40.40.2)
root@mEB42:/usr/asm/data.EB42> grep -i mountpoint /proc/mounts
40.40.40.2:/another_XFS /mountpoint nfs4 rw,relatime,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=40.40.40.1,local_lock=none,addr=40.40.40.2 0 0
root@mEB42:/usr/asm/data.EB42>
root@mEB42:/usr/asm/data.EB42> umount /mountpoint/

A-synchronous mount is not reported (which is correct because this is the default)
root@mEB42:/usr/asm/data.EB42> mount 40.40.40.2:/another_XFS /mountpoint -o nfsvers=4,async
root@mEB42:/usr/asm/data.EB42> mount -v | grep another_XFS
40.40.40.2:/another_XFS on /mountpoint type nfs4 (rw,relatime,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=40.40.40.1,local_lock=none,addr=40.40.40.2)
root@mEB42:/usr/asm/data.EB42> grep -i mountpoint /proc/mounts
40.40.40.2:/another_XFS /mountpoint nfs4 rw,relatime,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=40.40.40.1,local_lock=none,addr=40.40.40.2 0 0
root@mEB42:/usr/asm/data.EB42>

We also ran file IO tests after we executed a NFS4 synchronous and a-synchronous mount to check if maybe only the reporting was missing.
However we see same IO results when using synchronous and asynchronous mounts via NFS4 which would mean that synchronous mount is not working at all when using NFS4. 

Steps to Reproduce

See description for clinet side steps.

Server side configuration in exports is this:

[root@localhost ~]# exportfs -v

/atlnfs         20.20.20.1(rw,wdelay,no_root_squash,no_subtree_check,sec=sys,rw,secure,no_root_squash,no_all_squash)

/datanfs        20.20.20.1(rw,wdelay,no_root_squash,no_subtree_check,sec=sys,rw,secure,no_root_squash,no_all_squash)

/10Gb_xfs_nolog

                20.20.20.1(rw,wdelay,no_root_squash,no_subtree_check,sec=sys,rw,secure,no_root_squash,no_all_squash)

/1Gb_xfs_nolog  30.30.30.1(rw,wdelay,no_root_squash,no_subtree_check,sec=sys,rw,secure,no_root_squash,no_all_squash)

/10Gb_ext4_incllog

                20.20.20.1(rw,wdelay,no_root_squash,no_subtree_check,sec=sys,rw,secure,no_root_squash,no_all_squash)

/1Gb_ext4_incllog

                30.30.30.1(rw,wdelay,no_root_squash,no_subtree_check,sec=sys,rw,secure,no_root_squash,no_all_squash)

/10Gb_ext4_nolog

                20.20.20.1(rw,wdelay,no_root_squash,no_subtree_check,sec=sys,rw,secure,no_root_squash,no_all_squash)

/mybtrfs        20.20.20.1(rw,wdelay,no_root_squash,no_subtree_check,sec=sys,rw,secure,no_root_squash,no_all_squash)

/1Gb_ext4_nolog

                30.30.30.1(rw,wdelay,no_root_squash,no_subtree_check,sec=sys,rw,secure,no_root_squash,no_all_squash)

/myramdisk      20.20.20.1(rw,wdelay,no_root_squash,no_subtree_check,fsid=100,sec=sys,rw,secure,no_root_squash,no_all_squash)

/myramdisk2     30.30.30.1(rw,wdelay,no_root_squash,no_subtree_check,fsid=100,sec=sys,rw,secure,no_root_squash,no_all_squash)

/testnfs        20.20.20.1(rw,wdelay,no_root_squash,no_subtree_check,slec=sys,rw,secure,no_root_squash,no_all_squash)

/another_XFS    40.40.40.1(rw,wdelay,no_root_squash,no_subtree_check,sec=sys,rw,secure,no_root_squash,no_all_squash)

Other Downloads


Live chat
Online