diff options
author | Mohammed Rafi KC <rkavunga@redhat.com> | 2017-10-12 14:31:14 +0530 |
---|---|---|
committer | mohammed rafi kc <rkavunga@redhat.com> | 2017-10-15 19:39:35 +0000 |
commit | 5aab0a11a37ec5758835ea1068b9e61ebdaccf8b (patch) | |
tree | 0a4b1261b9a481a7a8d47f0c1cf715a30256dab8 /xlators/mount/fuse/utils/mount.glusterfs.in | |
parent | 3c0b53018acfe0fec721c5e2f50141fc8b061165 (diff) |
mount/fuse : Fix parsing of vol_id for snapshot volume
For supporting sub-dir mount, we changed the volid. Which means anything
after a '/' in volume_id will be considered as sub-dir path.
But snapshot volume has vol_id stracture of /snaps/<volname>/<snapname>
which has to be considered as during the parsing.
Note 1: sub-dir mount is not supported on snapshot volume
Note 2: With sub-dir mount changes brick based mount for quota cannot be
executed via mount command. It has to be a direct call via glusterfs
Backport of>
>Change-Id: I0d824de0236b803db8a918f683dabb0cb523cb04
>BUG: 1501235
>Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
Change-Id: I0d824de0236b803db8a918f683dabb0cb523cb04
BUG: 1501238
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
(cherry picked from commit 067f38063e13fc75d4e3f7adf93441d15099c557)
Diffstat (limited to 'xlators/mount/fuse/utils/mount.glusterfs.in')
-rwxr-xr-x | xlators/mount/fuse/utils/mount.glusterfs.in | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/xlators/mount/fuse/utils/mount.glusterfs.in b/xlators/mount/fuse/utils/mount.glusterfs.in index bd6503a04e3..36b60fff316 100755 --- a/xlators/mount/fuse/utils/mount.glusterfs.in +++ b/xlators/mount/fuse/utils/mount.glusterfs.in @@ -675,8 +675,10 @@ main () [ ${first_char} = '/' ] && { volume_str_temp=$(echo "$volume_str" | cut -c 2-) } - [ $(echo $volume_str_temp | grep -c "/") -eq 1 ] && { - volume_id=$(echo "$volume_str_temp" | cut -f1 -d '/'); + volume_id_temp=$(echo "$volume_str_temp" | cut -f1 -d '/'); + [ $(echo $volume_str_temp | grep -c "/") -eq 1 ] && + [ "$volume_id_temp" != "snaps" ] && { + volume_id=$volume_id_temp; subdir_mount=$(echo "$volume_str_temp" | cut -f2- -d '/'); } } |