LFS-MIRROR-SPLIT(1)

NAME
lfs-mirror-split - split a specified mirror from an existing mirrored file

SYNOPSIS
lfs mirror split {--mirror-id <mirror_id> | --component-id|--comp-id|-I <comp_id> | --pool <pool>} [--destroy|-d] [-f <new_file>] <mirrored_file>

DESCRIPTION
This command splits a mirror with mirror ID <mirror_id> or containing a component with <comp_id> or containing a component on <pool> out of a mirrored file specified by the path name mirrored_file. By default, the layout of the split mirror will be stored into a new file named <mirrored_file>.mirror~<mirror_id>. If --destroy|-d option is specified, and the split mirror is not the last non-stale mirror, then it will be destroyed. If -f <new_file> option is specified, then the layout of the split mirror will be stored into the named file.
If mirrored_file has only one mirror existing after split, it will be converted to a regular non-mirrored file.
If the original mirrored_file is not a mirrored file, then the command will return an error.

OPTIONS

--mirror-id <mirror_id>
    The numerical unique identifier for a mirror. The mirror ID is unique within a mirrored file and is automatically assigned at file creation or extension time. It can be fetched by lfs getstripe command (see lfs(1)).

--comp-id <comp_id>
    The numerical unique identifier for a component contained within a mirror.

--pool <pool>
    The pool storing a component contained within a mirror.

--destroy|-d
    This option indicates the split mirror will be destroyed.
    This option is mandatory on encrypted files when the encryption key is not available. Otherwise operation results in -ENOKEY.

-f <new_file>
    This option indicates the layout of the split mirror will be stored into <new_file>.
    This option cannot be used on encrypted files when the encryption key is not available. It will result in -ENOKEY.

EXAMPLES

lfs mirror split --mirror-id 1 /mnt/lustre/file1
    Split a mirror with ID 1 out of /mnt/lustre/file1 and store it into /mnt/lustre/file1.mirror~1.

lfs mirror split --mirror-id 2 -d /mnt/lustre/file1
    Split a mirror with ID 2 out of /mnt/lustre/file1 and destroy it.

lfs mirror split --mirror-id 3 -f /mnt/lustre/file2 /mnt/lustre/file1
    Split a mirror with ID 3 out of /mnt/lustre/file1 and store it into /mnt/lustre/file2.

lfs mirror split --comp-id 65537 -d /mnt/lustre/file1
    Split a mirror containing the component with ID 65537 out of /mnt/lustre/file1 and destroy it.

lfs mirror split --pool lustre-nvme -d /mnt/lustre/file1
    Split a mirror on pool lustre-nvme out of /mnt/lustre/file1 and destroy it.

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

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