[Plugin] Spin Down SAS Drives


doron

Recommended Posts

2 minutes ago, SimonF said:

I think it is a RAID card so may not be passing commands through to the drives. 

 

what output do you get for 

sg_start  --readonly --pc=3 /dev/sdc and

sdparm -C sense /dev/sdc 

 

 

root@Proliant:~# sg_start  --readonly --pc=3 /dev/sdc
Illegal request
START STOP UNIT command failed
sg_start failed: Illegal request
root@Proliant:~# sdparm -C sense /dev/sdc 
    /dev/sdc: HP        EG0300FAWHV       HPDE

 

Link to comment
1 minute ago, inogueira said:
root@Proliant:~# sg_start  --readonly --pc=3 /dev/sdc
Illegal request
START STOP UNIT command failed
sg_start failed: Illegal request
root@Proliant:~# sdparm -C sense /dev/sdc 
    /dev/sdc: HP        EG0300FAWHV       HPDE

 

Seems like either this HP drive or the controller (or both) do not support the spin down instruction. Unfortunately, support for these instructions is not ubiquitous among SAS drives.

Link to comment
  • 1 month later...
38 minutes ago, JimJamUrUnraid said:

Hello, this plugin has been saving me about 25 watts regularly, so thank you for creating it! It has been great.

 

I just upgraded from 6.9.2 to 6.11.5 and went from SAS standby working on 6.9.2 to not working on 6.11.5. Can you let me know what logs I need to look at and where they are located to try and track this down? Thank you!

I've installed SAS spindown on my Unraid 6.11.5 and it works fine.

I just have to say initially it wasn't working at all then I just reinstalled the plugin and rebooted the server and since then it started working perfectly...

I'd just suggest to reinstall and reboot the server, then try to spin down a SAS drive while the syslog is open and you should see something as follows.

image.png.aadd2532c446d5d88325fad534c3fcda.png

 

Btw, the log you've to check is this one.

image.png.d3472a4b8c0481bf2ba378659dde0de2.png

 

PS I don't know for other users if it's the same, but some drives' models require more time to spin down, but it's not a problem for sure...

Here I tried to spin up and then spin down all the drives, you can test if everything works doing the same.

image.png.52ccc0f3650c0f6a7950301574e8c850.png

 

I'm really thankful to the creator of this plugin, I have 8 SAS drives in my build and I'm constantly saving 80w!

Edited by endystrike
  • Thanks 1
Link to comment
2 hours ago, JimJamUrUnraid said:

Hello, this plugin has been saving me about 25 watts regularly, so thank you for creating it! It has been great.

Glad you are finding it helpful!

 

2 hours ago, JimJamUrUnraid said:

I just upgraded from 6.9.2 to 6.11.5 and went from SAS standby working on 6.9.2 to not working on 6.11.5. Can you let me know what logs I need to look at and where they are located to try and track this down? Thank you!

I've seen more than one report like the one just below your post, that reinstalling/rebooting made it work for some. I don't have a very good explanation as to why that would be the case, but I'd try that first.

 

If it still doesn't make it work, please post diagnostics.

  • Upvote 1
Link to comment

I just moved my array of 16 disks from using reverse breakout cables directly to disks over to a 24 bay InterTech server cabinet https://www.inter-tech.de/productdetails-142/4U-4424_EN.html with a SAS backplane for each row, and connection to four rows with 8087 SAS cables to the backplane from my two IBM M1015 flashed to LSI9211-8i IT mode (running on an Asus X99-WS/IPMI). 

 

Migration was completely transparent, unRAID automatically found all the drives, and booted as if nothing had happened, except the disks didn't spin down.

 

I quickly found this plugin, installed it, and voilá - spin down working flawlessly!

 

So this post just to confirm my configuration is working with the plugin, and first and foremost a big thank you for building and maintaining this @doron 👍😃

  • Upvote 1
Link to comment

Thanks for this!! I just got a HP DL380 Gen9 as my 2nd server to use for all of my containers/vms outside of plex, and it has SAS storage.  At the time I didn't know about the system not able to spin down SAS drives until I noticed it and started to look.  That is where I came by this plugin.  My system did require a restart in order for it to start working, but now it is working without any problems!!

Thanks again!

  • Like 1
  • Thanks 1
Link to comment
On 1/27/2023 at 1:47 PM, doron said:

Glad you are finding it helpful!

 

I've seen more than one report like the one just below your post, that reinstalling/rebooting made it work for some. I don't have a very good explanation as to why that would be the case, but I'd try that first.

 

If it still doesn't make it work, please post diagnostics.

Uninstalled and then reinstalled. Restarted server. Clicked the ball next to the drive to try and spin down the disk. No go. Attached are my diagnostics...  Seems to be working now

 

Edited by JimJamUrUnraid
Removed Diagnostics, updated states
Link to comment

I've had this going for a couple days now....and basically all the drives stay running except one.  

I can click on them, and they spin down, but then this spins them back up.  Feb  1 06:13:42 Tower  emhttpd: read SMART /dev/sdc

I've been looking through threads trying to find out more info on this, and not finding much.  Has anyone got any idea what I can do to prevent something from spinning them back up?  I already installed file activity and nothing is writing to it via the disk or share.  

Here we can see the plugin spinning them down, and then almost immediately they come back up again.... any thoughts?

1 06:27:44 Tower SAS Assist v2022.08.02: Spinning down device /dev/sdb
Feb  1 06:27:44 Tower SAS Assist v2022.08.02: Spinning down device /dev/sdf
Feb  1 06:27:57 Tower  emhttpd: spinning down /dev/sdg
Feb  1 06:27:57 Tower SAS Assist v2022.08.02: Spinning down device /dev/sdg
Feb  1 06:28:03 Tower  emhttpd: spinning down /dev/sdh
Feb  1 06:28:03 Tower  emhttpd: spinning down /dev/sdi
Feb  1 06:28:03 Tower SAS Assist v2022.08.02: Spinning down device /dev/sdh
Feb  1 06:28:03 Tower SAS Assist v2022.08.02: Spinning down device /dev/sdi
Feb  1 06:28:15 Tower  emhttpd: read SMART /dev/sdi
Feb  1 06:28:37 Tower  emhttpd: spinning down /dev/sdc
Feb  1 06:28:37 Tower SAS Assist v2022.08.02: Spinning down device /dev/sdc
Feb  1 06:29:00 Tower  emhttpd: read SMART /dev/sdb
Feb  1 06:29:00 Tower  emhttpd: read SMART /dev/sdf
Feb  1 06:29:06 Tower  emhttpd: read SMART /dev/sdg
Feb  1 06:29:12 Tower  emhttpd: read SMART /dev/sdh
Feb  1 06:29:50 Tower  emhttpd: read SMART /dev/sdc

Link to comment
3 minutes ago, coltonc18 said:

Here we can see the plugin spinning them down, and then almost immediately they come back up again.... any thoughts?

There's probably actual i/o activity against the drives, which spins them back up.

The "read SMART" messages just indicates that Unraid, whenever an HDD starts or spins up, (re)reads its SMART attributes.

Link to comment
3 minutes ago, coltonc18 said:

I've had this going for a couple days now....and basically all the drives stay running except one.  

I can click on them, and they spin down, but then this spins them back up.  Feb  1 06:13:42 Tower  emhttpd: read SMART /dev/sdc

I've been looking through threads trying to find out more info on this, and not finding much.  Has anyone got any idea what I can do to prevent something from spinning them back up?  I already installed file activity and nothing is writing to it via the disk or share.  

Here we can see the plugin spinning them down, and then almost immediately they come back up again.... any thoughts?

1 06:27:44 Tower SAS Assist v2022.08.02: Spinning down device /dev/sdb
Feb  1 06:27:44 Tower SAS Assist v2022.08.02: Spinning down device /dev/sdf
Feb  1 06:27:57 Tower  emhttpd: spinning down /dev/sdg
Feb  1 06:27:57 Tower SAS Assist v2022.08.02: Spinning down device /dev/sdg
Feb  1 06:28:03 Tower  emhttpd: spinning down /dev/sdh
Feb  1 06:28:03 Tower  emhttpd: spinning down /dev/sdi
Feb  1 06:28:03 Tower SAS Assist v2022.08.02: Spinning down device /dev/sdh
Feb  1 06:28:03 Tower SAS Assist v2022.08.02: Spinning down device /dev/sdi
Feb  1 06:28:15 Tower  emhttpd: read SMART /dev/sdi
Feb  1 06:28:37 Tower  emhttpd: spinning down /dev/sdc
Feb  1 06:28:37 Tower SAS Assist v2022.08.02: Spinning down device /dev/sdc
Feb  1 06:29:00 Tower  emhttpd: read SMART /dev/sdb
Feb  1 06:29:00 Tower  emhttpd: read SMART /dev/sdf
Feb  1 06:29:06 Tower  emhttpd: read SMART /dev/sdg
Feb  1 06:29:12 Tower  emhttpd: read SMART /dev/sdh
Feb  1 06:29:50 Tower  emhttpd: read SMART /dev/sdc

I jumped the gun removing my diagnostics and claiming it works. I have the same problem, it seems like “read SMART” prevents my SAS drives from spinning down. Certainly whenever I click the green orb, the SAS drive doesn’t spin down followed by the read smart message. 

Link to comment
4 minutes ago, doron said:

There's probably actual i/o activity against the drives, which spins them back up.

The "read SMART" messages just indicates that Unraid, whenever an HDD starts or spins up, (re)reads its SMART attributes.

that's whats weird...I loaded the plugin File activity, which monitors that kind of thing (within unraid at least) and the only one that had something reading against it was my NVMW drive, which was expected.  The others didn't have any activity hitting them.  

This server is my container server/vm server so I don't even really store a lot of data on it...its on my other server, so disks 3-8 don't even have any files on them, and they still get spun up.  I'm baffled. 

Link to comment
On 2/1/2023 at 7:38 AM, JimJamUrUnraid said:

I jumped the gun removing my diagnostics and claiming it works. I have the same problem, it seems like “read SMART” prevents my SAS drives from spinning down. Certainly whenever I click the green orb, the SAS drive doesn’t spin down followed by the read smart message. 

I wanted to give the server a few days to see what would happen. I have 2 SAS disks are doing some weird things. Nothing is showing in the open files plugin or the file activity plugin on these drives. Disks 14 and 15 (sdj & sdq) are SAS disks that would spin down before updating to 6.11.5.

 

The syslog does show the disk sometimes spinning down (I have not seen it actually spin down). But most of the time the syslog shows this message and then never spins down:

Feb  1 03:34:36 Kioshi SAS Assist v2022.08.02: Spinning down device /dev/sdq
Feb  1 03:34:38 Kioshi  emhttpd: read SMART /dev/sdq

 

 

Edited by JimJamUrUnraid
Removed diagnostics as I never received help
Link to comment
  • 2 weeks later...
On 2/1/2023 at 8:47 AM, coltonc18 said:

that's whats weird...I loaded the plugin File activity, which monitors that kind of thing (within unraid at least) and the only one that had something reading against it was my NVMW drive, which was expected.  The others didn't have any activity hitting them.  

This server is my container server/vm server so I don't even really store a lot of data on it...its on my other server, so disks 3-8 don't even have any files on them, and they still get spun up.  I'm baffled. 


I just wanted to provide an update, this server came with a hp p440ar raid card, I switched it out with a Supermicro 9300-8I 12Gbps HBA, and it appears to have fixed my issue.  All my drives can now spin down with this plugin.  

I just wanted to provide an update on this for anyone that might come here and experience the same issue I was.  

Thanks!!

Link to comment
8 hours ago, coltonc18 said:

I just wanted to provide an update, this server came with a hp p440ar raid card, I switched it out with a Supermicro 9300-8I 12Gbps HBA, and it appears to have fixed my issue.  All my drives can now spin down with this plugin.  

Thanks for providing the update. That's very interesting, and supports the hypothesis that the behavior is dependent on the combination HDD+controller. 

If you don't mind sharing the make/model of your drives, that'd be helpful too.

Link to comment
9 hours ago, doron said:

Thanks for providing the update. That's very interesting, and supports the hypothesis that the behavior is dependent on the combination HDD+controller. 

If you don't mind sharing the make/model of your drives, that'd be helpful too.

I just looked they are HP drives built by Seagate.
Model is EG0900FBLSK
HP P/N 619286

 

Edited by coltonc18
Link to comment
3 hours ago, coltonc18 said:

I just looked they are HP drives built by Seagate.
Model is EG0900FBLSK

Seagate. Shocking 🙂 (*)

That model is indeed a rebranded Seagate ST990080SS.

Thanks for reporting!

 

(*) Most hit-and-misses with SAS drive spindown seem to involve Seagate made drives. 🤷‍♂️

 

 

 

Link to comment

Hi,

 

I'm running ST10000NM002G with a Dell H310 and this plugin appears not to work.

I get the following in my log:

 

Feb 21 12:50:00 Adam-HTPC  emhttpd: spinning down /dev/sdf
Feb 21 12:50:00 Adam-HTPC SAS Assist v2022.08.02: Spinning down device /dev/sdf
Feb 21 12:50:19 Adam-HTPC  emhttpd: read SMART /dev/sdf

 

However the drive does not appear to spin down.

I read through the entire thread and I can't see anyone comming on my specific combo, wondering if anyone else is running Seagate X16 SAS drive OR a Dell H310 and has it working?

Link to comment
4 minutes ago, SimonF said:

This indicates something has accessed the device, was 19 seconds after the spindown. Can you tell if it physically spins down?

 

The drive is a parity drive and all other drives are spun down during my attempts.

I am running Unraid 6.11.5.

 

I suspected this so I spin it down, then quickly refresh the page on another webpage to see if it goes grey, however it doesn't.

Is there another way to test?

Link to comment
22 minutes ago, deanpelton said:

 

The drive is a parity drive and all other drives are spun down during my attempts.

I am running Unraid 6.11.5.

 

I suspected this so I spin it down, then quickly refresh the page on another webpage to see if it goes grey, however it doesn't.

Is there another way to test?

 

This is the command to spindown.

sg_start  --readonly --pc=3 /dev/sdx

 

 

 

 

This will tell you the status

sdparm --command=sense /dev/sdx

Link to comment
5 minutes ago, SimonF said:

 

This is the command to spindown.

sg_start  --readonly --pc=3 /dev/sdx

 

 

 

 

This will tell you the status

sdparm --command=sense /dev/sdx

 

So I ran the command, the status on the Unraid page did not change.

Running the status command immedately after gave the following:

/dev/sdf: SEAGATE   ST10000NM002G     E003

 

Unsure what this means.

Edited by deanpelton
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.