Whamcloud - gitweb
LU-10258 lfs: lfs mirror copy command 20/33220/6
authorBobi Jam <bobijam@whamcloud.com>
Sat, 22 Sep 2018 16:42:37 +0000 (00:42 +0800)
committerOleg Drokin <green@whamcloud.com>
Thu, 21 Mar 2019 03:43:02 +0000 (03:43 +0000)
commitc6e7c0788d7cd766880d12eae6679782283dc479
tree4734756fbe6f280a924262466ef2f8a25a166352
parent2b215d3763a8a37ff9d65bf1a250fcdaa27c4bdf
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.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: Id138368cdb29ec14b7c03a5db3b2dd1e0db5ea37
Reviewed-on: https://review.whamcloud.com/33220
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@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