Whamcloud - gitweb
LU-6051 utils: allow lfs_migrate to handle hard links 51/25851/9
authorSteve Guminski <stephenx.guminski@intel.com>
Thu, 9 Mar 2017 12:19:44 +0000 (07:19 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 6 Nov 2017 03:43:17 +0000 (03:43 +0000)
commit80a2ff7137d3504e5672c6a68561d4ae8d5a28e3
treef4255452f70236de543227dc5c5faa1c5015f973
parent5b663ca0cb31517e307913873ca5df4676e5654d
LU-6051 utils: allow lfs_migrate to handle hard links

Detect files that are hard links to files that have already been
migrated, and skip them.  This prevents unnecessary work and speeds
up the migration process.  Sanity test 56xb has been added to test
the new behavior.  A new option '-S <stripe_size>' has been added
to lfs_migrate, and allows the test to be run with a single OST.

Previously, the default behavior was to skip migration of any
file name that contained hard links other than itself. Therefore,
the file in the link set would not be migrated at all.  The '-l'
option could be used to override.  However, there was no attempt to
detect which file names were hard linked to already migrated files,
so the file would be migrated multiple times.

The new behavior automatically migrates the file once and skips
other file names in the link set.

Test-Parameters: trivial
Signed-off-by: Steve Guminski <stephenx.guminski@intel.com>
Signed-off-by: Evan Felix <evan.felix@pnnl.gov>
Change-Id: I43678b34931507c0fe30c1c40ca2dc2d47f86aeb
Reviewed-on: https://review.whamcloud.com/25851
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Henri Doreau <henri.doreau@cea.fr>
lustre/doc/lfs_migrate.1
lustre/scripts/lfs_migrate
lustre/tests/sanity.sh