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>