poma <pomidorabelisima(a)gmail.com> writes:
grep -w sdc /proc/diskstats >dstat.1st
sleep 60
grep -w sdc /proc/diskstats >dstat.2nd
if cmp dstat.1st dstat.2nd >/dev/null 2>&1
then
echo Stopping disk, spinning down…
sdparm -f -r -q -v -C stop /dev/sdc
exit 0
else
echo Disk busy.
exit 1
fi
EOF
Thanks! I had forgotten about sdparm. (Boy do I miss the days when I
just installed everything and then could do something like "man -k disk"
to find likely candidates.
Monitoring /proc/diskstats might also give me a clue as to what is
touching the disks.
-wolfgang
--
g+:
https://plus.google.com/114566345864337108516/about