lfs migrate \- migrate files or directories between MDTs or OSTs.
.SH SYNOPSIS
.B lfs migrate
-.RI [ SETSTRIPE_OPTIONS " ... ] <" file "> ..."
+.RI [ SETSTRIPE_OPTIONS " ... ]"
+.RB [ -v ]
+.RI < file "> ..."
.br
.B lfs migrate -m \fIstart_mdt_index
.RB [ -cHv ]
.B --non-direct
option uses buffered read/write operations, which may improve migration
speed at the cost of more CPU and memory overhead.
+.TP
+.BR -v , --verbose
+Print each filename as it is migrated.
.P
NOTE:
.B lfs migrate
#define MIGRATE_USAGE \
SSM_CMD_COMMON("migrate ") \
- " [--block|-b]\n" \
- " [--non-block|-n]\n" \
- " [--non-direct|-D]\n" \
+ " [--block|-b] [--non-block|-n]\n" \
+ " [--non-direct|-D] [--verbose|-v]\n" \
" <filename>\n" \
SSM_HELP_COMMON \
"\n" \
"\tblock: Block file access during data migration (default)\n" \
"\tnon-block: Abort migrations if concurrent access is detected\n" \
- "\tnon-direct: Do not use direct I/O to copy file contents\n" \
+ "\tnon-direct: Do not use direct I/O to copy file contents\n" \
+ "\tverbose: Print each filename as it is migrated\n" \
#define SETDIRSTRIPE_USAGE \
" [--mdt-count|-c stripe_count>\n" \
static const char *error_loc = "syserror";
enum {
- MIGRATION_NONBLOCK = 1 << 0,
- MIGRATION_MIRROR = 1 << 1,
- MIGRATION_NONDIRECT = 1 << 2,
+ MIGRATION_NONBLOCK = 0x0001,
+ MIGRATION_MIRROR = 0x0002,
+ MIGRATION_NONDIRECT = 0x0004,
+ MIGRATION_VERBOSE = 0x0008,
};
static int lfs_component_create(char *fname, int open_flags, mode_t open_mode,
if (rc < 0)
fprintf(stderr, "error: %s: %s: %s: %s\n",
progname, name, error_loc, strerror(-rc));
+ else if (migration_flags & MIGRATION_VERBOSE)
+ printf("%s\n", name);
+
return rc;
}
goto usage_error;
}
migrate_mdt_param.fp_verbose = VERBOSE_DETAIL;
+ migration_flags = MIGRATION_VERBOSE;
break;
case 'y':
from_yaml = true;