Bug 1389910

Summary: RFE : Allow ":" as brick path name
Product: [Community] GlusterFS Reporter: Alessandro Corbelli <alessandro.corbelli>
Component: cliAssignee: Atin Mukherjee <amukherj>
Status: CLOSED UPSTREAM QA Contact:
Severity: low Docs Contact:
Priority: medium    
Version: mainlineCC: bugs, sasundar, vbellur
Target Milestone: ---Keywords: FutureFeature, Triaged
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-11-19 05:20:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Alessandro Corbelli 2016-10-29 12:57:22 UTC
gluster doesn't allow the use of ":" in the brick path name

# gluster volume replace-brick gv0 1.2.3.4:/export/brick1/brick
1.2.3.4:/export/pci-0000:01:00.0-scsi-0:0:2:0/brick commit force
wrong brick type: 1.2.3.4:/export/pci-0000:01:00.0-scsi-0:0:2:0/brick,
use <HOSTNAME>:<export-dir-abs-path>
Usage: volume replace-brick <VOLNAME> <SOURCE-BRICK> <NEW-BRICK> {commit force}


There are 2 possible solutions to this:

1) get the hostname up to the first occurence of ":" and leave the rest as brick path. This would breack IPv6 compatibility and IPv6 users should use hostnames and not IPv6 addresses (that containes ":")

2) get the hostname up to the first occurrence of ":/". This preserve the IPv6 compatibility (as there is no '/' in an IPv6 addresses) and should also fix this bug as the brick path must always be an absolute path (thus always start with a '/')

The use of ":" in brick path is usefull when you want to call each brick as the physical path of the underlying disk, like for ZFS. In my test case, the "pci-0000:01:00.0-scsi-0:0:2:0" is the disk located at device "pci-0000:01:00.0-scsi-0:0:2:0". When you have multiple bricks per servers and multiple servers for each cluster, referring to disk path is better than calling "brick1" or "brick2"
"brick1" is hard to remember, while with "1.2.3.4:/pci-0000:01:00.0-scsi-0:0:2:0" you know immediatly that is disk at slot number2 on server 1.2.3.4

Comment 1 Vijay Bellur 2018-11-19 05:29:47 UTC
Migrated to github:

https://github.com/gluster/glusterfs/issues/578

Please follow the github issue for further updates on this bug.