Commit d6759c7f authored by System Administrator's avatar System Administrator Committed by Vitaly Lipatov

hdd: small improvements

parent 08c87cfb
......@@ -2,10 +2,7 @@
# disable WriteCache on SSD
is_hdd()
{
hdparm -i "$1" | grep -q "Model=WDC"
}
. ./functions.sh
for dev in /dev/sd? ; do
is_hdd $dev && continue
......
......@@ -92,13 +92,15 @@ sort <$0.log.found >$0.log.found.sort
diff -u $0.log.sort $0.log.found.sort
echo
echo "Drives not in active RAID:"
echo "Drives nor in active RAID nor in LVM:"
for dev in /dev/sd* ; do
sdev=$(basename $dev)
# strict
cat /proc/mdstat | grep -q " $sdev\[" && continue
#cat /proc/mdstat | grep -q " $sdev\[" && continue
# use parts from it
cat /proc/mdstat | grep -q " $sdev[0-9]*\[" && continue
# LVM?
pvscan 2>/dev/null | grep -q " $dev[0-9]* " && continue
printf " %09s %10s\n" "$dev" "$(print_size $dev)"
done
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