Whamcloud - gitweb
LU-12157 utils: fix lfs_migrate output and testing 12/37812/3
authorAndreas Dilger <adilger@whamcloud.com>
Thu, 4 Apr 2019 02:26:37 +0000 (20:26 -0600)
committerOleg Drokin <green@whamcloud.com>
Mon, 6 Apr 2020 21:14:57 +0000 (21:14 +0000)
commit70ab71892c1ec4d3b624fa157752146fc606426c
tree2cacdb0e7e3d142d3a169bd4f15b99e1167ea568
parent39b5fba0249f9483dd88526e70d94cc0f1fcfd8d
LU-12157 utils: fix lfs_migrate output and testing

Don't pass the "-v" option through to "lfs migrate", as this causes
the filename to be printed twice when run with the "-v" option.

Don't use "echo -e" to process escape characters in filenames unless
this is needed, but add it where it is needed.  Don't add ANSI escape
characters to the output.  The output previously looked like:

     /mnt/testfs/l0: stripe count=1,size=1048576,pool=/mnt/testfs/l0
     done migrate
     nr[K/mnt/testfs/l1: /mnt/testfs/l1: already migrated ...
     nr[K/mnt/testfs/l2: /mnt/testfs/l1: already migrated ...
     nr[K/mnt/testfs/l3: /mnt/testfs/l1: already migrated ...

Print out the "pool=" and "mirror_count=" parameters only if needed.

Fix "-A" option to round up the number of stripes when the migrated.
Skip sanity test_56xc 1GB test if there is not enough space on OSTs.

Fixes: 60c5bc2502 ("LU-8235 scripts: pass unrecognized options to lfs migrate")
Fixes: 80a2ff7137 ("LU-6051 utils: allow lfs_migrate to handle hard links")
Fixes: 99d7a8ed43 ("LU-8207 scripts: add auto-stripe option to lfs_migrate")

Lustre-change: https://review.whamcloud.com/34592
Lustre-commit: 9b8e8e0e54e5055c02469cb16d186c94fa2040e0

Test-Parameters: trivial fstype=zfs testlist=sanity envdefinitions=ONLY=56
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I059e7daeb2fa82e7607fd9d862797433053ebbe5
Reviewed-by: James Nunez <jnunez@whamcloud.com>
Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/37812
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/scripts/lfs_migrate
lustre/tests/sanity.sh