1 .TH lfs_migrate 1 "Dec 19, 2017" Lustre "utilities"
4 \- migrate files between Lustre OSTs
9 .RB [ --no-rsync | --rsync ]
20 is a tool to assist migration of files between Lustre OSTs, possibly also
21 restriping the files as it goes. It copies each specified file to a new file,
22 verifies the file contents have not changed, and then replaces the original
23 filename with the new file (either atomically via
25 on Lustre 2.5 and later, or
27 on older versions of Lustre). This allows balancing space usage between OSTs,
28 moving files off OSTs that are starting to show hardware problems but are still
29 functional, or OSTs that will be removed from the filesystem.
31 Files to be migrated can be specified as command-line arguments. If a
32 directory is specified on the command-line then all files within that
33 directory are migrated. If no files are specified on the command-line,
34 then a list of files is read from the standard input, making
38 to locate files on specific OSTs and/or matching other file attributes,
39 or any other tools that generate a list of files.
41 Any options and arguments not explicitly recognized by
43 are passed through to the underlying
49 for a complete list of options.
51 To maintain backward compatibility, the \fI-n \fRoption is used by the
52 script to indicate a dry-run (no modifications made), and is not passed to
54 as the non-block option. To specify non-block, use the long option
57 The current file allocation policies on MDS dictate where the new files
58 are placed, taking into account whether specific OSTs have been disabled
61 (preventing new files from being allocated there), whether
62 some OSTs are overly full (reducing the number of files placed on those
63 OSTs), or if there is a specific default file striping for the target
64 directory (potentially changing the stripe count, stripe size, OST pool,
65 or OST index of a new file).
69 Only print the names of files to be migrated.
72 Display help information.
75 Do not fall back to using rsync if
76 .BR lfs (1) " migrate" " fails."
77 Cannot be used at the same time as \fI--rsync\fR.
80 Run quietly (don't print filenames or status).
83 Force rsync to be used instead of
84 .BR lfs (1) " migrate" .
85 May not be used at the same time as \fI--no-rsync\fR.
88 Restripe file using default directory striping instead of keeping striping.
89 This option may not be specified at the same time as the -c or -S options
90 (these options are passed through to
92 and are therefore not listed here).
95 Skip file data comparison after migrate. Default is to compare migrated file
96 against original to verify correctness.
99 Show verbose debug messages.
102 Answer 'y' to usage warning without prompting (for scripts, use with caution).
105 Input file names on stdin are separated by a null character.
107 To rebalance all files within
109 (which are known not to be modified by in-use programs):
111 lfs_migrate /testfs/jobs/2011
113 To migrate files within the
115 filesystem on OST0004 (perhaps because it is much more full than other OSTs),
116 larger than 4GB (because it is more efficient to just migrate large files),
117 and older than two days (to avoid files that are in use, though this is NOT
118 a guarantee the files are not being modified, that is workload specific) after
119 disabling file creation on testfs-OST0004 (this is needed on all MDS nodes):
121 mds# lctl set_param osp.testfs-OST0004*.max_create_count=0
122 client# lfs find /testfs -obd testfs-OST0004 -size +4G -mtime +2d | lfs_migrate -y
123 mds# lctl set_param osp.testfs-OST0004*.max_create_count=20000
125 In versions prior to 2.5,
129 closely integrated with the MDS, and cannot determine whether a file
130 is currently open and/or in-use by other applications or nodes. That makes
133 for use on files that might be modified by other applications, since the
134 migrated file is only a copy of the current file. This will result in the
135 old file becoming an open-unlinked file, and any modifications to that file
141 filesystem package. Added in the 1.8.4 release.