[Bugs] [Bug 1175692] New: [SNAPSHOT]: snapshoted volume is read only but it shows rw attributes in mount

bugzilla at redhat.com bugzilla at redhat.com
Thu Dec 18 12:10:31 UTC 2014


https://bugzilla.redhat.com/show_bug.cgi?id=1175692

            Bug ID: 1175692
           Summary: [SNAPSHOT]: snapshoted volume is read only but it
                    shows rw attributes in mount
           Product: GlusterFS
           Version: 3.6.1
         Component: glusterd
          Severity: medium
          Assignee: bugs at gluster.org
          Reporter: rabhat at redhat.com
                CC: bugs at gluster.org, gluster-bugs at redhat.com,
                    rhinduja at redhat.com, vmallika at redhat.com
        Depends On: 1131968, 1132946



+++ 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 at wingo ~]# mount -t glusterfs 
hostname1:/snaps/snap1/vol1 /mnt/snap1
[root at wingo ~]# 

#cd to the mount
[root at wingo ~]# cd /mnt/snap1

#Try to create a dir
[root at wingo snap1]# mkdir a
mkdir: cannot create directory `a': Read-only file system
[root at wingo snap1]# 

Note: The snap volume is mounted as readonly file system

#Look for the mount attributes

[root at 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 at redhat.com)

--- 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 at redhat.com)

--- 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 at redhat.com) 
------
commit 60f12e0eaf11a42f3f5ee8978ba540bbb6c8aadb
Author: vmallika <vmallika at redhat.com>
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 at redhat.com>
    Reviewed-on: http://review.gluster.org/8518
    Tested-by: Gluster Build System <jenkins at build.gluster.com>
    Reviewed-by: Avra Sengupta <asengupt at redhat.com>
    Reviewed-by: Rajesh Joseph <rjoseph at redhat.com>
    Reviewed-by: Krishnan Parthasarathi <kparthas at redhat.com>
    Tested-by: Krishnan Parthasarathi <kparthas at redhat.com>


Referenced Bugs:

https://bugzilla.redhat.com/show_bug.cgi?id=1131968
[Bug 1131968] [SNAPSHOT]: snapshoted volume is read only but it shows rw
attributes in mount
https://bugzilla.redhat.com/show_bug.cgi?id=1132946
[Bug 1132946] [SNAPSHOT]: snapshoted volume is read only but it shows rw
attributes in mount
-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the Bugs mailing list