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 inception.lab.eng.blr.redhat.com:/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 inception.lab.eng.blr.redhat.com:/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.0.27-1.el6rhs.x86_64 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)
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.
Version : glusterfs-3.7.1-4.el6rhs.x86_64 Steps : ====== 1) Create a snapshot and activate it. gluster snapshot create S1 vol0 snapshot create: success: Snap S1_GMT-2015.06.22-11.54.18 created successfully [root@inception scripts]# gluster snapshot activate S1_GMT-2015.06.22-11.54.18 Snapshot activate: S1_GMT-2015.06.22-11.54.18: Snap activated successfully 2) Mount the snap volume on the client mount -t glusterfs 10.70.34.50:/snaps/S2_GMT-2015.06.22-12.11.15/vol0 /mnt/S2 cd /mnt/S2 [root@dhcp35-63 S2]# mkdir a mkdir: cannot create directory `a': Read-only file system 3)grep for mount attributes: mount | grep S2_GMT- 10.70.34.50:/snaps/S2_GMT-2015.06.22-12.11.15/vol0 on /mnt/S2 type fuse.glusterfs (ro,default_permissions,allow_other,max_read=131072) it shows Read-Only Marking the bug 'Verified'
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHSA-2015-1495.html