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

DNE3: disable new regular file creation on MDTs mounted with 'no_create'

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Major
    • None
    • Lustre 2.14.0, Lustre 2.12.4

    Description

      In order to allow draining an MDT for removal from the filesystem, or to disable it temporarily, the "mdt.*.no_create" parameter should be set on the MDT to let clients/MDS know that it should be skipped.

      However, the no_create parameter currently only stops new directory creates on that MDT. If a client does try to create a file or directory on the MDT, it will currently be allowed.

      Instead, the MDT should return an error like -EREMOTE if that would work with the existing clients, or preferably a unique code like -ENOANO or -EBADRQC that makes it clear the client should use a different MDT for creation. We should not use -EROFS to indicate the MDT cannot be used, since that would be returned to the application and the create would fail. We might also consider -ENOSPC to have the client try a different MDT, since we would also want the client to do this if the MDT was actually out of space.

      Creating remote subdirectories to avoid a specific MDT was implemented in LU-12998, but avoiding the creation of new files or directory entries in an existing directory still needs to be implemented.

      One solution would be to turn the directory into a striped directory with a shard on another MDT with the LMV_HASH_FLAG_MIGRATION flag set, and then create all new inodes and directory entries in the new MDT shard. That wouldn't affect existing inodes in the directory, but would prevent all new inodes from being allocated on that MDT in that directory. Something similar would need to be done during file migration anyway, so a later "lfs migrate -m" of that directory would "resume" the migration and move any remaining inodes on the disabled MDT.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated: