Description of problem: mount(8) and /proc/mounts not in sync after changed to read only mount. Version-Release number of selected component (if applicable): util-linux-2.13-0.56.el5 How reproducible: Always Steps to Reproduce: 2 cluster node with 1 shared disk. The shared lun has an ext3 filesystem. 1. Mount the LUN from node0. 2. copy large files to the LUN 3. From node1, use sg_persist command to clear the reservation while copying the data. And take over the reservation to node1. 4. The process which was copying a file to shared disk was blocked. And the filesystem changes to Read Only mount. This is expected behavior. 5. Check the mount command output on node0. Actual results: Only /proc/mounts shows read only mount. mount output /dev/sde1 on /mnt5 type ext3 (rw) <== wrong /proc/mounts output /dev/sde1 /mnt5 ext3 ro,data=ordered 0 0 Expected results: Both mount and /proc/mounts shows sde1 as read-only mount. mount output /dev/sde1 on /mnt5 type ext3 (ro) /proc/mounts output /dev/sde1 /mnt5 ext3 ro,data=ordered 0 0 Additional info:
This is well known issue. man mount: It is possible that files /etc/mtab and /proc/mounts don't match. The first file is based only on the mount command options, but the content of the second file also depends on the kernel and others settings (e.g. remote NFS server. In particular case the mount command may reports unreliable information about a NFS mount point and the /proc/mounts file usually contains more reliable information.) Sorry, but this problem cannot be fixed. The real solution is to remove /etc/mtab and use kernel (/proc/mounts) as a source about filesystems information. This solution will be used in RHEL7.