Bug 798877 - [FEAT] option to create a read-only volume
Summary: [FEAT] option to create a read-only volume
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: glusterd
Version: mainline
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: Amar Tumballi
QA Contact: Rahul Hinduja
URL:
Whiteboard:
Depends On:
Blocks: 817967
TreeView+ depends on / blocked
 
Reported: 2012-03-01 07:20 UTC by Amar Tumballi
Modified: 2013-12-19 00:07 UTC (History)
3 users (show)

Fixed In Version: glusterfs-3.4.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-07-24 17:40:53 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions: glusterfs-3.3.0qa45-1.el6.x86_64
Embargoed:


Attachments (Terms of Use)

Description Amar Tumballi 2012-03-01 07:20:34 UTC
Description of problem:
Currently, one can make a mount point which is 'ro' (through -oro for mount, or --read-only for glusterfs process), but there is no way one can make a volume readonly, ie, whatever a volume exports itself is readonly.

Comment 1 Anand Avati 2012-03-14 10:37:23 UTC
CHANGE: http://review.gluster.com/2915 (mgmt/glusterd: provide an option to make a volume read-only) merged in master by Vijay Bellur (vijay)

Comment 2 Gowrishankar Rajaiyan 2012-05-31 06:29:12 UTC
Node 1:
[root@dhcp201-221 ~]# gluster volume set test2 read-only on
Set volume successful
[root@dhcp201-221 ~]# 

Node 2:
[root@dhcp201-214 ~]# mount -t glusterfs dhcp201-221.englab.pnq.redhat.com:test2 /export/mount/shanks2
[root@dhcp201-214 ~]# cd /export/mount/shanks2
[root@dhcp201-214 shanks2]# touch a
touch: cannot touch `a': Read-only file system
[root@dhcp201-214 shanks2]# 
[root@dhcp201-214 ~]# umount /export/mount/shanks2

Node 1:
[root@dhcp201-221 ~]# gluster volume set test2 read-only off
Set volume successful
[root@dhcp201-221 ~]# gluster volume stop test2
Stopping volume will make its data inaccessible. Do you want to continue? (y/n) y
Stopping volume test2 has been successful
[root@dhcp201-221 ~]# gluster volume start test2
Starting volume test2 has been successful
[root@dhcp201-221 ~]# 

Node 2:
[root@dhcp201-214 ~]# mount -t glusterfs dhcp201-221.englab.pnq.redhat.com:test2 /export/mount/shanks2
[root@dhcp201-214 ~]# 
[root@dhcp201-214 ~]# cd /export/mount/shanks2
[root@dhcp201-214 shanks2]# touch a
[root@dhcp201-214 shanks2]# ls -l
total 4
-rw-r--r--. 1 root root 0 May 31 04:55 a
[root@dhcp201-214 shanks2]# 

Verified in version: glusterfs-3.3.0qa45-1.el6.x86_64


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