Bug 764341 (GLUSTER-2609) - Error message not properly provided when trying to create a volume from a read-only source
Summary: Error message not properly provided when trying to create a volume from a rea...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: GLUSTER-2609
Product: GlusterFS
Classification: Community
Component: logging
Version: 3.1.3
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: krishnan parthasarathi
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-29 18:22 UTC by Matt Harris
Modified: 2015-11-03 23:03 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Regression: RTP
Mount Type: ---
Documentation: DP
CRM:
Verified Versions: master


Attachments (Terms of Use)

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.


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