Bug 764797 (GLUSTER-3065)

Summary: make sure the export directories are not re-used as part of another volume
Product: [Community] GlusterFS Reporter: Amar Tumballi <amarts>
Component: coreAssignee: Amar Tumballi <amarts>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: mainlineCC: gluster-bugs, saurabh, vraman
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: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Amar Tumballi 2011-06-21 08:31:49 UTC
issues today:

* create a simple 'stripe' volume with 2 bricks, call it 'test'.
* start the volume
* mount client, start populating data.
* umount client.
* stop and delete volume
* now create volume with same bricks (can be any name), but with 'replica' type.
* start the volume, mount the client
* now because exports already had striped data, client side 'cluster/replicate' gets confused. and this case is hard to debug as there is no info whether that export was re-used one or the freshly created one.

--> to fix, make sure a given export belongs to only one volume as long as the export directory exists.

Comment 1 Anand Avati 2011-06-24 01:31:09 UTC
PATCH: http://patches.gluster.com/patch/7619 in master (bring in strict check on export directory being re-used for different volume)

Comment 2 Anand Avati 2011-07-14 05:02:00 UTC
PATCH: http://patches.gluster.com/patch/7837 in master (storage/posix: make sure we are starting on a genuine backend)

Comment 3 Saurabh 2011-07-25 06:02:07 UTC
i have verified this bug, and the new fix works fine,

But I have a question that this fix can be deterrent to customers, who want to convert from a distribute to a distribute-replicate volume. Are we going to give them some workaround to do that kind of conversion?


############logs of verification of the bug #####################


[root@centos-qa-client-2 ~]# /opt/glusterfs/git_inst//sbin/gluster volume create dist1 10.1.12.134:/mnt/dist 10.1.12.135:/mnt/dist
/opt/glusterfs/git_inst//libexec/glusterfs/gsyncd: line 52: /usr/local/bin/python: No such file or directory
/opt/glusterfs/git_inst//libexec/glusterfs/gsyncd: line 52: exec: /usr/local/bin/python: cannot execute: No such file or directory
Creation of volume dist1 has been successful. Please start the volume to access data.
[root@centos-qa-client-2 ~]# /opt/glusterfs/git_inst//sbin/gluster start dist1
/opt/glusterfs/git_inst//libexec/glusterfs/gsyncd: line 52: /usr/local/bin/python: No such file or directory
/opt/glusterfs/git_inst//libexec/glusterfs/gsyncd: line 52: exec: /usr/local/bin/python: cannot execute: No such file or directory
unrecognized word: start (position 0)
[root@centos-qa-client-2 ~]# 
[root@centos-qa-client-2 ~]# 
[root@centos-qa-client-2 ~]# /opt/glusterfs/git_inst//sbin/gluster volume start dist1
/opt/glusterfs/git_inst//libexec/glusterfs/gsyncd: line 52: /usr/local/bin/python: No such file or directory
/opt/glusterfs/git_inst//libexec/glusterfs/gsyncd: line 52: exec: /usr/local/bin/python: cannot execute: No such file or directory
Starting volume dist1 has been successful
[root@centos-qa-client-2 ~]#  /opt/glusterfs/git_inst//sbin/gluster volume stop dist1 
/opt/glusterfs/git_inst//libexec/glusterfs/gsyncd: line 52: /usr/local/bin/python: No such file or directory
/opt/glusterfs/git_inst//libexec/glusterfs/gsyncd: line 52: exec: /usr/local/bin/python: cannot execute: No such file or directory
Stopping volume will make its data inaccessible. Do you want to continue? (y/n) y
Stopping volume dist1 has been successful
[root@centos-qa-client-2 ~]#  /opt/glusterfs/git_inst//sbin/gluster volume delete dist1 
/opt/glusterfs/git_inst//libexec/glusterfs/gsyncd: line 52: /usr/local/bin/python: No such file or directory
/opt/glusterfs/git_inst//libexec/glusterfs/gsyncd: line 52: exec: /usr/local/bin/python: cannot execute: No such file or directory
Deleting volume will erase all information about the volume. Do you want to continue? (y/n) y
Deleting volume dist1 has been successful
[root@centos-qa-client-2 ~]# 
[root@centos-qa-client-2 ~]# 
[root@centos-qa-client-2 ~]# /opt/glusterfs/git_inst//sbin/gluster volume create dist2 10.1.12.134:/mnt/dist 10.1.12.135:/mnt/dist
/opt/glusterfs/git_inst//libexec/glusterfs/gsyncd: line 52: /usr/local/bin/python: No such file or directory
/opt/glusterfs/git_inst//libexec/glusterfs/gsyncd: line 52: exec: /usr/local/bin/python: cannot execute: No such file or directory
'10.1.12.134:/mnt/dist' has been part of a deleted volume with id 74b7de2f-ba0b-4fd7-acc0-c58556430b37. Please re-create the brick directory.
[root@centos-qa-client-2 ~]# 
[root@centos-qa-client-2 ~]# /opt/glusterfs/git_inst//sbin/gluster volume create dist1 10.1.12.134:/mnt/dist 10.1.12.135:/mnt/dist
/opt/glusterfs/git_inst//libexec/glusterfs/gsyncd: line 52: /usr/local/bin/python: No such file or directory
/opt/glusterfs/git_inst//libexec/glusterfs/gsyncd: line 52: exec: /usr/local/bin/python: cannot execute: No such file or directory
'10.1.12.134:/mnt/dist' has been part of a deleted volume with id 74b7de2f-ba0b-4fd7-acc0-c58556430b37. Please re-create the brick directory.
[root@centos-qa-client-2 ~]# rmdir /mnt/dist
[root@centos-qa-client-2 ~]# mkdir /mnt/dist1
[root@centos-qa-client-2 ~]# /opt/glusterfs/git_inst//sbin/gluster volume create dist1 10.1.12.134:/mnt/dist1 10.1.12.135:/mnt/dist
/opt/glusterfs/git_inst//libexec/glusterfs/gsyncd: line 52: /usr/local/bin/python: No such file or directory
/opt/glusterfs/git_inst//libexec/glusterfs/gsyncd: line 52: exec: /usr/local/bin/python: cannot execute: No such file or directory
'10.1.12.135:/mnt/dist' has been part of a deleted volume with id 74b7de2f-ba0b-4fd7-acc0-c58556430b37. Please re-create the brick directory.
[root@centos-qa-client-2 ~]# ssh root.12.135 "rmdir /mnt/dist"
root.12.135's password: 
[root@centos-qa-client-2 ~]# ssh root.12.135 "mkdir /mnt/dist"
root.12.135's password: 
[root@centos-qa-client-2 ~]# /opt/glusterfs/git_inst//sbin/gluster volume create dist1 10.1.12.134:/mnt/dist1 10.1.12.135:/mnt/dist
/opt/glusterfs/git_inst//libexec/glusterfs/gsyncd: line 52: /usr/local/bin/python: No such file or directory
/opt/glusterfs/git_inst//libexec/glusterfs/gsyncd: line 52: exec: /usr/local/bin/python: cannot execute: No such file or directory
Creation of volume dist1 has been successful. Please start the volume to access data.