Hello,
attached a fix for resource agent "heartbeat/Filesystem" to use
/proc/mounts first for checking mount state of filesystem.
Problem: If /etc/mtab is accidentialy overwritten (sync from wrong
system etc.) the resource agents might use legacy information. /proc/
seems to be more reliable.
Regards,
Robert
--- /usr/lib/ocf/resource.d/heartbeat/Filesystem 2008-08-25
14:09:11.000000000 +0200
+++ /usr/lib/ocf/resource.d/ui/Filesystem 2009-04-24 11:44:28.794244106
+0200
@@ -179,7 +179,13 @@
# Take advantage of /etc/mtab if present, use portable mount command
# otherwise. Normalize format to "dev mountpoint fstype".
+# Note: We use /proc/mounts fist, because this survives
+# badly synced or manually edited /etc/mtab
list_mounts() {
+ if [ -e "/proc/mounts" ]; then
+ cut -d' ' -f1,2,3 </proc/mounts
+ return
+ fi
if [ -f "/etc/mtab" -a -r "/etc/mtab" ]; then
cut -d' ' -f1,2,3 </etc/mtab
else
_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/