+++ 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>
This is not a security bug, not going to fix this in 3.6.x because of http://www.gluster.org/pipermail/gluster-users/2016-July/027682.html
If the issue persists in the latest releases, please feel free to clone them