Bug 751691 - mount(8) and /proc/mounts not in sync after it changed to Read Only filesystem
Summary: mount(8) and /proc/mounts not in sync after it changed to Read Only filesystem
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: util-linux
Version: 5.6
Hardware: All
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: Karel Zak
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-07 07:52 UTC by masanari iida
Modified: 2011-11-07 08:28 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-11-07 08:28:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.