* 2.6.22-rc3 hibernate(?) disables SMART on ide
@ 2007-06-01 21:41 David Greaves
2007-06-02 9:45 ` Tejun Heo
0 siblings, 1 reply; 11+ messages in thread
From: David Greaves @ 2007-06-01 21:41 UTC (permalink / raw)
To: 'linux-kernel@vger.kernel.org', IDE Linux
I have 2 ide disks. If I enable SMART and hibernate/suspend2disk, SMART is
disabled when I resume.
Same as in 2.6.21.1
cu:~# smartctl -son /dev/hda
smartctl version 5.36 [i686-pc-linux-gnu] Copyright (C) 2002-6 Bruce Allen
Home page is http://smartmontools.sourceforge.net/
=== START OF ENABLE/DISABLE COMMANDS SECTION ===
SMART Enabled.
cu:~# /usr/net/bin/hibernate
[poweron resume here]
cu:~# smartctl -a /dev/hda
smartctl version 5.36 [i686-pc-linux-gnu] Copyright (C) 2002-6 Bruce Allen
Home page is http://smartmontools.sourceforge.net/
=== START OF INFORMATION SECTION ===
Model Family: Seagate Barracuda ATA II family
Device Model: ST320420A
Serial Number: 3CL04RKY
Firmware Version: 3.21
User Capacity: 20,404,101,120 bytes
Device is: In smartctl database [for details use: -P show]
ATA Version is: 4
ATA Standard is: Exact ATA specification draft version not indicated
Local Time is: Fri Jun 1 22:37:15 2007 BST
SMART support is: Available - device has SMART capability.
SMART support is: Disabled
SMART Disabled. Use option -s with argument 'on' to enable it.
here's some syslog
Jun 1 21:56:25 cu kernel: Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
Jun 1 21:56:25 cu kernel: ide: Assuming 33MHz system bus speed for PIO modes;
override with idebus=xx
Jun 1 21:56:25 cu kernel: VP_IDE: IDE controller at PCI slot 0000:00:0f.1
Jun 1 21:56:25 cu kernel: ACPI: PCI Interrupt 0000:00:0f.1[A] -> GSI 20 (level,
low) -> IRQ 16
Jun 1 21:56:25 cu kernel: VP_IDE: chipset revision 6
Jun 1 21:56:25 cu kernel: VP_IDE: not 100%% native mode: will probe irqs later
Jun 1 21:56:25 cu kernel: VP_IDE: VIA vt8237 (rev 00) IDE UDMA133 controller on
pci0000:00:0f.1
Jun 1 21:56:25 cu kernel: ide0: BM-DMA at 0x9000-0x9007, BIOS settings:
hda:DMA, hdb:DMA
Jun 1 21:56:25 cu kernel: ide1: BM-DMA at 0x9008-0x900f, BIOS settings:
hdc:pio, hdd:DMA
Jun 1 21:56:25 cu kernel: Probing IDE interface ide0...
Jun 1 21:56:25 cu kernel: Switched to high resolution mode on CPU 0
Jun 1 21:56:25 cu kernel: hda: ST320420A, ATA DISK drive
Jun 1 21:56:25 cu kernel: hdb: Maxtor 5A300J0, ATA DISK drive
Jun 1 21:56:25 cu kernel: ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
Jun 1 21:56:25 cu kernel: Probing IDE interface ide1...
Jun 1 21:56:25 cu kernel: hdd: PLEXTOR CD-R PX-W2410A, ATAPI CD/DVD-ROM drive
Jun 1 21:56:25 cu kernel: ide1 at 0x170-0x177,0x376 on irq 15
Jun 1 21:56:25 cu kernel: hda: max request size: 128KiB
Jun 1 21:56:25 cu kernel: hda: 39851760 sectors (20404 MB) w/2048KiB Cache,
CHS=39535/16/63, UDMA(66)
Jun 1 21:56:25 cu kernel: hda: cache flushes not supported
Jun 1 21:56:25 cu kernel: hda: hda1 hda2 hda3
Jun 1 21:56:25 cu kernel: hdb: max request size: 512KiB
Jun 1 21:56:25 cu kernel: hdb: 585940320 sectors (300001 MB) w/2048KiB Cache,
CHS=36473/255/63, UDMA(133)
Jun 1 21:56:25 cu kernel: hdb: cache flushes supported
Jun 1 21:56:25 cu kernel: hdb: hdb1 hdb2
anything else needed?
David
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: 2.6.22-rc3 hibernate(?) disables SMART on ide
2007-06-01 21:41 David Greaves
@ 2007-06-02 9:45 ` Tejun Heo
2007-06-02 21:53 ` David Greaves
0 siblings, 1 reply; 11+ messages in thread
From: Tejun Heo @ 2007-06-02 9:45 UTC (permalink / raw)
To: David Greaves; +Cc: 'linux-kernel@vger.kernel.org', IDE Linux, ballen
David Greaves wrote:
> I have 2 ide disks. If I enable SMART and hibernate/suspend2disk, SMART is
> disabled when I resume.
>
> Same as in 2.6.21.1
>
> cu:~# smartctl -son /dev/hda
> smartctl version 5.36 [i686-pc-linux-gnu] Copyright (C) 2002-6 Bruce Allen
> Home page is http://smartmontools.sourceforge.net/
>
> === START OF ENABLE/DISABLE COMMANDS SECTION ===
> SMART Enabled.
>
> cu:~# /usr/net/bin/hibernate
> [poweron resume here]
> cu:~# smartctl -a /dev/hda
> smartctl version 5.36 [i686-pc-linux-gnu] Copyright (C) 2002-6 Bruce Allen
> Home page is http://smartmontools.sourceforge.net/
>
> === START OF INFORMATION SECTION ===
> Model Family: Seagate Barracuda ATA II family
> Device Model: ST320420A
> Serial Number: 3CL04RKY
> Firmware Version: 3.21
> User Capacity: 20,404,101,120 bytes
> Device is: In smartctl database [for details use: -P show]
> ATA Version is: 4
> ATA Standard is: Exact ATA specification draft version not indicated
> Local Time is: Fri Jun 1 22:37:15 2007 BST
> SMART support is: Available - device has SMART capability.
> SMART support is: Disabled
>
> SMART Disabled. Use option -s with argument 'on' to enable it.
According to the ATA standard, the device (drive) itself is responsible
for preserving SMART enabled status over power cycles. It seems your
drive doesn't wanna do that. I don't think mangling with SMART setup in
the kernel is wise thing to do. Bruce, any ideas? Maybe hook smartd
such that it gets suspend/resume events?
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: 2.6.22-rc3 hibernate(?) disables SMART on ide
[not found] ` <8rA7H-1B4-1@gated-at.bofh.it>
@ 2007-06-02 21:27 ` Bodo Eggert
2007-06-02 22:18 ` Jeff Garzik
2007-06-02 22:22 ` Alan Cox
0 siblings, 2 replies; 11+ messages in thread
From: Bodo Eggert @ 2007-06-02 21:27 UTC (permalink / raw)
To: Tejun Heo, David Greaves, 'linux-kernel@vger.kernel.org',
IDE Linux, ballen
Tejun Heo <htejun@gmail.com> wrote:
> David Greaves wrote:
>> I have 2 ide disks. If I enable SMART and hibernate/suspend2disk, SMART is
>> disabled when I resume.
<snip>
Maybe it's disabled by the BIOS?
> According to the ATA standard, the device (drive) itself is responsible
> for preserving SMART enabled status over power cycles. It seems your
> drive doesn't wanna do that. I don't think mangling with SMART setup in
> the kernel is wise thing to do. Bruce, any ideas? Maybe hook smartd
> such that it gets suspend/resume events?
1) Enabling smart is a single command
2) The command should not fail, and if it fails, it's probably because
it's not supported. There is nothing userspace can do better or worse.
3) There should be no bad effect from enabling smart, except if the BIOS
insists on not booting because of a bad RAID disk. (That's why I like
to disable it in the BIOS)
4) Not enabling smart is a common failure in many setups. Usurally the admin
will have to enumerate the attached disks and patch the smartctl startup
scripts.
5) Sometimes there is no smartd (or udev) running, and you'll still not want
to re-enable smart each time you suspend.
6) A simple udev rule or smartd hook should be bigger than the code required
in-kernel.
Therefore I suggest setting the smart-enabled-bit in the kernel, in spite of
not being the kernel's duty. It would be a 99,99% DTRT.
OTOH: What would happen if the drive's command queue is full?
What happens for DMA handling (can we hitch-hike)?
Is it possible to just enqueue "enable_smart($DEV)"?
--
Top 100 things you don't want the sysadmin to say:
48. Tell me again what that '-r' option to rm does
Friß, Spammer: VmngZze7@fc.7eggert.dyndns.org EPlKiav@7eggert.dyndns.org
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: 2.6.22-rc3 hibernate(?) disables SMART on ide
2007-06-02 9:45 ` Tejun Heo
@ 2007-06-02 21:53 ` David Greaves
2007-06-04 16:29 ` Mark Lord
0 siblings, 1 reply; 11+ messages in thread
From: David Greaves @ 2007-06-02 21:53 UTC (permalink / raw)
To: Tejun Heo; +Cc: 'linux-kernel@vger.kernel.org', IDE Linux, ballen
Tejun Heo wrote:
> David Greaves wrote:
>> I have 2 ide disks. If I enable SMART and hibernate/suspend2disk, SMART is
>> disabled when I resume.
>>
>> Same as in 2.6.21.1
>
> According to the ATA standard, the device (drive) itself is responsible
> for preserving SMART enabled status over power cycles. It seems your
> drive doesn't wanna do that. I don't think mangling with SMART setup in
> the kernel is wise thing to do. Bruce, any ideas? Maybe hook smartd
> such that it gets suspend/resume events?
Sorry, FYI, I made the same mistake as when I reported the wol problem - I was
booting 2.6.21.1.
I am having problems with 2.6.22-rc3 but when it does suspend/resume I can
confirm that the problem is still there (of course).
However your comments still stand.
One unpleasant side effect is that I get
hda: drive_cmd: status=0x51 { DriveReady SeekComplete Error }
hda: drive_cmd: error=0x04 { DriveStatusError }
ide: failed opcode was: 0xb0
hda: drive_cmd: status=0x51 { DriveReady SeekComplete Error }
hda: drive_cmd: error=0x04 { DriveStatusError }
ide: failed opcode was: 0xb0
...
and
hdb: drive_cmd: status=0x51 { DriveReady SeekComplete Error }
hdb: drive_cmd: error=0x04 { DriveStatusError }
ide: failed opcode was: 0xb0
hdb: drive_cmd: status=0x51 { DriveReady SeekComplete Error }
hdb: drive_cmd: error=0x04 { DriveStatusError }
ide: failed opcode was: 0xb0
...
when the system comes back (induced from smartd I guess) until I do a:
smartctl -son
David
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: 2.6.22-rc3 hibernate(?) disables SMART on ide
2007-06-02 21:27 ` 2.6.22-rc3 hibernate(?) disables SMART on ide Bodo Eggert
@ 2007-06-02 22:18 ` Jeff Garzik
2007-06-02 22:22 ` Alan Cox
1 sibling, 0 replies; 11+ messages in thread
From: Jeff Garzik @ 2007-06-02 22:18 UTC (permalink / raw)
To: 7eggert
Cc: Tejun Heo, David Greaves, 'linux-kernel@vger.kernel.org',
IDE Linux, ballen
Bodo Eggert wrote:
> Therefore I suggest setting the smart-enabled-bit in the kernel, in spite of
> not being the kernel's duty. It would be a 99,99% DTRT.
NAK. That's hardcoding policy in the kernel.
Jeff
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: 2.6.22-rc3 hibernate(?) disables SMART on ide
2007-06-02 21:27 ` 2.6.22-rc3 hibernate(?) disables SMART on ide Bodo Eggert
2007-06-02 22:18 ` Jeff Garzik
@ 2007-06-02 22:22 ` Alan Cox
1 sibling, 0 replies; 11+ messages in thread
From: Alan Cox @ 2007-06-02 22:22 UTC (permalink / raw)
To: 7eggert
Cc: Tejun Heo, David Greaves, 'linux-kernel@vger.kernel.org',
IDE Linux, ballen
> 3) There should be no bad effect from enabling smart, except if the BIOS
> insists on not booting because of a bad RAID disk. (That's why I like
> to disable it in the BIOS)
With a couple of exceptions unfortunately. Belongs in udev and smartd so
its controllable and flexible (and also swappable).
Alan
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: 2.6.22-rc3 hibernate(?) disables SMART on ide
2007-06-02 21:53 ` David Greaves
@ 2007-06-04 16:29 ` Mark Lord
2007-06-04 17:22 ` David Greaves
0 siblings, 1 reply; 11+ messages in thread
From: Mark Lord @ 2007-06-04 16:29 UTC (permalink / raw)
To: David Greaves
Cc: Tejun Heo, 'linux-kernel@vger.kernel.org', IDE Linux,
ballen
David Greaves wrote:
> I have 2 ide disks. If I enable SMART and hibernate/suspend2disk, SMART is
> disabled when I resume.
Just a thought: This *may* be fixable at the drive, with "hdparm -K1".
Cheers
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: 2.6.22-rc3 hibernate(?) disables SMART on ide
2007-06-04 16:29 ` Mark Lord
@ 2007-06-04 17:22 ` David Greaves
2007-06-05 4:17 ` Mark Lord
0 siblings, 1 reply; 11+ messages in thread
From: David Greaves @ 2007-06-04 17:22 UTC (permalink / raw)
To: Mark Lord
Cc: Tejun Heo, 'linux-kernel@vger.kernel.org', IDE Linux,
ballen
Mark Lord wrote:
> David Greaves wrote:
>> I have 2 ide disks. If I enable SMART and hibernate/suspend2disk,
>> SMART is
>> disabled when I resume.
>
> Just a thought: This *may* be fixable at the drive, with "hdparm -K1".
Thanks Mark, good idea.
Just tried and it didn't help though :(
in fact, hda gave
cu:~# hdparm -K1 /dev/hda
/dev/hda:
setting drive keep features to 1 (on)
HDIO_DRIVE_CMD(keepsettings) failed: Input/output error
and in dmesg:
hda: drive_cmd: status=0x51 { DriveReady SeekComplete Error }
hda: drive_cmd: error=0x04 { DriveStatusError }
ide: failed opcode was: 0xef
The drive, FWIW, is:
=== START OF INFORMATION SECTION ===
Model Family: Seagate Barracuda ATA II family
Device Model: ST320420A
Serial Number: 3CL04RKY
Firmware Version: 3.21
User Capacity: 20,404,101,120 bytes
Device is: In smartctl database [for details use: -P show]
ATA Version is: 4
ATA Standard is: Exact ATA specification draft version not indicated
Local Time is: Mon Jun 4 18:20:46 2007 BST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
David
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: 2.6.22-rc3 hibernate(?) disables SMART on ide
2007-06-04 17:22 ` David Greaves
@ 2007-06-05 4:17 ` Mark Lord
2007-06-05 9:03 ` David Greaves
0 siblings, 1 reply; 11+ messages in thread
From: Mark Lord @ 2007-06-05 4:17 UTC (permalink / raw)
To: David Greaves
Cc: Tejun Heo, 'linux-kernel@vger.kernel.org', IDE Linux,
ballen
David Greaves wrote:
> Mark Lord wrote:
>> David Greaves wrote:
>>> I have 2 ide disks. If I enable SMART and hibernate/suspend2disk,
>>> SMART is
>>> disabled when I resume.
>> Just a thought: This *may* be fixable at the drive, with "hdparm -K1".
>
> Thanks Mark, good idea.
> Just tried and it didn't help though :(
>
> in fact, hda gave
> cu:~# hdparm -K1 /dev/hda
>
> /dev/hda:
> setting drive keep features to 1 (on)
> HDIO_DRIVE_CMD(keepsettings) failed: Input/output error
>
> and in dmesg:
> hda: drive_cmd: status=0x51 { DriveReady SeekComplete Error }
> hda: drive_cmd: error=0x04 { DriveStatusError }
> ide: failed opcode was: 0xef
That's odd. Could you try that again,
with the latest (either v7.3 or v7.4) version of hdparm
(from sourceforge) ?
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: 2.6.22-rc3 hibernate(?) disables SMART on ide
2007-06-05 4:17 ` Mark Lord
@ 2007-06-05 9:03 ` David Greaves
2007-06-05 15:33 ` Mark Lord
0 siblings, 1 reply; 11+ messages in thread
From: David Greaves @ 2007-06-05 9:03 UTC (permalink / raw)
To: Mark Lord
Cc: Tejun Heo, 'linux-kernel@vger.kernel.org', IDE Linux,
ballen
Mark Lord wrote:
> That's odd. Could you try that again,
> with the latest (either v7.3 or v7.4) version of hdparm
> (from sourceforge) ?
Using Debian's 7.3 via apt-get experimental - is that OK or would you like me to
compile the upstream?
2.6.21.1
cu:~# hdparm -V
hdparm v7.3
cu:~# hdparm -K1 /dev/hda
/dev/hda:
setting drive keep features to 1 (on)
HDIO_DRIVE_CMD(keepsettings) failed: Input/output error
dmesg:
skge eth0: Link is up at 1000 Mbps, full duplex, flow control both
hda: drive_cmd: status=0x51 { DriveReady SeekComplete Error }
hda: drive_cmd: error=0x04 { DriveStatusError }
ide: failed opcode was: 0xef
David
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: 2.6.22-rc3 hibernate(?) disables SMART on ide
2007-06-05 9:03 ` David Greaves
@ 2007-06-05 15:33 ` Mark Lord
0 siblings, 0 replies; 11+ messages in thread
From: Mark Lord @ 2007-06-05 15:33 UTC (permalink / raw)
To: David Greaves
Cc: Tejun Heo, 'linux-kernel@vger.kernel.org', IDE Linux,
ballen
David Greaves wrote:
> Mark Lord wrote:
>> That's odd. Could you try that again,
>> with the latest (either v7.3 or v7.4) version of hdparm
>> (from sourceforge) ?
>
> Using Debian's 7.3 via apt-get experimental - is that OK or would you like me to
> compile the upstream?
No, what you have is good, thanks.
> cu:~# hdparm -K1 /dev/hda
>
> /dev/hda:
> setting drive keep features to 1 (on)
> HDIO_DRIVE_CMD(keepsettings) failed: Input/output error
>
> dmesg:
> skge eth0: Link is up at 1000 Mbps, full duplex, flow control both
> hda: drive_cmd: status=0x51 { DriveReady SeekComplete Error }
> hda: drive_cmd: error=0x04 { DriveStatusError }
> ide: failed opcode was: 0xef
I just find it odd that the drive rejects the command,
but Seagate do seem to be the first to drop older features nowadays.
But I thought their PATA units might have kept that functionality.
I have some modern seagate SATA drives here -- I'll try it on those too,
just for my own education.
Thanks.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2007-06-05 15:33 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <8rnax-6XX-11@gated-at.bofh.it>
[not found] ` <8rA7H-1B4-1@gated-at.bofh.it>
2007-06-02 21:27 ` 2.6.22-rc3 hibernate(?) disables SMART on ide Bodo Eggert
2007-06-02 22:18 ` Jeff Garzik
2007-06-02 22:22 ` Alan Cox
2007-06-01 21:41 David Greaves
2007-06-02 9:45 ` Tejun Heo
2007-06-02 21:53 ` David Greaves
2007-06-04 16:29 ` Mark Lord
2007-06-04 17:22 ` David Greaves
2007-06-05 4:17 ` Mark Lord
2007-06-05 9:03 ` David Greaves
2007-06-05 15:33 ` Mark Lord
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).