Commit ff0f5bb3 authored by Vitaly Lipatov's avatar Vitaly Lipatov

improve fix_disk.sh

parent ecd2aa97
......@@ -8,7 +8,7 @@
if [ -z "$1" ] || [ "$1" = "-h" ] || [ "$1" = "--help" ] ; then
echo "Usage:"
echo "fix_disk [--fix]"
echo "fix_disk [--fix] [--force] [--list]"
exit
fi
......@@ -71,6 +71,16 @@ done
[ -n "$LIST" ] && exit
# [23743.306922] blk_update_request: critical medium error, dev sdc, sector 510634067
dmesg | grep "blk_update_request: critical medium error" | sed -e "s|.*blk_update_request: critical medium error, dev \(sd[a-z]\), sector \([0-9]*\)|\1 \2|g" | sort -u | \
while read devname block ; do
#for i in $BLOCKLIST ; do
echo
echo "Fixing $block block on /dev/$devname ..."
fix_block /dev/$devname $block
done
dmesg | grep "end_request: I/O error" | sed -e "s|.*end_request: I/O error, dev \(sd[a-z]\), sector \([0-9]*\)|\1 \2|g" | sort -u | \
while read devname block ; do
#for i in $BLOCKLIST ; do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment