OS Manuals

lustre_rsync(8)

lustre_rsync - Utility to replicate a Lustre Filesystem

LUSTRE_RSYNC(8) Lustre Configuration Utilities LUSTRE_RSYNC(8)

lustre_rsync - Utility to replicate a Lustre Filesystem

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}

lustre_rsync is designed to replicate a Lustre filesystem (source filesystem) to another target filesystem (any filesystem type) efficiently by using Lustre MDT changelogs. A changelog user must be registered (see lctl (8) changelog_register) before using this tool.

The source and the target filesystems must be identical before the changelog user is registered. If the filesystems are discrepant, a utility like rsync may be used to make them identical.

The path to the root of the Lustre filesystem which will be replicated. Mandatory if a valid statuslog created during an previous replication operation (--statuslog) is not specified.
The path to the root where the filesystem we be replicated. Mandatory if a valid statuslog created during an previous replication operation (--statuslog) is not specified. This option can be repeated if multiple replication targets are desired.
The metadata device which is to be replicated. A changelog user must be registered for this device. Mandatory if a valid statuslog created during an previous replication operation (--statuslog) is not specified.
The changelog user id for the above MDT device. See lctl(8) changelog_register. Mandatory if a valid statuslog created during an previous replication operation (--statuslog) is not specified.
A status log file to which the status of replication is saved. When lustre_rsync is started, the state from a previous replication will be read from here.
If a statuslog from a previous replication operation is specified, the otherwise mandatory options like --source, --target and --mdt may be skipped.
By specifying the options like --source, --target and --mdt in addition to the --statuslog option, the parameters in the statuslog can be overridden. The command line options take precedence over the ones from the statuslog.
Specify whether extended attributes are replicated or not. The default is to replicate extended attributes. Disabling xattrs will mean that Lustre striping information will not be replicated.
Produce a verbose output.
Shows what the program would do without actually replicating data.
Stop processing upon first error. Default is to continue processing.

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

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

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

The lustre_rsync command is part of the lustre(7) filesystem package since release 1.7.0

lfs(1), lustre(7), lctl(8)

2024-08-28 Lustre

lustre 2.17.59-r1 · enterprise-packages · ingested 2026-10-02