Whamcloud - gitweb
LU-18454 utils: 'lfs migrate' can read filenames from file 04/57104/9
authorFeng Lei <flei@whamcloud.com>
Fri, 22 Nov 2024 01:18:53 +0000 (09:18 +0800)
committerOleg Drokin <green@whamcloud.com>
Wed, 26 Mar 2025 03:59:58 +0000 (03:59 +0000)
commitb85d28309764e9988005a8e98cfd4ffd900c090c
tree09bbadabbb5cb06e079f45d6ea9ae4c983005449
parentc037373ef0cc5a00a06f30a08f6f66977d46fb4e
LU-18454 utils: 'lfs migrate' can read filenames from file

Enhance 'lfs migrate' and 'lfs mirror extend' command to
be able to read filenames from a file or pipeline and handle
all the files in one process.

When -0 or --null is specified, read filenames from stdin by
default. Each filename is ended with a NUL char. So it can work
together with 'lfs find -0' very well. For example:

  # lfs find /mnt/lustre --ost 0 -0 | lfs migrate -0 --ost 1

When --files-from=LISTFILE is specified, read filenames from
LISTFILE. One line for each filename. If LISTFILE is -, read
from stdin. If --null is specified at the same time, filenames
are separated by NUL char in LISTFILE.

Filenames can be specified on command line directly as before.

Signed-off-by: Lei Feng <flei@whamcloud.com>
Test-Parameters: trivial
Change-Id: Id12aaba2b52a8a541a4d552d37facf6fb0fadc57
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57104
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Etienne AUJAMES <eaujames@ddn.com>
Reviewed-by: Olaf Faaland <faaland1@llnl.gov>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/doc/lfs-migrate.1
lustre/doc/lfs-mirror-extend.1
lustre/tests/sanity.sh
lustre/utils/lfs.c