Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
home_server:home_server_setup:other_services:disk [2025-09-14 Sun wk37 11:29] – [smartmon] baumkphome_server:home_server_setup:other_services:disk [2025-09-14 Sun wk37 15:54] (current) – [Block Device Monitoring and Control] baumkp
Line 64: Line 64:
 ---- ----
 =====Block Device Monitoring and Control===== =====Block Device Monitoring and Control=====
 +My main server has a parity disk that is normally only is used once a week.  I would like to place this hard disk in to stand-by to reduce power and wear and tear upon it.
  
 ====smartmon==== ====smartmon====
   * ''sudo smartctl -i -n standby /dev/sdb''  will chack the HD activity mode.  It does this without starting up the drive, which hdparm may do.   * ''sudo smartctl -i -n standby /dev/sdb''  will chack the HD activity mode.  It does this without starting up the drive, which hdparm may do.
     * If in standby mode it reports back only: "Device is in STANDBY mode, exit(2)" otherwise     * If in standby mode it reports back only: "Device is in STANDBY mode, exit(2)" otherwise
-    * ++++ active or idel mode|+    * ++ active or idel mode|
 <code>smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.12.41+deb13-amd64] (local build) <code>smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.12.41+deb13-amd64] (local build)
 Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org
Line 89: Line 90:
 SMART support is: Enabled SMART support is: Enabled
 Power mode is:    ACTIVE or IDLE</code> Power mode is:    ACTIVE or IDLE</code>
-+++++++
  
 ---- ----
  
 ====hdparm==== ====hdparm====
 +  *''sudo hdparm -y /dev/sdb'' sets the HD into standby mode
  
 +To for the HD into standby mode after reboot and set the standby time crate and use an on boot systemd service.
 +++++/etc/systemd/system/hdparm.service|
 +<code bash>[Unit]
 +Description=hdparm sleep
 +
 +[Service]
 +Type=oneshot
 +ExecStart=/usr/sbin/hdparm -q -S 120 -y /dev/sdb
 +
 +[Install]
 +WantedBy=multi-user.target</code>
 +++++
 +Some tips:
 +  *use ''whereis hdparm'' to confirm where the command is installed.
 +  *use ''sudo apt install hdparm'' to install if required
 +  *use ''sudo systemctl daemon-reload'' after modifying or creating a new systemd service to update systemd configuration
 +  *use ''sudo systemctl status hdparm.service'' to see status of service and enable if required.
 ====idle3-tools==== ====idle3-tools====
 [[https://idle3-tools.sourceforge.net/|idle3-tools]] provides a linux/unix utility that can disable, get and set the value of the infamous idle3 timer found on recent Western Digital Hard Disk Drives. [[https://idle3-tools.sourceforge.net/|idle3-tools]] provides a linux/unix utility that can disable, get and set the value of the infamous idle3 timer found on recent Western Digital Hard Disk Drives.