LFS-MIRROR-WRITE(1)

πŸ“¦ version 2.17.58, in ubuntu stonking

πŸ’– LFS-MIRROR-WRITE(1) πŸ’–

okay bestie, gather round, because we're talking about lfs-mirror-write, and it lives in the Lustre User Utilities manual. it's giving "surgical mirror surgery" energy and honestly? obsessed. πŸͺžβœ¨


✨ NAME ✨

lfs-mirror-write β€” write a mirror's content of a mirrored file

like, you have a mirrored file (a file with several mirrors, each one a whole copy of the data, iykyk), and this command writes the content of one specific mirror. one. just the one you point at. slay. πŸ’…


🌸 SYNOPSIS 🌸

lfs mirror write --mirror-id|-N MIRROR_ID [--inputfile|-i INPUT_FILE]
                 MIRRORED_FILE

translation for the girlies: you must tell it which mirror (-N or --mirror-id), you may tell it where to read from (-i or --inputfile), and you must hand it the mirrored file itself. no file, no write. periodt. πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

This command writes the content of a file's mirror. the file is specified by the path name MIRRORED_FILE, and the mirror is specified by its mirror ID MIRROR_ID.

so like. the file = MIRRORED_FILE. the mirror inside that file = MIRROR_ID. that's the whole vibe. you're pointing at a specific mirror and telling it "here, this content goes here now." 🌈


πŸ’œ OPTIONS πŸ’œ

  • -N, --mirror-id MIRROR_ID β€” this option indicates the content of which mirror, specified by MIRROR_ID, needs to be written. the MIRROR_ID is the numerical unique identifier for a mirror. so yes, it's a number, and yes, it's unique, and yes, you gotta pick the right one or you're writing to the wrong twin. πŸ‘―β€β™€οΈ
  • -i, --inputfile INPUT_FILE β€” the path name of the input file. if you don't specify it, the standard input stream will be used instead. heads up though: the input stream or input_file cannot be the same mirrored file as the MIRRORED_FILE. and if you'd like to copy a mirror's content to another mirror of the same mirrored file, use the lfs mirror copy command instead. bestie do not try to make it eat its own tail, it says no. 🚫🫢
🚨 okay this is the important bit: --inputfile (or stdin) can't be the same mirrored file as MIRRORED_FILE. if that's what you're trying to do, lfs mirror copy is your girl. don't fight the tool.

πŸ”₯ EXAMPLES πŸ”₯

1. write the content of /tmp/src_file to the mirror with ID 3 for /mnt/lustre/file1:

# lfs mirror write --mirror-id 3 /mnt/lustre/file1 < /tmp/src_file

look at that redirect doing its little thing, feeding /tmp/src_file in through stdin. iconic. πŸ’«

2. write the content of /tmp/src_file to the mirror with mirror ID 2 for /mnt/lustre/file1:

# lfs mirror write -N2 -i /tmp/src_file /mnt/lustre/file1

same job, different fit β€” -N2 squished together like a bestie abbreviation, and -i handing over the file directly instead of using stdin. both ate. πŸ“


πŸ‘‘ AVAILABILITY πŸ‘‘

The lfs mirror write command is part of the lustre(7) filesystem package since release 2.12.0.

so if you're on something older than 2.12.0, this is not your era, sorry babe. ⏳


🌟 SEE ALSO 🌟

lfs(1), lfs-getstripe(1), lfs-mirror-copy(1), lfs-mirror-create(1), lfs-mirror-extend(1), lfs-mirror-read(1), lfs-mirror-split(1), lfs-mirror-verify(1), lfs-setstripe(1)

the whole mirror friend group honestly. go say hi. πŸ’–


and that's the tea, bestie. this page came from the Lustre manual, dated 2024-08-20, and it's LFS-MIRROR-WRITE(1) β€” you're welcome, go write a mirror, and hydrate. πŸ§šβ€β™€οΈπŸ’œ

πŸ“¦ where this page comes from