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

hdd: small improvements

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