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

"lfs setdirstripe -D ... <dir>" should create directory if missing

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Minor
    • None
    • Lustre 2.14.0, Lustre 2.12.4
    • None
    • 9223372036854775807

    Description

      Currently, "lfs setdirstripe -D <layout> <dir>" will fail if "<dir>" does not already exist. However, from a usability point of view, it would make sense for the "lfs" utility to create the target "<dir>" if it does not yet exist using the specified "<layout>", and then set the same default "<layout>" on the directory for subdirectories created therein. It doesn't make sense to force the user to run the command twice to do this.

      In the ideal case, the client could send a single "MDS_REINT" RPC to the MDS with "<layout>", the same as "lfs mkdir <layout> <dir>" and just add a flag that indicates "store the same layout as the default", rather than having to send two separate RPCs. However, for compatibility with older MDS nodes, and to backport this fix to older releases, it makes sense for "lfs_setdirstripe()" to handle this in userspace if the "llapi_dir_set_default_lmv()" command fails with "-ENOENT" by calling "llapi_dir_create()" and then retrying "llapi_dir_set_default_lmv()" once.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated: