diff options
author | Rajesh Amaravathi <rajesh@redhat.com> | 2012-02-01 15:52:36 +0530 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2012-02-07 02:47:21 -0800 |
commit | 1969ef17591342af2148d3a740b368f8cc6f8d5d (patch) | |
tree | bbdd7c90e458f3ad2bbcd70949383d32e6dd68ea /xlators | |
parent | b708b18b833d1f2ba4da394884bc762a821ff56b (diff) |
mount/fuse: check for existence of volfiles
If glusterd is not running in the client host and/or
if there are no volume created yet, this patch ensures
that appropriate error message is displayed
Change-Id: I15d23a45d70aa27bbdd42f435fe705b14c779e3f
BUG: 786077
Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com>
Reviewed-on: http://review.gluster.com/2708
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amar@gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators')
-rwxr-xr-x | xlators/mount/fuse/utils/mount.glusterfs.in | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/xlators/mount/fuse/utils/mount.glusterfs.in b/xlators/mount/fuse/utils/mount.glusterfs.in index 40bf4815059..40fd5781ef0 100755 --- a/xlators/mount/fuse/utils/mount.glusterfs.in +++ b/xlators/mount/fuse/utils/mount.glusterfs.in @@ -192,7 +192,7 @@ check_recursive_mount () export PATH; # check whether getfattr exists - which getfattr > /dev/null; + which getfattr > /dev/null 2>&1; if [ $? -ne 0 ]; then return; fi @@ -204,7 +204,14 @@ check_recursive_mount () fi # check if the mount point is a brick's parent directory - brick_path=(`cat /etc/glusterd/vols/*/bricks/* | grep ^path | cut -d "=" -f 2`); + GLUSTERD_WORKDIR="/etc/glusterd"; + + ls -L "$GLUSTERD_WORKDIR"/vols/*/bricks/* > /dev/null 2>&1; + if [ $? -ne 0 ]; then + return; + fi + + brick_path=(`grep ^path "$GLUSTERD_WORKDIR"/vols/*/bricks/* | cut -d "=" -f 2`); root_inode=`stat -Lc %i /`; root_dev=`stat -Lc %d /`; mnt_inode=`stat -Lc %i $mnt_dir`; |