[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-ha-dev
Subject: Re: [Linux-ha-dev] [patch] Filesystem RA support for tmpfs
From: Dejan Muhamedagic <dejan () suse ! de>
Date: 2011-10-03 16:12:46
Message-ID: 20111003161246.GC3750 () squib
[Download RAW message or body]
Hi,
On Sun, Oct 02, 2011 at 11:38:23AM +0200, Endre Holecz wrote:
> Hello,
>
> sorry to be somewhat late. :) The /proc/filesystem check is necessary,
> as there is no tmpfs module (compiled into the kernel, at least on
> RHEL6 and derivatives), and modprobe fails.
>
> That grep is indeed incorrect, because there are:
>
> nodev tmpfs
> nodev devtmpfs
>
> lines in /proc/filesystem.
>
> This one should work fine:
>
> grep -e "\b$FSTYPE"'$' /proc/filesystems>/dev/null
Made a somewhat different patch. Please take a look at:
commit a9e283556d299459a21605d6ab4641dd093e0f52
Author: Dejan Muhamedagic <dejan@suse.de>
Date: Mon Oct 3 18:08:45 2011 +0200
Low: Filesystem: load fs support kernel module only if necessary (thanks to Endre \
Holecz)
Signed-off-by: Dejan Muhamedagic <dejan@suse.de>
Thanks for bringing it up again.
Cheers,
Dejan
> Regards,
> Endre
>
>
>
> Hi,
>
> On Sun, Aug 28, 2011 at 02:57:25PM +0200, Endre Holecz wrote:
> > / Hi,
> />/
> />/ I needed to mount tmpfs, but the current RA would fail, so I modified
> />/ it. The params would look like this:
> />/
> />/ device="none"
> />/ fstype="tmpfs"
> />/ directory="/foo"
> />/ options="size=512m"
> />/
> />/ Changes made:
> />/
> />/ - don't check for /dev/* if fstype is tmpfs
> />/ - blockdevice="no" for tmpfs
> />/ - first check /proc/filesystems and only modprobe when necessary
> /
> The first two are apparently unrelated to the third. Unless I'm
> missing something. I'll apply all but that hunk.
>
> The /proc/filesystems check part needs fixing:
>
> grep -e "$FSTYPE"'$' /proc/filesystems
>
> If there are two filesystems sharing a suffix, that can break.
> Don't know how likely that is.
>
> Best would be to create a function, say is_fs_supported, then
> put a correct check over there.
>
> > / Patch is attached.
> /
> Many thanks for the patch.
>
> Cheers,
>
> Dejan
>
> > / Regards,
> />/ Endre Holecz
> /
> > / --- Filesystem.orig 2011-08-25 23:20:04.000000000 +0200
> />/ +++ Filesystem 2011-08-28 11:51:00.101691214 +0200
> />/ @@ -236,7 +236,7 @@
> />/ # Get the current real device name, if possible.
> />/ # (specified devname could be -L or -U...)
> />/ case "$FSTYPE" in
> />/ - nfs|smbfs|cifs|none) ;;
> />/ + nfs|smbfs|cifs|none|tmpfs) ;;
> />/ *) DEVICE=`list_mounts | grep " $MOUNTPOINT " | cut -d' ' -f1`
> />/ if [ -b "$DEVICE" ]; then
> />/ blockdevice=yes
> />/ @@ -417,7 +417,7 @@
> />/ no) false;;
> />/ ""|auto)
> />/ case $FSTYPE in
> />/ - ext4|ext4dev|ext3|reiserfs|reiser4|nss|xfs|jfs|vfat|fat|nfs|cifs|smbfs|ocfs2|gfs2|none|lustre)
> />/ + tmpfs|ext4|ext4dev|ext3|reiserfs|reiser4|nss|xfs|jfs|vfat|fat|nfs|cifs|smbfs|ocfs2|gfs2|none|lustre)
> />/ false;;
> />/ *)
> />/ true;;
> />/ @@ -461,8 +461,11 @@
> />/ if [ -z "$FSTYPE" -o "$FSTYPE" = none ]; then
> />/ : No FSTYPE specified, rely on the system has the right file-system \
> support already />/ else
> />/ - # Insert Filesystem module
> />/ - $MODPROBE $FSTYPE>/dev/null
> />/ + grep -e "$FSTYPE"'$' /proc/filesystems>/dev/null
> />/ + if [ $? -ne 0 ] ; then
> />/ + # Insert Filesystem module
> />/ + $MODPROBE $FSTYPE>/dev/null
> />/ + fi
> />/ grep -e "$FSTYPE"'$' /proc/filesystems>/dev/null
> />/ if [ $? -ne 0 ] ; then
> />/ ocf_log err "Couldn't find filesystem $FSTYPE in /proc/filesystems"
> />/ @@ -972,6 +975,8 @@
> />/ ;;
> />/ //[!/]*/*) # An SMB filesystem specification...
> />/ ;;
> />/ +none)
> />/ + ;;
> />/ /dev/null) # Special case for BSC
> />/ blockdevice=yes
> />/ ;;/
>
> _______________________________________________________
> 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