hdd-spindown.sh icon indicating copy to clipboard operation
hdd-spindown.sh copied to clipboard

Question about "dev_isup" function

Open Taosky opened this issue 3 years ago • 1 comments

This script does not work on my machine(Xubuntu 20.04.2). So I checked the shell script. When I comment out line 68,my hard drive can sleep normally.

I manually run smartctl -i -n standby "/dev/sdd" , the "Power mode" is ACTIVE or IDLE. Is this result related to different Linux distributions?

smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.8.0-55-generic] (local build) Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION === Model Family: Western Digital Blue Device Model: WDC WD5000AAKX-75U6AA0 Serial Number: WD-WCC2ELL61791 LU WWN Device Id: 5 0014ee 25e35cee0 Firmware Version: 19.01H19 User Capacity: 500,107,862,016 bytes [500 GB] Sector Size: 512 bytes logical/physical Device is: In smartctl database [for details use: -P show] ATA Version is: ATA8-ACS (minor revision not indicated) SATA Version is: SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s) Local Time is: Tue Jun 8 15:36:44 2021 CST SMART support is: Available - device has SMART capability. SMART support is: Enabled Power mode is: ACTIVE or IDLE

Taosky avatar Jun 08 '21 08:06 Taosky

The line you are referencing is supposed to skip the spin-up read when the device is already up and running. So this should not prevent a drive from going to sleep.

I'd rather assume your issue is that Kernel 5.5 started counting SMART queries as I/O so the script never sees unchanged counters and thus never puts the drives to sleep (see issue #5).

lynix avatar Jun 09 '22 11:06 lynix