[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-ha-dev
Subject:    Re: [Linux-ha-dev] [PATCH] RA: Filesystem -- Filesystem umount
From:       Dejan Muhamedagic <dejanmm () fastmail ! fm>
Date:       2009-04-24 14:26:14
Message-ID: 20090424142613.GD18034 () rondo ! homenet
[Download RAW message or body]

Hi,

On Fri, Apr 24, 2009 at 11:59:32AM +0200, Robert wrote:
> 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.

Many thanks for the patch, but that /proc/mounts has been evicted
before for some reasons spelled out here:

http://developerbugs.linux-foundation.org/show_bug.cgi?id=1761

So, we should analyze all the consequences before applying this.
Note also that heartbeat/pacemaker may happen to run on old
systems as well. We shouldn't break them.

Is it that /etc/mtab may contain just about any kind of
information? Of course, I do understand that /proc/mounts should
always have the correct data.

Thanks,

Dejan

> 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: Linux-HA-Dev@lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/

_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic