Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-838

"lfs path2fid /mnt/lustre" (ROOT) returns inode number

Details

    • Bug
    • Resolution: Fixed
    • Blocker
    • None
    • Lustre 2.4.0
    • 3
    • 3991

    Description

      Running "lfs path2fid" on the Lustre mountpoint (e.g. /mnt/lustre) will return the underlying "ROOT/" directory inode number. This is bad for a number of reasons:

      • it exposes the on-disk inode number to userspace as an IGIF value
      • this will be broken after a backup/restore cycle
      • this value is stored in the "link" xattr of all files in the ROOT/ directory

      $ lfs path2fid /mnt/lustre
      [0x61ab:0x6cad245e:0x0]

      $ getfattr -d -m trusted.link -e hex /mnt/lustre/etc
      getfattr: Removing leading '/' from absolute path names

      1. file: mnt/lustre/etc
        trusted.link=0xdff1ea11010000002d000000000000000000000000000000001500000000000061ab6cad245e00000000657463

      This should probably be fixed by moving MDD_ROOT_INDEX_OID to be 1UL or 2UL, and then returning FID_SEQ_START:MDD_ROOT_INDEX_OID to the client, like:

      $ lfs path2fid /mnt/lustre
      [0x200000000:0x2:0x0]

      All that is needed is to ensure that the ROOT/ inode stores this in the LMA. This has the drawback that FID_SEQ_START is not currently exposed to clients and it fixes MDD_ROOT_INDEX_OID to a specific value (since it will be stored in the "link" xattr).

      The alternative is to expose some other SEQ:OID for the root FID.

      Attachments

        Issue Links

          Activity

            [LU-838] "lfs path2fid /mnt/lustre" (ROOT) returns inode number
            tappro Mikhail Pershin made changes -
            Link New: This issue is related to LU-2886 [ LU-2886 ]
            jlevi Jodi Levi (Inactive) made changes -
            Resolution New: Fixed [ 1 ]
            Status Original: In Progress [ 3 ] New: Resolved [ 5 ]
            adilger Andreas Dilger made changes -
            Labels Original: HB New: LB
            adilger Andreas Dilger made changes -
            Link New: This issue is duplicated by LU-2240 [ LU-2240 ]
            jlevi Jodi Levi (Inactive) made changes -
            Labels New: HB
            tappro Mikhail Pershin made changes -
            Link New: This issue is related to LU-2462 [ LU-2462 ]
            tappro Mikhail Pershin made changes -
            Link New: This issue is related to ORI-756 [ ORI-756 ]
            tappro Mikhail Pershin made changes -
            Status Original: Open [ 1 ] New: In Progress [ 3 ]
            adilger Andreas Dilger made changes -
            Link New: This issue is duplicated by OSF-76 [ OSF-76 ]
            adilger Andreas Dilger made changes -
            Affects Version/s New: Lustre 2.4.0 [ 10154 ]
            Affects Version/s Original: Lustre 2.1.0 [ 10021 ]
            Affects Version/s Original: Lustre 2.2.0 [ 10082 ]
            Assignee Original: WC Triage [ wc-triage ] New: Mikhail Pershin [ tappro ]
            Priority Original: Minor [ 4 ] New: Blocker [ 1 ]

            People

              tappro Mikhail Pershin
              adilger Andreas Dilger
              Votes:
              0 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: