From: Steve Guminski Date: Fri, 18 Aug 2017 12:37:29 +0000 (-0400) Subject: LU-6051 utils: Remove incorrect request for getstripe help X-Git-Tag: 2.10.53~18 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=ad45173d94e0be94de90368019be52a905bcb993;p=fs%2Flustre-release.git LU-6051 utils: Remove incorrect request for getstripe help The option flag for stripe-size in the getstripe command was changed in Lustre 1.8. To detect the correct flag to use, the help was parsed. However, the help was incorrectly invoked by using the "--help" option, instead of the correct "lfs help getstripe". Since interoperability with 1.8 is no longer needed, the incorrect code is removed and the correct flag is hard-coded. Test-Parameters: trivial Signed-off-by: Steve Guminski Change-Id: I29ae644c7d6b2ed247573d83c943cb556cfb6325 Reviewed-on: https://review.whamcloud.com/28597 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: John L. Hammond --- diff --git a/lustre/scripts/lfs_migrate b/lustre/scripts/lfs_migrate index 37e8ee0..30e0664 100755 --- a/lustre/scripts/lfs_migrate +++ b/lustre/scripts/lfs_migrate @@ -18,7 +18,6 @@ RSYNC=${RSYNC:-rsync} LFS_MIGRATE_RSYNC_MODE=${LFS_MIGRATE_RSYNC_MODE:-false} ECHO=echo LFS=${LFS:-lfs} -LFS_SIZE_OPT="-s" usage() { cat -- <&2 @@ -98,9 +97,6 @@ strings $(which $RSYNC) 2>&1 | grep -q lustre && LFS=: # access the temporary file. umask 0077 -# This is needed for 1.8 Interoperability and can be removed in the future -$LFS getstripe --help 2>&1 | grep -q stripe-size && LFS_SIZE_OPT="-S" - lfs_migrate() { while IFS='' read -d '' OLDNAME; do $ECHO -n "$OLDNAME: " @@ -137,11 +133,10 @@ lfs_migrate() { [ "$OPT_STRIPE_COUNT" ] && COUNT=$OPT_STRIPE_COUNT || COUNT=$($LFS getstripe -c "$OLDNAME" \ 2> /dev/null) - SIZE=$($LFS getstripe $LFS_SIZE_OPT "$OLDNAME" \ - 2> /dev/null) + SIZE=$($LFS getstripe -S "$OLDNAME" 2> /dev/null) [ -z "$COUNT" -o -z "$SIZE" ] && UNLINK="" - SIZE=${LFS_SIZE_OPT}${SIZE} + SIZE="-S${SIZE}" fi # first try to migrate inside lustre