Bug 526025

Summary: Automatic SMART data refresh spins up disk
Product: [Fedora] Fedora Reporter: Tim Waugh <twaugh>
Component: libatasmartAssignee: Lennart Poettering <lpoetter>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: davidz, lpoetter
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-10-23 21:20:17 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tim Waugh 2009-09-28 12:11:38 UTC
Description of problem:
When DeviceKit-disks automatically refreshes SMART data, it spins up disks that it has spun down.

Version-Release number of selected component (if applicable):
DeviceKit-disks-007-1.fc12.x86_64

How reproducible:
100%

Steps to Reproduce:
1.System->Preferences->Power Management
2.Check 'Spin down hard disks when possible'
3.Stop using a disk and wait until it can be heard spinning down
4.Verify with e.g. 'hdparm -C /dev/sdb'
5.Wait until it can be heard spinning up
6.Applications->System Tools->Disk Utility
7.Select drive and click 'More information' next to SMART status
8.Observe 'Updated' field.
9.Verify with e.g. 'hdparm -C /dev/sdb'

Actual results:
Had updated less than a minute ago, corresponding to when disk spun up/

Expected results:
Should not spin disk up.

Additional info:
This could cause premature hardware failure if left unchecked!

Comment 1 David Zeuthen 2009-10-02 17:34:50 UTC
(In reply to comment #0)
> Description of problem:
> When DeviceKit-disks automatically refreshes SMART data, it spins up disks that
> it has spun down.

We actually go to great lengths to avoid spinning up disks and I can confirm it doesn't happen here with various devices. It is however true that some disks are broken and woken up by e.g. the IDENTIFY ATA command that I believe libatasmart is using before checking whether the disk is asleep.

Either way, reassigning to libatasmart.

> 1.System->Preferences->Power Management
> 2.Check 'Spin down hard disks when possible'
> 3.Stop using a disk and wait until it can be heard spinning down
> 4.Verify with e.g. 'hdparm -C /dev/sdb'
> 5.Wait until it can be heard spinning up
> 6.Applications->System Tools->Disk Utility
> 7.Select drive and click 'More information' next to SMART status
> 8.Observe 'Updated' field.
> 9.Verify with e.g. 'hdparm -C /dev/sdb'

Please try this from single-user mode (to avoid devkit-disks-daemon and other stuff being around)

1. put the disk to sleep via hdparm
2. run "/usr/libexec/devkit-disks-helper-ata-smart-collect /dev/sdb 1"
   (the last argument is nowakeup - e.g. if non-zero it will not wake
    up the disk)
3. check if the disk is asleep

What is the result?

(Lennart: how about an option to skdump(1) to specify the disk should not be spun up?)

> This could cause premature hardware failure if left unchecked!  

Not really.

Comment 2 Tim Waugh 2009-10-05 16:40:00 UTC
(In reply to comment #1)
> Please try this from single-user mode (to avoid devkit-disks-daemon and other
> stuff being around)
> 
> 1. put the disk to sleep via hdparm
> 2. run "/usr/libexec/devkit-disks-helper-ata-smart-collect /dev/sdb 1"
>    (the last argument is nowakeup - e.g. if non-zero it will not wake
>     up the disk)
> 3. check if the disk is asleep
> 
> What is the result?

The disk is woken up.

Comment 3 Lennart Poettering 2009-10-23 21:20:17 UTC

*** This bug has been marked as a duplicate of bug 491552 ***