Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1131968 - [SNAPSHOT]: snapshoted volume is read only but it shows rw attributes in mount
[SNAPSHOT]: snapshoted volume is read only but it shows rw attributes in mount
Status: CLOSED ERRATA
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: snapshot (Show other bugs)
3.0
x86_64 Linux
high Severity medium
: ---
: RHGS 3.1.0
Assigned To: Vijaikumar Mallikarjuna
Rahul Hinduja
SNAPSHOT
:
Depends On:
Blocks: 1132946 1175692 1175694 1202842 1223636
  Show dependency treegraph
 
Reported: 2014-08-20 08:17 EDT by Rahul Hinduja
Modified: 2016-09-17 09:05 EDT (History)
8 users (show)

See Also:
Fixed In Version: glusterfs-3.7.0-3.el6rhs
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1132946 (view as bug list)
Environment:
Last Closed: 2015-07-29 00:35:19 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:1495 normal SHIPPED_LIVE Important: Red Hat Gluster Storage 3.1 update 2015-07-29 04:26:26 EDT

  None (edit)
Description Rahul Hinduja 2014-08-20 08:17:18 EDT
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)
Comment 2 Vijaikumar Mallikarjuna 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.
Comment 5 senaik 2015-06-22 08:22:26 EDT
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'
Comment 7 errata-xmlrpc 2015-07-29 00:35:19 EDT
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

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