LFS-MIRROR-EXTEND(1)
π LFS-MIRROR-EXTEND(1) π
okay bestie, welcome to the Lustre User Utilities corner of the manual, and this one is lfs-mirror-extend β the girl whose entire job is: take your file, give it a whole extra mirror (or several), slay π
β¨ NAME β¨
lfs-mirror-extend β add mirror(s) to an existing file πͺπͺ
β¨ SYNOPSIS β¨
lfs mirror extend [--bandwidth|--bandwidth-limit|-W BANDWIDTH_MB[MG]]
[--fid|-F [--lustre-dir=LUSTRE_MOUNT_POINT]]
[--mirror-count|-N[[=]MIRROR_COUNT]] [--no-verify]
[--non-direct|-D] [--stats|--stats-interval=SECONDS]
[SETSTRIPE_OPTIONS | -f VICTIM_FILE] FILES_FROM
like, look at her. so much range. π«Ά
β¨ DESCRIPTION β¨
This command adds mirror(s) to existing file(s) that you point at with FILES_FROM. no cap.
The file(s) you're extending can already be a mirrored file, or honestly they can just be a regular non-mirrored file living their single-mirror life. If it's a non-mirrored file, this command will convert it into a mirrored file for you. main character transformation arc fr fr β¨π¦
FILES_FROM may be:
FILENAME [FILENAME ...]β file names are listed right on the command line, bestie. Multiple file names are separated by a space char.-0,--nullβ reads file names from stdin by default. Each file name is followed by aNULchar. Usually this is what you use after piping from thelfs find --print0command. very much the pipeline girlie move π--files-from=LIST_FILEβ reads file names from the fileLIST_FILE. One line for each file name. IfLIST_FILEis-, read from stdin. And if--nullis specified at the same time, file names are separated by aNULchar.SETSTRIPE_OPTIONSβ specify the specific layout for the mirror. These are the same options that are used bylfs-setstripe(1). IfSETSTRIPE_OPTIONSare not specified, then the stripe options inherited from the previous component will be used. IfVICTIM_FILEis specified and 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. π gone. reduced to atoms.
π OPTIONS π
--chunk-size=SIZE_MBβ the buffer chunk size in MB used to transfer data. It's1(MB) by default. But if--aio-tasks=0, the default value is64(MB). okay math queen π-F,--fidβ FID(s) are provided from command line/stdin/LIST_FILE instead of file path(s). Option--lustre-dir=LUSTRE_MOUNT_POINTmust be specified at the same time. like, mandatory, they're a package deal π«Ά-f,--file VICTIM_FILEβ first, the contents ofVICTIM_FILEwill be verified to be the same asFILENAME. If they are, the layout ofVICTIM_FILEwill be merged as a mirror added to the mirrored file. Otherwise the layout ofVICTIM_FILEwill be unchanged. However,--no-verifycan be specified to override this check. Once the command is completeVICTIM_FILEwill be removed. This option cannot be specified withSETSTRIPE_OPTIONS. pick a lane babe π-N,--mirror-count[[=]MIRROR_COUNT]β specifies that the nextMIRROR_COUNTmirrors will have the following layout. This option can be repeated multiple times to separate mirrors that have different layouts. TheMIRROR_COUNTargument is optional and will default to1if not specified. This lets a single mirror be specified easily with-N. The--mirror-count|-Noption itself is also optional, and if not specified only1mirror will be created. TheMIRROR_COUNTcan be specified with a preceding'='to indicate the number of total mirrors desired for the layout, such as--mirror-count==TOTAL_MIRROR_COUNTor-N=TOTAL_MIRROR_COUNT. This will create mirrors until the total number of mirrors in the layout is at leastTOTAL_MIRROR_COUNT. This also means that if there are already at leastTOTAL_MIRROR_COUNTmirrors in the layout then no new mirrors will be created. she does the math so you don't have to π₯--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. This option can save siginificant time on file comparison if the file size is large, but it should only be used when the file contents are known to be the same.
bestie PLEASE. only use this when you know the contents match. it skips the vibe check entirely π
--non-direct,-Dβ use buffered, notO_DIRECT, read and write operations when migrating a file. This adds CPU and memory overhead for the data copy between kernel and userspace buffers, but avoids synchronous read and write operations that may slow down small file operations.
This option cannot be used on encrypted files when the encryption key is not available. It will result in -ENOKEY being returned. no key, no entry, no service πβ
--statsβ this option enables progress updates every5seconds, in YAML format. she's keeping you posted π--stats-interval=STATS_INTERVALβ this option enables progress updates everySTATS_INTERVALseconds, in YAML format.-W,--bandwidth BANDWIDTH_MB[MG]β limit the read and write bandwidth a mirror extend consumes to no more thanBANDWIDTH_MBMiB/s. An optional suffix can be used to specify units in Mebibytes or Gibibytes per second. throttle her a lil bit, she's wild π
πΈ EXAMPLES πΈ
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 -N2 /mnt/lustre/file1
Add 3 PFL mirrors to /mnt/lustre/file1. Each mirror has the same specified PFL layout:
# lfs mirror extend -N3 -E 1M -c 1 -E 32M -c 4 -S 16M -E eof -c -1 /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 -N -c 1 -S 4M -N -c 2 -o 2,3 -p flash -N -p none /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 -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
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:
# lfs mirror extend --no-verify -N -f /mnt/lustre/file2 -N -f /mnt/lustre/file3 /mnt/lustre/file1
β AVAILABILITY β
The lfs mirror extend command is part of the lustre(7) filesystem package since release 2.11.0. she's been iconic since day one π
π¦ SEE ALSO π¦
lfs(1), lfs-mirror-create(1), lfs-mirror-delete(1), lfs-mirror-resync(1), lfs-mirror-split(1), lfs-mirror-verify(1), lfs-setstripe(1)
and that's the whole page, bestie!! β¨ this is Lustre, dated 2025-07-11, and it's the LFS-MIRROR-EXTEND(1) manual β go forth and mirror everything ππͺπ
π¦ where this page comes from
- ubuntu stonking: lustre-client-utils 2.17.58+dfsg-0ubuntu2 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms