Re: can mount several times

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Somehow missed to commit this patch.
Thanks Matthias for patch. It was very helpful.


>
> --- glusterfs-1.3.8.orig/glusterfs-fuse/utils/mount.glusterfs.in
> 2008-01-08 12:49:35.000000000 +0100
> +++ glusterfs-1.3.8/glusterfs-fuse/utils/mount.glusterfs.in
> 2008-01-08 13:44:30.000000000 +0100
> @@ -121,6 +121,12 @@ main ()
>     # $2=$(echo "$@" | sed -n 's/[^ ]* \([^ ]*\).*/\1/p');
>     mount_point="$2";
> +
> +    # Simple check to avoid multiple identical mounts
> +    if grep -q "glusterfs $mount_point fuse" /etc/mtab; then
> +        echo "$0: according to mtab, a glusterfs is already mounted on
> $mount_point"
> +        exit 1
> +    fi
>
>     fs_options=$(echo "$fs_options,$new_fs_options");
>
> This is probably not portable at all (tested only on Fedora/RHEL), and
> I'm sure there must be a much more elegant way to fix the problem ;-)
>
> Matthias
>
>
Regards,
-- 
Amar Tumballi
Gluster/GlusterFS Hacker
[bulde on #gluster/irc.gnu.org]
http://www.zresearch.com - Commoditizing Super Storage!


[Index of Archives]     [Gluster Users]     [Ceph Users]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux