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.
94 .BR -c , --mdt-count=\fICOUNT\fR
95 Directory will be migrated to
99 .BR -H , --mdt-hash=\fIHASH_TYPE\fR
106 Sum of ASCII characters modulo number of MDTs. This
107 provides weak hashing of the filename, and is suitable
108 for only testing or when the input is known to have
109 perfectly uniform distribution (e.g. sequential numbers).
111 .B fnv_1a_64 (type 2)
112 Fowler-Noll-Vo (FNV-1a) hash algorithm. This provides
113 reasonably uniform, but not cryptographically strong,
114 hashing of the filename. (default)
117 CRUSH hash algorithm. This is a consistent hash
118 algorithm, so minimum sub files need to relocate
119 during directory restripe.
122 Only the root user can migrate directories. Files that have been archived by
123 HSM or are currently opened will fail to migrate, user can run the same migrate
124 command again to finish migration when files are ready. Both inode and
125 directory entry will be migrated. During migration directory and sub files can
126 be accessed like normal ones.
129 A migrated file or directory will have a new FID, and hence a new inode
130 number. As a consequence, files archived by Lustre HSM that depend on
131 the FID as the identifier in the HSM archive cannot currently be migrated.
132 Having a new inode number may also cause backup tools to consider the
133 migrated file(s) to be a new, and cause them to be backed up again.
137 .B $ lfs migrate -c 2 /mnt/lustre/file1
138 This migrates the file into a new layout with 2 stripes.
140 .B $ lfs migrate -E 64M -c 1 -E 256M -c 4 -E -1 -c -1 /mnt/lustre/file1
141 This migrates the file into a three component composite layout.
143 .B $ lfs migrate -m 0,2 ./testremote
144 Move the inodes contained in directory ./testremote from their current
145 MDT to the MDT with index 0 and 2.
147 The lfs command is part of the Lustre filesystem.
150 .BR lfs-setstripe (1),
151 .BR lfs-setdirstripe (1),
152 .BR lfs-getdirstripe (1),