Jump to content
doron

[Plugin] Spin Down SAS Drives

106 posts in this topic Last Reply

Recommended Posts

EDIT: It appears that some combinations of SAS drives / controllers are not compatible with temporary spin-down. We've seen reports specifically re Seagate Constellation ES.3 and Hitachi 10KRPM 600GB but there are probably others. Plugin has been updated to exclude combinations known to misbehave, and to use a dynamic exclusion table so that other combinations can be added from time to time. 19-Nov-2020

 

 

Unraid does a nice job of controlling HDD's energy consumption (and probably longevity) by spinning down (mechanical) hard drives when idle for a set period of time.

Unfortunately the technique used by Unraid to spin down an HDD, true to the time of writing this, works only for ATA drives. If you have SCSI/SAS hard drives, these drives do not spin down (although the UI will indicate they do). The drives continue spinning 24x7, expanding the energy footprint of your Unraid server.

Following a long and fruitful discussion here, a solution is provided via this plugin. This is hopefully a temporary stopgap, until Limetech includes this in the mainline Unraid, at which time this plugin will walk into the sunset. 

 

Essentially, this plugin does the following:

1. Install a script that spins down a SAS drive. The script is triggered by the Unraid syslog message reporting this drive's (intended) spin down, and actually spins it down.

2. Install an rsyslog filter that mobilizes the script in #1.

3. Install a wrapper for "smartctl", which works around smartctl's deficiency of not supporting the "-n standby" flag for non-ATA devices (which leads to many unsolicited spin-ups for SAS drives). When this flag is detected, if the target device is SAS and is in standby (i.e. spun down), smartctl is bypassed.

 

You can install this plugin by using this URL:

https://raw.githubusercontent.com/doron1/unraid-sas-spindown/master/sas-spindown.plg

In "Install Plugin" dialog. Hopefully, it will also soon be available via Community Applications.

 

Essentially, this plugin does the following:

1. Install a script that spins down a SAS drive. The script is triggered by the Unraid syslog message reporting this drive's (intended) spin down, and actually spins it down.

2. Install an rsyslog filter that mobilizes the script in #1.

3. Install a wrapper for "smartctl", which works around smartctl's deficiency of not supporting the "-n standby" flag for non-ATA devices. When this flag is detected and the target device is SAS, smartctl is bypassed.

 

When you remove the plugin, original "vanilla" Unraid behavior is reinstated.

 

As always, there is absolutely no warranty, use at your own risk. It works for me. 

With that said, please report any issue (or success stories...) here.

 

Thanks and credit points go to this great community, with special mention to @SimonF and @Cilusse.

 

Edited by doron

Share this post


Link to post
2 hours ago, doron said:

Hopefully, it will also soon be available via Community Applications.

It is

Share this post


Link to post
Posted (edited)

Hi @dotexe, thanks for reporting an installation issue (here).

So far I have not been able to reproduce the issue. Can you run the following command for me, on the Unraid console, and post the results:

/etc/rc.d/rc.rsyslogd restart

EDIT: Also, please post your Unraid version, and an excerpt from your syslog around the time of the plugin installation.

Edited by doron

Share this post


Link to post

is still spaming on my log :(

 

Oct 3 12:11:48 segator-unraid emhttpd: cmd: /usr/local/emhttp/plugins/dynamix.plugin.manager/scripts/plugin install https://raw.githubusercontent.com/doron1/unraid-sas-spindown/master/sas-spindown.plg
Oct 3 12:11:48 segator-unraid root: plugin: running: anonymous
Oct 3 12:11:48 segator-unraid root: plugin: creating: /usr/local/emhttp/plugins/sas-spindown/README.md - from INLINE content
Oct 3 12:11:48 segator-unraid root: plugin: setting: /usr/local/emhttp/plugins/sas-spindown/README.md - mode to 644
Oct 3 12:11:48 segator-unraid root: plugin: creating: /usr/local/bin/unraid-spinsasdown - from INLINE content
Oct 3 12:11:48 segator-unraid root: plugin: setting: /usr/local/bin/unraid-spinsasdown - mode to 755
Oct 3 12:11:48 segator-unraid root: plugin: creating: /usr/sbin/smartctl.wrapper - from INLINE content
Oct 3 12:11:48 segator-unraid root: plugin: setting: /usr/sbin/smartctl.wrapper - mode to 755
Oct 3 12:11:48 segator-unraid root: plugin: creating: /etc/rsyslog.d/99-spinsasdown.conf - from INLINE content
Oct 3 12:11:48 segator-unraid root: plugin: setting: /etc/rsyslog.d/99-spinsasdown.conf - mode to 644
Oct 3 12:11:48 segator-unraid root: plugin: running: anonymous
Oct 3 12:11:48 segator-unraid sas-spindown plugin: Installing a wrapper for smartctl...
Oct 3 12:11:48 segator-unraid sas-spindown plugin: Installing syslog hook for SAS device spindown...
Oct 3 12:11:49 segator-unraid kernel: mdcmd (1518646): spindown 4
Oct 3 12:11:49 segator-unraid kernel: md: do_drive_cmd: disk4: ATA_OP e0 ioctl error: -5
Oct 3 12:11:49 segator-unraid kernel: mdcmd (1518647): spindown 7
Oct 3 12:11:49 segator-unraid emhttpd: error: mdcmd, 2721: Input/output error (5): write
Oct 3 12:11:49 segator-unraid emhttpd: error: mdcmd, 2721: Input/output error (5): write
Oct 3 12:11:49 segator-unraid kernel: md: do_drive_cmd: disk7: ATA_OP e0 ioctl error: -5
Oct 3 12:11:50 segator-unraid rsyslogd: [origin software="rsyslogd" swVersion="8.1908.0" x-pid="27295" x-info="https://www.rsyslog.com"] start
Oct 3 12:11:51 segator-unraid kernel: mdcmd (1518648): spindown 4
Oct 3 12:11:52 segator-unraid SAS Assist v0.5[27387]: spinning down slot 4, device /dev/sdd (/dev/sg3)
Oct 3 12:11:54 segator-unraid SAS Assist v0.5[27435]: spinning down slot 7, device /dev/sdg (/dev/sg6)
Oct 3 12:11:56 segator-unraid emhttpd: error: mdcmd, 2721: Input/output error (5): write
Oct 3 12:11:56 segator-unraid kernel: md: do_drive_cmd: disk4: ATA_OP e0 ioctl error: -5
Oct 3 12:11:56 segator-unraid kernel: mdcmd (1518649): spindown 7
Oct 3 12:11:58 segator-unraid SAS Assist v0.5[27517]: spinning down slot 4, device /dev/sdd (/dev/sg3)
Oct 3 12:12:02 segator-unraid emhttpd: error: mdcmd, 2721: Input/output error (5): write
Oct 3 12:12:02 segator-unraid kernel: md: do_drive_cmd: disk7: ATA_OP e0 ioctl error: -5
Oct 3 12:12:03 segator-unraid kernel: mdcmd (1518650): spindown 4
Oct 3 12:12:04 segator-unraid SAS Assist v0.5[27826]: spinning down slot 7, device /dev/sdg (/dev/sg6)
Oct 3 12:12:06 segator-unraid emhttpd: error: mdcmd, 2721: Input/output error (5): write
Oct 3 12:12:06 segator-unraid kernel: md: do_drive_cmd: disk4: ATA_OP e0 ioctl error: -5
Oct 3 12:12:06 segator-unraid kernel: mdcmd (1518651): spindown 7
Oct 3 12:12:08 segator-unraid SAS Assist v0.5[27904]: spinning down slot 4, device /dev/sdd (/dev/sg3)

 

Share this post


Link to post
Posted (edited)
1 hour ago, segator said:

is still spaming on my log :(

If you are referring to the messages that begin with "SAS Assist", they are by design - to log the functioning of the plugin.

However you have other messages, such as:

Oct 3 12:11:49 segator-unraid emhttpd: error: mdcmd, 2721: Input/output error (5): write
Oct 3 12:11:49 segator-unraid emhttpd: error: mdcmd, 2721: Input/output error (5): write
Oct 3 12:11:49 segator-unraid kernel: md: do_drive_cmd: disk7: ATA_OP e0 ioctl error: -5

Which seem to be unrelated to the plugin, and might indicate a problem. As a first step, I'd suggest you remove the plugin and see if these messages keep showing up (following a "spindown" message).

 

EDIT: Okay seems like these messages have been plaguing some users with SAS drives - I'm seeing threads like this. I have never seen them, it's probably controller dependent. I guess you have been getting these and expected the plugin to make it stop.

Because of how this plugin is triggered, the emhttp / mdcmd code runs just before it, and issues the ATA standby ops, so the plugin can't turn these off. We may want to filter these messages out of syslog, but gotta be careful not to filter too much (in other, non-spindown cases these messages might be important and indicate an issue). I'll look into this.

 

At any rate, other than being a nuisance on the log, I believe these messages are harmless.

Edited by doron

Share this post


Link to post
3 hours ago, doron said:

Hi @dotexe, thanks for reporting an installation issue (here).

So far I have not been able to reproduce the issue. Can you run the following command for me, on the Unraid console, and post the results:


/etc/rc.d/rc.rsyslogd restart

EDIT: Also, please post your Unraid version, and an excerpt from your syslog around the time of the plugin installation.

I rebooted my server, then tried to install the plug in and it now shows installed. Thanks 

Share this post


Link to post

When you have the plugin installed the "support thread" link on the plugin, links to the feature request thread and not to this one. That needs fixing also :) 

I have just installed it without issues, waiting to see if it works...

Share this post


Link to post

Ops I forgot to mention

this error d: do_drive_cmd: disk7: ATA_OP e0 ioctl error: -5 appears always that unraid trying to stop the SAS disks, thats why i'm saying it's not working as it stays on loop forever until log is full in a couple of weeks :/

Share this post


Link to post
Posted (edited)
2 hours ago, Golfonauta said:

When you have the plugin installed the "support thread" link on the plugin, links to the feature request thread and not to this one. That needs fixing also :) 

Indeed. The next version (to be uploaded Soon) fixes that.

Quote

I have just installed it without issues, waiting to see if it works...

Great. Please report any issues.

Edited by doron

Share this post


Link to post
2 hours ago, segator said:

this error d: do_drive_cmd: disk7: ATA_OP e0 ioctl error: -5 appears always that unraid trying to stop the SAS disks, thats why i'm saying it's not working as it stays on loop forever until log is full in a couple of weeks :/

The plugin makes sure the SAS drive indeed spins down. It does not eliminate the error messages from mdcmd, as explained above.

 

You can go to Settings -> Syslog Server and configure Local syslog rotation, to keep the log file from filling up.

Share this post


Link to post
Posted (edited)

I'm on 6.9.0-beta25 and when I try spinning down the drive after the plugin is installed, it stays green and doesn't spin down. I've tried reinstalling but same thing. 

 

Disk log information shows a continues attempt to try and spin down the drive. 

Screenshot_20201004-214744_Brave.jpg

Edited by dotexe

Share this post


Link to post
Posted (edited)
7 hours ago, dotexe said:

I'm on 6.9.0-beta25 and when I try spinning down the drive after the plugin is installed, it stays green and doesn't spin down. I've tried reinstalling but same thing. 

Can you describe what you're doing, exactly? Are you pushing the green button (to initiate spin down) repeatedly?

 

Could it be that your /dev/sdd is busy doing active i/o (so it keeps spinning back up immediately)? You can check that if you look at the "Reads" and "Writes" columns in the main panel - if they are changing, the disk is doing i/o so forcing it to spin down will not help.

 

Also, can you share the disk and controller model.

 

(Note, this plugin has not yet been tested in Unraid 6.9)

Edited by doron

Share this post


Link to post

I'm on 6.8.3 and been messing around with this plug-in.  So far the only indication to me that a drive is spun down is that the temperature indicator is replaced with a *.  This was the same behavior before this plug-in so I'm not sure it's doing anything in my system.  In monitoring my power usage (via Killawatt), it doesn't appear that there is much to any drop is power usage.  The green light never goes gray on any of my SAS drives when I try to spin them down.  I have a handful of SAS drives that are barely used so I'm pretty sure they're not being spun back up right away.

 

I am getting the spamming of the mdcmd messages in my logs, but I'm not seeing any of the SAS Assist log messages that it appears I am supposed to.  Is that right?  

 

Oct  5 04:39:58 teraserver kernel: mdcmd (26990): spindown 4
Oct  5 04:39:58 teraserver kernel: md: do_drive_cmd: disk4: ATA_OP e0 ioctl error: -5
Oct  5 04:39:58 teraserver emhttpd: error: mdcmd, 2723: Input/output error (5): write
Oct  5 04:39:59 teraserver kernel: mdcmd (26991): spindown 4
Oct  5 04:39:59 teraserver emhttpd: error: mdcmd, 2723: Input/output error (5): write
Oct  5 04:39:59 teraserver kernel: md: do_drive_cmd: disk4: ATA_OP e0 ioctl error: -5
Oct  5 04:40:00 teraserver emhttpd: error: mdcmd, 2723: Input/output error (5): write
Oct  5 04:40:00 teraserver kernel: mdcmd (26992): spindown 4
Oct  5 04:40:00 teraserver kernel: md: do_drive_cmd: disk4: ATA_OP e0 ioctl error: -5

 

All of my SAS drives are: HUH721010AL4200 

 

The plug-in seemed to install fine.  Happy to help troubleshooting or send logs.

 

Share this post


Link to post
Posted (edited)
1 hour ago, noties said:

I'm on 6.8.3 and been messing around with this plug-in.  So far the only indication to me that a drive is spun down is that the temperature indicator is replaced with a *.  This was the same behavior before this plug-in so I'm not sure it's doing anything in my system.  In monitoring my power usage (via Killawatt), it doesn't appear that there is much to any drop is power usage.  The green light never goes gray on any of my SAS drives when I try to spin them down.  I have a handful of SAS drives that are barely used so I'm pretty sure they're not being spun back up right away.

 

I am getting the spamming of the mdcmd messages in my logs, but I'm not seeing any of the SAS Assist log messages that it appears I

am supposed to.  Is that right?  

That's not what should happen. Seems like the syslog filter is not triggered, for some reason.

Can you run the following for me on your console:

cat /etc/rsyslog.d/99-spinsasdown.conf &> /tmp/sas-dbg

/etc/rc.d/rc.rsyslogd restart &>> /tmp/sas-dbg

rsyslogd -dn &>> /tmp/sas-dbg

and post (or pm) the resulting file /tmp/sas-dbg ?

 

1 hour ago, noties said:

All of my SAS drives are: HUH721010AL4200 

 

Mine are HUH721212AL4200 - close enough 🙂

Quote

 

Happy to help troubleshooting or send logs.

 

Thank you!

Edited by doron

Share this post


Link to post

DM'd you the log file.  

 

 

I have a remote syslog server and scanning the log real quick, thought it may have an issue with that... not sure.

 

Share this post


Link to post

Thanks. The output file seems to indicate all's in order.

 

10 minutes ago, noties said:

I have a remote syslog server and scanning the log real quick, thought it may have an issue with that... not sure.

 

Ah. Only remote - no local instance? If you do have a /var/log/syslog - can you look at that one?

Share this post


Link to post

I have both a local and remote.  I just disabled the remote syslog for good measure and removed and re-installed the plug-in.  I'm still getting the same behavior.  

 

I force spindown on a drive by clicking the green button light.  The temp indicator goes turns to *, but the button stays green.   I get no SAS Assist messages in the log.  I have a mixture of SAS and SATA HDD in here.  Would that cause an issue?  How does it know which is which?

 

Also my SMART controller type for my SAS drives all say "Use default"  - not sure if that's an issue or would it need to be changed to SCSI.

 

 

 

Share this post


Link to post

Can you run, against a SAS drive that has just (allegedly..) spun down, these command (in this order) and post the result?

sdparm --command=sense /dev/sdX

smartctl -i /dev/sdX

 

6 minutes ago, noties said:

I force spindown on a drive by clicking the green button light.  The temp indicator goes turns to *, but the button stays green.   I get no SAS Assist messages in the log.  I have a mixture of SAS and SATA HDD in here.  Would that cause an issue?  How does it know which is which?

Should not cause an issue (many people, myself included, have a mix). The code checks for that and intervenes only if the drive is detected as SAS. The output from the two commands above will hopefully tell us more.

 

Appreciate your help.

Share this post


Link to post

Here you go:

 

root@teraserver:/tmp# sdparm --command=sense /dev/sd[a-m]
    /dev/sda: Kingston  DataTraveler 3.0  
    /dev/sdb: ATA       SAMSUNG MZ7GE960  303Q
    /dev/sdc: ATA       SAMSUNG MZ7GE960  5F3Q
    /dev/sdd: ATA       TOSHIBA DT01ACA3  ABB0
    /dev/sde: HGST      HUH721010AL4200   A21D
    /dev/sdf: HGST      HUH721010AL4200   A21D
    /dev/sdg: HGST      HUH721010AL4200   A21D
    /dev/sdh: HGST      HUH721010AL4200   A21D
    /dev/sdi: HGST      HUH721010AL4200   A21D
    /dev/sdj: ATA       ST3000DM001-1CH1  CC29
    /dev/sdk: ATA       WDC WD100EMAZ-00  0A83
    /dev/sdl: HGST      HUH721010AL4200   A21D
    /dev/sdm: HGST      HUH721010AL4200   A21D

 


 

root@teraserver:/tmp# smartctl -i /dev/sdb
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-4.19.107-Unraid] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Samsung based SSDs
Device Model:     SAMSUNG MZ7GE960HMHP-00003
Serial Number:    S1M7NWAG301550
LU WWN Device Id: 5 002538 8700b85c8
Firmware Version: EXT0303Q
User Capacity:    960,197,124,096 bytes [960 GB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    Solid State Device
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ACS-2, ATA8-ACS T13/1699-D revision 4c
SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Mon Oct  5 15:49:09 2020 PDT
SMART support is: Available - device has SMART capability.
SMART support is: Enabled


root@teraserver:/tmp# smartctl -i /dev/sdc
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-4.19.107-Unraid] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Samsung based SSDs
Device Model:     SAMSUNG MZ7GE960HMHP-00003
Serial Number:    S1M7NWAG400880
LU WWN Device Id: 5 002538 8700e6b26
Firmware Version: EXT05F3Q
User Capacity:    960,197,124,096 bytes [960 GB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    Solid State Device
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ACS-2, ATA8-ACS T13/1699-D revision 4c
SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 3.0 Gb/s)
Local Time is:    Mon Oct  5 15:50:16 2020 PDT
SMART support is: Available - device has SMART capability.
SMART support is: Enabled





root@teraserver:/tmp# smartctl -i /dev/sdd
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-4.19.107-Unraid] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Toshiba 3.5" DT01ACA... Desktop HDD
Device Model:     TOSHIBA DT01ACA300
Serial Number:    Y32A1DJGS
LU WWN Device Id: 5 000039 ff4d2a87c
Firmware Version: MX6OABB0
User Capacity:    3,000,592,982,016 bytes [3.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    7200 rpm
Form Factor:      3.5 inches
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ATA8-ACS T13/1699-D revision 4
SATA Version is:  SATA 3.0, 6.0 Gb/s (current: 3.0 Gb/s)
Local Time is:    Mon Oct  5 15:50:29 2020 PDT
SMART support is: Available - device has SMART capability.
SMART support is: Enabled


root@teraserver:/tmp# smartctl -i /dev/sde
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-4.19.107-Unraid] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Vendor:               HGST
Product:              HUH721010AL4200
Revision:             A21D
Compliance:           SPC-4
User Capacity:        10,000,831,348,736 bytes [10.0 TB]
Logical block size:   4096 bytes
LU is fully provisioned
Rotation Rate:        7200 rpm
Form Factor:          3.5 inches
Logical Unit id:      0x5000cca2512035e4
Serial number:        7PGKR4TG
Device type:          disk
Transport protocol:   SAS (SPL-3)
Local Time is:        Mon Oct  5 15:50:51 2020 PDT
SMART support is:     Available - device has SMART capability.
SMART support is:     Enabled
Temperature Warning:  Enabled


root@teraserver:/tmp# smartctl -i /dev/sdf
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-4.19.107-Unraid] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Vendor:               HGST
Product:              HUH721010AL4200
Revision:             A21D
Compliance:           SPC-4
User Capacity:        10,000,831,348,736 bytes [10.0 TB]
Logical block size:   4096 bytes
LU is fully provisioned
Rotation Rate:        7200 rpm
Form Factor:          3.5 inches
Logical Unit id:      0x5000cca2511b29d0
Serial number:        7PGGY38G
Device type:          disk
Transport protocol:   SAS (SPL-3)
Local Time is:        Mon Oct  5 15:51:03 2020 PDT
SMART support is:     Available - device has SMART capability.
SMART support is:     Enabled
Temperature Warning:  Enabled





root@teraserver:/tmp# smartctl -i /dev/sdg
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-4.19.107-Unraid] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Vendor:               HGST
Product:              HUH721010AL4200
Revision:             A21D
Compliance:           SPC-4
User Capacity:        10,000,831,348,736 bytes [10.0 TB]
Logical block size:   4096 bytes
LU is fully provisioned
Rotation Rate:        7200 rpm
Form Factor:          3.5 inches
Logical Unit id:      0x5000cca2510f09fc
Serial number:        7PG88DBS
Device type:          disk
Transport protocol:   SAS (SPL-3)
Local Time is:        Mon Oct  5 15:51:16 2020 PDT
SMART support is:     Available - device has SMART capability.
SMART support is:     Enabled
Temperature Warning:  Enabled




root@teraserver:/tmp# smartctl -i /dev/sdh
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-4.19.107-Unraid] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Vendor:               HGST
Product:              HUH721010AL4200
Revision:             A21D
Compliance:           SPC-4
User Capacity:        10,000,831,348,736 bytes [10.0 TB]
Logical block size:   4096 bytes
LU is fully provisioned
Rotation Rate:        7200 rpm
Form Factor:          3.5 inches
Logical Unit id:      0x5000cca2512068a4
Serial number:        7PGKUJKG
Device type:          disk
Transport protocol:   SAS (SPL-3)
Local Time is:        Mon Oct  5 15:51:29 2020 PDT
SMART support is:     Available - device has SMART capability.
SMART support is:     Enabled
Temperature Warning:  Enabled


root@teraserver:/tmp# smartctl -i /dev/sdi
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-4.19.107-Unraid] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Vendor:               HGST
Product:              HUH721010AL4200
Revision:             A21D
Compliance:           SPC-4
User Capacity:        10,000,831,348,736 bytes [10.0 TB]
Logical block size:   4096 bytes
LU is fully provisioned
Rotation Rate:        7200 rpm
Form Factor:          3.5 inches
Logical Unit id:      0x5000cca251206dec
Serial number:        7PGKUWGG
Device type:          disk
Transport protocol:   SAS (SPL-3)
Local Time is:        Mon Oct  5 15:51:43 2020 PDT
SMART support is:     Available - device has SMART capability.
SMART support is:     Enabled
Temperature Warning:  Enabled


root@teraserver:/tmp# smartctl -i /dev/sdj
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-4.19.107-Unraid] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Seagate Barracuda 7200.14 (AF)
Device Model:     ST3000DM001-1CH166
Serial Number:    Z1F346DA
LU WWN Device Id: 5 000c50 03ce5a7e0
Firmware Version: CC29
User Capacity:    3,000,592,982,016 bytes [3.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    7200 rpm
Form Factor:      3.5 inches
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ACS-2, ACS-3 T13/2161-D revision 3b
SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 3.0 Gb/s)
Local Time is:    Mon Oct  5 15:51:54 2020 PDT
SMART support is: Available - device has SMART capability.
SMART support is: Enabled



root@teraserver:/tmp# smartctl -i /dev/sdk
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-4.19.107-Unraid] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     WDC HGST Ultrastar He10
Device Model:     WDC WD100EMAZ-00WJTA0
Serial Number:    2YK14YTD
LU WWN Device Id: 5 000cca 273eacd81
Firmware Version: 83.H0A83
User Capacity:    10,000,831,348,736 bytes [10.0 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    5400 rpm
Form Factor:      3.5 inches
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ACS-2, ATA8-ACS T13/1699-D revision 4
SATA Version is:  SATA 3.2, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Mon Oct  5 15:52:05 2020 PDT
SMART support is: Available - device has SMART capability.
SMART support is: Enabled



root@teraserver:/tmp# smartctl -i /dev/sdl
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-4.19.107-Unraid] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Vendor:               HGST
Product:              HUH721010AL4200
Revision:             A21D
Compliance:           SPC-4
User Capacity:        10,000,831,348,736 bytes [10.0 TB]
Logical block size:   4096 bytes
LU is fully provisioned
Rotation Rate:        7200 rpm
Form Factor:          3.5 inches
Logical Unit id:      0x5000cca26695fd14
Serial number:        7JJNH4DG
Device type:          disk
Transport protocol:   SAS (SPL-3)
Local Time is:        Mon Oct  5 15:52:26 2020 PDT
SMART support is:     Available - device has SMART capability.
SMART support is:     Enabled
Temperature Warning:  Enabled



root@teraserver:/tmp# smartctl -i /dev/sdm
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-4.19.107-Unraid] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Vendor:               HGST
Product:              HUH721010AL4200
Revision:             A21D
Compliance:           SPC-4
User Capacity:        10,000,831,348,736 bytes [10.0 TB]
Logical block size:   4096 bytes
LU is fully provisioned
Rotation Rate:        7200 rpm
Form Factor:          3.5 inches
Logical Unit id:      0x5000cca25120538c
Serial number:        7PGKT40G
Device type:          disk
Transport protocol:   SAS (SPL-3)
Local Time is:        Mon Oct  5 15:52:41 2020 PDT
SMART support is:     Available - device has SMART capability.
SMART support is:     Enabled
Temperature Warning:  Enabled

 

 

 

 

 

 

 

 

 

 

Share this post


Link to post

I've just installed this plugin on 6.8.3 Clicked the green dot to spin a drive down and now the drive is disabled and I dont seem to be able to get it back!

 

Oct 6 13:23:00 Apollo emhttpd: error: mdcmd, 2723: Input/output error (5): write
Oct 6 13:23:00 Apollo kernel: mdcmd (48): spindown 3
Oct 6 13:23:00 Apollo kernel: md: do_drive_cmd: disk3: ATA_OP e0 ioctl error: -5
Oct 6 13:23:01 Apollo SAS Assist v0.6[47280]: spinning down slot 3, device /dev/sdb (/dev/sg1)
Oct 6 13:23:17 Apollo kernel: sd 7:0:0:0: [sdb] tag#3684 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x08
Oct 6 13:23:17 Apollo kernel: sd 7:0:0:0: [sdb] tag#3684 Sense Key : 0x2 [current] [descriptor]
Oct 6 13:23:17 Apollo kernel: sd 7:0:0:0: [sdb] tag#3684 ASC=0x4 ASCQ=0x11
Oct 6 13:23:17 Apollo kernel: sd 7:0:0:0: [sdb] tag#3684 CDB: opcode=0x88 88 00 00 00 00 00 e9 07 bc 20 00 00 00 18 00 00
Oct 6 13:23:17 Apollo kernel: print_req_error: I/O error, dev sdb, sector 3909598240
Oct 6 13:23:17 Apollo kernel: md: disk3 read error, sector=3909598176
Oct 6 13:23:17 Apollo kernel: md: disk3 read error, sector=3909598184
Oct 6 13:23:17 Apollo kernel: md: disk3 read error, sector=3909598192
Oct 6 13:23:17 Apollo kernel: sd 7:0:0:0: [sdb] tag#3686 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x08
Oct 6 13:23:17 Apollo kernel: sd 7:0:0:0: [sdb] tag#3686 Sense Key : 0x2 [current] [descriptor]
Oct 6 13:23:17 Apollo kernel: sd 7:0:0:0: [sdb] tag#3686 ASC=0x4 ASCQ=0x11
Oct 6 13:23:17 Apollo kernel: sd 7:0:0:0: [sdb] tag#3686 CDB: opcode=0x8a 8a 00 00 00 00 00 e9 07 bc 20 00 00 00 18 00 00
Oct 6 13:23:17 Apollo kernel: print_req_error: I/O error, dev sdb, sector 3909598240
Oct 6 13:23:17 Apollo kernel: md: disk3 write error, sector=3909598176
Oct 6 13:23:17 Apollo kernel: md: disk3 write error, sector=3909598184
Oct 6 13:23:17 Apollo kernel: md: disk3 write error, sector=3909598192
Oct 6 13:24:15 Apollo kernel: mdcmd (49): spindown 3
Oct 6 13:24:15 Apollo kernel: md: do_drive_cmd: disk3: ATA_OP e0 ioctl error: -5
Oct 6 13:24:15 Apollo emhttpd: error: mdcmd, 2723: Input/output error (5): write
Oct 6 13:24:15 Apollo SAS Assist v0.6[47679]: spinning down slot 3, device /dev/sdb (/dev/sg1)

Share this post


Link to post
Posted (edited)
3 hours ago, dansonamission said:

I've just installed this plugin on 6.8.3 Clicked the green dot to spin a drive down and now the drive is disabled and I dont seem to be able to get it back!

Ouch. That's not good.

 

1. Sorry! The command code being sent to the drive has been tested with multiple users and drives, up to now with no issue, let alone a red x. I guess one should always expect the unexpected. Please remove the plugin for now (I assume you already have).

2. Bottom line first - the best way to get the drive back into the array is to rebuild it from parity. There are multiple posts and guides as to how to do that (basically need to remove it from the array and reinsert it, but need to be precise, so please use one of the step-by-step guides). 

3. I've had a red x happen during the initial tests (long before the plugin was written), when we sent a different op code to the drive - basically a STOP vs. a STANDBY. It might be that your particular drive/controller interpret the STANDBY op code differently (as STOP).

4. Can you post the drive model, and, if possible, the SAS controller model?

 

Others - I'd probably hold off installing the plugin until we get to the bottom of this. Nobody wants a red x.

 

Quote

Oct 6 13:23:17 Apollo kernel: sd 7:0:0:0: [sdb] tag#3684 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x08
Oct 6 13:23:17 Apollo kernel: sd 7:0:0:0: [sdb] tag#3684 Sense Key : 0x2 [current] [descriptor]
Oct 6 13:23:17 Apollo kernel: sd 7:0:0:0: [sdb] tag#3684 ASC=0x4 ASCQ=0x11
Oct 6 13:23:17 Apollo kernel: sd 7:0:0:0: [sdb] tag#3684 CDB: opcode=0x88 88 00 00 00 00 00 e9 07 bc 20 00 00 00 18 00 00

This (sense 0x2 ASC 0x4) translates to the LU is spun down and needs an INIT command. This is usually the result of a STOP command, and "should not" be the result of a STANDBY command. This could match my assumption in #3 above - that for some reason the drive/controller took the STANDBY to mean STOP.

 

@SimonF, any further insights?

Edited by doron

Share this post


Link to post

Can we get some more info on disk type and controller? 

 

04h/11h DZT RO AEB VF LOGICAL UNIT NOT READY, NOTIFY (ENABLE SPINUP) REQUIRED

 

Can we get output of

 

smartctl -i 

sdparm --flexible -6 -v -S -p po 

sdparm --command=sense 

 

 

 

Share this post


Link to post
16 hours ago, noties said:

sdparm --command=sense /dev/sd[a-m]

Manual command for sending drive to standby by command is sg_start  --readonly --pc=3 /dev/sdx you should be able to run this again an see if the drive as gone into standby by command

Share this post


Link to post
2 minutes ago, SimonF said:

Manual command for sending drive to standby by command is sg_start  --readonly --pc=3 /dev/sdx you should be able to run this again an see if the drive as gone into standby by command

Indeed BUT @dansonamission if you try that, please do it only with the array stopped, to make sure you don't get a second red x. That would be really bad. 

Share this post


Link to post

I removed the plugin earlier.

 

The drive is a ST4000NM0023 Seagate, revision GS0D and the card HP H220 LSI 9205-8i 9207 with P20 firmware.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.