LFS-MIRROR-SPLIT(1)

πŸ“¦ version 2.17.58, in ubuntu stonking

πŸ’… lfs-mirror-split β€” the "break up with one mirror" era πŸ’…

okay bestie, welcome to the Lustre User Utilities ✨ manual for lfs-mirror-split ✨ β€” yes, that's the whole manual name up top, we're just vibing with it. This one is for when a mirrored file has a mirror that simply needs to leave the group chat and go be its own file. No cap.


🌸 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

like, you have to pick one of those identifying options, bestie, not all three. choose your fighter πŸ’–


πŸŽ€ DESCRIPTION πŸŽ€

So here's the tea πŸ“: this command splits a mirror out of a mirrored file, and the file is the path name MIRRORED_FILE. Which mirror though? You get three whole ways to point at it:

  • a mirror with mirror ID MIRROR_ID
  • a mirror containing a component with COMP_ID
  • a mirror containing a component on POOL

By default β€” like, if you don't say otherwise β€” the layout of that split mirror gets stored into a brand new file named MIRRORED_FILE.mirror~MIRROR_ID. cute, right? πŸŽ€

BUT if you pass the -f NEW_FILE option, then the layout of the split mirror gets stored into the file you named instead. main character choice πŸ’…

And here's the part that's lowkey important: if MIRRORED_FILE has only one mirror existing after the split, it will be converted to a regular non-mirrored file. it's giving "the last one standing doesn't need the mirror label anymore" πŸͺžβœ¨

🚨 Also: if the original MIRRORED_FILE is not a mirrored file, then the command will return an error. it's not going to improvise for you, bestie.

πŸ”₯ OPTIONS πŸ”₯

  • --mirror-id MIRROR_ID β€” the numerical unique identifier for a mirror. This mirror ID is unique within a mirrored file and is automatically assigned at file creation or extension time. Wanna peek at it? It can be fetched by the lfs getstripe command (see lfs(1)). obsessed with a self-assigning ID honestly πŸ‘‘
  • --comp-id COMP_ID β€” the numerical unique identifier for a component contained within a mirror. (the synopsis also lets you spell this --component-id or -I β€” same energy, bestie πŸ’œ)
  • --pool POOL β€” the pool storing a component contained within a mirror.
  • -d, --destroy β€” this option indicates the split mirror will be destroyed. πŸ’€

This option is mandatory on encrypted files when the encryption key is not available. Otherwise the operation results in -ENOKEY. so like, no key = you gotta destroy, periodt.

  • -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. do not try it, it's not going to go well 😭


🌈 EXAMPLES 🌈

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 1 /mnt/lustre/file1

Split a mirror with ID 2 out of /mnt/lustre/file1 and destroy it:

# lfs mirror split --mirror-id 2 -d /mnt/lustre/file1

Split a mirror with ID 3 out of /mnt/lustre/file1 and store it into /mnt/lustre/file2:

# lfs mirror split --mirror-id 3 -f /mnt/lustre/file2 /mnt/lustre/file1

Split a mirror containing the component with ID 65537 out of /mnt/lustre/file1 and destroy it:

# lfs mirror split --comp-id 65537 -d /mnt/lustre/file1

Split a mirror on pool lustre-nvme out of /mnt/lustre/file1 and destroy it:

# lfs mirror split --pool lustre-nvme -d /mnt/lustre/file1

🧚 AVAILABILITY 🧚

The lfs mirror split command is part of the lustre(7) filesystem package since release 2.11.0 ⭐ like, it's been here, it's established, it's iconic.


πŸ’– SEE ALSO πŸ’–

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

go read the whole lil mirror family, iykyk πŸ¦‹


okay bye bestie!! this page is from Lustre, dated 2024-08-20 β€” thanks for reading, mwah πŸ’‹βœ¨ go split responsibly 🫢

πŸ“¦ where this page comes from