remove shell scripts which relocates single sector
authorDobrica Pavlinusic <dpavlin@rot13.org>
Wed, 25 Jan 2012 16:52:28 +0000 (16:52 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Wed, 25 Jan 2012 16:52:28 +0000 (16:52 +0000)
git-svn-id: svn://svn.rot13.org/sysadmin-cookbook@286 191e9f34-6774-4a6d-acfc-7664dacd4a2a

recepies/smart/smart-relocate-sector.sh [deleted file]

diff --git a/recepies/smart/smart-relocate-sector.sh b/recepies/smart/smart-relocate-sector.sh
deleted file mode 100755 (executable)
index 3a3ce0e..0000000
+++ /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
-