Hide Forgot
Related to this (http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2005) bug: When trying to create a volume that includes read-only bricks (such as a filesystem that is mounted read-only), an error message in the logs to the effect of "You just tried to create a volume that includes read-only bricks. This will probably fail in exciting and frustrating ways" would be extremely valuable.
PATCH: http://patches.gluster.com/patch/7059 in master (Detect read-only filesystem and fail the brick creation operation.)
PATCH: http://patches.gluster.com/patch/7060 in master (posix: glusterfs.test should be removed xattr immediately after use.)
The fix checks if the backend filesystem is read-only and if it supports extended attributes (xattrs). Steps to verify the fix: - Try to create a volume with a read-only filesystem - Try to create a volume with a filesytem that has rw permissions but does not support xattr. You must see appropriate error messages and log of the same. Also check if the xattr trusted.glusterfs.test is *not* present in the backend filesystem, after glusterfsd has started.
When the backend is read-only file system, gluster volume create should fail. In this case, # gluster volume create <- succeeds. # gluster volume start <- appears to succeed # gluster volume info Volume Name: test Type: Distribute Status: Started Number of Bricks: 1 Transport-type: tcp Bricks: Brick1: odin:/mnt/stripe Shows started (but it is not started). mount -t glusterfs <- succeeds (appears to!). # ls /mnt/point ls: cannot access /mnt/point: Transport endpoint is not connected It is only now that we come to know something is wrong and figure out backend file system is read-only and has to be fixed. Is it possible to throw error message during volume create stating read-only file system?
Comments above.
PATCH: http://patches.gluster.com/patch/7820 in master (Fail volume creation on existing directories of a read-only file system.)
The steps to reproduce remain as before.
works on master, 2nd & 3rd patch needs to be pushed for 3.1 & 3.2 branches as well.
According to Vijay & Avati, not required to back-port the patches.
root@Dagobah:~# gluster volume create rovol dagobah:/data/export5/ glusterfs is not supported on brick: dagobah:/data/export5. Setting extended attributes failed, reason: Read-only file system.