LUSTRE_RSYNC(8)

πŸ“¦ version 2.17.58, in ubuntu stonking

πŸ’– LUSTRE_RSYNC πŸ’–

okay bestie, so this is the manual page for lustre_rsync from the Lustre Configuration Utilities section (that's section 8, for the admin girlies πŸ‘‘). Sit down, grab a matcha πŸ“, and let's get you fluent, because this tool? It's giving main character energy for filesystem replication.


✨ NAME ✨

lustre_rsync β€” the utility that replicates a Lustre Filesystem. That's it, that's the whole job, and it does it so well πŸ’….


🌈 SYNOPSIS 🌈

lustre_rsync {--source|-s SRC} {--target|-t TGT} {--mdt|-m MDT}
             [--user|-u USERID] [--xattr|-x {yes|no}] [--verbose|-v]
             [--statuslog|-l LOG] [--dry-run] [--abort-on-err]
lustre_rsync {--statuslog|-l LOG}
lustre_rsync {--statuslog|-l LOG} {--source|-s SOURCE} {--target|-t TGT}
             {--mdt|-m MDT}

Like, three whole moods. Pick the one that matches your situation, no cap ✨.


πŸ¦‹ DESCRIPTION πŸ¦‹

lustre_rsync was designed to replicate a Lustre filesystem (that's your source filesystem, the origin, the blueprint πŸ’–) over to another target filesystem β€” and honestly? The target can be any filesystem type, we don't gatekeep here 🌈.

How does it do it so efficiently? It reads the Lustre MDT changelogs. That's the whole trick, iykyk πŸ‘‘

🚨 okay important thing bestie, do NOT skip this: a changelog user must be registered before you use this tool. See lctl(8), specifically changelog_register. No registered changelog user, no replication. Periodt.

And one more non-negotiable, listen up πŸ™ˆ: the source and target filesystems must be identical before the changelog user gets registered. If they're discrepant (aka not matching, messy, inconsistent), you can use a utility like rsync to make them identical first. Fix the vibes before you start ✨.


πŸ’… OPTIONS πŸ’…

  • -s, --source=SRC β€” the path to the root of the Lustre filesystem that's getting replicated. It's mandatory β€” unless you're passing a valid statuslog created during a previous replication operation (--statuslog). In that case she's already got the info πŸ’–.
  • -t, --target=TGT β€” the path to the root where the filesystem will be replicated to. Also mandatory if you don't have a valid statuslog from a previous replication operation (--statuslog). And here's the cute part: this option can be repeated if you want multiple replication targets πŸ‘―β€β™€οΈ β€” one girl, many destinations, iconic.
  • -m, --mdt=MDT β€” the metadata device that's to be replicated. A changelog user must be registered for this device. Mandatory if you're not supplying a valid statuslog from a previous replication operation (--statuslog).
  • -u, --user=USER_ID β€” the changelog user id for the MDT device above 🫢. Go look at lctl(8) changelog_register. Mandatory if a valid statuslog created during a previous replication operation (--statuslog) isn't specified.
  • -l, --statuslog=LOG β€” a status log file where the status of replication gets saved πŸ’Ύ. When lustre_rsync starts up, it reads the state from a previous replication out of here. So if you do specify a statuslog from a previous replication operation, all those otherwise-mandatory options like --source, --target and --mdt? Yeah, you can skip them. She remembers ✨. And if you pass options like --source, --target and --mdt in addition to --statuslog, then the parameters in the statuslog get overridden. Command line options take precedence over the ones from the statuslog β€” the CLI is the main character here πŸ‘‘.
  • -x, --xattr {yes|no} β€” specify whether extended attributes are replicated or not. The default is to replicate extended attributes. Heads up though: disabling xattrs means Lustre striping information will not be replicated ⚠️. So like, know what you're giving up.
  • -v, --verbose β€” produce a verbose output. Gimme all the details, we love a girl who over-shares πŸ’œ.
  • --dry-run β€” shows you what the program would do, without actually replicating any data. Window shopping πŸ›οΈ, zero commitment.
  • --abort-on-err β€” stop processing upon the first error. The default is to continue processing β€” so if you want her to actually stop when things go wrong, you gotta say so fr fr.

πŸŽ€ EXAMPLES πŸŽ€

Register a changelog consumer for MDT lustre-MDT0000:

# ssh $MDS lctl changelog_register --device lustre-MDT0000 -n
cl1

Replicate the lustre filesystem /mnt/lustre to /mnt/target:

# lustre_rsync --source=/mnt/lustre --target=/mnt/target --mdt=lustre-MDT0000 --user=cl1 --statuslog replicate.log --verbose
Lustre filesystem: lustre
MDT device: lustre-MDT0000
Source: /mnt/lustre
Target: /mnt/target
Statuslog: replicate.log
Changelog registration: cl1
Starting changelog record: 0
Errors: 0
lustre_rsync took 1 seconds
Changelog records consumed: 22

look at that output, she ate and left no crumbs πŸ”₯

After the filesystem undergoes some changes, replicate the changes. Only the statuslog needs to be specified as it has all the parameters passed earlier:

# lustre_rsync --statuslog replicate.log --verbose
Replicating Lustre filesystem: lustre
MDT device: lustre-MDT0000
Source: /mnt/lustre
Target: /mnt/target
Statuslog: replicate.log
Changelog registration: cl1
Starting changelog record: 22
Errors: 0
lustre_rsync took 2 seconds
Changelog records consumed: 42

see how it picked up at Starting changelog record: 22? that's the statuslog doing her thing, we're obsessed πŸ˜­πŸ’–

To replicate the lustre filesystem /mnt/lustre to /mnt/target1 and /mnt/target2:

# lustre_rsync --source=/mnt/lustre --target=/mnt/target1 --target=/mnt/target2 --mdt=lustre-MDT0000 --user=cl1 --statuslog replicate.log

two --target flags, two destinations, no drama πŸ’…


⭐ AVAILABILITY ⭐

The lustre_rsync command is part of the lustre(7) filesystem package since release 1.7.0. She's been around, she's a legend πŸ‘‘.


🌸 SEE ALSO 🌸

go read those too, don't be shy πŸ¦‹


and that's the whole page, bestie!! this one's from the Lustre manual, dated 2024-08-28 β€” go forth and replicate responsibly, and remember: register that changelog user first or it's over for you πŸ’€βœ¨

πŸ“¦ where this page comes from