Whamcloud - gitweb
LU-9771 flr: lfs mirror create and extend commands 00/29100/28
authorJian Yu <jian.yu@intel.com>
Fri, 15 Sep 2017 21:43:10 +0000 (21:43 +0000)
committerJinshan Xiong <jinshan.xiong@intel.com>
Sat, 25 Nov 2017 17:58:15 +0000 (17:58 +0000)
commit125f98fb5c103a164a2f81615204798679f94fd7
treef993644a10772b2f0d5657c7e476b68cccf629c1
parent173981742e695dfa95997284c618c790813069d5
LU-9771 flr: lfs mirror create and extend commands

This patch adds "lfs mirror create" and "lfs mirror extend"
commands to create or extend a mirrored file.

Usage:

lfs mirror create <--mirror-count|-N[mirror_count]>
                  [setstripe options|--parent]
                  ... <filename|directory>

lfs mirror extend [--no-verify]
                  <--mirror-count|-N[mirror_count]>
                  [setstripe options|--parent|-f <victim_file>]
                  ... <filename>
Options:

--mirror-count|-N[mirror_count]
Number of mirrors to be created with the upcoming setstripe
layout options. The option can be repeated multiple times to
separate mirrors that have different layouts. The mirror_count
argument is optional and defaults to 1 if it's not specified;
if specified, it must follow the option without a space.

setstripe options
The layout of one mirror. The options are the same as those for
lfs setstripe command. If setstripe options are not specified,
then the stripe options inherited from the previous component
will be used.

--parent
This option indicates that the default stripe options inherited
from parent directory will be used.

-f <victim_file>
The layout of victim_file will be split and used as a mirror
added to the mirrored file.

--no-verify
This option indicates not to verify the mirror(s) from victim
file(s) in case the victim file(s) contains the same data as
the original mirrored file.

Test-Parameters: testlist=sanity-flr
Signed-off-by: Jian Yu <jian.yu@intel.com>
Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I8fb4a367bd169073f194ddee5c26d65b557e8201
Reviewed-on: https://review.whamcloud.com/29100
Tested-by: Jenkins
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
lustre/doc/Makefile.am
lustre/doc/lfs-mirror-create.1 [new file with mode: 0644]
lustre/doc/lfs-mirror-extend.1 [new file with mode: 0644]
lustre/doc/lfs-mirror-resync.1 [new file with mode: 0644]
lustre/doc/lfs-mirror-split.1 [new file with mode: 0644]
lustre/doc/lfs-mirror-verify.1 [new file with mode: 0644]
lustre/include/lustre/lustreapi.h
lustre/tests/sanity-flr.sh
lustre/tests/test-framework.sh
lustre/utils/lfs.c
lustre/utils/liblustreapi_layout.c