Description of problem:
On an NFSv4 cluster that uses bind mounts to arrange cluster controlled file systems in the NFS root, this causes consistent warnings from clurgmgrd:
Sep 28 14:33:12 node1 clurgmgrd: : <warning> Device /dev/nfsvg/fs1lv is mounted on /nfsroot/fs1 instead of /fs1
Sep 28 14:33:12 node1 clurgmgrd: : <warning> Device /dev/nfsvg/fs2lv is mounted on /nfsroot/fs2 instead of /fs2
Sep 28 14:33:12 node1 clurgmgrd: : <warning> Device /dev/nfsvg/fs3lv is mounted on /nfsroot/fs3 instead of /fs3
Version-Release number of selected component (if applicable):
RHEL 5.4 x86
Steps to Reproduce:
1. Create an ext3 file system resource in the cluster config, assign to a service and activate that service.
2. Create a bind mount that makes that file system available somewhere else in the directory hierarchy.
Clurgmgrd will start complaining into /var/log/messages that the file system is mounted in a location that differs from the cluster configuration.
The fs resource script should ignore the bind mount. No warnings should be generated in this case.
Cluster script fs.sh doesn't exclude bind mounts in the isMounted() function. The /proc/mounts source it uses to determine mount points doesn't provide sufficient information to distinguish a real mount point from a bind mount point.
The way bind mounts work is actually more accurately reflected in /proc/mounts than in /etc/mtab (or the output of the 'mount' command).
mount -t ext3 /dev/sdb3 /foo
mount -o bind /foo /mnt/tmp
... the output of 'mtab' is nonsensical: you have something for which you have no record (/foo) now bind-mounted on /mnt/tmp.
Consequently, the only solution to this problem without causing very strange behavior in some cases is to simply remove the warning message.
Actually, here's a more correct fix:
- check all mounts
- if we are mounted in the right place, return success
- if not, log a warning w/ the last-read (incorrect) mount point
This will catch the case where an administrator umounts the original mount point but has other locations bind-mounted. The side effect is that only one bind mount will be logged per incident.
The 'start' phase was producing an incorrect warning as a result of the previous patch; this fixes it.
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.