From ab6abc228c479284c408f0f01edfa974e15e886f Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Wed, 25 Jan 2012 16:52:28 +0000 Subject: [PATCH] remove shell scripts which relocates single sector git-svn-id: svn://svn.rot13.org/sysadmin-cookbook@286 191e9f34-6774-4a6d-acfc-7664dacd4a2a --- recepies/smart/smart-relocate-sector.sh | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100755 recepies/smart/smart-relocate-sector.sh diff --git a/recepies/smart/smart-relocate-sector.sh b/recepies/smart/smart-relocate-sector.sh deleted file mode 100755 index 3a3ce0e..0000000 --- a/recepies/smart/smart-relocate-sector.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh -x - -DRIVE=$1 - -test -z "$DRIVE" && echo "usage: $0 /dev/sda" && exit - -smartctl -a $DRIVE > /tmp/smart.0 - -sector=`smartctl -a $DRIVE | grep 'Completed: read failure' | head -1 | awk '{ print $10 }'` - -if [ ! -z "$sector" ] ; then - - echo $sector - hdparm --read-sector $sector $DRIVE - smartctl -a $DRIVE > /tmp/smart.1 - hdparm --write-sector $sector --yes-i-know-what-i-am-doing $DRIVE - smartctl -a $DRIVE > /tmp/smart.2 - - smartctl -t long $DRIVE - - echo "when smartctl test finishes, re-check your arrays with:" - cat /proc/mdstat | grep sdd | cut -d' ' -f1 | xargs -i echo "echo check > /sys/block/{}/md/sync_action" - -fi - -- 2.20.1