.TH lfs_migrate 1 "Jul 21, 2010" Lustre "utilities"
.SH NAME
-.Blfs_migrate
+.B lfs_migrate
\- simple tool to migrate files between Lustre OSTs
.SH SYNOPSIS
.B lfs_migrate
-.RB [ -c | -s ]
+.RB [ -c <stripe_count> ]
.RB [ -h ]
.RB [ -l ]
.RB [ -n ]
+.RB [ -q ]
+.RB [ -R ]
+.RB [ -s ]
.RB [ -y ]
.RI [ file | "directory ..." ]
.br
is simply copying each specified file to a new file, verifying the file
contents have not changed, and then renaming the new file back to the
original filename. This allows balancing space usage between OSTs, moving
-files of OSTs that are starting to show hardware problems (though are still
-functional), or OSTs will be discontinued.
+files off OSTs that are starting to show hardware problems (though are still
+functional), or OSTs that will be removed from the filesystem.
.PP
Because
.B lfs_migrate
is
.B not
-closely integrated with the MDS, it cannot determine whether a file
+yet closely integrated with the MDS, it cannot determine whether a file
is currently open and/or in-use by other applications or nodes. That makes
it
.B
or OST index of a new file).
.SH OPTIONS
.TP
-.B \\-c
-Compare file data after migrate (default, use
-.B \\-s
-to disable).
-.TP
-.B \\-s
-skip file data comparison after migrate (use
-.B \\-c
-to enable).
+.B \\-c <stripe_count>
+Restripe file using the specified stripe count. This option may not be
+specified at the same time as the -R option.
.TP
.B \\-h
Display help information.
.B \\-q
Run quietly (don't print filenames or status)
.TP
+.B \\-R
+Restripe file using default directory striping instead of keeping striping.
+This option may not be specified at the same time as the -c option.
+.TP
+.B \\-s
+skip file data comparison after migrate. Default is to compare migrated file
+against original to verify correctness.
+.TP
.B \\-y
-Answer 'y' to usage warning without prompting (for scripts)
+Answer 'y' to usage warning without prompting (for scripts, use with caution).
.SH EXAMPLES
To rebalance all files within
-.IR /mnt/lustre/dir :
+.I /testfs/jobs/2011
+(which are known not to be modified by in-use programs):
.IP
-lfs_migrate /mnt/lustre/file
+lfs_migrate /testfs/jobs/2011
.PP
To migrate files within the
-.I /test
-filesystem on OST0004 larger than 4GB in size:
+.I /testfs
+filesystem on OST0004 (perhaps because it is much more full than other OSTs),
+larger than 4GB (because it is more efficient to just migrate large files),
+and older than two days (to avoid files that are in use, though this is NOT
+a guarantee the files are not being modified, that is workload specific):
.IP
-lfs find /test -obd test-OST0004 -size +4G | lfs_migrate -y
+lfs find /testfs -obd test-OST0004 -size +4G -mtime +2d |
+ lfs_migrate -y
.SH KNOWN BUGS
Hard links could be handled correctly in Lustre 2.0 by using
.BR lfs (1) " fid2path" .
.BR lfs (1)
itself and will integrate with the MDS layout locking to make it safe
in the presence of opened files and ongoing file IO.
-.PP
-Please report all bugs to http://bugzilla.lustre.org/
.SH AVAILABILITY
.B lfs_migrate
is part of the