LFS-MIRROR-CREATE(1)

πŸ“¦ version 2.17.58, in ubuntu stonking

✨ NAME ✨

lfs-mirror-create β€” bestie, this is the one that creates a mirrored file or directory πŸ’–

(It's the lfs-mirror-create page from the Lustre User Utilities, if you were wondering who's talking πŸŽ€)


πŸ¦‹ SYNOPSIS πŸ¦‹

lfs mirror create --mirror-count|-N[MIRROR_COUNT]
                  [SETSTRIPE_OPTIONS|[--flags=FLAGS]] ...
                  FILENAME|DIRECTORY

πŸ’… DESCRIPTION πŸ’…

Okay so this command creates a mirrored file or directory, and you point at it with the path name FILENAME or DIRECTORY. That's the whole assignment, no cap.

The --mirror-count|-N parameter is required, like genuinely not optional. It tells you how many mirrors that have the same layout are gonna be created. You can repeat it multiple times to separate mirrors that have different layouts β€” that's the flex. The MIRROR_COUNT argument is optional and defaults to 1 if you don't say it; and if you do say it, it must follow the option with no space in between. No space. Not even a lil one. πŸ™ˆ

The SETSTRIPE_OPTIONS specify the specific layout for the mirror. It can be a plain layout with a specific striping pattern, or a composite layout like Progressive File Layout (PFL) β€” go peek at lfs-setstripe(1) for that one. If SETSTRIPE_OPTIONS are not specified, then the stripe options inherited from the previous component will be used ✨. And if there is no previous component? Then the STRIPE_COUNT and STRIPE_SIZE options inherited from filesystem-wide default values get used, and the OST POOL_NAME inherited from the parent directory gets used too. Inheritance chain, we love to see it 🫢

If no option is specified, then the command will return an error. It's giving "you have to actually ask for something." πŸ’€


🌸 OPTIONS 🌸

  • -N, --mirror-count[MIRROR_COUNT] β€” the number of mirrors that have the same layout to be created. You can repeat this option 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. (Yes we said that already. It matters. Periodt.)
  • SETSTRIPE_OPTIONS β€” the layout of one mirror. The options are the same as those for the lfs-setstripe(1) command. If SETSTRIPE_OPTIONS are not specified, then the stripe options inherited from the previous component will be used.
  • --flags=FLAGS β€” where available, FLAGS are as follows:
    • prefer is supported in mirror creation. This flag will be set to all components that belong to the corresponding mirror. The prefer flag gives a hint to Lustre for which mirrors should be used to serve I/O. When a mirrored file is being read, the component(s) with prefer are likely to be picked to serve the read; and when a mirrored file is prepared to be written, the MDT will tend to choose the component with the prefer flag set and stale the other components with overlapping extents. This flag just provides a hint to Lustre, which means Lustre may still choose mirrors without this flag set β€” for instance, if all preferred mirrors are unavailable when the I/O occurs. This flag could be set on multiple components. πŸ‘‘

Please note that this flag will be set to all components that belong to the corresponding mirror. There also exists an option --comp-flags that can be set to individual components at mirror creation time. So if you want per-component control, that's your girl. πŸŽ€


πŸ”₯ EXAMPLES πŸ”₯

Create a mirrored file with 2 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 create -N2 /mnt/lustre/file1

Create a mirrored directory with 2 PFL mirrors. Each mirror has the same specified PFL layout:

# lfs mirror create -N2 -E 1M -E eof -c -1 /mnt/lustre/dir1

Create a mirrored file with 3 PFL mirrors. Each mirror has the same specified PFL layout:

# lfs mirror create -N3 -E 1M -c 1 -E 32M -c 4 -S 16M -E eof -c -1 /mnt/lustre/file1

Create a mirrored file with 3 plain layout mirrors. 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 create -N -c 1 -S 4M -N -c 2 -o 2,3 -p flash -N -p none /mnt/lustre/file1

Create a mirrored file with 5 PFL mirrors. The first and second mirrors have the same PFL layout, and both of the components are allocated from the flash OST pool. Also, flag prefer is applied to all the components of the first two mirrors, which tells the client to read data from those components whenever they are available. πŸ’–

The last three mirrors have the same PFL layout, and each of these components have a stripe size of 16MB and use OSTs in the archive pool. However, the flag prefer is only applied to the first component of each mirror:

# lfs mirror create -N2 -E 4M -c 2 --pool flash --flags prefer -E eof -c 4 -N3 -E 16M -c 4 -S 16M --pool archive --comp-flags=prefer -E eof -c -1 /mnt/lustre/file1

⭐ AVAILABILITY ⭐

The lfs mirror create command is part of the lustre(7) filesystem package since release 2.11.0. It's been iconic for a minute, iykyk. πŸ‘‘


🌈 SEE ALSO 🌈

lfs(1), lfs-mirror-delete(1), lfs-mirror-extend(1), lfs-mirror-resync(1), lfs-mirror-split(1), lfs-mirror-verify(1), lfs-setstripe(1)


okay bestie that's the whole page, go forth and mirror your files πŸ’…βœ¨ This was the Lustre User Utilities manual page for LFS-MIRROR-CREATE(1), from the Lustre package, dated 2024-08-20. Goodbye and ily, go read lfs-setstripe(1) next πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from