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

"lfs find" does not return directories when searching for default layouts

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • Lustre 2.12.0, Lustre 2.13.0, Lustre 2.10.6
    • None
    • 3
    • 9223372036854775807

      It appears that running a find to locate directories with a specific layout, like:

      # mkdir /mnt/testfs/ost0
      # lfs setstripe -i 0 /mnt/testfs/ost0
      # lfs find /mnt/testfs -type d -i 0
      

      does not return the directory, because it does not actually have an object on testfs-OST0000. Nevertheless, this kind of scan can be useful for finding and/or resolving problems (e.g. removing default layouts that were accidentally inherited, ala LU-11739, or finding directories where users incorrectly specified "-i 0" thinking it meant "don't specify any OST" rather than "-i -1" or not specifying anything at all).

      If -type d is explicitly specified, then "-i" should check the lmm_stripe_offset of the default file layout stored on the directories, along with other arguments to see if it matches the requested layout parameters. We do not want to return directories that match the file layout only because of inherited layouts.

            wc-triage WC Triage
            adilger Andreas Dilger
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: