Disk spin-down: What program to use and best practice today?

~> sudo smartctl -A /dev/sda
[sudo] password for root: 
smartctl 7.2 2021-09-14 r5237 [x86_64-linux-5.16.13-lp153.3.g9251332-default] (SUSE RPM)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF READ SMART DATA SECTION ===
SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x002f   200   200   051    Pre-fail  Always       -       0
  3 Spin_Up_Time            0x0027   157   154   021    Pre-fail  Always       -       7116
  4 Start_Stop_Count        0x0032   096   096   000    Old_age   Always       -       4418
  5 Reallocated_Sector_Ct   0x0033   200   200   140    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x002e   200   200   000    Old_age   Always       -       0
  9 Power_On_Hours          0x0032   088   088   000    Old_age   Always       -       9441
 10 Spin_Retry_Count        0x0032   100   100   000    Old_age   Always       -       0
 11 Calibration_Retry_Count 0x0032   100   100   000    Old_age   Always       -       0
 12 Power_Cycle_Count       0x0032   097   097   000    Old_age   Always       -       3948
192 Power-Off_Retract_Count 0x0032   200   200   000    Old_age   Always       -       208
193 Load_Cycle_Count        0x0032   198   198   000    Old_age   Always       -       8707
194 Temperature_Celsius     0x0022   130   113   000    Old_age   Always       -       20
196 Reallocated_Event_Count 0x0032   200   200   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   200   200   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0030   100   253   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x0032   200   200   000    Old_age   Always       -       0
200 Multi_Zone_Error_Rate   0x0008   200   200   000    Old_age   Offline      -       0

~> sudo smartctl -A /dev/sdb
smartctl 7.2 2021-09-14 r5237 [x86_64-linux-5.16.13-lp153.3.g9251332-default] (SUSE RPM)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF READ SMART DATA SECTION ===
SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x002f   200   200   051    Pre-fail  Always       -       0
  3 Spin_Up_Time            0x0027   166   161   021    Pre-fail  Always       -       6683
  4 Start_Stop_Count        0x0032   096   096   000    Old_age   Always       -       4788
  5 Reallocated_Sector_Ct   0x0033   200   200   140    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x002e   200   200   000    Old_age   Always       -       0
  9 Power_On_Hours          0x0032   088   088   000    Old_age   Always       -       9425
 10 Spin_Retry_Count        0x0032   100   100   000    Old_age   Always       -       0
 11 Calibration_Retry_Count 0x0032   100   100   000    Old_age   Always       -       0
 12 Power_Cycle_Count       0x0032   096   096   000    Old_age   Always       -       4743
192 Power-Off_Retract_Count 0x0032   200   200   000    Old_age   Always       -       204
193 Load_Cycle_Count        0x0032   197   197   000    Old_age   Always       -       11208
194 Temperature_Celsius     0x0022   131   111   000    Old_age   Always       -       19
196 Reallocated_Event_Count 0x0032   200   200   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   200   200   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0030   100   253   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x0032   200   200   000    Old_age   Always       -       0
200 Multi_Zone_Error_Rate   0x0008   200   200   000    Old_age   Offline      -       0

~> sudo smartctl -A /dev/sdc
smartctl 7.2 2021-09-14 r5237 [x86_64-linux-5.16.13-lp153.3.g9251332-default] (SUSE RPM)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF READ SMART DATA SECTION ===
SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x002f   200   200   051    Pre-fail  Always       -       73
  3 Spin_Up_Time            0x0027   179   172   021    Pre-fail  Always       -       8016
  4 Start_Stop_Count        0x0032   099   099   000    Old_age   Always       -       1567
  5 Reallocated_Sector_Ct   0x0033   142   142   140    Pre-fail  Always       -       1708
  7 Seek_Error_Rate         0x002e   200   200   000    Old_age   Always       -       0
  9 Power_On_Hours          0x0032   080   080   000    Old_age   Always       -       14900
 10 Spin_Retry_Count        0x0032   100   100   000    Old_age   Always       -       0
 11 Calibration_Retry_Count 0x0032   100   100   000    Old_age   Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       481
192 Power-Off_Retract_Count 0x0032   200   200   000    Old_age   Always       -       149
193 Load_Cycle_Count        0x0032   198   198   000    Old_age   Always       -       6820
194 Temperature_Celsius     0x0022   132   103   000    Old_age   Always       -       20
196 Reallocated_Event_Count 0x0032   104   001   000    Old_age   Always       -       96
197 Current_Pending_Sector  0x0032   200   200   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0030   100   253   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x0032   200   200   000    Old_age   Always       -       0
200 Multi_Zone_Error_Rate   0x0008   200   200   000    Old_age   Offline      -       1

~> sudo smartctl -A /dev/sdd
smartctl 7.2 2021-09-14 r5237 [x86_64-linux-5.16.13-lp153.3.g9251332-default] (SUSE RPM)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF READ SMART DATA SECTION ===
SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x002f   200   200   051    Pre-fail  Always       -       0
  3 Spin_Up_Time            0x0027   162   160   021    Pre-fail  Always       -       6858
  4 Start_Stop_Count        0x0032   098   098   000    Old_age   Always       -       2351
  5 Reallocated_Sector_Ct   0x0033   200   200   140    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x002e   200   200   000    Old_age   Always       -       0
  9 Power_On_Hours          0x0032   093   093   000    Old_age   Always       -       5380
 10 Spin_Retry_Count        0x0032   100   100   000    Old_age   Always       -       0
 11 Calibration_Retry_Count 0x0032   100   100   000    Old_age   Always       -       0
 12 Power_Cycle_Count       0x0032   098   098   000    Old_age   Always       -       2298
192 Power-Off_Retract_Count 0x0032   200   200   000    Old_age   Always       -       167
193 Load_Cycle_Count        0x0032   199   199   000    Old_age   Always       -       4449
194 Temperature_Celsius     0x0022   131   110   000    Old_age   Always       -       19
196 Reallocated_Event_Count 0x0032   200   200   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   200   200   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0030   100   253   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x0032   200   198   000    Old_age   Always       -       3
200 Multi_Zone_Error_Rate   0x0008   200   200   000    Old_age   Offline      -       0

Let me know what you think about the above report. I am glad with the config to reduce spin time.

However the last thing; when I boot or wake-up after suspend, HDDs start spinning again.
I had a look on PUIS (PM2). ASRock told me that B550 Steel Legend mobo doesn’t have this feature. I don’t know about my WD HDDs, after search I don’t think.
Is there another way to avoid that? What about hardware switches? Does it worth the effort?
Almost at the end, I hope I don’t bother you.

There is nothing to worry about.

However the last thing; when I boot or wake-up after suspend, HDDs start spinning again.
I had a look on PUIS (PM2). ASRock told me that B550 Steel Legend mobo doesn’t have this feature. I don’t know about my WD HDDs, after search I don’t think.
Is there another way to avoid that? What about hardware switches? Does it worth the effort?
Almost at the end, I hope I don’t bother you.

You may try the following, which will run at boot and after resuming:

**erlangen:~ #** systemctl cat hd-parm.service  
**# /etc/systemd/system/hd-parm.service**
[Unit] 
Description=Local system resume actions 
After=suspend.target 

[Service] 
Type=simple 
ExecStart=/usr/sbin/hdparm -Y /dev/sdb 

[Install] 
WantedBy=suspend.target multi-user.target 
**erlangen:~ #**
**erlangen:~ #** journalctl -b -u hd-parm.service -u systemd-suspend.service --since 16:54 
Mar 24 16:54:13 erlangen systemd[1]: Starting System Suspend... 
Mar 24 16:54:13 erlangen systemd-sleep[6924]: INFO: Skip running /usr/lib/systemd/system-sleep/grub2.sleep for suspend 
Mar 24 16:54:13 erlangen systemd-sleep[6921]: Entering sleep state 'suspend'... 
Mar 24 16:54:33 erlangen systemd-sleep[6986]: INFO: Skip running /usr/lib/systemd/system-sleep/grub2.sleep for suspend 
Mar 24 16:54:33 erlangen systemd[1]: systemd-suspend.service: Deactivated successfully. 
Mar 24 16:54:33 erlangen systemd[1]: Finished System Suspend. 
Mar 24 16:54:33 erlangen systemd[1]: Started Local system resume actions. 
Mar 24 16:54:33 erlangen hdparm[6997]: /dev/sdb: 
Mar 24 16:54:33 erlangen hdparm[6997]:  issuing sleep command 
Mar 24 16:54:33 erlangen systemd[1]: hd-parm.service: Deactivated successfully. 
**erlangen:~ #**

After few days trying the config:

  • After cold boot there are 2 more “93 Load_Cycle_Count” (Before shutdown and at cold boot)
  • After suspend to RAM there is 1 more “93 Load_Cycle_Count”. (Only at wake up)
  • Along the day, there are between 1 to 4 more “93 Load_Cycle_Count” by the system, not user action. For exemple
Mar 29 10:17:51 ASR5600G systemd[1]: Started hdparm check status.
Mar 29 10:17:51 ASR5600G hdparm[3764]: /dev/sda:
Mar 29 10:17:51 ASR5600G hdparm[3764]:  drive state is:  standby
Mar 29 10:17:51 ASR5600G hdparm[3764]: /dev/sdb:
Mar 29 10:17:51 ASR5600G hdparm[3764]:  drive state is:  standby
Mar 29 10:17:51 ASR5600G hdparm[3764]: /dev/sdc:
Mar 29 10:17:51 ASR5600G hdparm[3764]:  drive state is:  standby
Mar 29 10:17:51 ASR5600G hdparm[3764]: /dev/sdd:
Mar 29 10:17:51 ASR5600G hdparm[3764]:  drive state is:  standby
Mar 29 10:17:51 ASR5600G systemd[1]: hdparm.service: Succeeded.
Mar 29 10:19:37 ASR5600G smartd[1141]: Device: /dev/sda [SAT], SMART Prefailure Attribute: 3 Spin_Up_Time changed from 157 to 168
Mar 29 10:19:37 ASR5600G smartd[1141]: Device: /dev/sda [SAT], SMART Usage Attribute: 194 Temperature_Celsius changed from 133 to 131
Mar 29 10:19:37 ASR5600G smartd[1141]: Device: /dev/sda [SAT], old test of type S not run at Tue Mar 29 03:00:00 2022 IST, starting now.
Mar 29 10:19:37 ASR5600G smartd[1141]: Device: /dev/sda [SAT], starting scheduled Short Self-Test.
Mar 29 10:19:37 ASR5600G smartd[1141]: Device: /dev/sdb [SAT], SMART Usage Attribute: 194 Temperature_Celsius changed from 134 to 131
Mar 29 10:19:37 ASR5600G smartd[1141]: Device: /dev/sdb [SAT], old test of type S not run at Tue Mar 29 03:00:00 2022 IST, starting now.
Mar 29 10:19:37 ASR5600G smartd[1141]: Device: /dev/sdb [SAT], starting scheduled Short Self-Test.
Mar 29 10:19:37 ASR5600G smartd[1141]: Device: /dev/sdc [SAT], SMART Usage Attribute: 194 Temperature_Celsius changed from 134 to 132
Mar 29 10:19:37 ASR5600G smartd[1141]: Device: /dev/sdc [SAT], old test of type S not run at Tue Mar 29 03:00:00 2022 IST, starting now.
Mar 29 10:19:37 ASR5600G smartd[1141]: Device: /dev/sdc [SAT], starting scheduled Short Self-Test.
Mar 29 10:19:37 ASR5600G smartd[1141]: Device: /dev/sdd [SAT], SMART Usage Attribute: 194 Temperature_Celsius changed from 133 to 131
Mar 29 10:19:37 ASR5600G smartd[1141]: Device: /dev/sdd [SAT], old test of type S not run at Tue Mar 29 03:00:00 2022 IST, starting now.
Mar 29 10:19:37 ASR5600G smartd[1141]: Device: /dev/sdd [SAT], starting scheduled Short Self-Test.
Mar 29 10:20:02 ASR5600G sudo[3801]: gkr-pam: unable to locate daemon control file
Mar 29 10:20:02 ASR5600G sudo[3801]:       jp : TTY=pts/0 ; PWD=/home/jp ; USER=root ; COMMAND=/usr/bin/journalctl -b -f -n 100
Mar 29 10:20:02 ASR5600G sudo[3801]: pam_unix(sudo:session): session opened for user root by (uid=1000)
Mar 29 10:20:02 ASR5600G hd-idle[1119]: spinup: sda
Mar 29 10:20:02 ASR5600G hd-idle[1119]: spinup: sdb
Mar 29 10:20:02 ASR5600G hd-idle[1119]: spinup: sdc
Mar 29 10:20:02 ASR5600G hd-idle[1119]: spinup: sdd
Mar 29 10:21:41 ASR5600G systemd[1]: Started hdparm check status.
Mar 29 10:21:41 ASR5600G hdparm[3828]: /dev/sda:
Mar 29 10:21:41 ASR5600G hdparm[3828]:  drive state is:  active/idle
Mar 29 10:21:41 ASR5600G hdparm[3828]: /dev/sdb:
Mar 29 10:21:41 ASR5600G hdparm[3828]:  drive state is:  active/idle
Mar 29 10:21:41 ASR5600G hdparm[3828]: /dev/sdc:
Mar 29 10:21:41 ASR5600G hdparm[3828]:  drive state is:  active/idle
Mar 29 10:21:41 ASR5600G hdparm[3828]: /dev/sdd:
Mar 29 10:21:41 ASR5600G hdparm[3828]:  drive state is:  active/idle
Mar 29 10:21:41 ASR5600G systemd[1]: hdparm.service: Succeeded.


I installed your last service “systemctl cat hd-parm.service”[FONT=arial] but I don’t understand the purpose. Could you explain, please?
Thanks
[/FONT]

Sure. You wrote in #61:

However the last thing; when I boot or wake-up after suspend, HDDs start spinning again. I had a look on PUIS (PM2). ASRock told me that B550 Steel Legend mobo doesn’t have this feature. I don’t know about my WD HDDs, after search I don’t think. Is there another way to avoid that?

I suggested hd-parm.service to immediately spin down the disk:

**erlangen:~ #** journalctl -b -u hd-parm.service  
Mar 29 12:00:48 erlangen systemd[1]: Started Local system resume actions. 
Mar 29 12:00:49 erlangen hdparm[27652]: /dev/sdb: 
Mar 29 12:00:49 erlangen hdparm[27652]:  issuing sleep command 
Mar 29 12:00:49 erlangen systemd[1]: hd-parm.service: Deactivated successfully. 
**erlangen:~ #**

OK, the boot process is

  • **09:49:26 **Boot starts
  • **29 09:49:29 Started hd-idle disk spindown service
    -
    29 09:49:30 **hdparm[1120]: issuing sleep command
  • **29 09:49:31 **hdparm[1152]: drive state is: standby
    **********- Something started the disks; Maybe “Started Self Monitoring and Reporting Technology (SMART) Daemon.”??
    -
    29 09:53:51 **hdparm[3131]: drive state is: active/idle
    ****- 29 09:55:30 hd-idle[1119]: spindown:
    So at boot, the disks started, this is hardware, we can’t avoid by software. After 3-4 seconds they spin down. After less than 4 mn they spin up then after 2 mn they spin down.
    Am I right?
    See log
~> sudo journalctl -b
[sudo] password for root: 
-- Logs begin at Mon 2022-03-14 17:46:44 GMT, end at Tue 2022-03-29 12:04:44 IST. --
**Mar 29 09:49:26** localhost kernel: Linux version 5.16.13-lp153.3.g9251332-default (geeko@buildhost) (gcc (SUSE Linux) 11.2.1 2021081>
Mar 29 09:49:26 localhost kernel: Command line: BOOT_IMAGE=/boot/vmlinuz-5.16.13-lp153.3.g9251332-default root=UUID=235d17b9-b2bb-4>
Mar 29 09:49:26 localhost kernel: x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
...
**Mar 29 09:49:29 localhost systemd[1]: Started hd-idle disk spindown service.**
Mar 29 09:49:29 localhost systemd[1]: Started Local system resume actions.
Mar 29 09:49:29 localhost hd-idle[1119]: hd-idle starting in nodaemon mode
...
Mar 29 09:49:29 localhost hd-idle[1119]:   disk: sdd timeout: 300
Mar 29 09:49:29 localhost hd-idle[1119]:   disk: sdc timeout: 300
Mar 29 09:49:29 localhost hd-idle[1119]:   disk: sdb timeout: 300
Mar 29 09:49:29 localhost hd-idle[1119]:   disk: sda timeout: 300
Mar 29 09:49:29 localhost hd-idle[1119]:   default timeout: 0
Mar 29 09:49:29 localhost systemd[1]: Starting Self Monitoring and Reporting Technology (SMART) Daemon...
Mar 29 09:49:29 localhost systemd[1]: Started hdparm check status.
Mar 29 09:49:29 localhost smartd[1141]: smartd 7.2 2021-09-14 r5237 [x86_64-linux-5.16.13-lp153.3.g9251332-default] (SUSE RPM)
Mar 29 09:49:29 localhost smartd[1141]: Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org
Mar 29 09:49:29 localhost smartd[1141]: Opened configuration file /etc/smartd.conf
Mar 29 09:49:29 localhost smartd[1141]: Drive: DEVICESCAN, implied '-a' Directive on line 32 of file /etc/smartd.conf
Mar 29 09:49:29 localhost smartd[1141]: Configuration file /etc/smartd.conf was parsed, found DEVICESCAN, scanning devices
Mar 29 09:49:30 localhost smartd[1141]: Device: /dev/sda, type changed from 'scsi' to 'sat'
Mar 29 09:49:30 localhost smartd[1141]: Device: /dev/sda [SAT], opened
Mar 29 09:49:30 localhost smartd[1141]: Device: /dev/sda [SAT], WDC WD40EFRX-68N32N0, S/N:WD-WCC7K1URKCCA, WWN:5-0014ee-264ba7edb, FW:82.00A82, 4.00 TB
Mar 29 09:49:30 localhost smartd[1141]: Device: /dev/sda [SAT], found in smartd database: Western Digital Red
Mar 29 09:49:30 localhost smartd[1141]: Device: /dev/sda [SAT], is SMART capable. Adding to "monitor" list.
Mar 29 09:49:30 localhost smartd[1141]: Device: /dev/sda [SAT], state read from /var/lib/smartmontools/smartd.WDC_WD40EFRX_68N32N0-WD_WCC7K1URKCCA.ata.st>
Mar 29 09:49:30 localhost hdparm[1120]: /dev/sda:
**Mar 29 09:49:30 localhost hdparm[1120]:  issuing sleep command**
Mar 29 09:49:30 localhost hdparm[1120]: /dev/sdb:
Mar 29 09:49:30 localhost hdparm[1120]:  issuing sleep command
Mar 29 09:49:30 localhost hdparm[1120]: /dev/sdc:
Mar 29 09:49:30 localhost hdparm[1120]:  issuing sleep command
Mar 29 09:49:30 localhost hdparm[1120]: /dev/sdd:
Mar 29 09:49:30 localhost hdparm[1120]:  issuing sleep command
Mar 29 09:49:30 localhost systemd[1]: hd-parm.service: Succeeded.
Mar 29 09:49:30 localhost smartd[1141]: Device: /dev/sdb, type changed from 'scsi' to 'sat'
Mar 29 09:49:30 localhost smartd[1141]: Device: /dev/sdb [SAT], opened
Mar 29 09:49:30 localhost smartd[1141]: Device: /dev/sdb [SAT], WDC WD40EFRX-68N32N0, S/N:WD-WCC7K3FP1KRD, WWN:5-0014ee-2b936f586, FW:82.00A82, 4.00 TB
Mar 29 09:49:30 localhost smartd[1141]: Device: /dev/sdb [SAT], found in smartd database: Western Digital Red
Mar 29 09:49:31 localhost hdparm[1152]: /dev/sda:
**Mar 29 09:49:31 localhost hdparm[1152]:  drive state is:  standby**
Mar 29 09:49:31 localhost hdparm[1152]: /dev/sdb:
Mar 29 09:49:31 localhost hdparm[1152]:  drive state is:  standby
Mar 29 09:49:31 localhost hdparm[1152]: /dev/sdc:
Mar 29 09:49:31 localhost hdparm[1152]:  drive state is:  standby
Mar 29 09:49:31 localhost hdparm[1152]: /dev/sdd:
Mar 29 09:49:31 localhost hdparm[1152]:  drive state is:  standby
Mar 29 09:49:31 localhost systemd[1]: hdparm.service: Succeeded.
Mar 29 09:49:32 localhost smartd[1141]: Device: /dev/sdb [SAT], is SMART capable. Adding to "monitor" list.
Mar 29 09:49:32 localhost smartd[1141]: Device: /dev/sdb [SAT], state read from /var/lib/smartmontools/smartd.WDC_WD40EFRX_68N32N0-WD_WCC7K3FP1KRD.ata.st>
Mar 29 09:49:32 localhost smartd[1141]: Device: /dev/sdc, type changed from 'scsi' to 'sat'
Mar 29 09:49:32 localhost smartd[1141]: Device: /dev/sdc [SAT], opened
Mar 29 09:49:32 localhost smartd[1141]: Device: /dev/sdc [SAT], WDC WD40EFRX-68WT0N0, S/N:WD-WCC4E1XXZ0TY, WWN:5-0014ee-20de6e65f, FW:82.00A82, 4.00 TB
Mar 29 09:49:32 localhost smartd[1141]: Device: /dev/sdc [SAT], found in smartd database: Western Digital Red
Mar 29 09:49:36 ASR5600G smartd[1141]: Device: /dev/sdc [SAT], is SMART capable. Adding to "monitor" list.
Mar 29 09:49:36 ASR5600G smartd[1141]: Device: /dev/sdc [SAT], state read from /var/lib/smartmontools/smartd.WDC_WD40EFRX_68WT0N0-WD_WCC4E1XXZ0TY.ata.sta>
Mar 29 09:49:36 ASR5600G smartd[1141]: Device: /dev/sdd, type changed from 'scsi' to 'sat'
Mar 29 09:49:36 ASR5600G smartd[1141]: Device: /dev/sdd [SAT], opened
Mar 29 09:49:36 ASR5600G smartd[1141]: Device: /dev/sdd [SAT], WDC WD40EFRX-68N32N0, S/N:WD-WCC7K1LDVZ6H, WWN:5-0014ee-2109636f0, FW:82.00A82, 4.00 TB
Mar 29 09:49:36 ASR5600G smartd[1141]: Device: /dev/sdd [SAT], found in smartd database: Western Digital Red
Mar 29 09:49:36 ASR5600G smartd[1141]: Device: /dev/sdd [SAT], is SMART capable. Adding to "monitor" list.
Mar 29 09:49:36 ASR5600G smartd[1141]: Device: /dev/sdd [SAT], state read from /var/lib/smartmontools/smartd.WDC_WD40EFRX_68N32N0-WD_WCC7K1LDVZ6H.ata.sta>
Mar 29 09:49:36 ASR5600G smartd[1141]: Device: /dev/nvme0, opened
Mar 29 09:49:36 ASR5600G smartd[1141]: Device: /dev/nvme0, Samsung SSD 980 1TB, S/N:S649NX0RC29102M, FW:2B4QFXO7, 1.00 TB
Mar 29 09:49:36 ASR5600G smartd[1141]: Device: /dev/nvme0, is SMART capable. Adding to "monitor" list.
Mar 29 09:49:36 ASR5600G smartd[1141]: Device: /dev/nvme0, state read from /var/lib/smartmontools/smartd.Samsung_SSD_980_1TB-S649NX0RC29102M.nvme.state
Mar 29 09:49:36 ASR5600G smartd[1141]: Monitoring 4 ATA/SATA, 0 SCSI/SAS and 1 NVMe devices
Mar 29 09:49:36 ASR5600G smartd[1141]: Device: /dev/sda [SAT], SMART Usage Attribute: 194 Temperature_Celsius changed from 132 to 133
Mar 29 09:49:36 ASR5600G smartd[1141]: Device: /dev/sdb [SAT], SMART Prefailure Attribute: 3 Spin_Up_Time changed from 182 to 185
Mar 29 09:49:36 ASR5600G smartd[1141]: Device: /dev/sdb [SAT], SMART Usage Attribute: 194 Temperature_Celsius changed from 132 to 134
Mar 29 09:49:36 ASR5600G smartd[1141]: Device: /dev/sdc [SAT], SMART Prefailure Attribute: 3 Spin_Up_Time changed from 198 to 193
Mar 29 09:49:36 ASR5600G smartd[1141]: Device: /dev/sdc [SAT], SMART Usage Attribute: 194 Temperature_Celsius changed from 133 to 134
Mar 29 09:49:36 ASR5600G smartd[1141]: Device: /dev/sdd [SAT], SMART Prefailure Attribute: 3 Spin_Up_Time changed from 174 to 180
Mar 29 09:49:36 ASR5600G smartd[1141]: Device: /dev/sdd [SAT], SMART Usage Attribute: 194 Temperature_Celsius changed from 132 to 133
Mar 29 09:49:36 ASR5600G smartd[1141]: Device: /dev/sda [SAT], state written to /var/lib/smartmontools/smartd.WDC_WD40EFRX_68N32N0-WD_WCC7K1URKCCA.ata.st>
Mar 29 09:49:36 ASR5600G smartd[1141]: Device: /dev/sdb [SAT], state written to /var/lib/smartmontools/smartd.WDC_WD40EFRX_68N32N0-WD_WCC7K3FP1KRD.ata.st>
Mar 29 09:49:36 ASR5600G smartd[1141]: Device: /dev/sdc [SAT], state written to /var/lib/smartmontools/smartd.WDC_WD40EFRX_68WT0N0-WD_WCC4E1XXZ0TY.ata.st>
Mar 29 09:49:36 ASR5600G smartd[1141]: Device: /dev/sdd [SAT], state written to /var/lib/smartmontools/smartd.WDC_WD40EFRX_68N32N0-WD_WCC7K1LDVZ6H.ata.st>
Mar 29 09:49:36 ASR5600G smartd[1141]: Device: /dev/nvme0, state written to /var/lib/smartmontools/smartd.Samsung_SSD_980_1TB-S649NX0RC29102M.nvme.state
Mar 29 09:49:36 ASR5600G systemd[1]: Started Self Monitoring and Reporting Technology (SMART) Daemon.
Mar 29 09:53:51 ASR5600G systemd[1]: Started hdparm check status.
Mar 29 09:53:51 ASR5600G hdparm[3131]: /dev/sda:
**Mar 29 09:53:51 ASR5600G hdparm[3131]:  drive state is:  active/idle**
Mar 29 09:53:51 ASR5600G hdparm[3131]: /dev/sdb:
Mar 29 09:53:51 ASR5600G hdparm[3131]:  drive state is:  active/idle
Mar 29 09:53:51 ASR5600G hdparm[3131]: /dev/sdc:
Mar 29 09:53:51 ASR5600G hdparm[3131]:  drive state is:  active/idle
Mar 29 09:53:51 ASR5600G hdparm[3131]: /dev/sdd:
Mar 29 09:53:51 ASR5600G hdparm[3131]:  drive state is:  active/idle
Mar 29 09:53:51 ASR5600G systemd[1]: hdparm.service: Succeeded.
**Mar 29 09:55:30 ASR5600G hd-idle[1119]: spindown: sda**
Mar 29 09:55:31 ASR5600G hd-idle[1119]: spindown: sdb
Mar 29 09:55:31 ASR5600G hd-idle[1119]: spindown: sdc
Mar 29 09:55:32 ASR5600G hd-idle[1119]: spindown: sdd

Then after 10 mn smartd start a short test

Mar 29 10:17:51 ASR5600G hdparm[3764]:  drive state is:  standby
Mar 29 10:17:51 ASR5600G hdparm[3764]: /dev/sdd:
Mar 29 10:17:51 ASR5600G hdparm[3764]:  drive state is:  standby
Mar 29 10:17:51 ASR5600G systemd[1]: hdparm.service: Succeeded.
Mar **29 10:19:37** ASR5600G smartd[1141]: Device: /dev/sda [SAT], SMART Prefailure Attribute: 3 Spin_Up_Time changed from 157 to 168
Mar 29 10:19:37 ASR5600G smartd[1141]: Device: /dev/sda [SAT], SMART Usage Attribute: 194 Temperature_Celsius changed from 133 to 131
Mar **29 10:19:37 ASR5600G smartd[1141]: Device: /dev/sda [SAT], old test of type S not run at Tue Mar 29 03:00:00 2022 IST, starting now.**
Mar 29 10:19:37 ASR5600G smartd[1141]: Device: /dev/sda [SAT], starting scheduled Short Self-Test.
Mar 29 10:19:37 ASR5600G smartd[1141]: Device: /dev/sdb [SAT], SMART Usage Attribute: 194 Temperature_Celsius changed from 134 to 131
Mar 29 10:19:37 ASR5600G smartd[1141]: Device: /dev/sdb [SAT], old test of type S not run at Tue Mar 29 03:00:00 2022 IST, starting now.
Mar 29 10:19:37 ASR5600G smartd[1141]: Device: /dev/sdb [SAT], starting scheduled Short Self-Test.
Mar 29 10:19:37 ASR5600G smartd[1141]: Device: /dev/sdc [SAT], SMART Usage Attribute: 194 Temperature_Celsius changed from 134 to 132
Mar 29 10:19:37 ASR5600G smartd[1141]: Device: /dev/sdc [SAT], old test of type S not run at Tue Mar 29 03:00:00 2022 IST, starting now.
Mar 29 10:19:37 ASR5600G smartd[1141]: Device: /dev/sdc [SAT], starting scheduled Short Self-Test.
Mar 29 10:19:37 ASR5600G smartd[1141]: Device: /dev/sdd [SAT], SMART Usage Attribute: 194 Temperature_Celsius changed from 133 to 131
Mar 29 10:19:37 ASR5600G smartd[1141]: Device: /dev/sdd [SAT], old test of type S not run at Tue Mar 29 03:00:00 2022 IST, starting now.
Mar 29 10:19:37 ASR5600G smartd[1141]: Device: /dev/sdd [SAT], starting scheduled Short Self-Test.
Mar 29 **10:20:02 ASR5600G hd-idle[1119]: spinup: sda**
Mar 29 10:20:02 ASR5600G hd-idle[1119]: spinup: sdb
Mar 29 10:20:02 ASR5600G hd-idle[1119]: spinup: sdc
Mar 29 10:20:02 ASR5600G hd-idle[1119]: spinup: sdd
Mar 29 10:21:41 ASR5600G systemd[1]: Started hdparm check status.
Mar 29 10:21:41 ASR5600G hdparm[3828]: /dev/sda:
Mar 29 10:21:41 ASR5600G hdparm[3828]:  drive state is:  active/idle
Mar 29 10:21:41 ASR5600G hdparm[3828]: /dev/sdb:
Mar 29 10:21:41 ASR5600G hdparm[3828]:  drive state is:  active/idle
Mar 29 10:21:41 ASR5600G hdparm[3828]: /dev/sdc:
Mar 29 10:21:41 ASR5600G hdparm[3828]:  drive state is:  active/idle
Mar 29 10:21:41 ASR5600G hdparm[3828]: /dev/sdd:
Mar 29 10:21:41 ASR5600G hdparm[3828]:  drive state is:  active/idle
Mar 29 10:21:41 ASR5600G systemd[1]: hdparm.service: Succeeded.
Mar 29 **10:25:02 ASR5600G hd-idle[1119]: spindown: sda**
Mar 29 10:25:03 ASR5600G hd-idle[1119]: spindown: sdb
Mar 29 10:25:03 ASR5600G hd-idle[1119]: spindown: sdc
Mar 29 10:25:03 ASR5600G hd-idle[1119]: spindown: sdd
Mar 29 10:25:51 ASR5600G systemd[1]: Started hdparm check status.

To optimize, Is it possible to leave spin up the disks at boot (remove hd-parm.service), force to run the tests (old test of type S not run at Tue Mar 29 03:00:00 2022 IST, starting now.), then issue the spin down when tests are done?

Yep.

To optimize, Is it possible to leave spin up the disks at boot (remove hd-parm.service), force to run the tests (old test of type S not run at Tue Mar 29 03:00:00 2022 IST, starting now.), then issue the spin down when tests are done?

You can have everything configured according to your requirements. Enabling smartd is pretty much overkill, in my opinion of course. erlangen’s WD40EZRX-22SPEB0 exhibits some mild rot:

**erlangen:~ #** smartctl -l selftest /dev/sdb                         
smartctl 7.2 2021-09-14 r5237 [x86_64-linux-5.16.15-1-default] (SUSE RPM) 
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org 

=== START OF READ SMART DATA SECTION === 
SMART Self-test log structure revision number 1 
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error 
# 1  Extended offline    Completed without error       00%     13825         - 
# 2  Short offline       Completed without error       00%     13807         - 
# 3  Short offline       Completed: read failure       90%     13798         11655049 
# 4  Short offline       Completed: read failure       90%     13779         11655048 
# 5  Extended offline    Interrupted (host reset)      90%     13765         - 
# 6  Short offline       Completed without error       00%     13316         - 
# 7  Extended offline    Interrupted (host reset)      90%     13314         - 
# 8  Extended offline    Interrupted (host reset)      20%     13308         - 
# 9  Extended offline    Interrupted (host reset)      90%     13296         - 
#10  Short offline       Completed without error       00%     13020         - 
#11  Short offline       Completed without error       00%     12870         - 
#12  Short offline       Interrupted (host reset)      10%     12870         - 
#13  Extended offline    Completed without error       00%     12832         - 
#14  Short offline       Completed without error       00%     12815         - 
#15  Short offline       Completed: read failure       20%     12799         11653928 
#16  Short offline       Completed: read failure       20%     12799         11651807 
#17  Short offline       Completed: read failure       20%     12799         11651806 
#18  Short offline       Completed: read failure       20%     12799         11651805 
#19  Short offline       Completed: read failure       20%     12798         11651803 
#20  Short offline       Completed: read failure       20%     12798         11651802 
#21  Short offline       Completed: read failure       20%     12798         11651801 
9 of 9 failed self-tests are outdated by newer successful extended offline self-test # 1 

**erlangen:~ #**

Nonetheless I go with smartd disabled as long as the daily backup works:

**erlangen:~ #** journalctl --since 14:00 -u backup-home.service  
Mar 29 14:28:58 erlangen systemd[1]: Started Backup /home. 
Mar 29 14:30:41 erlangen systemd[1]: backup-home.service: Deactivated successfully. 
Mar 29 14:30:41 erlangen systemd[1]: backup-home.service: Consumed 28.219s CPU time. 
**erlangen:~ #**

**“You can have everything configured according to your requirements.” **:slight_smile:
My HDD are not system, so I don’t know if I need smartd “fully” running. I added standby,q to avoid it when spindown.
Only this one has error

~> sudo smartctl -l selftest /dev/sdc
smartctl 7.2 2021-09-14 r5237 [x86_64-linux-5.16.13-lp153.3.g9251332-default] (SUSE RPM)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF READ SMART DATA SECTION ===
SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short offline       Completed: read failure       20%     14932         6694104
# 2  Short offline       Completed: read failure       20%     14925         6694104
# 3  Short offline       Completed: read failure       20%     14916         6694104
# 4  Short offline       Completed: read failure       20%     14915         6694104
# 5  Short offline       Completed: read failure       20%     14911         6694104
# 6  Short offline       Completed: read failure       20%     14909         6694104
# 7  Short offline       Completed: read failure       20%     14904         6694104
# 8  Short offline       Completed: read failure       20%     14900         6694104
# 9  Short offline       Completed: read failure       20%     14897         6694104
#10  Short offline       Completed: read failure       20%     14891         6694104
#11  Short offline       Completed: read failure       20%     14887         6694104
#12  Short offline       Completed: read failure       20%     14880         6694104
#13  Short offline       Completed: read failure       20%     14873         6694104
#14  Short offline       Completed: read failure       20%     14866         6694104
#15  Short offline       Completed: read failure       20%     14864         6694104
#16  Short offline       Completed: read failure       20%     14855         6694104
#17  Short offline       Completed: read failure       20%     14850         6694104
#18  Short offline       Completed: read failure       20%     14842         6694104
#19  Short offline       Interrupted (host reset)      10%     14834         -
#20  Extended offline    Completed: read failure       90%     14785         6686200
#21  Extended offline    Completed: read failure       90%     14754         6686200

Is there something to do? Can I still trust it?

Moreover, one test starts the disks exactly 30 mn after boot. It is scheduled at 3:00:00 am but can’t run at this time. I’d guess it starts only once every 24 hours.

ar 31 10:59:24 ASR5600G hdparm[3247]: /dev/sda:
Mar 31 10:59:24 ASR5600G hdparm[3247]:  drive state is:  standby
Mar 31 10:59:24 ASR5600G hdparm[3247]: /dev/sdb:
Mar 31 10:59:24 ASR5600G hdparm[3247]:  drive state is:  standby
Mar 31 10:59:24 ASR5600G hdparm[3247]: /dev/sdc:
Mar 31 10:59:24 ASR5600G hdparm[3247]:  drive state is:  standby
Mar 31 10:59:24 ASR5600G hdparm[3247]: /dev/sdd:
Mar 31 10:59:24 ASR5600G hdparm[3247]:  drive state is:  standby
Mar 31 11:01:06 ASR5600G smartd[1152]: Device: /dev/sda [SAT], SMART Usage Attribute: 194 Temperature_Celsius changed from 135 to 132
**Mar 31 11:01:06 ASR5600G smartd[1152]: Device: /dev/sda [SAT], old test of type S not run at Thu Mar 31 03:00:00 2022 IST, starting now.**
Mar 31 11:01:06 ASR5600G smartd[1152]: Device: /dev/sda [SAT], starting scheduled Short Self-Test.
Mar 31 11:01:06 ASR5600G smartd[1152]: Device: /dev/sdb [SAT], SMART Usage Attribute: 194 Temperature_Celsius changed from 135 to 132
**Mar 31 11:01:06 ASR5600G smartd[1152]: Device: /dev/sdb [SAT], old test of type S not run at Thu Mar 31 03:00:00 2022 IST, starting now.**
Mar 31 11:01:06 ASR5600G smartd[1152]: Device: /dev/sdb [SAT], starting scheduled Short Self-Test.
Mar 31 11:01:06 ASR5600G smartd[1152]: Device: /dev/sdc [SAT], SMART Usage Attribute: 194 Temperature_Celsius changed from 136 to 133
**Mar 31 11:01:06 ASR5600G smartd[1152]: Device: /dev/sdc [SAT], old test of type S not run at Thu Mar 31 03:00:00 2022 IST, starting now.**
Mar 31 11:01:06 ASR5600G smartd[1152]: Device: /dev/sdc [SAT], starting scheduled Short Self-Test.
Mar 31 11:01:06 ASR5600G smartd[1152]: Device: /dev/sdd [SAT], SMART Usage Attribute: 194 Temperature_Celsius changed from 135 to 132
**Mar 31 11:01:06 ASR5600G smartd[1152]: Device: /dev/sdd [SAT], old test of type S not run at Thu Mar 31 03:00:00 2022 IST, starting now.**
Mar 31 11:01:06 ASR5600G smartd[1152]: Device: /dev/sdd [SAT], starting scheduled Short Self-Test.
Mar 31 11:01:08 ASR5600G hd-idle[1127]: spinup: sda
Mar 31 11:01:08 ASR5600G hd-idle[1127]: spinup: sdb
Mar 31 11:01:08 ASR5600G hd-idle[1127]: spinup: sdc
Mar 31 11:01:08 ASR5600G hd-idle[1127]: spinup: sdd

How to schedule it at 2-3 mn after boot?

Being annoyed by a kernel bug I now disable erlangen’s WDC WD40EZRX-22SPEB0 and enable it only when needed:

**erlangen:~ #** journalctl -b -g ata4.00                        
Mar 31 13:24:22 erlangen kernel: ata4.00: ATA-9: WDC WD40EZRX-22SPEB0, 80.00A80, max UDMA/133 
Mar 31 13:24:22 erlangen kernel: ata4.00: 7814037168 sectors, multi 16: LBA48 NCQ (depth 32), AA 
Mar 31 13:24:22 erlangen kernel: ata4.00: configured for UDMA/133 
Mar 31 13:24:24 erlangen kernel: **ata4.00****: disabled**
**erlangen:~ #**

https://forums.opensuse.org/showthread.php/568451-Disabling-SATA-disk-and-scanning-for-it

Only this one has error

~> sudo smartctl -l selftest /dev/sdc
smartctl 7.2 2021-09-14 r5237 [x86_64-linux-5.16.13-lp153.3.g9251332-default] (SUSE RPM)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF READ SMART DATA SECTION ===
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error

1 Short offline Completed: read failure 20% 14932 6694104

2 Short offline Completed: read failure 20% 14925 6694104

3 Short offline Completed: read failure 20% 14916 6694104

4 Short offline Completed: read failure 20% 14915 6694104

5 Short offline Completed: read failure 20% 14911 6694104

6 Short offline Completed: read failure 20% 14909 6694104

7 Short offline Completed: read failure 20% 14904 6694104

8 Short offline Completed: read failure 20% 14900 6694104

9 Short offline Completed: read failure 20% 14897 6694104

#10 Short offline Completed: read failure 20% 14891 6694104
#11 Short offline Completed: read failure 20% 14887 6694104
#12 Short offline Completed: read failure 20% 14880 6694104
#13 Short offline Completed: read failure 20% 14873 6694104
#14 Short offline Completed: read failure 20% 14866 6694104
#15 Short offline Completed: read failure 20% 14864 6694104
#16 Short offline Completed: read failure 20% 14855 6694104
#17 Short offline Completed: read failure 20% 14850 6694104
#18 Short offline Completed: read failure 20% 14842 6694104
#19 Short offline Interrupted (host reset) 10% 14834 -
#20 Extended offline Completed: read failure 90% 14785 6686200
#21 Extended offline Completed: read failure 90% 14754 6686200

Is there something to do? Can I still trust it?

Yep. Have some fun: https://forums.opensuse.org/showthread.php/555649-Extra-Fun-With-Backup-To-External-Disk

Moreover, one test starts the disks exactly 30 mn after boot. It is scheduled at 3:00:00 am but can’t run at this time. I’d guess it starts only once every 24 hours.

ar 31 10:59:24 ASR5600G hdparm[3247]: /dev/sda:
Mar 31 10:59:24 ASR5600G hdparm[3247]:  drive state is:  standby
Mar 31 10:59:24 ASR5600G hdparm[3247]: /dev/sdb:
Mar 31 10:59:24 ASR5600G hdparm[3247]:  drive state is:  standby
Mar 31 10:59:24 ASR5600G hdparm[3247]: /dev/sdc:
Mar 31 10:59:24 ASR5600G hdparm[3247]:  drive state is:  standby
Mar 31 10:59:24 ASR5600G hdparm[3247]: /dev/sdd:
Mar 31 10:59:24 ASR5600G hdparm[3247]:  drive state is:  standby
Mar 31 11:01:06 ASR5600G smartd[1152]: Device: /dev/sda [SAT], SMART Usage Attribute: 194 Temperature_Celsius changed from 135 to 132
**Mar 31 11:01:06 ASR5600G smartd[1152]: Device: /dev/sda [SAT], old test of type S not run at Thu Mar 31 03:00:00 2022 IST, starting now.**
Mar 31 11:01:06 ASR5600G smartd[1152]: Device: /dev/sda [SAT], starting scheduled Short Self-Test.
Mar 31 11:01:06 ASR5600G smartd[1152]: Device: /dev/sdb [SAT], SMART Usage Attribute: 194 Temperature_Celsius changed from 135 to 132
**Mar 31 11:01:06 ASR5600G smartd[1152]: Device: /dev/sdb [SAT], old test of type S not run at Thu Mar 31 03:00:00 2022 IST, starting now.**
Mar 31 11:01:06 ASR5600G smartd[1152]: Device: /dev/sdb [SAT], starting scheduled Short Self-Test.
Mar 31 11:01:06 ASR5600G smartd[1152]: Device: /dev/sdc [SAT], SMART Usage Attribute: 194 Temperature_Celsius changed from 136 to 133
**Mar 31 11:01:06 ASR5600G smartd[1152]: Device: /dev/sdc [SAT], old test of type S not run at Thu Mar 31 03:00:00 2022 IST, starting now.**
Mar 31 11:01:06 ASR5600G smartd[1152]: Device: /dev/sdc [SAT], starting scheduled Short Self-Test.
Mar 31 11:01:06 ASR5600G smartd[1152]: Device: /dev/sdd [SAT], SMART Usage Attribute: 194 Temperature_Celsius changed from 135 to 132
**Mar 31 11:01:06 ASR5600G smartd[1152]: Device: /dev/sdd [SAT], old test of type S not run at Thu Mar 31 03:00:00 2022 IST, starting now.**
Mar 31 11:01:06 ASR5600G smartd[1152]: Device: /dev/sdd [SAT], starting scheduled Short Self-Test.
Mar 31 11:01:08 ASR5600G hd-idle[1127]: spinup: sda
Mar 31 11:01:08 ASR5600G hd-idle[1127]: spinup: sdb
Mar 31 11:01:08 ASR5600G hd-idle[1127]: spinup: sdc
Mar 31 11:01:08 ASR5600G hd-idle[1127]: spinup: sdd

How to schedule it at 2-3 mn after boot?

Delete the install section by running "systemctl edit --full smartd.service:

**erlangen:~ #** systemctl cat smartd.service                
**# /usr/lib/systemd/system/smartd.service**
[Unit] 
Description=Self Monitoring and Reporting Technology (SMART) Daemon 
Documentation=man:smartd(8) man:smartd.conf(5) 
ConditionVirtualization=no 

[Service] 
# added automatically, for details please see 
# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort 
ProtectSystem=full 
ProtectHome=true 
ProtectHostname=true 
ProtectKernelModules=true 
ProtectKernelLogs=true 
ProtectControlGroups=true 
RestrictRealtime=true 
# end of automatic additions  
Type=notify 
EnvironmentFile=-/var/lib/smartmontools/smartd_opts 
ExecStart=/usr/sbin/smartd -n $smartd_opts 
ExecReload=/bin/kill -HUP $MAINPID 

[Install] 
WantedBy=multi-user.target 
**erlangen:~ #**

Create a timer:

[FONT=monospace]**erlangen:~ #** systemctl cat smartd.timer  
**# /etc/systemd/system/smartd.timer**
[Unit] 
Description=Start smartd

[Timer] 
OnStartupSec=180

[Install] 
WantedBy=timers.target 
**erlangen:~ #**[/FONT]

I did it

~> sudo systemctl cat smartd.service
# /usr/lib/systemd/system/smartd.service
[Unit]
Description=Self Monitoring and Reporting Technology (SMART) Daemon
Documentation=man:smartd(8) man:smartd.conf(5)
ConditionVirtualization=no

[Service]
# added automatically, for details please see
# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
ProtectSystem=full
ProtectHome=true
ProtectHostname=true
ProtectKernelModules=true
ProtectKernelLogs=true
ProtectControlGroups=true
RestrictRealtime=true
# end of automatic additions 
Type=notify
EnvironmentFile=-/var/lib/smartmontools/smartd_opts
ExecStart=/usr/sbin/smartd -n $smartd_opts
ExecReload=/bin/kill -HUP $MAINPID

# Changed start by timer
#[Install]
#WantedBy=multi-user.target


~> sudo systemctl cat smartd.timer
# /etc/systemd/system/smartd.timer
[Unit] 
Description=Start smartd

[Timer] 
OnStartupSec=180

[Install] 
WantedBy=timers.target 

~> sudo systemctl status smartd.timer
● smartd.timer - Start smartd
     Loaded: loaded (/etc/systemd/system/smartd.timer; enabled; vendor preset: disabled)
     Active: active (running) since Sat 2022-04-02 10:54:54 IST; 42min ago
    Trigger: n/a
   Triggers: ● smartd.service

**Apr 02 10:54:54 localhost systemd[1]: Started Start smartd.**

But I still get spinup just 30mn after smartd started

Apr 02 11:22:32 ASR5600G systemd[1]: Started hdparm check status.
Apr 02 11:22:32 ASR5600G hdparm[3769]: /dev/sda:
Apr 02 11:22:32 ASR5600G hdparm[3769]:  drive state is:  standby
Apr 02 11:22:32 ASR5600G hdparm[3769]: /dev/sdb:
Apr 02 11:22:32 ASR5600G hdparm[3769]:  drive state is:  standby
Apr 02 11:22:32 ASR5600G hdparm[3769]: /dev/sdc:
Apr 02 11:22:32 ASR5600G hdparm[3769]:  drive state is:  standby
Apr 02 11:22:32 ASR5600G hdparm[3769]: /dev/sdd:
Apr 02 11:22:32 ASR5600G hdparm[3769]:  drive state is:  standby
Apr 02 11:22:32 ASR5600G systemd[1]: hdparm.service: Succeeded.
Apr 02 11:24:54 ASR5600G smartd[1131]: Device: /dev/sda [SAT], SMART Usage Attribute: 194 Temperature_Celsius changed from 134 to 131
**Apr 02 11:24:54 ASR5600G smartd[1131]: Device: /dev/sda [SAT], old test of type S not run at Sat Apr  2 03:00:00 2022 IST, starting now.**
Apr 02 11:24:54 ASR5600G smartd[1131]: Device: /dev/sda [SAT], starting scheduled Short Self-Test.
Apr 02 11:24:54 ASR5600G smartd[1131]: Device: /dev/sdb [SAT], SMART Usage Attribute: 194 Temperature_Celsius changed from 134 to 131
Apr 02 11:24:54 ASR5600G smartd[1131]: Device: /dev/sdb [SAT], old test of type S not run at Sat Apr  2 03:00:00 2022 IST, starting now.
Apr 02 11:24:54 ASR5600G smartd[1131]: Device: /dev/sdb [SAT], starting scheduled Short Self-Test.
Apr 02 11:24:54 ASR5600G smartd[1131]: Device: /dev/sdc [SAT], SMART Usage Attribute: 194 Temperature_Celsius changed from 135 to 132
Apr 02 11:24:54 ASR5600G smartd[1131]: Device: /dev/sdc [SAT], old test of type S not run at Sat Apr  2 03:00:00 2022 IST, starting now.
Apr 02 11:24:54 ASR5600G smartd[1131]: Device: /dev/sdc [SAT], starting scheduled Short Self-Test.
Apr 02 11:24:54 ASR5600G smartd[1131]: Device: /dev/sdd [SAT], SMART Usage Attribute: 194 Temperature_Celsius changed from 134 to 131
Apr 02 11:24:54 ASR5600G smartd[1131]: Device: /dev/sdd [SAT], old test of type S not run at Sat Apr  2 03:00:00 2022 IST, starting now.
Apr 02 11:24:54 ASR5600G smartd[1131]: Device: /dev/sdd [SAT], starting scheduled Short Self-Test.
Apr 02 11:24:56 ASR5600G hd-idle[1110]: spinup: sda
Apr 02 11:24:56 ASR5600G hd-idle[1110]: spinup: sdb
Apr 02 11:24:56 ASR5600G hd-idle[1110]: spinup: sdc
Apr 02 11:24:56 ASR5600G hd-idle[1110]: spinup: sdd
Apr 02 11:26:32 ASR5600G systemd[1]: Started hdparm check status.
Apr 02 11:26:32 ASR5600G hdparm[3826]: /dev/sda:
Apr 02 11:26:32 ASR5600G hdparm[3826]:  drive state is:  active/idle
Apr 02 11:26:32 ASR5600G hdparm[3826]: /dev/sdb:
Apr 02 11:26:32 ASR5600G hdparm[3826]:  drive state is:  active/idle
Apr 02 11:26:32 ASR5600G hdparm[3826]: /dev/sdc:
Apr 02 11:26:32 ASR5600G hdparm[3826]:  drive state is:  active/idle
Apr 02 11:26:32 ASR5600G hdparm[3826]: /dev/sdd:
Apr 02 11:26:32 ASR5600G hdparm[3826]:  drive state is:  active/idle
Apr 02 11:26:32 ASR5600G systemd[1]: hdparm.service: Succeeded.
Apr 02 11:29:56 ASR5600G hd-idle[1110]: spindown: sda
Apr 02 11:29:57 ASR5600G hd-idle[1110]: spindown: sdb
Apr 02 11:29:57 ASR5600G hd-idle[1110]: spindown: sdc
Apr 02 11:29:57 ASR5600G hd-idle[1110]: spindown: sdd

Not Working. :question:
Edit: Looks like a specific test “type S” is started at that time. How to start it when smartd is started the first time?

Everything depends on configuration:

**erlangen:~ #** grep -v ^\# /etc/sysconfig/smartmontools | grep -v ^\$ 
SMARTD_CHECK_INTERVAL="10" 
SMARTD_LOG_FACILITY="daemon" 
SMARTD_DRIVEDB="" 
SMARTD_SAVESTATES="yes" 
SMARTD_ATTRLOG="yes" 
SMARTD_EXTRA_OPTS="" 
**erlangen:~ #**
**erlangen:~ #** grep -v ^\# /etc/smartd.conf | grep -v ^\$ 
DEFAULT -d removable -s (S/../.././03|L/../(01|02|03|04|05|06|07)/7/01) 
DEVICESCAN 
**erlangen:~ #**
**erlangen:~ #** systemctl cat smartd.* 
**# /etc/systemd/system/smartd.service**
[Unit] 
Description=Self Monitoring and Reporting Technology (SMART) Daemon 
Documentation=man:smartd(8) man:smartd.conf(5) 
ConditionVirtualization=no 

[Service] 
# added automatically, for details please see 
# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort 
ProtectSystem=full 
ProtectHome=true 
ProtectHostname=true 
ProtectKernelModules=true 
ProtectKernelLogs=true 
ProtectControlGroups=true 
RestrictRealtime=true 
# end of automatic additions  
Type=notify 
EnvironmentFile=-/var/lib/smartmontools/smartd_opts 
ExecStart=/usr/sbin/smartd -n $smartd_opts 
ExecReload=/bin/kill -HUP $MAINPID 

**# /etc/systemd/system/smartd.timer**
[Unit]  
Description=Start smartd 

[Timer]  
OnStartupSec=180 

[Install]  
WantedBy=timers.target 
**erlangen:~ #**



**erlangen:~ #** systemctl status smartd.service  
**●** smartd.service - Self Monitoring and Reporting Technology (SMART) Daemon 
     Loaded: loaded (/etc/systemd/system/smartd.service; static) 
     Active: **active (running)** since Sat 2022-04-02 12:56:56 CEST; 8min ago 
TriggeredBy: ○ smartd.timer 
       Docs: man:smartd(8) 
             man:smartd.conf(5) 
   Main PID: 10591 (smartd) 
     Status: "Next check of 3 devices will start at 13:05:26" 
      Tasks: 1 (limit: 4915) 
        CPU: 166ms 
     CGroup: /system.slice/smartd.service 
             └─10591 /usr/sbin/smartd -n -i 10

Apr 02 13:04:46 erlangen smartd[10591]: **Device: /dev/sdb [SAT], 4 Currently unreadable (pending) sectors**
Apr 02 13:04:46 erlangen smartd[10591]: **Device: /dev/sdb [SAT], 1 Offline uncorrectable sectors**
Apr 02 13:04:56 erlangen smartd[10591]: **Device: /dev/sdb [SAT], 4 Currently unreadable (pending) sectors**
Apr 02 13:04:56 erlangen smartd[10591]: **Device: /dev/sdb [SAT], 1 Offline uncorrectable sectors**
Apr 02 13:05:06 erlangen smartd[10591]: **Device: /dev/sdb [SAT], 4 Currently unreadable (pending) sectors**
Apr 02 13:05:06 erlangen smartd[10591]: **Device: /dev/sdb [SAT], 1 Offline uncorrectable sectors**
Apr 02 13:05:06 erlangen smartd[10591]: Device: /dev/sdb [SAT], SMART Usage Attribute: 194 Temperature_Celsius changed from 123 to 122 
Apr 02 13:05:16 erlangen smartd[10591]: Device: /dev/sda [SAT], SMART Usage Attribute: 194 Temperature_Celsius changed from 67 to 66 
Apr 02 13:05:16 erlangen smartd[10591]: **Device: /dev/sdb [SAT], 4 Currently unreadable (pending) sectors**
Apr 02 13:05:16 erlangen smartd[10591]: **Device: /dev/sdb [SAT], 1 Offline uncorrectable sectors**
**erlangen:~ #** systemctl status smartd.timer 
○ smartd.timer - Start smartd 
     Loaded: loaded (/etc/systemd/system/smartd.timer; enabled; vendor preset: disabled) 
     Active: inactive (dead) since Sat 2022-04-02 12:57:35 CEST; 7min ago 
    Trigger: n/a 
   Triggers: **●** smartd.service 

Apr 02 12:56:47 erlangen systemd[1]: Started Start smartd. 
Apr 02 12:57:35 erlangen systemd[1]: smartd.timer: Deactivated successfully. 
Apr 02 12:57:35 erlangen systemd[1]: Stopped Start smartd. 
**erlangen:~ #**


While smartd.service is acitve disks will be checked periodically:

**erlangen:~ #** journalctl -b -u smartd.* --no-pager             
Apr 02 12:56:47 erlangen systemd[1]: Started Start smartd. 
Apr 02 12:56:47 erlangen systemd[1]: Starting Self Monitoring and Reporting Technology (SMART) Daemon... 
Apr 02 12:56:47 erlangen smartd[10591]: smartd 7.2 2021-09-14 r5237 [x86_64-linux-5.17.1-1-default] (SUSE RPM) 
Apr 02 12:56:47 erlangen smartd[10591]: Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org 
Apr 02 12:56:47 erlangen smartd[10591]: Opened configuration file /etc/smartd.conf 
Apr 02 12:56:47 erlangen smartd[10591]: Drive: DEVICESCAN, implied '-a' Directive on line 32 of file /etc/smartd.conf 
Apr 02 12:56:47 erlangen smartd[10591]: Configuration file /etc/smartd.conf was parsed, found DEVICESCAN, scanning devices 
Apr 02 12:56:47 erlangen smartd[10591]: Device: /dev/sda, type changed from 'scsi' to 'sat' 
Apr 02 12:56:47 erlangen smartd[10591]: Device: /dev/sda [SAT], opened 
Apr 02 12:56:47 erlangen smartd[10591]: Device: /dev/sda [SAT], CT2000BX500SSD1, S/N:1944E225C2B1, WWN:5-00a075-1e225c2b1, FW:M6CR030, 2.00 TB 
Apr 02 12:56:47 erlangen smartd[10591]: Device: /dev/sda [SAT], found in smartd database: Crucial/Micron Client SSDs 
Apr 02 12:56:47 erlangen smartd[10591]: Device: /dev/sda [SAT], is SMART capable. Adding to "monitor" list. 
Apr 02 12:56:47 erlangen smartd[10591]: Device: /dev/sda [SAT], state read from /var/lib/smartmontools/smartd.CT2000BX500SSD1-1944E225C2B1.ata.state 
Apr 02 12:56:47 erlangen smartd[10591]: Device: /dev/sdb, type changed from 'scsi' to 'sat' 
Apr 02 12:56:47 erlangen smartd[10591]: Device: /dev/sdb [SAT], opened 
Apr 02 12:56:47 erlangen smartd[10591]: Device: /dev/sdb [SAT], WDC WD40EZRX-22SPEB0, S/N:WD-WCC4E2FYXSNV, WWN:5-0014ee-262d2e71e, FW:80.00A80, 4.00 TB 
Apr 02 12:56:47 erlangen smartd[10591]: Device: /dev/sdb [SAT], found in smartd database: Western Digital Green 
Apr 02 12:56:56 erlangen smartd[10591]: Device: /dev/sdb [SAT], is SMART capable. Adding to "monitor" list. 
Apr 02 12:56:56 erlangen smartd[10591]: Device: /dev/sdb [SAT], state read from /var/lib/smartmontools/smartd.WDC_WD40EZRX_22SPEB0-WD_WCC4E2FYXSNV.ata.state 
Apr 02 12:56:56 erlangen smartd[10591]: Device: /dev/nvme0, opened 
Apr 02 12:56:56 erlangen smartd[10591]: Device: /dev/nvme0, Samsung SSD 970 EVO Plus 2TB, S/N:S4J4NX0R834197L, FW:2B2QEXM7, 2.00 TB 
Apr 02 12:56:56 erlangen smartd[10591]: Device: /dev/nvme0, is SMART capable. Adding to "monitor" list. 
Apr 02 12:56:56 erlangen smartd[10591]: Device: /dev/nvme0, state read from /var/lib/smartmontools/smartd.Samsung_SSD_970_EVO_Plus_2TB-S4J4NX0R834197L.nvme.state 
Apr 02 12:56:56 erlangen smartd[10591]: Monitoring 2 ATA/SATA, 0 SCSI/SAS and 1 NVMe devices 
Apr 02 12:56:56 erlangen smartd[10591]: **Device: /dev/sdb [SAT], 4 Currently unreadable (pending) sectors**
Apr 02 12:56:56 erlangen smartd[10591]: **Device: /dev/sdb [SAT], 1 Offline uncorrectable sectors**
Apr 02 12:56:56 erlangen smartd[10591]: Device: /dev/sdb [SAT], SMART Usage Attribute: 9 Power_On_Hours changed from 82 to 81 
Apr 02 12:56:56 erlangen smartd[10591]: Device: /dev/sdb [SAT], Self-Test Log error count decreased from 2 to 0 
Apr 02 12:56:56 erlangen smartd[10591]: **Device: /dev/nvme0, number of Error Log entries increased from 426 to 510**
Apr 02 12:56:56 erlangen smartd[10591]: Device: /dev/sda [SAT], state written to /var/lib/smartmontools/smartd.CT2000BX500SSD1-1944E225C2B1.ata.state 
Apr 02 12:56:56 erlangen smartd[10591]: Device: /dev/sdb [SAT], state written to /var/lib/smartmontools/smartd.WDC_WD40EZRX_22SPEB0-WD_WCC4E2FYXSNV.ata.state 
Apr 02 12:56:56 erlangen smartd[10591]: Device: /dev/nvme0, state written to /var/lib/smartmontools/smartd.Samsung_SSD_970_EVO_Plus_2TB-S4J4NX0R834197L.nvme.state 
Apr 02 12:56:56 erlangen systemd[1]: Started Self Monitoring and Reporting Technology (SMART) Daemon. 
Apr 02 12:57:06 erlangen smartd[10591]: Device: /dev/sda [SAT], old test of type S not run at Thu Mar 24 03:00:00 2022 CET, starting now. 
Apr 02 12:57:06 erlangen smartd[10591]: Device: /dev/sda [SAT], starting scheduled Short Self-Test. 
Apr 02 12:57:06 erlangen smartd[10591]: **Device: /dev/sdb [SAT], 4 Currently unreadable (pending) sectors**
Apr 02 12:57:06 erlangen smartd[10591]: **Device: /dev/sdb [SAT], 1 Offline uncorrectable sectors**
Apr 02 12:57:06 erlangen smartd[10591]: Device: /dev/sdb [SAT], old test of type S not run at Thu Mar 24 03:00:00 2022 CET, starting now. 
Apr 02 12:57:06 erlangen smartd[10591]: Device: /dev/sdb [SAT], starting scheduled Short Self-Test. 
Apr 02 12:57:16 erlangen smartd[10591]: Device: /dev/sda [SAT], SMART Usage Attribute: 194 Temperature_Celsius changed from 67 to 66 
Apr 02 12:57:16 erlangen smartd[10591]: Device: /dev/sda [SAT], self-test in progress, 90% remaining 
Apr 02 12:57:16 erlangen smartd[10591]: **Device: /dev/sdb [SAT], 4 Currently unreadable (pending) sectors**
Apr 02 12:57:16 erlangen smartd[10591]: **Device: /dev/sdb [SAT], 1 Offline uncorrectable sectors**
Apr 02 12:57:16 erlangen smartd[10591]: Device: /dev/sdb [SAT], self-test in progress, 90% remaining 
Apr 02 12:57:26 erlangen smartd[10591]: Device: /dev/sda [SAT], self-test in progress, 80% remaining 
Apr 02 12:57:26 erlangen smartd[10591]: **Device: /dev/sdb [SAT], 4 Currently unreadable (pending) sectors**
Apr 02 12:57:26 erlangen smartd[10591]: **Device: /dev/sdb [SAT], 1 Offline uncorrectable sectors**


When booting smartd.timer will wait for 180 second and eventually trigger smartd.service

You need to reboot for checking proper operation.

My config

~> grep -v ^\# /etc/sysconfig/smartmontools | grep -v ^\$
**SMARTD_CHECK_INTERVAL="1800"**
SMARTD_LOG_FACILITY="daemon"
SMARTD_DRIVEDB=""
SMARTD_SAVESTATES="yes"
SMARTD_ATTRLOG="yes"
SMARTD_EXTRA_OPTS=""

~> grep -v ^\# /etc/smartd.conf | grep -v ^\$
DEFAULT -d removable -s (S/../.././03|L/../(01|02|03|04|05|06|07)/7/01)
DEVICESCAN
DEFAULT -n standby,q
/dev/sda
/dev/sdb
/dev/sdb
/dev/sdd

~> sudo systemctl status smartd.service
[sudo] password for root: 
● smartd.service - Self Monitoring and Reporting Technology (SMART) Daemon
     Loaded: loaded (/usr/lib/systemd/system/smartd.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2022-04-02 10:54:54 IST; 1h 43min ago
TriggeredBy: ● smartd.timer
       Docs: man:smartd(8)
             man:smartd.conf(5)
   Main PID: 1131 (smartd)
     Status: "Next check of 5 devices will start at 12:54:54"
      Tasks: 1 (limit: 4915)
     CGroup: /system.slice/smartd.service
             └─1131 /usr/sbin/smartd -n

Apr 02 11:54:54 ASR5600G smartd[1131]: Device: /dev/sda [SAT], SMART Usage Attribute: 194 Temperature_Celsius changed from 131 to 128
Apr 02 11:54:54 ASR5600G smartd[1131]: Device: /dev/sda [SAT], previous self-test completed without error
Apr 02 11:54:54 ASR5600G smartd[1131]: Device: /dev/sdb [SAT], SMART Usage Attribute: 194 Temperature_Celsius changed from 131 to 129
Apr 02 11:54:54 ASR5600G smartd[1131]: Device: /dev/sdb [SAT], previous self-test completed without error
Apr 02 11:54:54 ASR5600G smartd[1131]: Device: /dev/sdc [SAT], SMART Usage Attribute: 194 Temperature_Celsius changed from 132 to 129
Apr 02 11:54:54 ASR5600G smartd[1131]: Device: /dev/sdc [SAT], previous self-test completed with error (read test element)
Apr 02 11:54:54 ASR5600G smartd[1131]: Device: /dev/sdc [SAT], new Self-Test Log error at hour timestamp 14936
Apr 02 11:54:54 ASR5600G smartd[1131]: Device: /dev/sdd [SAT], SMART Usage Attribute: 194 Temperature_Celsius changed from 131 to 129
Apr 02 11:54:54 ASR5600G smartd[1131]: Device: /dev/sdd [SAT], previous self-test completed without error
Apr 02 12:24:54 ASR5600G smartd[1131]: Device: /dev/sda [SAT], SMART Usage Attribute: 194 Temperature_Celsius changed from 128 to 129

The main difference I see is the check interval (30mn for my config). Your is 10s, not too often?
I notice that smartd start by the delay (30mn) then test. Is is possible to start it by test then delay? This could solve this issue.
As I understand in a previous post, I don’t need to have smartd running often for data disk.

I chose the 10 seconds interval for demonstration purposes only. I reiterate: Running periodic tests is overkill, in my opinion of course.

I notice that smartd start by the delay (30mn) then test. Is is possible to start it by test then delay? This could solve this issue.

I have no idea what you are talking about. Provide details I can understand.

According to this log erlangen’s smartd does:

**erlangen:~ #** journalctl -b -u smartd.service --since 13:10 
**# start up**
Apr 02 13:10:51 erlangen systemd[1]: Starting Self Monitoring and Reporting Technology (SMART) Daemon... 
Apr 02 13:10:51 erlangen smartd[11062]: smartd 7.2 2021-09-14 r5237 [x86_64-linux-5.17.1-1-default] (SUSE RPM) 
Apr 02 13:10:51 erlangen smartd[11062]: Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org 
Apr 02 13:10:51 erlangen smartd[11062]: Opened configuration file /etc/smartd.conf 
Apr 02 13:10:51 erlangen smartd[11062]: Drive: DEVICESCAN, implied '-a' Directive on line 32 of file /etc/smartd.conf 
Apr 02 13:10:51 erlangen smartd[11062]: Configuration file /etc/smartd.conf was parsed, found DEVICESCAN, scanning devices 
Apr 02 13:10:51 erlangen smartd[11062]: Device: /dev/sda, type changed from 'scsi' to 'sat' 
Apr 02 13:10:51 erlangen smartd[11062]: Device: /dev/sda [SAT], opened 
Apr 02 13:10:51 erlangen smartd[11062]: Device: /dev/sda [SAT], CT2000BX500SSD1, S/N:1944E225C2B1, WWN:5-00a075-1e225c2b1, FW:M6CR030, 2.00 TB 
Apr 02 13:10:51 erlangen smartd[11062]: Device: /dev/sda [SAT], found in smartd database: Crucial/Micron Client SSDs 
Apr 02 13:10:51 erlangen smartd[11062]: Device: /dev/sda [SAT], is SMART capable. Adding to "monitor" list. 
Apr 02 13:10:51 erlangen smartd[11062]: Device: /dev/sda [SAT], state read from /var/lib/smartmontools/smartd.CT2000BX500SSD1-1944E225C2B1.ata.state 
Apr 02 13:10:51 erlangen smartd[11062]: Device: /dev/sdb, type changed from 'scsi' to 'sat' 
Apr 02 13:10:51 erlangen smartd[11062]: Device: /dev/sdb [SAT], opened 
Apr 02 13:10:51 erlangen smartd[11062]: Device: /dev/sdb [SAT], WDC WD40EZRX-22SPEB0, S/N:WD-WCC4E2FYXSNV, WWN:5-0014ee-262d2e71e, FW:80.00A80, 4.00 TB 
Apr 02 13:10:51 erlangen smartd[11062]: Device: /dev/sdb [SAT], found in smartd database: Western Digital Green 
Apr 02 13:10:51 erlangen smartd[11062]: Device: /dev/sdb [SAT], is SMART capable. Adding to "monitor" list. 
Apr 02 13:10:51 erlangen smartd[11062]: Device: /dev/sdb [SAT], state read from /var/lib/smartmontools/smartd.WDC_WD40EZRX_22SPEB0-WD_WCC4E2FYXSNV.ata.state 
Apr 02 13:10:51 erlangen smartd[11062]: Device: /dev/nvme0, opened 
Apr 02 13:10:51 erlangen smartd[11062]: Device: /dev/nvme0, Samsung SSD 970 EVO Plus 2TB, S/N:S4J4NX0R834197L, FW:2B2QEXM7, 2.00 TB 
Apr 02 13:10:51 erlangen smartd[11062]: Device: /dev/nvme0, is SMART capable. Adding to "monitor" list. 
Apr 02 13:10:51 erlangen smartd[11062]: Device: /dev/nvme0, state read from /var/lib/smartmontools/smartd.Samsung_SSD_970_EVO_Plus_2TB-S4J4NX0R834197L.nvme.state 
Apr 02 13:10:51 erlangen smartd[11062]: Monitoring 2 ATA/SATA, 0 SCSI/SAS and 1 NVMe devices 
Apr 02 13:10:51 erlangen smartd[11062]: **Device: /dev/sdb [SAT], 4 Currently unreadable (pending) sectors**
Apr 02 13:10:51 erlangen smartd[11062]: **Device: /dev/sdb [SAT], 1 Offline uncorrectable sectors**
Apr 02 13:10:51 erlangen smartd[11062]: Device: /dev/sdb [SAT], SMART Usage Attribute: 194 Temperature_Celsius changed from 122 to 121 
Apr 02 13:10:51 erlangen smartd[11062]: Device: /dev/sda [SAT], state written to /var/lib/smartmontools/smartd.CT2000BX500SSD1-1944E225C2B1.ata.state 
Apr 02 13:10:51 erlangen smartd[11062]: Device: /dev/sdb [SAT], state written to /var/lib/smartmontools/smartd.WDC_WD40EZRX_22SPEB0-WD_WCC4E2FYXSNV.ata.state 
Apr 02 13:10:51 erlangen smartd[11062]: Device: /dev/nvme0, state written to /var/lib/smartmontools/smartd.Samsung_SSD_970_EVO_Plus_2TB-S4J4NX0R834197L.nvme.state 
Apr 02 13:10:51 erlangen systemd[1]: Started Self Monitoring and Reporting Technology (SMART) Daemon. 
**# periodic checks 10 seconds interval**
Apr 02 13:11:01 erlangen smartd[11062]: **Device: /dev/sdb [SAT], 4 Currently unreadable (pending) sectors**
Apr 02 13:11:01 erlangen smartd[11062]: **Device: /dev/sdb [SAT], 1 Offline uncorrectable sectors**
Apr 02 13:11:12 erlangen smartd[11062]: **Device: /dev/sdb [SAT], 4 Currently unreadable (pending) sectors**
Apr 02 13:11:12 erlangen smartd[11062]: **Device: /dev/sdb [SAT], 1 Offline uncorrectable sectors**
Apr 02 13:11:21 erlangen smartd[11062]: **Device: /dev/sdb [SAT], 4 Currently unreadable (pending) sectors**
Apr 02 13:11:21 erlangen smartd[11062]: **Device: /dev/sdb [SAT], 1 Offline uncorrectable sectors**
**# shutting down**
Apr 02 13:11:25 erlangen smartd[11062]: smartd received signal 15: Terminated 
Apr 02 13:11:25 erlangen smartd[11062]: Device: /dev/sda [SAT], state written to /var/lib/smartmontools/smartd.CT2000BX500SSD1-1944E225C2B1.ata.state 
Apr 02 13:11:25 erlangen systemd[1]: Stopping Self Monitoring and Reporting Technology (SMART) Daemon... 
Apr 02 13:11:25 erlangen smartd[11062]: Device: /dev/sdb [SAT], state written to /var/lib/smartmontools/smartd.WDC_WD40EZRX_22SPEB0-WD_WCC4E2FYXSNV.ata.state 
Apr 02 13:11:25 erlangen smartd[11062]: Device: /dev/nvme0, state written to /var/lib/smartmontools/smartd.Samsung_SSD_970_EVO_Plus_2TB-S4J4NX0R834197L.nvme.state 
Apr 02 13:11:25 erlangen smartd[11062]: smartd is exiting (exit status 0) 
Apr 02 13:11:25 erlangen systemd[1]: smartd.service: Deactivated successfully. 
Apr 02 13:11:25 erlangen systemd[1]: Stopped Self Monitoring and Reporting Technology (SMART) Daemon. 
**erlangen:~ #**

Is smartd useful for system SSD M.2 for issue alert? At what interval?
Is it possible to select what disks smartd will monitor? SDD M.2 vs HDDs
If I keep smartd for the non system HDDs, what the larger interval? Is once a day good?

I notice that smartd start by the delay (30mn) then test. Is is possible to start it by test then delay? This could solve this issue.

I have no idea what you are talking about. Provide details I can understand.

In my post #69,

Apr 02 11:24:54 ASR5600G smartd[1131]: Device: /dev/sda [SAT], SMART Usage Attribute: 194 Temperature_Celsius changed from 134 to 131
**Apr 02 11:24:54 ASR5600G smartd[1131]: Device: /dev/sda [SAT], old test of type S not run at Sat Apr  2 03:00:00 2022 IST, starting now.**
Apr 02 11:24:54 ASR5600G smartd[1131]: Device: /dev/sda [SAT], starting scheduled Short Self-Test.
Apr 02 11:24:54 ASR5600G smartd[1131]: Device: /dev/sdb [SAT], SMART Usage Attribute: 194 Temperature_Celsius changed from 134 to 131
**Apr 02 11:24:54 ASR5600G smartd[1131]: Device: /dev/sdb [SAT], old test of type S not run at Sat Apr  2 03:00:00 2022 IST, starting now.**
Apr 02 11:24:54 ASR5600G smartd[1131]: Device: /dev/sdb [SAT], starting scheduled Short Self-Test.
Apr 02 11:24:54 ASR5600G smartd[1131]: Device: /dev/sdc [SAT], SMART Usage Attribute: 194 Temperature_Celsius changed from 135 to 132
**Apr 02 11:24:54 ASR5600G smartd[1131]: Device: /dev/sdc [SAT], old test of type S not run at Sat Apr  2 03:00:00 2022 IST, starting now.**
Apr 02 11:24:54 ASR5600G smartd[1131]: Device: /dev/sdc [SAT], starting scheduled Short Self-Test.
Apr 02 11:24:54 ASR5600G smartd[1131]: Device: /dev/sdd [SAT], SMART Usage Attribute: 194 Temperature_Celsius changed from 134 to 131
**Apr 02 11:24:54 ASR5600G smartd[1131]: Device: /dev/sdd [SAT], old test of type S not run at Sat Apr  2 03:00:00 2022 IST, starting now.**
Apr 02 11:24:54 ASR5600G smartd[1131]: Device: /dev/sdd [SAT], starting scheduled Short Self-Test.
Apr 02 11:24:56 ASR5600G hd-idle[1110]: spinup: sda
Apr 02 11:24:56 ASR5600G hd-idle[1110]: spinup: sdb
Apr 02 11:24:56 ASR5600G hd-idle[1110]: spinup: sdc
Apr 02 11:24:56 ASR5600G hd-idle[1110]: spinup: sdd

I understand that there is a specific test started by smartd "old test of type S not run at Sat Apr 2 03:00:00 2022". This test didn’t run at 03:00:00 because the computer was off.
This test seems to be only once a 24 hours.
At the following boot smartd restart after a 180s delay but this test is postponed for 1800s (30mn) and when started, spinup the disks.
My question is why this 1800 delay? How to remove it and trigger it at the smartd start after boot?

If your HDD is spindown just before you start shutting down the computer, does it spin up before switch off?
My HDDs spin up just before the computer switch off. Is it possible to avoid it?

I see. Same behavior here:

**erlangen:~ #** journalctl -b -u smartd.service -g sdb                    
Apr 03 19:56:55 erlangen smartd[22281]: Device: /dev/sdb, type changed from 'scsi' to 'sat' 
Apr 03 19:56:55 erlangen smartd[22281]: Device: /dev/sdb [SAT], opened 
Apr 03 19:56:55 erlangen smartd[22281]: Device: /dev/sdb [SAT], WDC WD40EZRX-22SPEB0, S/N:WD-WCC4E2FYXSNV, WWN:5-0014ee-262d2e71e, FW:80.00A80, 4.00 TB 
Apr 03 19:56:55 erlangen smartd[22281]: Device: /dev/sdb [SAT], found in smartd database: Western Digital Green 
**Apr 03 19:57:04 erlangen smartd[22281]: Device: /dev/sdb [SAT], is SMART capable. Adding to "monitor" list. 
**Apr 03 19:57:04 erlangen smartd[22281]: Device: /dev/sdb [SAT], state read from /var/lib/smartmontools/smartd.WDC_WD40EZRX_22SPEB0-WD_WCC4E2FYXSNV.ata.state 
Apr 03 19:57:04 erlangen smartd[22281]: **Device: /dev/****sdb**** [SAT], 4 Currently unreadable (pending) sectors**
Apr 03 19:57:04 erlangen smartd[22281]: **Device: /dev/****sdb**** [SAT], 1 Offline uncorrectable sectors**
Apr 03 19:57:04 erlangen smartd[22281]: Device: /dev/sdb [SAT], SMART Prefailure Attribute: 3 Spin_Up_Time changed from 182 to 181 
Apr 03 19:57:04 erlangen smartd[22281]: Device: /dev/sdb [SAT], SMART Usage Attribute: 194 Temperature_Celsius changed from 121 to 122 
Apr 03 19:57:04 erlangen smartd[22281]: Device: /dev/sdb [SAT], state written to /var/lib/smartmontools/smartd.WDC_WD40EZRX_22SPEB0-WD_WCC4E2FYXSNV.ata.state 
Apr 03 19:57:14 erlangen smartd[22281]: **Device: /dev/****sdb**** [SAT], 4 Currently unreadable (pending) sectors**
Apr 03 19:57:14 erlangen smartd[22281]: **Device: /dev/****sdb**** [SAT], 1 Offline uncorrectable sectors**
Apr 03 19:57:14 erlangen smartd[22281]: Device: /dev/sdb [SAT], SMART Usage Attribute: 194 Temperature_Celsius changed from 122 to 123 
**Apr 03 19:57:14 erlangen smartd[22281]: Device: /dev/sdb [SAT], old test of type L not run at Sun Apr  3 01:00:00 2022 CEST, starting now.** 
Apr 03 19:57:14 erlangen smartd[22281]: Device: /dev/sdb [SAT], starting scheduled Long Self-Test. 
Apr 03 19:57:24 erlangen smartd[22281]: **Device: /dev/****sdb**** [SAT], 4 Currently unreadable (pending) sectors**
Apr 03 19:57:24 erlangen smartd[22281]: **Device: /dev/****sdb**** [SAT], 1 Offline uncorrectable sectors**
Apr 03 19:57:24 erlangen smartd[22281]: Device: /dev/sdb [SAT], self-test in progress, 90% remaining 
Apr 03 19:57:34 erlangen smartd[22281]: **Device: /dev/****sdb**** [SAT], 4 Currently unreadable (pending) sectors**
Apr 03 19:57:34 erlangen smartd[22281]: **Device: /dev/****sdb**** [SAT], 1 Offline uncorrectable sectors**
Apr 03 19:57:42 erlangen smartd[22281]: Device: /dev/sdb [SAT], state written to /var/lib/smartmontools/smartd.WDC_WD40EZRX_22SPEB0-WD_WCC4E2FYXSNV.ata.state 
**erlangen:~ #**

I have no idea how to change this. From “man smartd.conf”:

Scheduled tests are run immediately following the regularly-scheduled device polling, if the current local date, time, and test type, match REGEXP. By default the regularly-scheduled device polling occurs every thirty minutes after starting smartd. Take caution if you use the ‘-i’ option to make this polling interval more than sixty minutes: the poll times may fail to coincide with any of the testing times that you have specified with REGEXP. In this case the test will be run following the next device polling.

If your HDD is spindown just before you start shutting down the computer, does it spin up before switch off? My HDDs spin up just before the computer switch off. Is it possible to avoid it?

erlangen’s WDC WD40EZRX-22SPEB0 doesn’t spin up on shutdown.

I plugged erlangen into a power meter and checked disk behavior.

**erlangen:~ #** inxi -MD 
**Machine:   Type:** Desktop **Mobo:** ASRock **model:** Z170 Pro4S **serial:** M86-64000700034 **UEFI:** American Megatrends **v:** P7.50 
           **date:** 01/23/2018 
**Drives:    Local Storage:****total:** 3.64 TiB **used:** 1.7 TiB (46.8%) 
           **ID-1:** /dev/nvme0n1 **vendor:** Samsung **model:** SSD 970 EVO Plus 2TB **size:** 1.82 TiB 
           **ID-2:** /dev/sda **vendor:** Crucial **model:** CT2000BX500SSD1 **size:** 1.82 TiB 
**erlangen:~ # **

erlangen supports hot plugging:

**erlangen:~ #** scan-for-backup-disk                       
**erlangen:~ #** inxi -D               
**Drives:    Local Storage:****total:** 7.28 TiB **used:** 3.79 TiB (52.1%) 
           **ID-1:** /dev/nvme0n1 **vendor:** Samsung **model:** SSD 970 EVO Plus 2TB **size:** 1.82 TiB 
           **ID-2:** /dev/sda **vendor:** Crucial **model:** CT2000BX500SSD1 **size:** 1.82 TiB 
           **ID-3:** /dev/sdb **vendor:** Western Digital **model:** WD40EZRX-22SPEB0 **size:** 3.64 TiB 
**erlangen:~ #**

For minimum hassle try this: Disabling SATA disk and scanning for it - Forums Feedback - openSUSE Forums

**erlangen:~ #** delete-backup-disk  
**erlangen:~ #** inxi -D             
**Drives:    Local Storage:****total:** 3.64 TiB **used:** 1.7 TiB (46.8%) 
           **ID-1:** /dev/nvme0n1 **vendor:** Samsung **model:** SSD 970 EVO Plus 2TB **size:** 1.82 TiB 
           **ID-2:** /dev/sda **vendor:** Crucial **model:** CT2000BX500SSD1 **size:** 1.82 TiB 
**erlangen:~ #**

I did a full test to sdc (~26 hours). Now I get

~> sudo smartctl -a /dev/sdc
smartctl 7.2 2021-09-14 r5237 [x86_64-linux-5.16.13-lp153.3.g9251332-default] (SUSE RPM)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Western Digital Red
Device Model:     WDC WD40EFRX-68WT0N0
Serial Number:    WD-WCC4E1XXZ0TY
LU WWN Device Id: 5 0014ee 20de6e65f
Firmware Version: 82.00A82
User Capacity:    4,000,787,030,016 bytes [4.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    5400 rpm
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ACS-2 (minor revision not indicated)
SATA Version is:  SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Tue Apr  5 11:35:51 2022 IST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x00)    Offline data collection activity
                    was never started.
                    Auto Offline Data Collection: Disabled.
Self-test execution status:      (   0)    The previous self-test routine completed
                    without error or no self-test has ever 
                    been run.
Total time to complete Offline 
data collection:         (54000) seconds.
Offline data collection
capabilities:              (0x7b) SMART execute Offline immediate.
                    Auto Offline data collection on/off support.
                    Suspend Offline collection upon new
                    command.
                    Offline surface scan supported.
                    Self-test supported.
                    Conveyance Self-test supported.
                    Selective Self-test supported.
SMART capabilities:            (0x0003)    Saves SMART data before entering
                    power-saving mode.
                    Supports SMART auto save timer.
Error logging capability:        (0x01)    Error logging supported.
                    General Purpose Logging supported.
Short self-test routine 
recommended polling time:      (   2) minutes.
Extended self-test routine
recommended polling time:      ( 540) minutes.
Conveyance self-test routine
recommended polling time:      (   5) minutes.
SCT capabilities:            (0x703d)    SCT Status supported.
                    SCT Error Recovery Control supported.
                    SCT Feature Control supported.
                    SCT Data Table supported.

SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x002f   200   200   051    Pre-fail  Always       -       222
  3 Spin_Up_Time            0x0027   179   172   021    Pre-fail  Always       -       8008
  4 Start_Stop_Count        0x0032   099   099   000    Old_age   Always       -       1629
  5 Reallocated_Sector_Ct   0x0033   142   142   140    Pre-fail  Always       -       1713
  7 Seek_Error_Rate         0x002e   200   200   000    Old_age   Always       -       0
  9 Power_On_Hours          0x0032   080   080   000    Old_age   Always       -       14978
 10 Spin_Retry_Count        0x0032   100   100   000    Old_age   Always       -       0
 11 Calibration_Retry_Count 0x0032   100   100   000    Old_age   Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       505
192 Power-Off_Retract_Count 0x0032   200   200   000    Old_age   Always       -       151
193 Load_Cycle_Count        0x0032   198   198   000    Old_age   Always       -       6900
194 Temperature_Celsius     0x0022   133   103   000    Old_age   Always       -       19
196 Reallocated_Event_Count 0x0032   100   001   000    Old_age   Always       -       100
197 Current_Pending_Sector  0x0032   200   200   000    Old_age   Always       -       7
198 Offline_Uncorrectable   0x0030   100   253   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x0032   200   200   000    Old_age   Always       -       0
200 Multi_Zone_Error_Rate   0x0008   200   200   000    Old_age   Offline      -       2

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short offline       Completed without error       00%     14975         -
# 2  Extended offline    Completed: read failure       90%     14948         6694104
# 3  Extended offline    Completed: read failure       90%     14946         6694104
# 4  Short offline       Completed: read failure       20%     14936         6694104
# 5  Short offline       Completed: read failure       20%     14932         6694104
# 6  Short offline       Completed: read failure       20%     14932         6694104
# 7  Short offline       Completed: read failure       20%     14925         6694104
# 8  Short offline       Completed: read failure       20%     14916         6694104
# 9  Short offline       Completed: read failure       20%     14915         6694104
#10  Short offline       Completed: read failure       20%     14911         6694104
#11  Short offline       Completed: read failure       20%     14909         6694104
#12  Short offline       Completed: read failure       20%     14904         6694104
#13  Short offline       Completed: read failure       20%     14900         6694104
#14  Short offline       Completed: read failure       20%     14897         6694104
#15  Short offline       Completed: read failure       20%     14891         6694104
#16  Short offline       Completed: read failure       20%     14887         6694104
#17  Short offline       Completed: read failure       20%     14880         6694104
#18  Short offline       Completed: read failure       20%     14873         6694104
#19  Short offline       Completed: read failure       20%     14866         6694104
#20  Short offline       Completed: read failure       20%     14864         6694104
#21  Short offline       Completed: read failure       20%     14855         6694104

SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.

Do I need to start another full test? Do you see something that show pre-fail in short time?

Reallocated_Sector_Ct is mounting (+5 since post #61). Be cautious. Run a long test.

erlangen’s WD40EZRX-22SPEB0 now has:

erlangen:~ # smartctl -A /dev/sdb
smartctl 7.2 2021-09-14 r5237 [x86_64-linux-5.17.1-1-default] (SUSE RPM)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF READ SMART DATA SECTION ===
SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x002f   200   200   051    Pre-fail  Always       -       728
  3 Spin_Up_Time            0x0027   182   175   021    Pre-fail  Always       -       7866
  4 Start_Stop_Count        0x0032   093   093   000    Old_age   Always       -       7978
  5 Reallocated_Sector_Ct   0x0033   200   200   140    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x002e   200   200   000    Old_age   Always       -       0
  9 Power_On_Hours          0x0032   081   081   000    Old_age   Always       -       13909
 10 Spin_Retry_Count        0x0032   100   100   000    Old_age   Always       -       0
 11 Calibration_Retry_Count 0x0032   100   100   000    Old_age   Always       -       0
 12 Power_Cycle_Count       0x0032   098   098   000    Old_age   Always       -       2975
192 Power-Off_Retract_Count 0x0032   200   200   000    Old_age   Always       -       83
193 Load_Cycle_Count        0x0032   198   198   000    Old_age   Always       -       7925
194 Temperature_Celsius     0x0022   113   110   000    Old_age   Always       -       39
196 Reallocated_Event_Count 0x0032   200   200   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   200   200   000    Old_age   Always       -       3
198 Offline_Uncorrectable   0x0030   200   200   000    Old_age   Offline      -       1
199 UDMA_CRC_Error_Count    0x0032   200   200   000    Old_age   Always       -       0
200 Multi_Zone_Error_Rate   0x0008   200   200   000    Old_age   Offline      -       126

erlangen:~ # smartctl -l selftest /dev/sdb
smartctl 7.2 2021-09-14 r5237 [x86_64-linux-5.17.1-1-default] (SUSE RPM)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF READ SMART DATA SECTION ===
SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Extended offline    Interrupted (host reset)      90%     13908         -
# 2  Short offline       Completed without error       00%     13907         -
# 3  Short offline       Completed without error       00%     13907         -
# 4  Short offline       Completed: read failure       20%     13907         11655048
# 5  Extended offline    Interrupted (host reset)      90%     13898         -
# 6  Short offline       Completed without error       00%     13881         -
# 7  Extended offline    Completed without error       00%     13825         -
# 8  Short offline       Completed without error       00%     13807         -
# 9  Short offline       Completed: read failure       90%     13798         11655049
#10  Short offline       Completed: read failure       90%     13779         11655048
#11  Extended offline    Interrupted (host reset)      90%     13765         -
#12  Short offline       Completed without error       00%     13316         -
#13  Extended offline    Interrupted (host reset)      90%     13314         -
#14  Extended offline    Interrupted (host reset)      20%     13308         -
#15  Extended offline    Interrupted (host reset)      90%     13296         -
#16  Short offline       Completed without error       00%     13020         -
#17  Short offline       Completed without error       00%     12870         -
#18  Short offline       Interrupted (host reset)      10%     12870         -
#19  Extended offline    Completed without error       00%     12832         -
#20  Short offline       Completed without error       00%     12815         -
#21  Short offline       Completed: read failure       20%     12799         11653928
3 of 4 failed self-tests are outdated by newer successful extended offline self-test # 7

erlangen:~ # 

Faulty sector #11655048 was presumably in an unused inode. Write to file until disk full didn’t result in error messages.

erlangen:~ # df -i /HDD/
Filesystem        Inodes   IUsed     IFree IUse% Mounted on
/dev/sdb1      244195328 1554919 242640409    1% /HDD
erlangen:~ # 

I verified: Running “hdparm --read-sector 11655048 /dev/sdb” increased Raw_Read_Error_Rate by 1. Zeroing with “hdparm --yes-i-know-what-i-am-doing --write-sector 11655048 /dev/sdb” reduced Current_Pending_Sector by 1.

Worse

~> sudo smartctl -a /dev/sdc
...
 5 Reallocated_Sector_Ct   0x0033   142   142   140    Pre-fail  Always       -       1714     ## +1
...
# 1  Short offline       Completed: read failure       20%     14979         6704352
# 2  Short offline       Completed without error       00%     14975         -

~> sudo dd if=/dev/zero of=/dev/sdc conv=sync bs=4096 count=1 seek=838044

6704352÷8=838044
But nothing changed, nothing better.
Do you have another command to remove “read failure”?
I’ll run a new full test and try to fix again but at the end I think I’ll remove it.

Status of WD40EZRX-22SPEB0:

**erlangen:~ #** smartctl -A /dev/sdb 
smartctl 7.2 2021-09-14 r5237 [x86_64-linux-5.17.1-1-default] (SUSE RPM) 
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org 

=== START OF READ SMART DATA SECTION === 
SMART Attributes Data Structure revision number: 16 
Vendor Specific SMART Attributes with Thresholds: 
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE 
**  1 Raw_Read_Error_Rate     0x002f   200   200   051    Pre-fail  Always       -       840 **
  3 Spin_Up_Time            0x0027   183   175   021    Pre-fail  Always       -       7816 
  4 Start_Stop_Count        0x0032   093   093   000    Old_age   Always       -       7981 
  5 Reallocated_Sector_Ct   0x0033   200   200   140    Pre-fail  Always       -       0 
  7 Seek_Error_Rate         0x002e   200   200   000    Old_age   Always       -       0 
  9 Power_On_Hours          0x0032   081   081   000    Old_age   Always       -       13926 
 10 Spin_Retry_Count        0x0032   100   100   000    Old_age   Always       -       0 
 11 Calibration_Retry_Count 0x0032   100   100   000    Old_age   Always       -       0 
 12 Power_Cycle_Count       0x0032   098   098   000    Old_age   Always       -       2975 
192 Power-Off_Retract_Count 0x0032   200   200   000    Old_age   Always       -       83 
193 Load_Cycle_Count        0x0032   198   198   000    Old_age   Always       -       7928 
194 Temperature_Celsius     0x0022   114   110   000    Old_age   Always       -       38 
196 Reallocated_Event_Count 0x0032   200   200   000    Old_age   Always       -       0 
197 Current_Pending_Sector  0x0032   200   200   000    Old_age   Always       -       3 
198 Offline_Uncorrectable   0x0030   200   200   000    Old_age   Offline      -       1 
199 UDMA_CRC_Error_Count    0x0032   200   200   000    Old_age   Always       -       0 
200 Multi_Zone_Error_Rate   0x0008   200   200   000    Old_age   Offline      -       129 

**erlangen:~ #** smartctl -l selftest /dev/sdb 
smartctl 7.2 2021-09-14 r5237 [x86_64-linux-5.17.1-1-default] (SUSE RPM) 
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org 

=== START OF READ SMART DATA SECTION === 
SMART Self-test log structure revision number 1 
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error 
**# 1  Extended offline    Completed without error       00%     13925         - **
# 2  Extended offline    Interrupted (host reset)      70%     13910         - 
# 3  Extended offline    Interrupted (host reset)      90%     13908         - 
# 4  Short offline       Completed without error       00%     13907         - 
# 5  Short offline       Completed without error       00%     13907         - 
# 6  Short offline       Completed: read failure       20%     13907         11655048 
# 7  Extended offline    Interrupted (host reset)      90%     13898         - 
# 8  Short offline       Completed without error       00%     13881         - 
# 9  Extended offline    Completed without error       00%     13825         - 
#10  Short offline       Completed without error       00%     13807         - 
#11  Short offline       Completed: read failure       90%     13798         11655049 
#12  Short offline       Completed: read failure       90%     13779         11655048 
#13  Extended offline    Interrupted (host reset)      90%     13765         - 
#14  Short offline       Completed without error       00%     13316         - 
#15  Extended offline    Interrupted (host reset)      90%     13314         - 
#16  Extended offline    Interrupted (host reset)      20%     13308         - 
#17  Extended offline    Interrupted (host reset)      90%     13296         - 
#18  Short offline       Completed without error       00%     13020         - 
#19  Short offline       Completed without error       00%     12870         - 
#20  Short offline       Interrupted (host reset)      10%     12870         - 
#21  Extended offline    Completed without error       00%     12832         - 
** 3 of 3 failed self-tests are outdated by newer successful extended offline self-test # 1 **

**erlangen:~ #**

Eight years later this Samsung HD103UJ 1 TB disk is still great: Weihnachtsbescherung | Karl Mistelberger

From the this thread

Looks like this is what I need as I was thinking to buy a hardware disk switch.
I need to adapt the new file to my need. I had reading about sysfs; Very hard to understand!
For reference, I found this

~> ls -al /sys/block/sd*
lrwxrwxrwx 1 root root 0 Apr  7 16:48 /sys/block/sda -> ../devices/pci0000:00/0000:00:02.1/0000:01:00.1/ata1/host0/target0:0:0/0:0:0:0/block/sda
lrwxrwxrwx 1 root root 0 Apr  7 16:48 /sys/block/sdb -> ../devices/pci0000:00/0000:00:02.1/0000:01:00.1/ata2/host1/target1:0:0/1:0:0:0/block/sdb
lrwxrwxrwx 1 root root 0 Apr  7 16:48 /sys/block/sdc -> ../devices/pci0000:00/0000:00:02.1/0000:01:00.1/ata3/host2/target2:0:0/2:0:0:0/block/sdc
lrwxrwxrwx 1 root root 0 Apr  7 16:48 /sys/block/sdd -> ../devices/pci0000:00/0000:00:02.1/0000:01:00.1/ata4/host3/target3:0:0/3:0:0:0/block/sdd


I try to adapt for my drives
File to create:
/usr/local/bin/delete-store1-disk ## store1 is the mount point for /dev/sda
usr/local/bin/scan-for-store1-disk
/etc/systemd/system/store1-disable.service ## or store1-soft-swith-off.service ?
/etc/systemd/system/store1-scan.service ## or store1-wake-up.service ## or store1-switch-on.service

I’ll keep the disable HDD on boot and prior suspend for all disks
I’ll wake up with a script integrated in MATE panel. I’ll need help her as well.
I keep the spin-down after timer and if possible after spin-down, another timer delays the -soft-swith-off.service
Do you agree to help me this way? You spend a lot of time with me you are very kind. BTW I am retired as well :slight_smile: Many thanks