Bug 1175694 - [SNAPSHOT]: snapshoted volume is read only but it shows rw attributes in mount
Summary: [SNAPSHOT]: snapshoted volume is read only but it shows rw attributes in mount
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: glusterd
Version: 3.6.1
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: bugs@gluster.org
QA Contact:
URL:
Whiteboard: SNAPSHOT
Depends On: 1131968 1132946
Blocks: glusterfs-3.6.2 1175692
TreeView+ depends on / blocked
 
Reported: 2014-12-18 12:12 UTC by Raghavendra Bhat
Modified: 2015-12-01 16:45 UTC (History)
4 users (show)

Fixed In Version: glusterfs-3.6.2
Doc Type: Bug Fix
Doc Text:
Clone Of: 1132946
Environment:
Last Closed: 2015-02-11 09:11:58 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Raghavendra Bhat 2014-12-18 12:12:14 UTC
+++ 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>

Comment 1 Anand Avati 2014-12-18 12:15:50 UTC
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)

Comment 2 Anand Avati 2014-12-18 14:46:58 UTC
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>

Comment 3 Raghavendra Bhat 2015-02-11 09:11:58 UTC
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


Note You need to log in before you can comment on or make changes to this bug.