Whamcloud - gitweb
LU-6051 utils: allow lfs_migrate to handle hard links 01/30801/2
authorSteve Guminski <stephenx.guminski@intel.com>
Thu, 9 Mar 2017 12:19:44 +0000 (07:19 -0500)
committerJohn L. Hammond <john.hammond@intel.com>
Mon, 19 Mar 2018 18:59:57 +0000 (18:59 +0000)
commit19fb581aa291f5d192a2e192e5079ae300b5e7aa
tree7b4348341de57cfd67409b3aa9d1c759cd3ee91f
parent661c0882b97465a6a1b813b84bfe7f402324b404
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
Lustre-change: https://review.whamcloud.com/25851
Lustre-commit: 80a2ff7137d3504e5672c6a68561d4ae8d5a28e3

Signed-off-by: Steve Guminski <stephenx.guminski@intel.com>
Signed-off-by: Evan Felix <evan.felix@pnnl.gov>
Change-Id: I43678b34931507c0fe30c1c40ca2dc2d47f86aeb
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Henri Doreau <henri.doreau@cea.fr>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/30801
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
lustre/doc/lfs_migrate.1
lustre/scripts/lfs_migrate
lustre/tests/sanity.sh