+++ This bug was initially created as a clone of Bug #1132946 +++ +++ This bug was initially created as a clone of Bug #1131968 +++ Description of problem: ======================= When a snapshot of a volume is created, it is readonly volume. If you mount the volume to the client it doesn't allow writes, but its attributes are rw which contradicts the functionality. For example, snap1 is the snapshoted volume #mount the snap volume [root@wingo ~]# mount -t glusterfs hostname1:/snaps/snap1/vol1 /mnt/snap1 [root@wingo ~]# #cd to the mount [root@wingo ~]# cd /mnt/snap1 #Try to create a dir [root@wingo snap1]# mkdir a mkdir: cannot create directory `a': Read-only file system [root@wingo snap1]# Note: The snap volume is mounted as readonly file system #Look for the mount attributes [root@wingo ~]# mount | grep snap1 hostname1:/snaps/snap1/vol1 on /mnt/snap1 type fuse.glusterfs (rw,default_permissions,allow_other,max_read=131072) The mount attributes are rw which means it is allowed to read and write as well. It should be ro(readonly) Version-Release number of selected component (if applicable): ============================================================= glusterfs-3.6.1 How reproducible: ================= always Steps to Reproduce: =================== 1. Create a snapshot of a volume 2. Mount the snap volume to the client 3. Grep for mount attributes Actual results: =============== mount attributes are shown as (rw) Expected results: ================= mount attributes should show (ro) --- Additional comment from RHEL Product and Program Management on 2014-08-20 08:32:25 EDT --- Since this issue was entered in bugzilla, the release flag has been set to ? to ensure that it is properly evaluated for this release. --- Additional comment from Vijaikumar Mallikarjuna on 2014-08-22 07:48:37 EDT --- We are mounting snapshot bricks with 'rw' options because when snapshots are activated, during brick start-up some xlators like 'posix xlators' tries to set xattrs and this will fail if the bricks are mounted readonly. --- Additional comment from Anand Avati on 2014-08-22 08:10:00 EDT --- REVIEW: http://review.gluster.org/8518 (glusterd: mount lvm snapshot with readonly option) posted (#1) for review on master by Vijaikumar Mallikarjuna (vmallika) --- Additional comment from Anand Avati on 2014-10-08 03:00:41 EDT --- REVIEW: http://review.gluster.org/8518 (glusterd/snapshot: mount snapshot volume with read-only option) posted (#2) for review on master by Vijaikumar Mallikarjuna (vmallika) --- Additional comment from Anand Avati on 2014-11-11 00:33:12 EST --- COMMIT: http://review.gluster.org/8518 committed in master by Krishnan Parthasarathi (kparthas) ------ commit 60f12e0eaf11a42f3f5ee8978ba540bbb6c8aadb Author: vmallika <vmallika> Date: Wed Oct 8 12:26:37 2014 +0530 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> Reviewed-on: http://review.gluster.org/8518 Tested-by: Gluster Build System <jenkins.com> Reviewed-by: Avra Sengupta <asengupt> Reviewed-by: Rajesh Joseph <rjoseph> Reviewed-by: Krishnan Parthasarathi <kparthas> Tested-by: Krishnan Parthasarathi <kparthas>
REVIEW: http://review.gluster.org/9296 (glusterd/snapshot: mount snapshot volume with read-only option) posted (#1) for review on release-3.6 by Raghavendra Bhat (raghavendra)
COMMIT: http://review.gluster.org/9296 committed in release-3.6 by Raghavendra Bhat (raghavendra) ------ commit f0a90bf48135c480c41a71ef25f46619001a3116 Author: vmallika <vmallika> Date: Wed Oct 8 12:26:37 2014 +0530 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> > Reviewed-on: http://review.gluster.org/8518 > Tested-by: Gluster Build System <jenkins.com> > Reviewed-by: Avra Sengupta <asengupt> > Reviewed-by: Rajesh Joseph <rjoseph> > Reviewed-by: Krishnan Parthasarathi <kparthas> > Tested-by: Krishnan Parthasarathi <kparthas> > Signed-off-by: Raghavendra Bhat <raghavendra> Change-Id: Ida7340ea18a558cd15f25f2787a9794e287b17bd BUG: 1175694 Reviewed-on: http://review.gluster.org/9296 Reviewed-by: Vijaikumar Mallikarjuna <vmallika> Tested-by: Gluster Build System <jenkins.com> Reviewed-by: Raghavendra Bhat <raghavendra> Tested-by: Raghavendra Bhat <raghavendra>
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.6.2, please reopen this bug report. glusterfs-3.6.2 has been announced on the Gluster Developers mailinglist [1], packages for several distributions should already be or become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution. The fix for this bug likely to be included in all future GlusterFS releases i.e. release > 3.6.2. [1] http://thread.gmane.org/gmane.comp.file-systems.gluster.devel/5978 [2] http://news.gmane.org/gmane.comp.file-systems.gluster.user [3] http://thread.gmane.org/gmane.comp.file-systems.gluster.devel/6137