1 .TH lfs_migrate 1 "Dec 19, 2017" Lustre "utilities"
4 \- simple tool to migrate files between Lustre OSTs
10 .RB [ --no-rsync | --rsync ]
21 is a simple tool to assist migration of files between Lustre OSTs. It
22 is simply copying each specified file to a new file, verifying the file
23 contents have not changed, and then renaming the new file back to the
24 original filename. This allows balancing space usage between OSTs, moving
25 files off OSTs that are starting to show hardware problems (though are still
26 functional), or OSTs that will be removed from the filesystem.
28 Files to be migrated can be specified as command-line arguments. If a
29 directory is specified on the command-line then all files within that
30 directory are migrated. If no files are specified on the command-line,
31 then a list of files is read from the standard input, making
35 to locate files on specific OSTs and/or matching other file attributes.
37 Any options and arguments not explicitly recognized by the script are passed
42 To maintain backward compatibility, the \fI-n \fRoption is used by the script
43 for a dry-run, and is not passed to
45 as the non-block option. To specify non-block, use the long option
48 The current file allocation policies on MDS dictate where the new files
49 are placed, taking into account whether specific OSTs have been disabled
52 (preventing new files from being allocated there), whether
53 some OSTs are overly full (reducing the number of files placed on those
54 OSTs), or if there is a specific default file striping for the target
55 directory (potentially changing the stripe count, stripe size, OST pool,
56 or OST index of a new file).
60 Only print the names of files to be migrated.
63 Do not use direct I/O to copy file contents.
66 Display help information.
69 Do not fall back to using rsync if
70 .BR lfs (1) " migrate" " fails."
71 Cannot be used at the same time as \fI--rsync\fR.
74 Run quietly (don't print filenames or status).
77 Force rsync to be used instead of
78 .BR lfs (1) " migrate" .
79 May not be used at the same time as \fI--no-rsync\fR.
82 Restripe file using default directory striping instead of keeping striping.
83 This option may not be specified at the same time as the -c or -S options
84 (these options are passed through to
86 and are therefore not listed here).
89 Skip file data comparison after migrate. Default is to compare migrated file
90 against original to verify correctness.
93 Show verbose debug messages.
96 Answer 'y' to usage warning without prompting (for scripts, use with caution).
99 Input file names on stdin are separated by a null character.
101 To rebalance all files within
103 (which are known not to be modified by in-use programs):
105 lfs_migrate /testfs/jobs/2011
107 To migrate files within the
109 filesystem on OST0004 (perhaps because it is much more full than other OSTs),
110 larger than 4GB (because it is more efficient to just migrate large files),
111 and older than two days (to avoid files that are in use, though this is NOT
112 a guarantee the files are not being modified, that is workload specific):
114 lfs find /testfs -obd test-OST0004 -size +4G -mtime +2d |
117 In versions prior to 2.5,
121 closely integrated with the MDS, and cannot determine whether a file
122 is currently open and/or in-use by other applications or nodes. That makes
126 for use on files that might be modified by other applications, since the
127 migrated file is only a copy of the current file. This will result in the
128 old file becoming an open-unlinked file, and any modifications to that file
131 Eventually, this functionality will be integrated into
133 itself and will integrate with the MDS layout locking to make it safe
134 in the presence of opened files and ongoing file IO.
139 filesystem package. Added in the 1.8.4 release.