[Gluster-devel] can mount several times
Amar S. Tumballi
amar at zresearch.com
Fri May 16 18:21:42 UTC 2008
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!
More information about the Gluster-devel
mailing list