I find a strange problem when I remount nfs in RHEL7.
I have shared 2 directories on nfs-server:
# showmount -e
Export list for localhost.localdomain:
/file2 192.168.122.1
/file1 192.168.122.1
Then I mount them on my client:
# sudo mount 192.168.122.100:/file2 /media
# sudo mount 192.168.122.100:/file1 /mnt/file1
# mount
192.168.122.100:/file1 on /mnt/file1 type nfs4 (rw,relatime,vers=4.0,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=192.168.122.1,local_lock=none,addr=192.168.122.100)
192.168.122.100:/file2 on /media type nfs4 (rw,relatime,vers=4.0,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=192.168.122.1,local_lock=none,addr=192.168.122.100)
Then I try remount one of them to ro:
# sudo mount -o ro,remount /mnt/file1/
That is the time strange thing happened, both of them changed to ro:
192.168.122.100:/file1 on /mnt/file1 type nfs4 (ro,relatime,vers=4.0,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=192.168.122.1,local_lock=none,addr=192.168.122.100)
192.168.122.100:/file2 on /media type nfs4 (ro,relatime,vers=4.0,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=192.168.122.1,local_lock=none,addr=192.168.122.100)
I have captured some packets, but I find no packet sent when remount.
I just have no idea now, is there anyone can help me?
Thanks.