Whamcloud - gitweb
LU-10258 lfs: lfs mirror write command 19/33219/7
authorBobi Jam <bobijam@whamcloud.com>
Sat, 22 Sep 2018 09:14:46 +0000 (17:14 +0800)
committerOleg Drokin <green@whamcloud.com>
Fri, 2 Nov 2018 07:18:36 +0000 (07:18 +0000)
commit14171e787dd00902af7c9edf10a6b54aab45f7b2
treeae216a3cf4b872f9bd541e81de2544b43f3c51e8
parent1d94072c63f53dfdf0fbad3adc866f9a0ca8cae9
LU-10258 lfs: lfs mirror write command

Rename "lfs mirror dump" command to "lfs mirror read".

Add "lfs mirror write" command to write a mirror's content of a
mirrored file.

Usage:

lfs mirror write {--mirror-id|-N <mirror_id>}
[--inputfile|-i <input_file>] <mirrored_file>

Options:

--mirror-id|-N <mirror_id>
  This  option  indicates  the  content of which mirror specified by
  mirror_id needs to be written. The mirror_id is the numerical unique
  identifier for a mirror.

--inputfile|-i <input_file>
  The path name of the input file, if not specified, the standard
  input stream will be used. The input stream or input_file cannot
  be the same mirrored file as the mirrored_file.

This command will issue a RESYNC lease write lock to notify MDS to
prepare destination mirror for the write (instantiate components of
the mirror), then client copy data from a file or STDIN to the
specified mirror of the mirrored file. After the data copy, a
RESYNC_DONE lease unlock is issued to MDS to update the layout
of the mirrored file.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I02022349d4ce871319903a8714ffc4534186c0e4
Reviewed-on: https://review.whamcloud.com/33219
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 files changed:
lustre/doc/lfs-mirror-read.1 [moved from lustre/doc/lfs-mirror-dump.1 with 65% similarity]
lustre/doc/lfs-mirror-write.1 [new file with mode: 0644]
lustre/include/md_object.h
lustre/include/uapi/linux/lustre/lustre_idl.h
lustre/include/uapi/linux/lustre/lustre_user.h
lustre/llite/file.c
lustre/lod/lod_object.c
lustre/mdc/mdc_reint.c
lustre/mdt/mdt_internal.h
lustre/mdt/mdt_lib.c
lustre/mdt/mdt_reint.c
lustre/ptlrpc/pack_generic.c
lustre/ptlrpc/wiretest.c
lustre/tests/sanity-flr.sh
lustre/utils/lfs.c
lustre/utils/wirecheck.c
lustre/utils/wiretest.c