| LUSTRE_RSYNC(8) | Lustre Configuration Utilities | LUSTRE_RSYNC(8) |
NAME
lustre_rsync - Utility to replicate a Lustre Filesystem
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} |
DESCRIPTION
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.
OPTIONS
- -s, --source=SRC
- 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.
- -t, --target=TGT
- 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.
- -m, --mdt=MDT
- 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.
- -u, --user=USER_ID
- 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.
- -l, --statuslog=LOG
- 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.
- -x, --xattr {yes|no}
- 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.
- -v, --verbose
- Produce a verbose output.
- --dry-run
- Shows what the program would do without actually replicating data.
- --abort-on-err
- Stop processing upon first error. Default is to continue processing.
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
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
AVAILABILITY
The lustre_rsync command is part of the lustre(7) filesystem package since release 1.7.0
SEE ALSO
| 2024-08-28 | Lustre |