[natty] Cannot spin down hard drives while APM_level=254

Bug #701144 reported by mlx on 2011-01-10
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
hdparm (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: hdparm

Some hard drives (tested with Samsung HD154UI) refuse to spin down on demand (hdparm -y and -Y options) or on inactivity timeout (-S) while the APM level (-B) is at 254. Setting it to another value (tested 255 and 253) makes the drive respect the set spindown time and spin down on demand as well.

-----------------------------------------
Old description:
On an update natty ubuntu-server installation (hdparm version 9.32-1ubuntu1) with nothing accessing the hard-drives running, I can't get them to spin down. The drives (sd[ab]) are in an LVM setup but only used for 2 data-directories, the system itself is on a USB flashstick (sdc) mounted directly:
# mount
/dev/sdc1 on / type ext4 (rw,errors=remount-ro)
...
/dev/mapper/DATA_VG-DATA_LV on /data type ext4 (rw)
/dev/mapper/DATA_VG-ZALOHY_LV on /zalohy type ext4 (rw)
# pvdisplay
  --- Physical volume ---
  PV Name /dev/sda1
  VG Name DATA_VG
...
  --- Physical volume ---
  PV Name /dev/sdb1
  VG Name DATA_VG
...
hdparm -y seems to do nothing at all, while hdparm -Y seems to put the SATA links to sleep:
Jan 10 19:32:11 johny kernel: [13313.493918] ata3.00: exception Emask 0x0 SAct 0x1 SErr 0x0 action 0x6
Jan 10 19:32:11 johny kernel: [13313.506875] ata3.00: waking up from sleep
Jan 10 19:32:11 johny kernel: [13313.514994] ata3: hard resetting link
Jan 10 19:32:12 johny kernel: [13313.832117] ata3: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
Jan 10 19:32:12 johny kernel: [13313.845403] ata3.00: configured for UDMA/133
Jan 10 19:32:12 johny kernel: [13313.845439] ata3: EH complete
Jan 10 19:32:12 johny kernel: [13313.852572] ata5.00: exception Emask 0x0 SAct 0x1 SErr 0x0 action 0x6
Jan 10 19:32:12 johny kernel: [13313.865560] ata5.00: waking up from sleep
Jan 10 19:32:12 johny kernel: [13313.873618] ata5: hard resetting link
Jan 10 19:32:12 johny kernel: [13314.192119] ata5: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
Jan 10 19:32:12 johny kernel: [13314.205402] ata5.00: configured for UDMA/133
Jan 10 19:32:12 johny kernel: [13314.205436] ata5: EH complete

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: hdparm 9.32-1ubuntu1
ProcVersionSignature: Ubuntu 2.6.37-12.26-generic-pae 2.6.37
Uname: Linux 2.6.37-12-generic-pae i686
Architecture: i386
Date: Mon Jan 10 19:23:08 2011
InstallationMedia: Ubuntu-Server 11.04 "Natty Narwhal" - Alpha i386 (20110106)
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: hdparm

mlx (myxal-mxl) wrote :

Who manufactures the drives, and what chipset is the RAID card? I was receiving the same error messages with two different Western Digital hard drives tested against two different Silicon Image SATA controllers; after replacing the Western Digitals with a Hitachi drive I had no problems. From other bug reports looking up "hard resetting link" on launchpad, it seems like the sata_sil and sata_via modules may not be playing nice with certain combinations of controllers and hard drives. I tried live CDs going back as far as 9.04 as well as the 11.04 RC2 and had the same issue when trying to write or read from the drive. Replacing the hardware was the only solution that worked.

mlx (myxal-mxl) wrote :

HDD: "Sammy" == Samsung
RAID: This isn't a RAID setup, not even a fake one - it's Intel's ICH7 SATA controller on the D945GSEJT motherboard. I will check with different drive brand (I have a Seagate at hand).when I get the chance, but the the thing worked without problem on debian squeeze so I doubt it's hardware/driver related unless something was changed since linux 2.6.32.

mlx (myxal-mxl) wrote :

Well my Seagate ST360015A (PATA drive) works as expected on both the onboard PATA (Intel 82801G ICH7) and onboard SATA (82801GM ICH7) over Silicon Image SiI3811 bridge.
I'm not sure if this is a bug in hdparm, linux, or LVM.

mlx (myxal-mxl) wrote :

Okay, just ruled out LVM as culprit - the problem persists with the drive effectively blank (no partitions, just a GPT table).
Also of importance:
1) Mainline kernel 2.6.38-rc3 behaves the same way.
2) Disabling APM on the drive (hdparm -B 255) makes -y and -Y options work again.
3) This is the same behavior as in squeeze - the difference is that on squeeze, APM is off by default.

This raises the question "Is the manual spindown (-y/-Y) supposed to work with APM enabled"? The aforementioned Barracuda ATA doesn't support APM at all, so I tried an old Travelstar (IC25N040ATCS05-0). Spindown with APM enabled works on it.

mlx (myxal-mxl) on 2011-02-03
description: updated
tags: added: apm
removed: i386 natty
summary: - [natty] Cannot spin down hard drives
+ [natty] Cannot spin down hard drives while APM_level=254
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers