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

set default max-inherit to 3 for default dir stripe policy if stripe count is not 0 or 1

Details

    • New Feature
    • Resolution: Fixed
    • Critical
    • Lustre 2.15.0
    • Lustre 2.7.0
    • 9223372036854775807

    Description

      From LU-15307 by adilger
       
      In addition to limiting the stripe count used when selecting "-c -1" it also makes sense to return an error from "lfs setdirstripe" when creating a default directory striping that has a stripe count > 1 but does not have max-inherit set. There have repeatedly been problems hit when a filesystem is configured with "lfs setdirstripe -c N -D $MOUNT" (for any N > 1) causing REMOTE_PARENT_DIR to be filled or have tens of millions of entries, excessive MDT inode usage, performance issues, etc.

      With automatic DNE MDT space balancing (LU-13440) the need to stripe directories by default is almost completely eliminated. It should still be possible to set this by explicitly specifying --max-inherit=N, but this is too dangerous to let users shoot themselves in the foot by accident by what "seems" like a good idea but is actually very bad over time.
      Edit

      Attachments

        Issue Links

          Activity

            [LU-15314] set default max-inherit to 3 for default dir stripe policy if stripe count is not 0 or 1
            pjones Peter Jones added a comment -

            Landed for 2.15

            pjones Peter Jones added a comment - Landed for 2.15

            "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/45874/
            Subject: LU-15314 utils: set default max-inherit to 3
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 956b4b1e0d9f18c6fe62d84e1c20268363b8159b

            gerrit Gerrit Updater added a comment - "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/45874/ Subject: LU-15314 utils: set default max-inherit to 3 Project: fs/lustre-release Branch: master Current Patch Set: Commit: 956b4b1e0d9f18c6fe62d84e1c20268363b8159b

            "Feng, Lei <flei@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/45874
            Subject: LU-15314 utils: set default max-inherit to 3
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 7bf5b510a88ce78d5394f3f1ad29bbc2c239196f

            gerrit Gerrit Updater added a comment - "Feng, Lei <flei@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/45874 Subject: LU-15314 utils: set default max-inherit to 3 Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 7bf5b510a88ce78d5394f3f1ad29bbc2c239196f
            laisiyao Lai Siyao added a comment -

            This looks reasonable to me.

            laisiyao Lai Siyao added a comment - This looks reasonable to me.

            I would suggest to set the default value of --max-inherit to a fixed value (e.g., 3) instead of unlimited (-1) for "lfs setstripe -D -c N" command. But if --max-inherit is specified explicitly, its value will always be accepted. A warning message can be printed to notify the user the default value of --max-inherit.

            I think this would be a reasonable (and safe) option as well, given the consequences . Having a limited inheritance ("LMV_INHERIT_DEFAULT = 3") for default directory layouts with "stripe_count != 0,1" avoids users shooting themselves in the foot. "lfs setdirstripe -D" should print a warning message for layouts with --max-inherit=N, N > 4 for "stripe_count != 0,1". There shouldn't be a warning message printed for default directory layouts with "stripe_count=0,1", regardless of --max-inherit used, since this does not cause the same problems as striped directories.

            chunteraa, crusan, laisiyao, any feedback on this? When the MDT space balancing/limited layout inheritance was being developed in LU-13440, I thought it was important to maintain the same behavior for "lfs setdirstripe -D ..." as existed before that patch, but in fact the "default striped directories on whole filesystem" behavior is something we don't want to keep.

            adilger Andreas Dilger added a comment - I would suggest to set the default value of --max-inherit to a fixed value (e.g., 3) instead of unlimited ( -1 ) for " lfs setstripe -D -c N " command. But if --max-inherit is specified explicitly, its value will always be accepted. A warning message can be printed to notify the user the default value of --max-inherit . I think this would be a reasonable (and safe) option as well, given the consequences . Having a limited inheritance (" LMV_INHERIT_DEFAULT = 3 ") for default directory layouts with " stripe_count != 0,1 " avoids users shooting themselves in the foot. " lfs setdirstripe -D " should print a warning message for layouts with --max-inherit=N , N > 4 for " stripe_count != 0,1 ". There shouldn't be a warning message printed for default directory layouts with " stripe_count=0,1 ", regardless of --max-inherit used, since this does not cause the same problems as striped directories. chunteraa , crusan , laisiyao , any feedback on this? When the MDT space balancing/limited layout inheritance was being developed in LU-13440 , I thought it was important to maintain the same behavior for " lfs setdirstripe -D ... " as existed before that patch, but in fact the "default striped directories on whole filesystem" behavior is something we don't want to keep.
            flei Feng Lei added a comment - - edited

            I would suggest to set the default value of --max-inherit to a fixed value (e.g., 3) instead of unlimited (-1) for lfs setstripe -D -c N command. But if --max-inherit is specified explicitly, its value will always be accepted. A warning message can be printed too to notify the user the default value of --max-inherit.

            This behavior won't change anything on a running system, and won't block existing script to deploy a new system. Even the new system will be a little different from the old ones.

            But if we make --max-inherit mandatory, some existing scripts may be blocked if they do not provide --max-inherit.

            adilger  Please feel free to comment.

            flei Feng Lei added a comment - - edited I would suggest to set the default value of --max-inherit to a fixed value (e.g., 3) instead of unlimited (-1) for lfs setstripe -D -c N command. But if --max-inherit is specified explicitly, its value will always be accepted. A warning message can be printed too to notify the user the default value of --max-inherit . This behavior won't change anything on a running system, and won't block existing script to deploy a new system. Even the new system will be a little different from the old ones. But if we make --max-inherit mandatory, some existing scripts may be blocked if they do not provide --max-inherit . adilger   Please feel free to comment.

            People

              flei Feng Lei
              flei Feng Lei
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: