This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 798877 - [FEAT] option to create a read-only volume
[FEAT] option to create a read-only volume
Status: CLOSED CURRENTRELEASE
Product: GlusterFS
Classification: Community
Component: glusterd (Show other bugs)
mainline
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Amar Tumballi
Rahul Hinduja
:
Depends On:
Blocks: 817967
  Show dependency treegraph
 
Reported: 2012-03-01 02:20 EST by Amar Tumballi
Modified: 2013-12-18 19:07 EST (History)
3 users (show)

See Also:
Fixed In Version: glusterfs-3.4.0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-24 13:40:53 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions: glusterfs-3.3.0qa45-1.el6.x86_64
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Amar Tumballi 2012-03-01 02:20:34 EST
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 06:37:23 EDT
CHANGE: http://review.gluster.com/2915 (mgmt/glusterd: provide an option to make a volume read-only) merged in master by Vijay Bellur (vijay@gluster.com)
Comment 2 Gowrishankar Rajaiyan 2012-05-31 02:29:12 EDT
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.