disk spindown

Wolfgang S. Rupprecht wolfgang.rupprecht at gmail.com
Wed Apr 24 19:08:06 UTC 2013


poma <pomidorabelisima at 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


More information about the users mailing list