PDA

View Full Version : [all variants] ...and STAY down! Sending a disk to stand-by and keeping it there?



herr_tichy
August 2nd, 2009, 03:50 PM
I have three harddrives in my computer of which only sdc is used when running Linux:


:~$ mount
/dev/sdc1 on / type ext3 (rw,relatime,errors=remount-ro)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
varrun on /var/run type tmpfs (rw,nosuid,mode=0755)
varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
lrm on /lib/modules/2.6.28-14-generic/volatile type tmpfs (rw,mode=755)
securityfs on /sys/kernel/security type securityfs (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
gvfs-fuse-daemon on /home/harald/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=harald)
/dev/mapper/home on /media/temp type ext3 (rw)

So I decided that the other two don't have to produce heat and noise and therefor should be put to sleep.


:~$ sudo hdparm -Y /dev/sda

/dev/sda:
issuing sleep command

...did the trick, but the harddisk immediately spins up again.


Aug 2 16:48:39 dreiraumrakete kernel: [13463.736326] ata1.00: exception Emask 0x0 SAct 0x1 SErr 0x0 action 0x6
Aug 2 16:48:39 dreiraumrakete kernel: [13463.736332] ata1.00: waking up from sleep
Aug 2 16:48:39 dreiraumrakete kernel: [13463.736342] ata1: hard resetting link
Aug 2 16:48:40 dreiraumrakete kernel: [13464.217539] ata1: softreset failed (device not ready)
Aug 2 16:48:40 dreiraumrakete kernel: [13464.217547] ata1: failed due to HW bug, retry pmp=0
Aug 2 16:48:40 dreiraumrakete kernel: [13464.381557] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
Aug 2 16:48:40 dreiraumrakete kernel: [13464.386475] ata1.00: SB600 AHCI: limiting to 255 sectors per cmd
Aug 2 16:48:43 dreiraumrakete kernel: [13467.210160] ata1.00: SB600 AHCI: limiting to 255 sectors per cmd
Aug 2 16:48:43 dreiraumrakete kernel: [13467.210169] ata1.00: configured for UDMA/133
Aug 2 16:48:43 dreiraumrakete kernel: [13467.210185] ata1: EH complete
Aug 2 16:48:43 dreiraumrakete kernel: [13467.210304] sd 0:0:0:0: [sda] 156301488 512-byte hardware sectors: (80.0 GB/74.5 GiB)
Aug 2 16:48:43 dreiraumrakete kernel: [13467.210330] sd 0:0:0:0: [sda] Write Protect is off
Aug 2 16:48:43 dreiraumrakete kernel: [13467.210334] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
Aug 2 16:48:43 dreiraumrakete kernel: [13467.210366] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA


Is there any way to force the disk to stay in standby?

herr_tichy
August 5th, 2009, 10:30 AM
Yeah, thanks for all the overwhelming help...

Anyway, it was a bug in hdparm v8.9. I've downloaded and compiled the newest version (hdparm v9.22) from their project website and it puts the disks to sleep correctly.