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

lfs mirror command to read/write specific mirror copy

Details

    • 9223372036854775807

    Description

      It would be useful to add an "lfs open [--ifcomp=<component_id>] [--ofcomp=<component_id>] <command>" that opens the stdin and/or stdout with the specified component ID values, so that e.g. "dd" could be used as a resync tool for stale components, or other arbitrary commands (e.g. MPI file utils for parallel resync, HSM tools for archive handling, etc).

      Also useful would be to open a specific mirror number for whole-file access, instead of just a single component. That would be something like "--ifrepl=" and "--ofrepl=" options.

      Attachments

        Issue Links

          Activity

            [LU-10258] lfs mirror command to read/write specific mirror copy

            Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/36193/
            Subject: LU-10258 lfs: lfs mirror copy command
            Project: fs/lustre-release
            Branch: b2_12
            Current Patch Set:
            Commit: 24f181513fb14f111455ec113d69a6ce5b50cf56

            gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/36193/ Subject: LU-10258 lfs: lfs mirror copy command Project: fs/lustre-release Branch: b2_12 Current Patch Set: Commit: 24f181513fb14f111455ec113d69a6ce5b50cf56

            Jian Yu (yujian@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/36193
            Subject: LU-10258 lfs: lfs mirror copy command
            Project: fs/lustre-release
            Branch: b2_12
            Current Patch Set: 1
            Commit: 00a5d4a04710b5c939b81c422e7b800471ffd83d

            gerrit Gerrit Updater added a comment - Jian Yu (yujian@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/36193 Subject: LU-10258 lfs: lfs mirror copy command Project: fs/lustre-release Branch: b2_12 Current Patch Set: 1 Commit: 00a5d4a04710b5c939b81c422e7b800471ffd83d
            pjones Peter Jones added a comment -

            Landed for 2.13

            pjones Peter Jones added a comment - Landed for 2.13

            Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/33220/
            Subject: LU-10258 lfs: lfs mirror copy command
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: c6e7c0788d7cd766880d12eae6679782283dc479

            gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/33220/ Subject: LU-10258 lfs: lfs mirror copy command Project: fs/lustre-release Branch: master Current Patch Set: Commit: c6e7c0788d7cd766880d12eae6679782283dc479

            Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/33219/
            Subject: LU-10258 lfs: lfs mirror write command
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 14171e787dd00902af7c9edf10a6b54aab45f7b2

            gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/33219/ Subject: LU-10258 lfs: lfs mirror write command Project: fs/lustre-release Branch: master Current Patch Set: Commit: 14171e787dd00902af7c9edf10a6b54aab45f7b2

            Bobi Jam (bobijam@hotmail.com) uploaded a new patch: https://review.whamcloud.com/33220
            Subject: LU-10258 lfs: lfs mirror copy command
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 075a96702fe89c37a9a4e1c11401a75d173dfdad

            gerrit Gerrit Updater added a comment - Bobi Jam (bobijam@hotmail.com) uploaded a new patch: https://review.whamcloud.com/33220 Subject: LU-10258 lfs: lfs mirror copy command Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 075a96702fe89c37a9a4e1c11401a75d173dfdad

            Bobi Jam (bobijam@hotmail.com) uploaded a new patch: https://review.whamcloud.com/33219
            Subject: LU-10258 lfs: lfs mirror write command
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 08c8accd22dc1021da3a0c37d8c6a33f1bf44607

            gerrit Gerrit Updater added a comment - Bobi Jam (bobijam@hotmail.com) uploaded a new patch: https://review.whamcloud.com/33219 Subject: LU-10258 lfs: lfs mirror write command Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 08c8accd22dc1021da3a0c37d8c6a33f1bf44607

            I wonder if we should rename this to "lfs mirror write" and rename "lfs mirror dump" to "lfs mirror read" for consistency?

            adilger Andreas Dilger added a comment - I wonder if we should rename this to " lfs mirror write " and rename " lfs mirror dump " to " lfs mirror read " for consistency?

            The problem with --ifcomp is that sometimes components are not started from beginning of the file; neither are components perfectly aligned. Therefore it would be hard to define the semantics clearly.

            I think there are legitimate use cases for opening a component and allowing writes outside of the component start/end. For example, migrating a large DoM file from the MDT to the start of an OST object and freeing up space on the MDT.

            adilger Andreas Dilger added a comment - The problem with --ifcomp is that sometimes components are not started from beginning of the file; neither are components perfectly aligned. Therefore it would be hard to define the semantics clearly. I think there are legitimate use cases for opening a component and allowing writes outside of the component start/end. For example, migrating a large DoM file from the MDT to the start of an OST object and freeing up space on the MDT.
            jay Jinshan Xiong (Inactive) added a comment - - edited

            From https://review.whamcloud.com/#/c/29100/23/lustre/doc/lfs-mirror-verify.1

            Andreas Dilger Nov 22 9:37 PM

            Not for this patch, but it would be interesting to use something like:
            lfs open --ifrepl=N <file> | diff <file> /dev/stdin
            (or with cmp) to be able to find what is different between two replicas.
            That makes me wonder if we would want some special open syntax some time later, like:
            diff <file> "<file>;N"
            to allow opening replica N directly from the command line? This uses the same naming to be consistent with VAX VMS file versions, and has the benefit that virtually no files will have ';' in the name because this is a shell metacharacter. The drawback is that accessing non-primary components would always need to escape or quote the file name, which is probably OK if it isn't commonly used. We might use something like ",,N" to allow easier usage, but have a higher risk of collisions with existing filenames.

            jay Jinshan Xiong (Inactive) added a comment - - edited From https://review.whamcloud.com/#/c/29100/23/lustre/doc/lfs-mirror-verify.1 Andreas Dilger Nov 22 9:37 PM Not for this patch, but it would be interesting to use something like: lfs open --ifrepl=N <file> | diff <file> /dev/stdin (or with cmp) to be able to find what is different between two replicas. That makes me wonder if we would want some special open syntax some time later, like: diff <file> "<file>;N" to allow opening replica N directly from the command line? This uses the same naming to be consistent with VAX VMS file versions, and has the benefit that virtually no files will have ';' in the name because this is a shell metacharacter. The drawback is that accessing non-primary components would always need to escape or quote the file name, which is probably OK if it isn't commonly used. We might use something like ",,N" to allow easier usage, but have a higher risk of collisions with existing filenames.

            People

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

              Dates

                Created:
                Updated:
                Resolved: