summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorvmallika <vmallika@redhat.com>2014-10-08 12:26:37 +0530
committerRaghavendra Bhat <raghavendra@redhat.com>2014-12-18 06:46:54 -0800
commitf0a90bf48135c480c41a71ef25f46619001a3116 (patch)
tree491b071af33c02ad8d19e09a044efd150b2d0380 /xlators
parent2372a9ed54f6e30e3ac744e1daf8ec379dd236ae (diff)
glusterd/snapshot: mount snapshot volume with read-only option
Snapshot volumes are readonly. If you mount the volume to the client it doesn't allow writes, but its attributes are rw which contradicts the functionality. mount script should set read-only attributes for snapshot volumes. > Change-Id: I056253abd8dfe7b2b43a064fbdbd9c16b8eca679 > BUG: 1132946 > Signed-off-by: vmallika <vmallika@redhat.com> > Reviewed-on: http://review.gluster.org/8518 > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Avra Sengupta <asengupt@redhat.com> > Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> > Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> > Tested-by: Krishnan Parthasarathi <kparthas@redhat.com> > Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Change-Id: Ida7340ea18a558cd15f25f2787a9794e287b17bd BUG: 1175694 Reviewed-on: http://review.gluster.org/9296 Reviewed-by: Vijaikumar Mallikarjuna <vmallika@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Tested-by: Raghavendra Bhat <raghavendra@redhat.com>
Diffstat (limited to 'xlators')
-rwxr-xr-xxlators/mount/fuse/utils/mount.glusterfs.in5
1 files changed, 5 insertions, 0 deletions
diff --git a/xlators/mount/fuse/utils/mount.glusterfs.in b/xlators/mount/fuse/utils/mount.glusterfs.in
index c8c32c66eb6..d491cc33c89 100755
--- a/xlators/mount/fuse/utils/mount.glusterfs.in
+++ b/xlators/mount/fuse/utils/mount.glusterfs.in
@@ -638,6 +638,11 @@ EOF
exit 32;
fi
+ #Snapshot volumes are mounted read only
+ case $volume_id in
+ /snaps/* ) read_only=1
+ esac
+
check_recursive_mount "$mount_point";
update_updatedb;