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

"lfs getdirstripe -D subdir" does not show correct inherited layout

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.15.0
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      The default directory layout printed for non-root directories does not correctly show the actual layout specified on the root directory:

      # lfs getdirstripe -D /mnt/testfs
      lmv_stripe_count: 1 lmv_stripe_offset: -1 lmv_hash_type: none lmv_max_inherit: -1 lmv_max_inherit_rr: 3
      # lfs getdirstripe -D /mnt/testfs/etc 
      lmv_stripe_count: 0 lmv_stripe_offset: -1 lmv_hash_type: none lmv_max_inherit: -1 lmv_max_inherit_rr: 0
      # getfattr -d -m - -e hex /mnt/testfs /mnt/testfs/etc
      # file: mnt/testfs
      trusted.dmv=0xd00cd30c01000000ffffffff000000000000000000030000000000000000000000000000000000000000000000000000
      trusted.lma=0x000000000000000007000000020000000100000000000000
      # file: mnt/testfs/etc
      trusted.link=0xdff1ea11010000002d000000000000000000000000000000001500000002000000070000000100000000657463
      trusted.lma=0x000000000000000002040000020000000100000000000000
      

      The default directory layout stored on the root directory is printed properly, and is correctly inherited by actual subdirectories created in the filesystem, but this is not what is shown by "lfs getdirstripe -D" on the client. It is printing a "generic" default layout if no trusted.lmv xattr is found.

      Instead, it would be more correct to return the inherited trusted.lmv from the root directory, if it exists and the lmv_max_inherit depth allows it, along with reducing lmv_max_inherit and lmv_max_inherit_rr by lli_depth if they are not -1.

      Attachments

        Issue Links

          Activity

            People

              laisiyao Lai Siyao
              adilger Andreas Dilger
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: