I tried to get the id(descriptor) of the file using the DFID which is defined as #define DFID "["DFID_NOBRACE"]" in lustre and got the output as [0x200000401:0x4:0x0]. So what does the fields separted by : in it signify?
- 704
- 8
- 19
-
`@Gilles` can you please answer this question? – Bhagyesh Dudhediya Sep 14 '15 at 07:57
2 Answers
You can see right next to the definition of DFID is the definition of PFID(), which is printing the f_seq, f_oid, and f_ver fields of the FID. FIDs are never re-used within Lustre.
f_seq is the 64-bit sequence (SEQ) number. This indicates on which MDT (or in DNE configurations on which OST) the range of inodes (or objects) it is located. Each MDT gets a range of sequence numbers, then allocates them (one at a time) to clients, and clients can create new files within that sequence number.
f_oid is the 32-bit object ID number (OID). This indicates an object within the SEQ range, which is allocated by the client whenever a new file is created. For DNE configurations the MDS allocates OIDs for SEQ numbers assigned to each OST.
f_ver is a reserved 32-bit version (VER) field. This is intended for use by snapshots/datasets to distinguish objects that otherwise have the same SEQ/OID. This field is also used for OST objects to store the LOV stripe index for a file in the fid xattr, so that the LOV layout can be reconstructed from the OST objects if the MDT layout is corrupted.
See https://www.eofs.eu/_media/events/elw11/08_johann_lombardi_hands_on_lustre_2.x.pdf for a more complete description of FIDs.
- 1,555
- 5
- 19
The first term 0x200000401.
It is basically the sequence to which the file belongs. In lustre the files belonging to a particular sequence are stored together meaning that all files (objects) with FIDs from a given sequence are stored on the same server.
- 704
- 8
- 19