-
[Plugin] Spin Down SAS Drives
@doron #!/bin/bash # Automatically generated, Mon Sep 7 20:44:19 PDT 2026 declare -A DRIVE_TYPE DRIVE_TYPE[sda]=SAS DRIVE_TYPE[sdb]=SAS DRIVE_TYPE[sdc]=SAS DRIVE_TYPE[sdd]=SAS DRIVE_TYPE[sde]=SAS DRIVE_TYPE[sdf]=SAS DRIVE_TYPE[sdg]=SAS DRIVE_TYPE[sdh]=SAS DRIVE_TYPE[sdi]=SAS DRIVE_TYPE[sdj]=OTHER DRIVE_TYPE[sdk]=OTHER DRIVE_TYPE[sdl]=OTHER DRIVE_TYPE[sdm]=OTHER DRIVE_TYPE[sdn]=OTHER DRIVE_TYPE[sdo]=OTHER DRIVE_TYPE[sdp]=OTHER DRIVE_TYPE[sdq]=OTHER DRIVE_TYPE[sdr]=OTHER DRIVE_TYPE[sds]=OTHER DRIVE_TYPE[sdt]=OTHER DRIVE_TYPE[sdu]=OTHER DRIVE_TYPE[sdv]=OTHER DRIVE_TYPE[sdw]=OTHER root@unraid1:~# sdparm -ip di_target /dev/sdh /dev/sdh: SEAGATE ST16000NM002G E002 Device identification VPD page: Target device that contains addressed lu: designator type: NAA, code set: Binary transport: Serial Attached SCSI Protocol (SPL-4) 0x5000c500adce52ac designator type: SCSI name string, code set: UTF-8 SCSI name string: naa.5000C500ADCE52AC root@unraid1:~# sg_start -v -rp3 /dev/sdh && sleep 2s && sdparm -C sense /dev/sdh start stop unit cdb: [1b 00 00 00 30 00] /dev/sdh: SEAGATE ST16000NM002G E002 After 30-60 seconds: (Note that the disk in question is not in use or added to any file share so no possible file activity should exist) The same situation is for other SAS drives that are empty, they would not go to standby mode. root@unraid1:~# smartctl -i -n standby /dev/sdh smartctl 7.5 2025-04-30 r5714 [x86_64-linux-6.18.38-Unraid] (local build) Copyright (C) 2002-25, Bruce Allen, Christian Franke, www.smartmontools.org === START OF INFORMATION SECTION === Vendor: SEAGATE Product: ST16000NM002G Revision: E002 Compliance: SPC-5 User Capacity: 16,000,900,661,248 bytes [16.0 TB] Logical block size: 512 bytes Physical block size: 4096 bytes LU is fully provisioned Rotation Rate: 7200 rpm Form Factor: 3.5 inches Logical Unit id: 0x5000c500adce52af Device type: disk Transport protocol: SAS (SPL-4) Local Time is: Tue Sep 15 12:24:11 2026 PDT SMART support is: Available - device has SMART capability. SMART support is: Enabled Temperature Warning: Enabled Power mode is: ACTIVE Thank you !
-
[Plugin] Spin Down SAS Drives
Here are some facts and logs root@unraid1:~# sdparm -C sense /dev/sdh /dev/sdh: SEAGATE ST16000NM002G E002 root@unraid1:~# sg_start -v -rp3 /dev/sdh start stop unit cdb: [1b 00 00 00 30 00] root@unraid1:~# smartctl -i -n standby /dev/sdh smartctl 7.5 2025-04-30 r5714 [x86_64-linux-6.18.38-Unraid] (local build) Copyright (C) 2002-25, Bruce Allen, Christian Franke, www.smartmontools.org === START OF INFORMATION SECTION === Vendor: SEAGATE Product: ST16000NM002G Revision: E002 Compliance: SPC-5 User Capacity: 16,000,900,661,248 bytes [16.0 TB] Logical block size: 512 bytes Physical block size: 4096 bytes LU is fully provisioned Rotation Rate: 7200 rpm Form Factor: 3.5 inches Logical Unit id: 0x5000c500adce52af Device type: disk Transport protocol: SAS (SPL-4) Local Time is: Mon Sep 14 16:23:57 2026 PDT SMART support is: Available - device has SMART capability. SMART support is: Enabled Temperature Warning: Enabled Power mode is: ACTIVE grep -i "sdh\|spin" /var/log/syslog | tail -20 Sep 7 20:42:40 unraid1 plugin-manager: creating: /usr/local/emhttp/plugins/sas-spindown/build_drive_types - from INLINE content Sep 7 20:42:40 unraid1 plugin-manager: setting: /usr/local/emhttp/plugins/sas-spindown/build_drive_types - mode to 755 Sep 7 20:42:40 unraid1 plugin-manager: creating: /usr/local/emhttp/plugins/sas-spindown/event/array_started - from INLINE content Sep 7 20:42:40 unraid1 plugin-manager: setting: /usr/local/emhttp/plugins/sas-spindown/event/array_started - mode to 755 Sep 7 20:42:40 unraid1 plugin-manager: executing inline script: /bin/bash '/tmp/inline13-sas-spindown.sh' Sep 7 20:42:40 unraid1 sas-spindown plugin: Unraid version 7.3.2 detected, using post-6.9 method (emhttp hook) Sep 7 20:42:40 unraid1 sas-spindown plugin: Installing SAS spindown/up script sdspin... Sep 7 20:42:44 unraid1 sas-spindown plugin: Installing most recent exclusions file... Sep 7 20:42:52 unraid1 sas-spindown plugin: Installing sas-util... Sep 7 20:42:52 unraid1 sas-spindown plugin: Populating drive types table... Sep 7 20:42:52 unraid1 plugin-manager: sas-spindown.plg installed Sep 7 20:42:52 unraid1 rc.local: plugin: installing: sas-spindown.plg Sep 7 20:42:52 unraid1 rc.local: sas-spindown v2024.11.25 installing Sep 7 20:42:52 unraid1 rc.local: Installing SAS spindown/up script sdspin... Sep 7 20:42:52 unraid1 rc.local: plugin: sas-spindown.plg installed Sep 7 20:43:06 unraid1 emhttpd: online: ST16000NM002G_ZL203S9H0000C9360N9V_35000c500adce52af (sdh) 512 31251759104 => data partition: sdh1 type: gpt start: 64 size: 15625879500 code: 0xee (3) Sep 7 20:43:07 unraid1 kernel: mdcmd (8): import 6 sdh 64 15625879500 0 ST16000NM002G_ZL203S9H0000C9360N9V_35000c500adce52af Sep 7 20:43:07 unraid1 kernel: md: import disk6: (sdh) ST16000NM002G_ZL203S9H0000C9360N9V_35000c500adce52af size: 15625879500 Sep 7 20:43:16 unraid1 emhttpd: read SMART /dev/sdh Sep 14 16:22:46 unraid1 kernel: sdh: sdh1 While running "sg_start -v --stop /dev/sdh" I see the disk is spinning up after ~30 seconds of issuing the command. Sep 14 16:28:44 unraid1 kernel: sd 0:0:7:0: [sdh] Spinning up disk... Sep 14 16:29:02 unraid1 kernel: sdh: sdh1
-
[Plugin] Spin Down SAS Drives
Have the same issue post upgrade to 7.3 ; none of my SAS drives are spinning down anylonger. Same issue after 7.3, none of my SAS drives are able to spin down.
-
[support] dlandon - Zoneminder 1.3
Is there an option to add a variable to take advance of a GPU card for zoneminder container (similar to what Plex has ?)
abidu99
Members
-
Joined
-
Last visited