[Gluster-devel] GFID2 - Proposal to add extra byte to existing GFID

Aravinda avishwan at redhat.com
Fri Dec 16 07:31:32 UTC 2016


Proposal to add one more byte to GFID to store "Type" information.
Extra byte will represent type(directory: 00, file: 01, Symlink: 02
etc)

For example, if a directory GFID is f4f18c02-0360-4cdc-8c00-0164e49a7afd
then, GFID2 will be 00f4f18c02-0360-4cdc-8c00-0164e49a7afd.

Changes to Backend store
------------------------
Existing: .glusterfs/gfid[0:2]/gfid/[2:4]/gfid
Proposed: .glusterfs/gfid2[0:2]/gfid2[2:4]/gfid2[4:6]/gfid2

Advantages:
-----------
- Automatic grouping in .glusterfs directory based on file Type.
- Easy identification of Type by looking at GFID in logs/status output
   etc.
- Crawling(Quota/AFR): List of directories can be easily fetched by
   crawling `.glusterfs/gfid2[0:2]/` directory. This enables easy
   parallel Crawling.
- Quota - Marker: Marker transator can mark xtime of current file and
   parent directory. No need to update xtime xattr of all directories
   till root.
- Geo-replication: - Crawl can be multithreaded during initial sync.
   With marker changes above it will be more effective in crawling.

Please add if any more advantageous.

Disadvantageous:
----------------
Functionality is not changed with the above change except the length
of the ID. I can't think of any disadvantages except the code changes
to accommodate this change. Let me know if I missed anything here.

Changes:
---------
- Code changes to accommodate 17 bytes GFID instead of 16 bytes(Read
   and Write)
- Migration Tool to upgrade GFIDs in Volume/Cluster

Let me know your thoughts.

-- 
regards
Aravinda
http://aravindavk.in



More information about the Gluster-devel mailing list