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.
CHANGE: http://review.gluster.com/2915 (mgmt/glusterd: provide an option to make a volume read-only) merged in master by Vijay Bellur (vijay)
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