Whamcloud - gitweb
LU-10258 lfs: lfs mirror copy command 93/36193/3
authorBobi Jam <bobijam@whamcloud.com>
Mon, 16 Sep 2019 18:56:47 +0000 (11:56 -0700)
committerOleg Drokin <green@whamcloud.com>
Mon, 23 Sep 2019 08:43:00 +0000 (08:43 +0000)
commit24f181513fb14f111455ec113d69a6ce5b50cf56
tree2d5b089288354d158fa853a7cb8df9275588fb02
parent5bde5407c504a8eafed2ac348d870d0bbd91b245
LU-10258 lfs: lfs mirror copy command

Add "lfs mirror copy" command to copy a mirror's content to other
mirror(s) of a mirrored file.

Usage:

lfs mirror copy {--read-mirror|-i <id0>}
{--write-mirror|-o <id1>[,<id2>,...]} <mirrored_file>

Options:

--read-mirror|-i <id0>
  This option indicates the content of which mirror specified by id0
  needs to be read. The id0 is the numerical unique identifier for a
  mirror.

--write-mirror|-o <id1>[,<id2>,...]
  This option indicates the content of which mirror(s) specified by
  mirror IDs needs to be written. The mirror IDs are separated with
  comma.  If the mirror id -1 is used here, it means that all mirrors
  other than the read mirror are to be written.

Note:

Be ware that the written mirror(s) will be marked as non-stale
mirror(s), be careful that after using this command, you could get a
file with non-stale mirrors while containing different contents.

This patch is back-ported from the following one:
Lustre-commit: c6e7c0788d7cd766880d12eae6679782283dc479
Lustre-change: https://review.whamcloud.com/33220

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: Id138368cdb29ec14b7c03a5db3b2dd1e0db5ea37
Reviewed-on: https://review.whamcloud.com/36193
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/doc/lfs-mirror-copy.1 [new file with mode: 0644]
lustre/doc/lfs-mirror-read.1
lustre/doc/lfs-mirror-write.1
lustre/include/lustre/lustreapi.h
lustre/include/uapi/linux/lustre/lustre_user.h
lustre/lod/lod_object.c
lustre/tests/mirror_io.c
lustre/tests/sanity-flr.sh
lustre/utils/lfs.c
lustre/utils/liblustreapi_mirror.c