Bug 1071019 - RFE: Display File Location in Gluster CLI
Summary: RFE: Display File Location in Gluster CLI
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: glusterfs
Version: unspecified
Hardware: All
OS: Unspecified
unspecified
low
Target Milestone: ---
: ---
Assignee: Bug Updates Notification Mailing List
QA Contact: storage-qa-internal@redhat.com
URL:
Whiteboard:
Depends On:
Blocks: 1208099
TreeView+ depends on / blocked
 
Reported: 2014-02-27 22:53 UTC by Andrew Hatfield
Modified: 2018-02-06 02:24 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Feature: Identify Brick location of $FILE Reason: Result (if any):
Clone Of:
: 1208099 (view as bug list)
Environment:
Last Closed: 2018-02-06 02:24:58 UTC
Embargoed:


Attachments (Terms of Use)

Description Andrew Hatfield 2014-02-27 22:53:44 UTC
Description of problem:

At present, there is no easy way to identify which Brick a file is currently located on.

Veda has provided one method to do so, but it's ugly and unworkable at scale

[root@ip-10-100-0-165 ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/xvde1            6.0G  2.3G  3.6G  40% /
none                  828M     0  828M   0% /dev/shm
rhs-srv2:/mirror      200G   67M  200G   1% /mnt/mirror
[root@ip-10-100-0-165 ~]# cd /mnt/mirror/
[root@ip-10-100-0-165 mirror]# ls
test1  test2
[root@ip-10-100-0-165 mirror]# cd test1
[root@ip-10-100-0-165 test1]# ls
file1    file14  file2   file25  file30  file36  file41  file47  file52  file58  file63  file69  file74  file8   file85  file90  file96
file10   file15  file20  file26  file31  file37  file42  file48  file53  file59  file64  file7   file75  file80  file86  file91  file97
file100  file16  file21  file27  file32  file38  file43  file49  file54  file6   file65  file70  file76  file81  file87  file92  file98
file11   file17  file22  file28  file33  file39  file44  file5   file55  file60  file66  file71  file77  file82  file88  file93  file99
file12   file18  file23  file29  file34  file4   file45  file50  file56  file61  file67  file72  file78  file83  file89  file94
file13   file19  file24  file3   file35  file40  file46  file51  file57  file62  file68  file73  file79  file84  file9   file95

[root@ip-10-100-0-165 test1]# getfattr -d -e text -m . -n trusted.glusterfs.pathinfo file99
# file: file99
trusted.glusterfs.pathinfo="(<DISTRIBUTE:mirror-dht> (<REPLICATE:mirror-replicate-0> <POSIX(/export/brick/mirror):ip-10-100-1-11:/export/brick/mirror/test1/file99> <POSIX(/export/brick/mirror):ip-10-100-2-12:/export/brick/mirror/test1/file99>))"

Version-Release number of selected component (if applicable):


How reproducible:
Always


Steps to Reproduce:
1.  Desire to identify which Brick holds a file
2.  Wonder
3.  Scratch head
4.  Wonder some more
5.  Do Veda's stuff above

Actual results:


Expected results:
RFE to include functionality in the gluster CLI to identify a file location

gluster volume $VOLUME location $FILEPATH

where $FILEPATH is the full path to the file.  In a Replicate Volume this is obviously very easy, just return the Bricks in the vol file.  In a Distribute Volume, apply the DHT algorithm, check the expected location and return detail if a HIT.  If a MISS due to a zero size link, follow the link and return that Brick location including that it was followed.

We could also include information about whether or not the file is healthy or in split brain by checking the xattrs

Additional info:


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