LFS-MIRROR-EXTEND(1)

NAME
lfs-mirror-extend - add mirror(s) to an existing file

SYNOPSIS
lfs mirror extend [--no-verify] <--mirror-count|-N[mirror_count]> [setstripe_options|-f <victim_file>] ... <filename>

DESCRIPTION
This command adds mirror(s) to an existing file specified by the path name filename.
The file filename can already be a mirrored file, or just a regular non-mirrored file. If it's a non-mirrored file, then the command will convert it to a mirrored file.
The --mirror-count|-N option is required and indicates how many mirrors that have the same layout will be added. It 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.
The setstripe_options specify the specific layout for the mirror. It can be a plain layout with specific striping pattern or a composite layout like Progressive File Layout (PFL) (see lfs-setstripe(1)). If setstripe_options are not specified, then the stripe options inherited from the previous component will be used. If victim_file exists, then the command will merge the layout from that file as a mirror added to the mirrored file. After the command is finished, the victim file will be removed. The setstripe_options cannot be specified with -f <victim_file> option in one command line.
If victim_file is specified, the utility will verify that the file contents from victim_file are the same as filename. Otherwise the command will return failure. However, option --no-verify can be used to override this verification. The option can save siginificant time on file comparison if the file size is large, but use it only when the file contents are known to be the same.
If no option is specified, then the command will return an error.

OPTIONS

--mirror-count|-N[mirror_count]
    The number of mirrors that have the same layout to be added. 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(1) command. If setstripe_options are not specified, then the stripe options inherited from the previous component will be used. This option cannot be specified with -f <victim_file> option.

-f <victim_file>
    The layout of victim_file will be merged as a mirror added to the mirrored file. This option cannot be specified with setstripe_options option.

--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.

EXAMPLES

lfs mirror extend -N2 /mnt/lustre/file1
    Add 2 mirrors to /mnt/lustre/file1. If file1 is a non-mirrored file, then the command will convert it to a mirrored file first and then add mirrors. Each mirror has the same default striping pattern with stripe_count and stripe_size inherited from filesystem-wide default values, and OST pool_name inherited from parent directory.

lfs mirror extend -N3 -E 1M -c 1 -E 32M -c 4 -S 16M -E eof -c -1 /mnt/lustre/file1
Add 3 PFL mirrors to /mnt/lustre/file1. Each mirror has the same specified PFL layout.

lfs mirror extend -N -c 1 -S 4M -N -c 2 -o 2,3 -p flash -N -p none /mnt/lustre/file1
Add 3 plain layout mirrors to /mnt/lustre/file1. The first mirror has a single stripe and 4MB stripe size. The second mirror has two stripes and locates on OSTs with indices 2 and 3 allocated from the flash OST pool. It also has 4MB stripe size inherited from the first mirror. The third mirror has two stripes and 4MB stripe size inherited from the previous mirror, and also has inherited OST pool_name from parent directory.

lfs mirror extend -N2 -E 4M -c 2 --pool flash -E eof -c 4 -N3 -E 16M -c 4 -S 16M --pool archive -E eof -c -1 /mnt/lustre/file1
Add 5 PFL mirrors to /mnt/lustre/file1. The first and second mirrors have the same PFL layout. All of the components are allocated from the flash OST pool. The last three mirrors have the same PFL layout. All of these components have a stripe size of 16MB and use OSTs in the archive pool.

lfs mirror extend --no-verify -N -f /mnt/lustre/file2 -N -f /mnt/lustre/file3 /mnt/lustre/file1
Merge the layouts from /mnt/lustre/file2 and /mnt/lustre/file3, which contain the same data as /mnt/lustre/file1, use the layouts as mirrors and add them to /mnt/lustre/file1 without verification.

AUTHOR
The lfs mirror extend command is part of the Lustre filesystem.

SEE ALSO
lfs(1), lfs-setstripe(1), lfs-mirror-create(1), lfs-mirror-delete(1), lfs-mirror-split(1), lfs-mirror-resync(1), lfs-mirror-verify(1)