1 .TH LFS-MIGRATE 1 2015-12-07 "Lustre" "Lustre Utilities"
3 lfs migrate \- migrate files or directories between MDTs or OSTs.
7 .RI [ SETSTRIPE_OPTIONS " ... ]"
10 .B lfs migrate -m \fIstart_mdt_index
15 Migrate OST objects or MDT inodes between MDTs and OSTs respectively.
19 command can be used for moving files from one (or more) OSTs to other
20 OSTs (e.g. for space balancing between OSTs, or to evacuate an OST for
21 hardware reasons), to change the stripe count or other layout parameters
22 of a file (e.g. to increase the bandwidth of a file by striping it over
23 multiple OSTs), or to move the file between different classes of storage
24 (e.g. SSD vs. HDD OSTs, or local vs. remote OSTs in different pools).
26 In OST object migration mode, the command supports the same
30 to specify the layout of the target file. The migrate command differs
35 will copy the data from the existing file(s) using the new layout parameters
36 to the new OST(s). In contrast,
38 is used for creating new (empty) files with the specified layout.
39 .SH OST MIGRATE OPTIONS
40 For OST object migration, there additional options available:
43 Block access to the file by other applications during data migration
44 (default). This prevents other processes from accessing the file during
45 migration, which prevents data data writes to the old file objects from
46 being lost. This should be used if an OST needs to be completely emptied
47 prior to its removal, to ensure all requested files are migrated off the
54 Abort migration if concurrent file access is detected. This can be
55 used with OST space balancing migration to avoid interfering with file
56 access by applications if there is not a requirement to migrate any
57 particular file to the new layout.
64 read and write operations when migrating a file. The
66 option avoids data copy from kernel buffers into userspace, which can
67 impose CPU and memory overhead on the copy operation, but makes read and
68 write operations synchronous. Using the
70 option uses buffered read/write operations, which may improve migration
71 speed at the cost of more CPU and memory overhead.
74 Print each filename as it is migrated.
80 script which is used to provide extra functionality when migrating file
81 data between OSTs and has a separate man page. See
84 .SH MDT MIGRATE OPTIONS
86 .BR -m , --mdt-index=\fIstart_mdt_index\fR
87 Directory will be migrated to MDTs starting with
89 , or specific MDTs if multiple MDTs are specified in a comma-seperated list.
90 This is useful if new MDTs have been added to a filesystem and existing user or
91 project directories should be migrated off old MDTs to balance the space usage
92 and future metadata workload. If
94 is set to -1, the MDT will be chosen by space and inode usage.
96 .BR -c , --mdt-count=\fICOUNT\fR
97 Directory will be migrated to
101 .BR -H , --mdt-hash=\fIHASH_TYPE\fR
108 Sum of ASCII characters modulo number of MDTs. This
109 provides weak hashing of the filename, and is suitable
110 for only testing or when the input is known to have
111 perfectly uniform distribution (e.g. sequential numbers).
113 .B fnv_1a_64 (type 2)
114 Fowler-Noll-Vo (FNV-1a) hash algorithm. This provides
115 reasonably uniform, but not cryptographically strong,
116 hashing of the filename. (default)
119 CRUSH hash algorithm. This is a consistent hash
120 algorithm, so minimum sub files need to relocate
121 during directory restripe.
124 Only the root user can migrate directories. Files that have been archived by
125 HSM or are currently opened will fail to migrate, user can run the same migrate
126 command again to finish migration when files are ready. Both inode and
127 directory entry will be migrated. During migration directory and sub files can
128 be accessed like normal ones.
131 A migrated file or directory will have a new FID, and hence a new inode
132 number. As a consequence, files archived by Lustre HSM that depend on
133 the FID as the identifier in the HSM archive cannot currently be migrated.
134 Having a new inode number may also cause backup tools to consider the
135 migrated file(s) to be a new, and cause them to be backed up again.
139 .B $ lfs migrate -c 2 /mnt/lustre/file1
140 This migrates the file into a new layout with 2 stripes.
142 .B $ lfs migrate -E 64M -c 1 -E 256M -c 4 -E -1 -c -1 /mnt/lustre/file1
143 This migrates the file into a three component composite layout.
145 .B $ lfs migrate -m 0,2 ./testremote
146 Move the inodes contained in directory ./testremote from their current
147 MDT to the MDT with index 0 and 2.
149 The lfs command is part of the Lustre filesystem.
152 .BR lfs-setstripe (1),
153 .BR lfs-setdirstripe (1),
154 .BR lfs-getdirstripe (1),