Bug 751691

Summary: mount(8) and /proc/mounts not in sync after it changed to Read Only filesystem
Product: Red Hat Enterprise Linux 5 Reporter: masanari iida <masanari_iida>
Component: util-linuxAssignee: Karel Zak <kzak>
Status: CLOSED NEXTRELEASE QA Contact: qe-baseos-daemons
Severity: low Docs Contact:
Priority: unspecified    
Version: 5.6   
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-11-07 08:28:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description masanari iida 2011-11-07 07:52:11 UTC
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:

Comment 1 Karel Zak 2011-11-07 08:28:03 UTC
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.