From ad45173d94e0be94de90368019be52a905bcb993 Mon Sep 17 00:00:00 2001 From: Steve Guminski Date: Fri, 18 Aug 2017 08:37:29 -0400 Subject: [PATCH] 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 --- lustre/scripts/lfs_migrate | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) 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 -- 1.8.3.1