Bug 764341 (GLUSTER-2609)

Summary: Error message not properly provided when trying to create a volume from a read-only source
Product: [Community] GlusterFS Reporter: Matt Harris <matthaeus.harris>
Component: loggingAssignee: krishnan parthasarathi <kparthas>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3.1.3CC: gluster-bugs, jdarcy, nsathyan, rahulcs, sac
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: RTP Mount Type: ---
Documentation: DP CRM:
Verified Versions: master Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Matt Harris 2011-03-29 18:22:19 UTC
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.

Comment 1 Anand Avati 2011-05-09 17:26:39 UTC
PATCH: http://patches.gluster.com/patch/7059 in master (Detect read-only filesystem and fail the brick creation operation.)

Comment 2 Anand Avati 2011-05-09 17:26:43 UTC
PATCH: http://patches.gluster.com/patch/7060 in master (posix: glusterfs.test should be removed xattr immediately after use.)

Comment 3 krishnan parthasarathi 2011-05-10 02:07:30 UTC
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.

Comment 4 Sachidananda Urs 2011-07-05 15:37:03 UTC
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?

Comment 5 Sachidananda Urs 2011-07-05 15:38:15 UTC
Comments above.

Comment 6 Anand Avati 2011-07-12 06:13:09 UTC
PATCH: http://patches.gluster.com/patch/7820 in master (Fail volume creation on existing directories of a read-only file system.)

Comment 7 krishnan parthasarathi 2011-07-12 09:48:22 UTC
The steps to reproduce remain as before.

Comment 8 Rahul C S 2011-09-07 10:37:52 UTC
works on master, 2nd & 3rd patch needs to be pushed for 3.1 & 3.2 branches as well.

Comment 9 Rahul C S 2011-09-07 10:47:42 UTC
According to Vijay & Avati, not required to back-port the patches.

Comment 10 Rahul C S 2011-09-07 10:54:17 UTC
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.