Whamcloud - gitweb
LU-930 utils: update lfs_migrate example usage
authorAndreas Dilger <adilger@whamcloud.com>
Tue, 6 Nov 2012 23:12:40 +0000 (16:12 -0700)
committerAndreas Dilger <adilger@whamcloud.com>
Fri, 23 Nov 2012 18:35:05 +0000 (13:35 -0500)
Update the lfs_migrate example usage to exclude files created within
the past two days.  This makes it more clear that the current script
needs to take care to avoid migrating files that may still be modified
by applications.  While two day old files are not guaranteed to be
unused, it definitely would avoid the vast majority of cases of files
that were just created and are being written to by running apps.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: If7c06ef3b0688db492930a56d7ba5ad4599b04e2
Reviewed-on: http://review.whamcloud.com/4481
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Richard Henwood <richard.henwood@intel.com>
Reviewed-by: Li Wei <wei.g.li@intel.com>
lustre/doc/lfs_migrate.1

index d59b976..c6f198a 100644 (file)
@@ -27,7 +27,7 @@ Because
 .B lfs_migrate
 is
 .B not
 .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
 is currently open and/or in-use by other applications or nodes.  That makes
 it
 .B
@@ -88,15 +88,20 @@ against original to verify correctness.
 Answer 'y' to usage warning without prompting (for scripts, use with caution).
 .SH EXAMPLES
 To rebalance all files within
 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
 .IP
-lfs_migrate /mnt/lustre/dir
+lfs_migrate /testfs/jobs/2011
 .PP
 To migrate files within the
 .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
 .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" .
 .SH KNOWN BUGS
 Hard links could be handled correctly in Lustre 2.0 by using
 .BR lfs (1) " fid2path" .