Whamcloud - gitweb
LU-6051 utils: Remove incorrect request for getstripe help 00/30800/3
authorSteve Guminski <stephenx.guminski@intel.com>
Fri, 18 Aug 2017 12:37:29 +0000 (08:37 -0400)
committerJohn L. Hammond <john.hammond@intel.com>
Mon, 12 Mar 2018 18:18:34 +0000 (18:18 +0000)
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
Lustre-change: https://review.whamcloud.com/28597
Lustre-commit: ad45173d94e0be94de90368019be52a905bcb993

Signed-off-by: Steve Guminski <stephenx.guminski@intel.com>
Change-Id: I29ae644c7d6b2ed247573d83c943cb556cfb6325
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/30800
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
lustre/scripts/lfs_migrate

index 37e8ee0..30e0664 100755 (executable)
@@ -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 -- <<USAGE 1>&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