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

'lfs mirror extend' should succeed with stale mirror on open-for-write files

Details

    Description

      Rather than completely failing the "lfs mirror extend" command when the MDS finds the mirror version to be different, it would be better for the MDS to allow the layout add to complete, but mark the new mirror LCME_FL_STALE immediately.

      This would allow adding redundancy to files that are continually being written. With "--block" we shouldn't need this, but it isn't always nice to the application to block IO for 100s while a large file is being completely mirrored.

      This also potentially allows future optimizing the resync of the stale mirror instead of having to create it again. For example, if the mirror is extended incrementally by component and the stale flag is only added to mirror components that were actually modified during this operation then it would mean less work to resync later.

      This should add an option to "lfs mirror extend" to enable/disable this behavior, maybe "--allow-stale" and "--deny-stale"?

      I think the default should be to enable this new behavior, but it should be possible to disable it on the MDS if it is causing problems. I think the affected logic will be in the LOD layer, so a parameter like "lod.*.enable_mirror_extend_stale" or similar should be added.

      Attachments

        Issue Links

          Activity

            [LU-17531] 'lfs mirror extend' should succeed with stale mirror on open-for-write files

            This is related to the patches you have submitted on LU-18332.

            adilger Andreas Dilger added a comment - This is related to the patches you have submitted on LU-18332 .

            I've filed LU-18746 to allow creating a new file with the STALE flag, which will need mostly the same functionality on the MDS.

            adilger Andreas Dilger added a comment - I've filed LU-18746 to allow creating a new file with the STALE flag, which will need mostly the same functionality on the MDS.
            adilger Andreas Dilger added a comment - - edited

            it would also be useful to have an option like "lfs mirror extend --no-resync" for adding only the STALE mirror component(s) to a file's layout without trying to do any data resync on the file. That can be used to add the mirror layout with specific parameters, and then offload the data resync to another node/process without the complexity of having to pass the layout.

            adilger Andreas Dilger added a comment - - edited it would also be useful to have an option like " lfs mirror extend --no-resync " for adding only the STALE mirror component(s) to a file's layout without trying to do any data resync on the file. That can be used to add the mirror layout with specific parameters, and then offload the data resync to another node/process without the complexity of having to pass the layout.

            People

              bobijam Zhenyu Xu
              adilger Andreas Dilger
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated: