Whamcloud - gitweb
LU-8998 docs: man pages for tools of PFL
[fs/lustre-release.git] / lustre / doc / lfs-migrate.1
1 .TH LFS-MIGRATE 1 2015-12-07 "Lustre" "Lustre Utilities"
2 .SH NAME
3 lfs migrate \- migrate files or directories between MDTs or OSTs.
4 .SH SYNOPSIS
5 .B lfs migrate
6 \fI-m mdt_idx\fR [-v|--verbose] \fI<directory>\fR
7 .br
8 .B lfs migrate
9 .RI [OPTIONS] ... <file|directory>\fR...
10 .br
11 .SH DESCRIPTION
12 Migrate MDT inodes or OST objects between MDTs and OSTs respectively. For the
13 case of MDT inode migration:
14 .TP
15 .B migrate -m|--mdt-index <mdt_idx> \fIdirectory\fR
16 .br
17 Move the file metadata (inode) from one MDT to MDT with index \fBmdt_idx\fR.
18 Migration of striped directories or individual files between MDTs is not
19 currently supported. Only the root user can migrate directories.  Files that
20 have been archived by HSM or are currently open are skipped by MDT inode
21 migration. Access to files within the directory is blocked until migration is
22 complete.
23 .TP
24 \fIWARNING\fR
25 A migrated file or directory will have a new inode number and FID.  As
26 a consequence, files archieved by Lustre HSM cannot currently be migrated
27 and migrated files that have a new inode number may confuse backup tools.
28 .TP
29 For the case of OST object migration:
30 .TP
31 .B migrate
32 .B [--stripe-count|-c \fIstripe_count\fR]
33 .B [--stripe-index|-i \fIstart_ost_idx\fR]
34 .B [--stripe-size|-S \fIstripe_size\fR]
35 .B [--pool|-p \fIpool_name\fR]
36 .B [--ost-list|-o \fIost_indices\fR]
37 .B [--block|-b]
38 .B [--non-block|-n] \fIfile|directory\fR
39 .B [--component-end|-E \fIcomp_end\fR]
40 .br
41 Migrate can also be used for OST objects by omitting \fI-m\fR option. In this
42 mode, the command has identical options to
43 .BR lfs-setstripe (1).
44 The difference between migrate and setstripe is that \fImigrate\fR will
45 re-layout the data in existing files using the new layout parameter by copying
46 the data from the existing OST(s) to the new OST(s). In contrast,
47 \fIsetstripe\fR is used for creating new files with the specified layout.  For
48 more information, see lfs-setstripe(1).
49 .P
50 NOTE: lfs migrate has a complementary script
51 .B lfs_migrate
52 which is used to provide extra functionality when migrating file data
53 between OSTs and has a separate man page.
54 .SH EXAMPLES
55 .TP
56 .B $ lfs migrate -m 0 ./testremote
57 Move the inodes contained in ./testremote from their current MDT to the
58 MDT with index 0.
59 .TP
60 .B $ lfs migrate -c 2 /mnt/lustre/file1
61 This migrate the file into a new layout with 2 stripes.
62 .TP
63 .B $ lfs migrate -E 64M -c 1 -E 256M -c 4 -E -1 -c -1 /mnt/lustre/file1
64 This migrate the file into a three components composite layout.
65 .SH AUTHOR
66 The lfs command is part of the Lustre filesystem.
67 .SH SEE ALSO
68 .BR lfs (1),
69 .BR lfs-setstripe (1),
70 .BR lfs-setdirstripe (1),
71 .BR lfs-getdirstripe (1),
72 .BR lfs-mkdir (1),
73 .BR lfs_migrate (1),
74 .BR lctl (8),