Whamcloud - gitweb
LU-10278 utils: allow to migrate without direct io
[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 [--component-end|-E \fIcomp_end\fR]
38 .B [--block|-b]
39 .B [--non-block|-n]
40 .B [--non-direct|-D] \fIfile|directory\fR
41 .br
42 Migrate can also be used for OST objects by omitting \fI-m\fR option. In this
43 mode, the command has identical options to
44 .BR lfs-setstripe (1).
45 The difference between migrate and setstripe is that \fImigrate\fR will
46 re-layout the data in existing files using the new layout parameter by copying
47 the data from the existing OST(s) to the new OST(s). In contrast,
48 \fIsetstripe\fR is used for creating new files with the specified layout.  For
49 more information, see lfs-setstripe(1).
50 .P
51 NOTE: lfs migrate has a complementary script
52 .B lfs_migrate
53 which is used to provide extra functionality when migrating file data
54 between OSTs and has a separate man page.
55 .SH EXAMPLES
56 .TP
57 .B $ lfs migrate -m 0 ./testremote
58 Move the inodes contained in ./testremote from their current MDT to the
59 MDT with index 0.
60 .TP
61 .B $ lfs migrate -c 2 /mnt/lustre/file1
62 This migrate the file into a new layout with 2 stripes.
63 .TP
64 .B $ lfs migrate -E 64M -c 1 -E 256M -c 4 -E -1 -c -1 /mnt/lustre/file1
65 This migrate the file into a three components composite layout.
66 .SH AUTHOR
67 The lfs command is part of the Lustre filesystem.
68 .SH SEE ALSO
69 .BR lfs (1),
70 .BR lfs-setstripe (1),
71 .BR lfs-setdirstripe (1),
72 .BR lfs-getdirstripe (1),
73 .BR lfs-mkdir (1),
74 .BR lfs_migrate (1),
75 .BR lctl (8),