Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Avoid periodical HDD wake up?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1900
Location: PB, Germany

PostPosted: Fri Apr 11, 2025 9:49 am    Post subject: Avoid periodical HDD wake up? Reply with quote

Hi,

installed a new setup with SSD and a bit rotating HDD for backups (purchased as used). I'm on OpenRC. Currently the HDD is not partitioned, not formatted, not mounted, showing up as:
Code:
# fdisk -l /dev/sda
Disk /dev/sda: 16,37 TiB, 18000207937536 bytes, 35156656128 sectors
Disk model: TOSHIBA MG09ACA1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: C911E84A-937C-42C1-82E1-FA0A828EF0A0

I planned to have it most of the time sleeping with spin-down, only starting for daily or weekly backups.

But it is continuously waking up with spin up and then going to sleep again every few minutes, syslog shows this:
Code:
Apr 11 11:29:23 [kernel] [14520.637846] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
Apr 11 11:29:23 [kernel] [14520.641188] ata1.00: ACPI cmd f5/00:00:00:00:00:e0(SECURITY FREEZE LOCK) filtered out
Apr 11 11:29:23 [kernel] [14520.664002] ata1.00: ACPI cmd f5/00:00:00:00:00:e0(SECURITY FREEZE LOCK) filtered out
Apr 11 11:29:23 [kernel] [14520.683254] ata1.00: configured for UDMA/133
Apr 11 11:29:23 [kernel] [14520.683436] ata1.00: Entering active power mode
Apr 11 11:29:33 [kernel] [14530.731040] ata1.00: qc timeout after 10000 msecs (cmd 0x40)
Apr 11 11:29:33 [kernel] [14530.731073] ata1.00: VERIFY failed (err_mask=0x4)
Apr 11 11:29:33 [kernel] [14530.731083] ata1.00: failed to enable DIPM, Emask 0x40
Apr 11 11:29:38 [kernel] [14534.854526] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
Apr 11 11:29:38 [kernel] [14534.873340] ata1.00: ACPI cmd f5/00:00:00:00:00:e0(SECURITY FREEZE LOCK) filtered out
Apr 11 11:29:38 [kernel] [14535.497097] ata1.00: ACPI cmd f5/00:00:00:00:00:e0(SECURITY FREEZE LOCK) filtered out
Apr 11 11:29:38 [kernel] [14535.516985] ata1.00: configured for UDMA/133
Apr 11 11:29:38 [kernel] [14535.517393] sd 0:0:0:0: [sda] Starting disk
Apr 11 11:29:38 [kernel] [14535.526227] sd 0:0:0:0: [sda] Starting disk
Apr 11 11:29:38 [kernel] [14535.534294] sd 0:0:0:0: [sda] Starting disk
Apr 11 11:29:57 [kernel] [14554.274951] sd 0:0:0:0: [sda] Synchronizing SCSI cache
Apr 11 11:29:57 [kernel] [14554.275408] sd 0:0:0:0: [sda] Stopping disk

How can I find the culprit? I already disabled potential services like smartd doing periodical self-tests. Also stopped hd-idle.
AFAIK I don't have any panel widgets doing disk usage or whatever which anyway would apply to mounted filesystems only.

Code:
hdparm -B /dev/sda

/dev/sda:
 APM_level   = 128


How can I freeze the HDD until I solved that, for not aging the HDD too much until getting solved in some weeks? Most of the StartStop counts are done by me without using it:
Code:
# smartctl -a /dev/sda |grep _Count
  4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -       485
 10 Spin_Retry_Count        0x0033   100   100   030    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       58
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       18
193 Load_Cycle_Count        0x0032   100   100   000    Old_age   Always       -       642
196 Reallocated_Event_Count 0x0033   100   100   010    Pre-fail  Always       -       0
199 UDMA_CRC_Error_Count    0x0032   200   200   000    Old_age   Always       -       14
223 Load_Retry_Count        0x0032   100   100   000    Old_age   Always       -       0


Ok, the other way round, for now I try to get it spinning without spin-down:
Code:
# hdparm -B 255 /dev/sda

/dev/sda:
 setting Advanced Power Management level to disabled
 APM_level   = off

# hdparm -S 0 /dev/sda

/dev/sda:
 setting standby to 0 (off)

But it still does a spin-down and needs to spin-up for every fdisk -l or something.
Code:
# smartctl /dev/sda -g aam -g apm -g lookahead -g security -g wcache -g rcache -g dsn
smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.12.16-gentoo-dist] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

AAM feature is:   Unavailable
APM feature is:   Disabled
Rd look-ahead is: Enabled
Write cache is:   Enabled
DSN feature is:   Disabled
ATA Security is:  Disabled, frozen [SEC2]

_________________
HP ZBook Power G9 i7-12700H|HP ProDesk 600 G5 i7-9700|HP EliteDesk 800 G1 i7-4790|HP Compaq Pro 6300 i7-3770
Back to top
View user's profile Send private message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1900
Location: PB, Germany

PostPosted: Fri Apr 11, 2025 10:25 am    Post subject: Reply with quote

Checking custom udev rules:
Code:
# grep -r "sd" /etc/udev/rules.d/
/etc/udev/rules.d/50-usb_drive.rules:KERNEL=="sd*", ACTION=="add", ATTRS{serial}=="3693070883579247478", RUN+="/usr/local/bin/1dmcrypt open %N"
/etc/udev/rules.d/50-usb_drive.rules:KERNEL=="sd*", ACTION=="remove", ATTRS{serial}=="3693070883579247478", RUN+="/usr/local/bin/1dmcrypt close %N"
/etc/udev/rules.d/00-ssd-scheduler.rules:ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{device/model}=="SD/MMC", ATTR{queue/rotational}="0"
/etc/udev/rules.d/00-ssd-scheduler.rules:ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="0",ATTR{queue/iosched/slice_idle}="0"
/etc/udev/rules.d/00-ssd-scheduler.rules:ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="0",ATTR{queue/scheduler}="kyber"
/etc/udev/rules.d/00-ssd-scheduler.rules:ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="1", ATTR{queue/scheduler}="bfq"

For now I got it temporarily disabled by
Quote:
echo 0 > /sys/block/sda/device/delete

_________________
HP ZBook Power G9 i7-12700H|HP ProDesk 600 G5 i7-9700|HP EliteDesk 800 G1 i7-4790|HP Compaq Pro 6300 i7-3770
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum