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

DNE3: limit directory default layout inheritance

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • Lustre 2.15.0
    • None
    • 9223372036854775807

      One problem that exists today is that default directory layouts are inherited by all new subdirectories created in the filesystem. That makes it difficult to set e.g. "lfs setdirstripe -D -c 1 -i -1" on the root directory and maybe a second level of directories without having it inherited by all of the subdirectories for the whole filesystem.

      It would be useful to add a option like "lfs setdirstripe --max-inherit" that stores "lmv_max_inherit" on the default directory layout so that it is only copied down that many levels of subdirectories before it is not copied. The lmv_max_inherit would be decremented each time it is copied down to a new subdirectory, so there is no need to track the parent layout.

      For compatibility, "lmv_max_inherit=0" would mean "copy forever", so "lmv_max_inherit=1" would mean "do not copy default layout". We don't need huge values here (e.g. "lmv_max_inherit=255" would be totally fine).

      I don't think we need to do anything incompatible for older MDS nodes (e.g. we don't need to use a different LMV magic), since at worst the old MDS will copy this layout forever (ignoring lmv_max_inherit) and have the same behaviour as before this feature existed. Probably the easiest would be to split a __u8 field out of lum_padding1 and leave an unused __u8 and __u16 for future use.

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

              Created:
              Updated:
              Resolved: