[Plugin] Spin Down SAS Drives


doron

Recommended Posts

I'm getting some conflicting behavior from this plugin ever since I updated to 6.11.5 My SAS disks refuse to spin down manually or when I click the green orb. If I click the "SPIN DOWN" button at the bottom of the Main array page, the disks will spin down seemingly normally and then wake up whenever accessed.

 

Link to comment
2 hours ago, JimJamUrUnraid said:

I'm getting some conflicting behavior from this plugin ever since I updated to 6.11.5 My SAS disks refuse to spin down manually or when I click the green orb. If I click the "SPIN DOWN" button at the bottom of the Main array page, the disks will spin down seemingly normally and then wake up whenever accessed.

 

imho that's what spin down mechanism is meant to be and to do... it's a stort of "standby" and then when you access those drives they spin up again until when due to inactivity (aka "Default spin down delay" setting in Settings > disk settings) occurs again they spin down again and so on! 

Edited by endystrike
Link to comment
1 minute ago, JimJamUrUnraid said:

Why is it functioning differently than individually spinning down a single disk?

what do you mean exactly? I cannot understand...

This plugin just adds the possibility to spin down SAS drives too, because Unraid natively supports spin down only for SATA drives...

But the spinning down mechanism once you've installed this plugin is the same...

Link to comment
2 hours ago, JimJamUrUnraid said:

My SAS disks refuse to spin down manually or when I click the green orb. If I click the "SPIN DOWN" button at the bottom of the Main array page, the disks will spin down seemingly normally

 I guess I will rephrase this…

 

When I click the green orb next to an individual SAS drive, the SAS disk will not spin down. 
 

When I click the “SPIN DOWN” button at the bottom of the Unraid webview for the “Main” tab it will successfully spin down all of my disks, including the SAS disk that would not previously spin down by itself. 

Link to comment
8 minutes ago, JimJamUrUnraid said:

All disks don’t spin up at the same time. Disks will only spin up when they are accessed. But a SAS disk will not go into standby unless the “SPIN DOWN” button is clicked. 

have you already tried to reboot the server after installing the plugin?

Initially it wasn't working on my server too, but after a reboot the plugin started working fine and since then I had no issue!

Link to comment
On 4/2/2023 at 5:49 AM, Octalbush said:


Here's the output:
 

sdb     | MG06SCA800A   | 1000:0097:1028:1f45   |  n/a  | 
sdc     | MG06SCA800A   | 1000:0097:1028:1f45   |  n/a  | 
sdd     | MG06SCA800A   | 1000:0097:1028:1f45   |  n/a  | 
sdg     | MG06SCA800A   | 1000:0097:1028:1f45   |  n/a  | 
sdi     | MG06SCA800A   | 1000:0097:1028:1f45   |  n/a  | 

 

I have added the MG06 SAS drives to the exclusions list, so the plugin will not try to spin them down.

Link to comment
  • 3 weeks later...
10 hours ago, bilbobagginz said:

where i can find a list of SAS drives that work with spindown? 

i'd like to buy some mid size 3/4TB HDD for my setup

Oddly, I have never compiled a list of drives that do perform nicely with the spin down/up SCSI/SAS commands. I have collected a list of exclusions - i.e. drives (or drive/controller combos) that misbehave, or otherwise known to either ignore the spin down command or create some sort of breakage upon receiving them.

It might be a good idea to compile success stories into such a list.

 

I'll kick it off: I have a few HUH721212AL4200 (12TB HGST) on an on-board supermicro SAS controller (LSI 2308). They spin down and up rather perfectly.

Link to comment
  • 3 weeks later...
On 8/29/2022 at 10:29 AM, Dustiebin said:

I have been having this issue but with my SATA drives.

 

I have 4 SATA and one SAS all off the same HBA card.

 

This 'app' actually keeps my SAS spun down it is only my SATA's that are getting spun back up with the same SMART trigger.

 

Could it be a HBA issue with Unraid?

 

I am no expert in any of this by the way. I entirely rely on the forums and great vids on youtube to set up my Unraid. 

Aug 29 08:16:23 TheEntertainer emhttpd: spinning down /dev/sde
Aug 29 08:19:19 TheEntertainer emhttpd: read SMART /dev/sde
Aug 29 08:30:25 TheEntertainer emhttpd: spinning down /dev/sde
Aug 29 08:34:16 TheEntertainer emhttpd: read SMART /dev/sde
Aug 29 08:57:36 TheEntertainer emhttpd: spinning down /dev/sde
Aug 29 09:06:51 TheEntertainer emhttpd: read SMART /dev/sde
Aug 29 09:21:43 TheEntertainer emhttpd: spinning down /dev/sde
Aug 29 09:28:51 TheEntertainer emhttpd: read SMART /dev/sde

 

 

Hi all

 

i encountered the same issue on my Dell T340 with a Dell HBA330 connected to a backplane which supports SAS and SATA.
My 4x SAS drives spun down while my 4x Sata disks remain up.

I was able to spin down a SATA disk manually by executing sg_start -rp3 /dev/sdi .
So i modified the drive_types file and tagged a SATA disks as SAS. After that i was also able to spin down the SATA disks over the UI.

Is there an easy way to tag all devices, which are connected to that backplane as SAS?

 

 

Link to comment

@suppa-men, the poster you reference appeared to not really have an issue - their SATA drives were spinning back up a few minutes after being spun down, so probably as a result of i/o activity.

 

What you're describing, is something I have not seen or been reported yet. You issue a SAS/SCSI command against a SATA drive and you report that it actually worked. This is very interesting.

Let me ask you this - how do you verify that the SATA drive does in fact spin down following the sg_start command?

Link to comment
54 minutes ago, doron said:

Let me ask you this - how do you verify that the SATA drive does in fact spin down following the sg_start command?


@Doron, please find the output below.

The power consumption was also lower.  And right after i accessed a file, there was SMART read.

root@dell-t340:~# sdparm --command=sense /dev/sdi
    /dev/sdi: ATA       WDC WD4003FFBX-6  0A83
root@dell-t340:~# sg_start -r --pc=3 /dev/sdi
root@dell-t340:~# sdparm --command=sense /dev/sdi
    /dev/sdi: ATA       WDC WD4003FFBX-6  0A83
Additional sense: Standby condition activated by command
root@dell-t340:~# 


root@dell-t340:~# head -n1 /mnt/disk6/Share/zotac.mi660/00-installer-config.yaml
# This is the network config written by 'subiquity'

root@dell-t340:~# sdparm --command=sense /dev/sdi
    /dev/sdi: ATA       WDC WD4003FFBX-6  0A83
root@dell-t340:~# tail -n 1 /var/log/syslog 
May 13 23:11:29 dell-t340  emhttpd: read SMART /dev/sdi

 

Link to comment
44 minutes ago, suppa-men said:

@Doron, please find the output below.

 

Looks like the SATA drives indeed do spin down. That's the first time I'm seeing this. Probably the doing of the HBA.

Does this mean that hdparm -y /dev/sdX does not work for these drives?

 

I could probably add some option to "force" a drive to be considered as SAS even though it isn't. Thing is, it should probably be configured by S/N (to survive restarts). If you'd then make a change - e.g. connect that SATA drive to an on-board SATA port - you'd need to remove this or it will break things.

 

The alternative is to hack the drive_types table in your "go" script 🙂

Link to comment

Hi doron

 

I have to correct myself. i ran some further tests today. It seems like the issue with SATA in combination with the HBA is not solved.

"hdparm -y /dev/sdi" put the disk to standby, but it became active again within seconds.
same behavior with "sg_start --readonly --stop /dev/sdi" and also with "sdparm --readonly --commamd=stop /dev/sdi" :(


Tested with all my SATA disk, there is are i/o activities. Docker and VM are disabled. 

 

root@dell-t340:/usr/local/emhttp/plugins/sas-spindown# date && hdparm -y /dev/sdi
Sun May 14 13:26:21 CEST 2023

/dev/sdi:
 issuing standby command
root@dell-t340:/usr/local/emhttp/plugins/sas-spindown# date && hdparm -C /dev/sdi
Sun May 14 13:26:23 CEST 2023

/dev/sdi:
 drive state is:  standby
root@dell-t340:/usr/local/emhttp/plugins/sas-spindown# date && hdparm -C /dev/sdi
Sun May 14 13:26:24 CEST 2023

/dev/sdi:
 drive state is:  standby
root@dell-t340:/usr/local/emhttp/plugins/sas-spindown# date && hdparm -C /dev/sdi
Sun May 14 13:26:25 CEST 2023

/dev/sdi:
 drive state is:  standby
root@dell-t340:/usr/local/emhttp/plugins/sas-spindown# date && hdparm -C /dev/sdi
Sun May 14 13:26:26 CEST 2023

/dev/sdi:
 drive state is:  standby
root@dell-t340:/usr/local/emhttp/plugins/sas-spindown# date && hdparm -C /dev/sdi
Sun May 14 13:26:27 CEST 2023

/dev/sdi:
 drive state is:  active/idle




root@dell-t340:/usr/local/emhttp/plugins/sas-spindown# date && sdparm --readonly --command=stop /dev/sdi
Sun May 14 13:28:49 CEST 2023
    /dev/sdi: ATA       WDC WD4003FFBX-6  0A83
root@dell-t340:/usr/local/emhttp/plugins/sas-spindown# date && hdparm -C /dev/sdi
Sun May 14 13:28:50 CEST 2023

/dev/sdi:
 drive state is:  standby
root@dell-t340:/usr/local/emhttp/plugins/sas-spindown# date && hdparm -C /dev/sdi
Sun May 14 13:28:52 CEST 2023

/dev/sdi:
 drive state is:  standby
root@dell-t340:/usr/local/emhttp/plugins/sas-spindown# date && hdparm -C /dev/sdi
Sun May 14 13:28:53 CEST 2023

/dev/sdi:
 drive state is:  standby
root@dell-t340:/usr/local/emhttp/plugins/sas-spindown# date && hdparm -C /dev/sdi
Sun May 14 13:28:53 CEST 2023

/dev/sdi:
 drive state is:  standby
root@dell-t340:/usr/local/emhttp/plugins/sas-spindown# date && hdparm -C /dev/sdi
Sun May 14 13:28:54 CEST 2023

/dev/sdi:
 drive state is:  standby
root@dell-t340:/usr/local/emhttp/plugins/sas-spindown# date && hdparm -C /dev/sdi
Sun May 14 13:28:55 CEST 2023

/dev/sdi:
 drive state is:  standby
root@dell-t340:/usr/local/emhttp/plugins/sas-spindown# date && hdparm -C /dev/sdi
Sun May 14 13:28:56 CEST 2023

/dev/sdi:
 drive state is:  standby
root@dell-t340:/usr/local/emhttp/plugins/sas-spindown# date && hdparm -C /dev/sdi
Sun May 14 13:28:57 CEST 2023

/dev/sdi:
 drive state is:  active/idle

 

Link to comment

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.