Page 1 of 3
How to verify my drive is "spinning down"
Posted: August 11th, 2011, 5:27 pm
by LarryJB
I implemented the drive spin down procedure the other day. But am suspicious that it is not working. I don't notice a delay when accessing that drive from windows explorer. Is there some way of verifying that the drive has actually spun down?
Re: How to verify my drive is "spinning down"
Posted: August 11th, 2011, 8:56 pm
by Ian
Hi Larry,
You can check whether your drives have spun down or not by issuing the hdparm command with the -C argument:
where /dev/sda is the drive you want to test.
It will return something along the following lines
/dev/sda:
drive state is: active/idle
this would indicate that the drive is spinning. If it comes back with
/dev/sda:
drive state is: standby
then your drive is spun down.
Hope this helps.
Ian.
Re: How to verify my drive is "spinning down"
Posted: August 13th, 2011, 12:26 pm
by LarryJB
Thanks for the info.
Well, I guess either the command did not work, or there is something running that keeps it active. How do I go about figuring this out?
Re: How to verify my drive is "spinning down"
Posted: August 13th, 2011, 12:51 pm
by Ian
LarryJB wrote:Thanks for the info.
Well, I guess either the command did not work, or there is something running that keeps it active. How do I go about figuring this out?
With difficulty basically
If you're within earshot of your server and so can hear the drive(s) spin up and down then you could try setting the drive to sleep after, say, 20 seconds and then listen. If it spins down but then immediately spins up again then you'll need to work out what is causing it to spin up again. SATA S.M.A.R.T. monitoring tools can cause this. Are you running anything like that? What commands are you using to spin the drive(s) down?
Ian.
Re: How to verify my drive is "spinning down"
Posted: August 13th, 2011, 1:57 pm
by LarryJB
I am not running anything that would keep it spinning that I know of. I was running serviio, but gave up on it and removed it. I am using the hdparm command described in your guide. And yes, I did reboot after adding the command to hdparm.conf. I guess I will need to review what is actually running.
As a real linux lightweight, what is the best way to tell what is running?
Re: How to verify my drive is "spinning down"
Posted: August 14th, 2011, 12:05 am
by Ian
For a full list of what you have running try issuing the following command in a Putty session:
Re: How to verify my drive is "spinning down"
Posted: August 14th, 2011, 1:06 pm
by LarryJB
Here is what that command produced: What could it be?
Code: Select all
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 Aug07 ? 00:00:00 /sbin/init
root 2 0 0 Aug07 ? 00:00:00 [kthreadd]
root 3 2 0 Aug07 ? 00:00:00 [migration/0]
root 4 2 0 Aug07 ? 00:00:00 [ksoftirqd/0]
root 5 2 0 Aug07 ? 00:00:00 [watchdog/0]
root 6 2 0 Aug07 ? 00:00:02 [events/0]
root 7 2 0 Aug07 ? 00:00:00 [cpuset]
root 8 2 0 Aug07 ? 00:00:00 [khelper]
root 9 2 0 Aug07 ? 00:00:00 [async/mgr]
root 10 2 0 Aug07 ? 00:00:00 [pm]
root 11 2 0 Aug07 ? 00:00:00 [sync_supers]
root 12 2 0 Aug07 ? 00:00:00 [bdi-default]
root 13 2 0 Aug07 ? 00:00:00 [kintegrityd/0]
root 14 2 0 Aug07 ? 00:00:01 [kblockd/0]
root 15 2 0 Aug07 ? 00:00:00 [kacpid]
root 16 2 0 Aug07 ? 00:00:00 [kacpi_notify]
root 17 2 0 Aug07 ? 00:00:00 [kacpi_hotplug]
root 18 2 0 Aug07 ? 00:01:10 [ata/0]
root 19 2 0 Aug07 ? 00:00:00 [ata_aux]
root 20 2 0 Aug07 ? 00:00:00 [ksuspend_usbd]
root 21 2 0 Aug07 ? 00:00:00 [khubd]
root 22 2 0 Aug07 ? 00:00:00 [kseriod]
root 23 2 0 Aug07 ? 00:00:00 [kmmcd]
root 26 2 0 Aug07 ? 00:00:00 [khungtaskd]
root 27 2 0 Aug07 ? 00:00:03 [kswapd0]
root 28 2 0 Aug07 ? 00:00:00 [ksmd]
root 29 2 0 Aug07 ? 00:00:00 [aio/0]
root 30 2 0 Aug07 ? 00:00:00 [ecryptfs-kthrea]
root 31 2 0 Aug07 ? 00:00:00 [crypto/0]
root 35 2 0 Aug07 ? 00:02:05 [scsi_eh_0]
root 36 2 0 Aug07 ? 00:00:00 [scsi_eh_1]
root 39 2 0 Aug07 ? 00:00:00 [scsi_eh_2]
root 40 2 0 Aug07 ? 00:00:00 [scsi_eh_3]
root 43 2 0 Aug07 ? 00:00:00 [kstriped]
root 44 2 0 Aug07 ? 00:00:00 [kmpathd/0]
root 45 2 0 Aug07 ? 00:00:00 [kmpath_handlerd]
root 46 2 0 Aug07 ? 00:00:00 [ksnapd]
root 47 2 0 Aug07 ? 00:00:00 [kondemand/0]
root 48 2 0 Aug07 ? 00:00:00 [kconservative/0]
root 203 2 0 Aug07 ? 00:00:00 [usbhid_resumer]
root 209 2 0 Aug07 ? 00:00:05 [kdmflush]
root 213 2 0 Aug07 ? 00:00:00 [kdmflush]
root 217 2 0 Aug07 ? 00:00:00 [kdmflush]
root 251 2 0 Aug07 ? 00:00:03 [flush-251:0]
root 252 2 0 Aug07 ? 00:00:06 [jbd2/dm-0-8]
root 253 2 0 Aug07 ? 00:00:00 [ext4-dio-unwrit]
root 296 1 0 Aug07 ? 00:00:00 upstart-udev-bridge --daemon
root 300 1 0 Aug07 ? 00:00:00 udevd --daemon
root 509 2 0 Aug07 ? 00:00:00 [kpsmoused]
root 528 2 0 Aug07 ? 00:00:00 [radeon/0]
root 529 2 0 Aug07 ? 00:00:00 [ttm_swap]
root 531 300 0 Aug07 ? 00:00:00 udevd --daemon
root 533 300 0 Aug07 ? 00:00:00 udevd --daemon
root 667 2 0 Aug07 ? 00:00:00 [jbd2/dm-2-8]
root 668 2 0 Aug07 ? 00:00:00 [ext4-dio-unwrit]
root 675 1 0 Aug07 ? 00:00:00 dhclient3 -e IF_METRIC=100 -pf /
root 692 2 0 Aug07 ? 00:00:00 [jbd2/sdb1-8]
root 693 2 0 Aug07 ? 00:00:00 [ext4-dio-unwrit]
root 727 1 0 Aug07 ? 00:00:00 smbd -F
root 728 1 0 Aug07 ? 00:00:00 /usr/sbin/sshd -D
syslog 746 1 0 Aug07 ? 00:00:01 rsyslogd -c4
104 754 1 0 Aug07 ? 00:00:14 dbus-daemon --system --fork
avahi 773 1 0 Aug07 ? 00:00:00 avahi-daemon: running [Server1.l
avahi 774 773 0 Aug07 ? 00:00:00 avahi-daemon: chroot helper
root 790 1 0 Aug07 ? 00:00:16 nmbd -D
root 803 1 0 Aug07 tty4 00:00:00 /sbin/getty -8 38400 tty4
root 808 1 0 Aug07 tty5 00:00:00 /sbin/getty -8 38400 tty5
root 823 727 0 Aug07 ? 00:00:00 smbd -F
root 824 1 0 Aug07 tty2 00:00:00 /sbin/getty -8 38400 tty2
root 825 1 0 Aug07 tty3 00:00:00 /sbin/getty -8 38400 tty3
root 827 1 0 Aug07 tty6 00:00:00 /sbin/getty -8 38400 tty6
daemon 829 1 0 Aug07 ? 00:00:00 atd
root 830 1 0 Aug07 ? 00:00:00 cron
root 835 1 0 Aug07 ? 00:00:03 /usr/sbin/winbindd
root 885 835 0 Aug07 ? 00:00:00 /usr/sbin/winbindd
prlarb0 887 1 0 Aug07 ? 00:00:04 Xvnc4 :1 -desktop Server1:1 () -
root 912 1 0 Aug07 ? 00:00:18 /usr/sbin/pwrstatd
prlarb0 922 1 0 Aug07 ? 00:00:00 /usr/bin/ck-launch-session /usr/
prlarb0 942 922 0 Aug07 ? 00:00:01 /usr/bin/ssh-agent /usr/bin/ck-l
root 944 1 0 Aug07 ? 00:00:00 /usr/sbin/console-kit-daemon --n
prlarb0 1017 922 0 Aug07 ? 00:00:11 x-session-manager
prlarb0 1020 1 0 Aug07 ? 00:00:00 /usr/bin/dbus-launch --exit-with
prlarb0 1021 1 0 Aug07 ? 00:00:03 /bin/dbus-daemon --fork --print-
prlarb0 1024 1 0 Aug07 ? 00:00:03 /usr/lib/libgconf2-4/gconfd-2
prlarb0 1030 1 0 Aug07 ? 00:00:24 /usr/lib/gnome-settings-daemon/g
prlarb0 1031 1 0 Aug07 ? 00:00:00 /usr/bin/gnome-keyring-daemon --
prlarb0 1035 1 0 Aug07 ? 00:00:00 /usr/lib/gvfs/gvfsd
prlarb0 1038 1017 0 Aug07 ? 00:00:32 gnome-power-manager
prlarb0 1040 1017 0 Aug07 ? 00:00:00 /usr/lib/policykit-1-gnome/polki
prlarb0 1041 1017 0 Aug07 ? 00:00:00 /usr/bin/metacity
prlarb0 1043 1017 0 Aug07 ? 00:00:11 gnome-panel
prlarb0 1044 1017 0 Aug07 ? 00:00:11 nautilus
root 1046 1 0 Aug07 ? 00:00:22 /usr/lib/upower/upowerd
root 1047 1 0 Aug07 ? 00:00:18 /usr/bin/perl /usr/share/webmin/
root 1051 1 0 Aug07 tty1 00:00:00 /sbin/getty -8 38400 tty1
root 1055 1 0 Aug07 ? 00:00:00 /usr/lib/policykit-1/polkitd
prlarb0 1056 1 0 Aug07 ? 00:00:00 /usr/bin/pulseaudio --start --lo
rtkit 1058 1 0 Aug07 ? 00:00:03 /usr/lib/rtkit/rtkit-daemon
prlarb0 1095 1 0 Aug07 ? 00:00:00 /usr/lib/gvfs/gvfsd-trash --spaw
prlarb0 1097 1 0 Aug07 ? 00:00:00 /usr/lib/bonobo-activation/bonob
prlarb0 1101 1 0 Aug07 ? 00:00:04 /usr/lib/gvfs/gvfs-gdu-volume-mo
root 1103 1 0 Aug07 ? 00:00:23 /usr/lib/udisks/udisks-daemon
root 1104 1103 0 Aug07 ? 00:02:27 udisks-daemon: polling /dev/sr0
prlarb0 1108 1 0 Aug07 ? 00:00:00 /usr/lib/gvfs/gvfs-gphoto2-volum
prlarb0 1116 1 0 Aug07 ? 00:00:00 /usr/lib/gnome-panel/wnck-applet
prlarb0 1117 1 0 Aug07 ? 00:00:00 /usr/lib/gnome-applets/trashappl
prlarb0 1119 1 0 Aug07 ? 00:00:08 /usr/lib/gvfs/gvfs-afc-volume-mo
prlarb0 1127 1 0 Aug07 ? 00:00:12 /usr/lib/gnome-panel/clock-apple
prlarb0 1128 1 0 Aug07 ? 00:00:00 /usr/lib/indicator-applet/indica
prlarb0 1129 1 0 Aug07 ? 00:00:00 /usr/lib/gnome-panel/notificatio
prlarb0 1132 1 0 Aug07 ? 00:00:00 /usr/lib/gvfs/gvfsd-metadata
prlarb0 1134 1 0 Aug07 ? 00:00:00 /usr/lib/indicator-sound/indicat
prlarb0 1136 1 0 Aug07 ? 00:00:00 /usr/lib/indicator-application/i
prlarb0 1138 1 0 Aug07 ? 00:00:00 /usr/lib/indicator-messages/indi
root 1147 835 0 Aug07 ? 00:00:04 /usr/sbin/winbindd
root 1155 835 0 Aug07 ? 00:00:00 /usr/sbin/winbindd
root 2612 727 0 01:02 ? 00:02:11 smbd -F
1001 6755 727 0 07:01 ? 00:00:00 smbd -F
root 6758 728 0 07:01 ? 00:00:00 sshd: prlarb0 [priv]
prlarb0 6836 6758 0 07:02 ? 00:00:00 sshd: prlarb0@pts/0
prlarb0 6837 6836 3 07:02 pts/0 00:00:00 -bash
root 6857 1047 10 07:02 ? 00:00:00 [miniserv.pl] <defunct>
prlarb0 6858 6837 0 07:02 pts/0 00:00:00 ps -ef
root 15285 727 0 Aug12 ? 00:00:33 smbd -F
root 20422 727 0 Aug13 ? 00:00:00 smbd -F
prlarb0 22436 1 0 Aug13 ? 00:00:00 /usr/lib/gvfs/gvfsd-computer --s
prlarb0@Server1:~$ sudo hdparm -C /dev/sda
[sudo] password for prlarb0:
/dev/sda:
drive state is: active/idle
prlarb0@Server1:~$ sudo hdparm -C /dev/sdb
/dev/sdb:
drive state is: active/idle
prlarb0@Server1:~$
Re: How to verify my drive is "spinning down"
Posted: August 14th, 2011, 4:05 pm
by Ian
Does the drive spin down but then spin back up again or does it never spin down?
Re: How to verify my drive is "spinning down"
Posted: August 21st, 2011, 7:00 pm
by LarryJB
Ian wrote:Does the drive spin down but then spin back up again or does it never spin down?
sorry I have not been working on this lately, but I have been very busy and have not had the time.
I changed the hdparm.conf to say hdparm -S 4 /dev/sdb Which I believe should cause the drive to spin down after 20 seconds.
The "sudo hdparm -C /dev/sdb" command only produces the active/idle status. So I guess it is not spinning down at all.
Re: How to verify my drive is "spinning down"
Posted: August 28th, 2011, 10:52 am
by Ian
Hi Larry,
Rather than change the hdparm.conf file try issuing the "hdparm -S 4 /dev/sdb" command in a Putty session. It's possible the process is not being run at boot. Does it make a difference?
Ian.