[Plugin] Spin Down SAS Drives


doron

Recommended Posts

@Elmojo @Toibs finding who issues i/o activity against your drives can be tricky at times.
If you eliminated network drive activity against your shares, try to stop all plugins, Dockers and VM's and see what happens. Then, add them back one by one. You might be able to find the culprit this way.

Sent from my tracking device using Tapatalk

  • Like 1
Link to comment
6 hours ago, Toibs said:

@doron So my devices hapilly spin down manually and stay down for a while before coming back up. However they never spin down automatically.

If i manually spindown from the Main screen, i see this in the logs :

 

Feb 29 00:48:38 Kermit emhttpd: spinning down /dev/sdh

Feb 29 00:48:38 Kermit emhttpd: spinning down /dev/sdg

Feb 29 00:48:38 Kermit emhttpd: spinning down /dev/sdd

Feb 29 00:48:38 Kermit emhttpd: spinning down /dev/sde

Feb 29 00:48:38 Kermit emhttpd: spinning down /dev/sdb

Feb 29 00:48:38 Kermit emhttpd: spinning down /dev/sdf

Feb 29 00:48:38 Kermit emhttpd: spinning down /dev/sdc

Feb 29 00:48:38 Kermit SAS Assist v2024.02.18: Spinning down device /dev/sdd

Feb 29 00:48:38 Kermit SAS Assist v2024.02.18: Spinning down device /dev/sde

Feb 29 00:48:38 Kermit SAS Assist v2024.02.18: Spinning down device /dev/sdc

Feb 29 00:48:38 Kermit SAS Assist v2024.02.18: Spinning down device /dev/sdf

Feb 29 00:48:38 Kermit SAS Assist v2024.02.18: Spinning down device /dev/sdb

 

However cannot see any attempts to automatically spin down - only when done manually.

I am using ST6000NM0034 Drives on a Dell RX730.

 

Bit of a newbie here - Any suggestions as to what I can try??

 

Many thanks!

Just to confirm you do have spin down set to a time value in disk settings.  How long do they stay spun down, if there is IO on the disks during the set period then they will not be automatically spun down.

  • Like 1
Link to comment
  • 2 weeks later...
On 2/29/2024 at 7:19 AM, SimonF said:

Just to confirm you do have spin down set to a time value in disk settings.  How long do they stay spun down, if there is IO on the disks during the set period then they will not be automatically spun down.

And Voila - as simple as that... Set the drive timeout to an hour. Now it spins down regular and saves power!

 

Checking in Idrac, looking a lot better now...

 

image.png.d924d6665fb9ab0c12c2cb57ca39689d.png

 

Thank you!!

Link to comment

So I've done some additional checking, and it appears that my spin-down failures are not due to this plugin, or anything to do with a file system, or even disk activity, but rather the fact that I'm running these Seagate 6TB SAS drives.  
I know I've seen something about these drives having a spin-down issue, but can't find it right now. 
Does anyone have info on that?

Link to comment
  • 3 weeks later...

Doron, thanks for this plugin!  It saved me more than a few bucks spinning down all my SAS drives.  I've since retired them for SATA drives, and they no longer spin down since the plugin was installed (which I didn't care about earlier, as I only had 2).  Since I have
 

 

I have now replaced the SAS drives with larger SATA ones and need my SATA spindown to start working again.   Uninstalling the SAS Spin down plugin did not solve for the problem.   Globally spin down is set for 1h, and I've tried setting it to 15 mins on the same drives.

Thoughts?

Link to comment

@zen , please add some more info re this problem. Do they never spin down? Spin down then up again? Logs?...

(Edit - sent out prematurely): the plugin is not supposed to interfere with SATA spin down, at all. That said, stuff can happen - but, you said that removing it did not remove the issue, so chances are your issue is elsewhere.

Sent from my tracking device using Tapatalk



Link to comment

Never spin down.  Even clicking on the "green dot" in the UI does nothing.  SAS Drives behave as expected.

The only log entries I can find for "spinning down" the drives are when I set the spin down time on the specific drives:

 

Apr  1 08:04:00 WARNAS kernel: mdcmd (43): set md_num_stripes 1280
Apr  1 08:04:00 WARNAS kernel: mdcmd (44): set md_queue_limit 80
Apr  1 08:04:00 WARNAS kernel: mdcmd (45): set md_sync_limit 5
Apr  1 08:04:00 WARNAS kernel: mdcmd (46): set md_write_method
Apr  1 08:04:00 WARNAS emhttpd: spinning down /dev/sdf
Apr  1 08:04:00 WARNAS emhttpd: sdspin /dev/sdf down: 1
Apr  1 08:04:14 WARNAS kernel: mdcmd (47): set md_num_stripes 1280
Apr  1 08:04:14 WARNAS kernel: mdcmd (48): set md_queue_limit 80
Apr  1 08:04:14 WARNAS kernel: mdcmd (49): set md_sync_limit 5
Apr  1 08:04:14 WARNAS kernel: mdcmd (50): set md_write_method
Apr  1 08:04:14 WARNAS emhttpd: spinning down /dev/sdl
Apr  1 08:04:14 WARNAS emhttpd: sdspin /dev/sdl down: 1
Apr  1 08:04:20 WARNAS emhttpd: spinning down /dev/sdi
Apr  1 08:04:20 WARNAS emhttpd: sdspin /dev/sdi down: 1
Apr  1 08:04:27 WARNAS kernel: mdcmd (51): set md_num_stripes 1280
Apr  1 08:04:27 WARNAS kernel: mdcmd (52): set md_queue_limit 80
Apr  1 08:04:27 WARNAS kernel: mdcmd (53): set md_sync_limit 5
Apr  1 08:04:27 WARNAS kernel: mdcmd (54): set md_write_method


But the drives did not spin down, nor is there a spin up notices later in the logs.  I know the drive(s) are still spun up because file access is instantaneous to files on those specific drives.

Hardware is a LSI 3008 ---> SuperMicro SAS3 Expander Backplane

Again SATA Spin down worked as advertised before installation of SAS spin down plugin.   Not blaming, just don't think the issue is anything with the hardware- beyond the drives, nothing has changed in years.  As I said, the plugin was a life saver!

Currently on 6.12.8, but problem existed in prior versions.  Let me know if you'd like any specific diagnostic packages.

 

Link to comment
51 minutes ago, @zen said:
emhttpd: sdspin /dev/sdf down: 1

This might indicate an issue.

 

Can you, on the Unraid console, issue this command:

hdparm -y /dev/sdf

and post the output?

 

(note the small y, not uppercase Y...)

Link to comment

Here you go:

 

/dev/sdf:
 issuing standby command
SG_IO: bad/missing sense data, sb[]:  70 00 01 00 00 00 00 0a 00 00 00 00 00 1d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

 

 

Here's the results of hdparm -I if you're interested.

 

root@WARNAS:~# hdparm -I /dev/sdf

/dev/sdf:

ATA device, with non-removable media
        Model Number:       TOSHIBA HDWG180
        Serial Number:      90J0A00JFBEG
        Firmware Revision:  0603
        Transport:          Serial, ATA8-AST, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6, SATA Rev 3.0
Standards:
        Used: unknown (minor revision code 0x006d)
        Supported: 10 9 8 7 6 5
        Likely used: 10
Configuration:
        Logical         max     current
        cylinders       16383   16383
        heads           16      16
        sectors/track   63      63
        --
        CHS current addressable sectors:    16514064
        LBA    user addressable sectors:   268435455
        LBA48  user addressable sectors: 15628053168
        Logical  Sector size:                   512 bytes
        Physical Sector size:                  4096 bytes
        Logical Sector-0 offset:                  0 bytes
        device size with M = 1024*1024:     7630885 MBytes
        device size with M = 1000*1000:     8001563 MBytes (8001 GB)
        cache/buffer size  = unknown
        Form Factor: 3.5 inch
        Nominal Media Rotation Rate: 7200
Capabilities:
        LBA, IORDY(can be disabled)
        Queue depth: 32
        Standby timer values: spec'd by Standard, no device specific minimum
        R/W multiple sector transfer: Max = 16  Current = 16
        Advanced power management level: 128
        DMA: sdma0 sdma1 sdma2 mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6
             Cycle time: min=120ns recommended=120ns
        PIO: pio0 pio1 pio2 pio3 pio4
             Cycle time: no flow control=120ns  IORDY flow control=120ns
Commands/features:
        Enabled Supported:
           *    SMART feature set
                Security Mode feature set
           *    Power Management feature set
           *    Write cache
           *    Look-ahead
           *    Host Protected Area feature set
           *    WRITE_BUFFER command
           *    READ_BUFFER command
           *    NOP cmd
           *    DOWNLOAD_MICROCODE
           *    Advanced Power Management feature set
                SET_MAX security extension
           *    48-bit Address feature set
           *    Mandatory FLUSH_CACHE
           *    FLUSH_CACHE_EXT
           *    SMART error logging
           *    SMART self-test
           *    General Purpose Logging feature set
           *    WRITE_{DMA|MULTIPLE}_FUA_EXT
           *    64-bit World wide name
           *    WRITE_UNCORRECTABLE_EXT command
           *    {READ,WRITE}_DMA_EXT_GPL commands
           *    Segmented DOWNLOAD_MICROCODE
                unknown 119[6]
                unknown 119[7]
           *    Gen1 signaling speed (1.5Gb/s)
           *    Gen2 signaling speed (3.0Gb/s)
           *    Gen3 signaling speed (6.0Gb/s)
           *    Native Command Queueing (NCQ)
           *    Host-initiated interface power management
           *    Phy event counters
           *    Host automatic Partial to Slumber transitions
           *    Device automatic Partial to Slumber transitions
           *    READ_LOG_DMA_EXT equivalent to READ_LOG_EXT
           *    DMA Setup Auto-Activate optimization
                Device-initiated interface power management
           *    Software settings preservation
                unknown 78[7]
           *    SMART Command Transport (SCT) feature set
           *    SCT Write Same (AC2)
           *    SCT Error Recovery Control (AC3)
           *    SCT Features Control (AC4)
           *    SCT Data Tables (AC5)
           *    SANITIZE_ANTIFREEZE_LOCK_EXT command
           *    SANITIZE feature set
           *    OVERWRITE_EXT command
           *    Extended number of user addressable sectors
           *    DOWNLOAD MICROCODE DMA command
Security:
        Master password revision code = 65534
                supported
        not     enabled
        not     locked
        not     frozen
        not     expired: security count
                supported: enhanced erase
        756min for SECURITY ERASE UNIT. 756min for ENHANCED SECURITY ERASE UNIT.
Logical Unit WWN Device Identifier: 5000039a68d04281
        NAA             : 5
        IEEE OUI        : 000039
        Unique ID       : a68d04281
Checksum: correct

 

Edited by @zen
Added hdparm -I
Link to comment

Hey all, i got a r730 with a hba330 in hba mode. All my drives spin down exept for the 6tb Seagate Ironwolfs. I can manually spin them down but after a few minutes they spin back up. I'm considering buying another controller. Is there any know good controller that works with all hard drives brand and types.

Link to comment
45 minutes ago, Spokz said:

All my drives spin down exept for the 6tb Seagate Ironwolfs. I can manually spin them down but after a few minutes they spin back up.

I would suggest you scan back through the last few pages of the thread. I'm having the same issue, with different Seagate drives.  From my research, this seems to be an issue with some Seagate SAS drives, and I've been unable to find a solution thus far.  It doesn't appear to be related to the controller, or to this plugin.  If you find anything to the contrary, please share it!
I'm actually unable to use my drives right now.  Since they stay spun up all the time, they are running really hot (51c avg) and I'm afraid to leave them in service.

Link to comment




I'm actually unable to use my drives right now.  Since they stay spun up all the time, they are running really hot (51c avg) and I'm afraid to leave them in service.

You may want to check your cooling. Depending on physical environment etc., a properly cooled drive that's spun up but idle would not typically average at these temps.

Sent from my tracking device using Tapatalk

Link to comment

Hi to all.

I have to add something to this topc. I got server that i put together by myself. MB MSI, CPU RYZEN 9 5800 and raid controller flashed to hba mode. all my disk no mather sas or sata was spin down and STAY that way until i did somethig to wake them up. All was so perfect that i wondered "what will happen when i buy a real server" and i did --- DELL t640 with HBA330. And now you know what happened and why am i here with you??? my disks spin dow and after 20-30 min they spin up.

 

What i did? i took out usb from my old server and put into my new. no changes just disks swap to new server and usb. so my advice dont waste time for looking if someting is writing to disk or so. IT IS ALL DELL FAULT. i put disks and usb to my old server again and everything works like it shoud. This is becouse of  firmware or bios of the DELL that wakes up disks. Nothing in unraid.

 

we should look in dell bios/idrack settings. if any one know how to flash this DELL HBA330 to non dell firmware maby this will really help. I am preatty sure that some DELL "performance" settings or controller firmware wont let disks to sleep for long.

 

one more proof. in unraid i switched disks view from bits per second to read / write number. than put disks to sleep and waited for them to wake up. the number of writes / reads  not change but disks ware woken up. This is proof that nothing was trying to read write from/to disks.

 

Link to comment
2 minutes ago, doron said:

You may want to check your cooling. Depending on physical environment etc., a properly cooled drive that's spun up but idle would not typically average at these temps.
 

I agree, but my cooling is kinda...overkill. lol

I have a dedicated 14k BTU AC that's blowing directly into the intake of the server.  All my server equipment is in a separate room, which is maintained at roughly 20c/45%RH.  All the other drives in the same chassis run 32-40c when spooled up, and the drives in my external disk shelf avg 23-26c when up.  It's only these Seagate drives that refuse to spin down, and also have temp issues.  It's baffling.  They're also the newest drives in my system, by far.

Link to comment
6 minutes ago, MoherPower said:

This is becouse of  firmware or bios of the DELL that wakes up disks. Nothing in unraid.

 

we should look in dell bios/idrack settings. if any one know how to flash this DELL HBA330 to non dell firmware maby this will really help. I am preatty sure that some DELL "performance" settings or controller firmware wont let disks to sleep for long.

I don't think this is correct.  I have 2 RAID cards in my T630, both flashed to non-DELL firmware.  All my drives spin down just fine, except for the specific Seagate SAS drives noted above.  There doesn't seem to be anything in iDRAC or the Dell BIOS that would wake drives, but I haven't done a deep dive looking for that specifically.  There are so many Dell servers out there in home labs, I think we'd have heard about it if this was a widespread, known issue.

Link to comment
48 minutes ago, Elmojo said:

I don't think this is correct.  I have 2 RAID cards in my T630, both flashed to non-DELL firmware.  All my drives spin down just fine, except for the specific Seagate SAS drives noted above.  There doesn't seem to be anything in iDRAC or the Dell BIOS that would wake drives, but I haven't done a deep dive looking for that specifically.  There are so many Dell servers out there in home labs, I think we'd have heard about it if this was a widespread, known issue.

than how you explain my case? i just move usb stick and disks from one server to another and in non dell server all disk sleep well but  in dell server they wake up after a while. i will try to find sas cables to connect my old HBA controller to dell derver and we will see than.

Link to comment
56 minutes ago, MoherPower said:

than how you explain my case? i just move usb stick and disks from one server to another and in non dell server all disk sleep well but  in dell server they wake up after a while. i will try to find sas cables to connect my old HBA controller to dell derver and we will see than.

There are a myriad factors that can govern how certain hardware works (or doesn't) within a given environment.  There often is no simple "explanation", unfortunately.   If you find a definite culprit for the failure to sleep, other than "it's Dell's fault", then by all means, please share it! :)

Link to comment
20 hours ago, Elmojo said:

There are a myriad factors that can govern how certain hardware works (or doesn't) within a given environment.  There often is no simple "explanation", unfortunately.   If you find a definite culprit for the failure to sleep, other than "it's Dell's fault", then by all means, please share it! :)

1) people say that this problem affect only segate sas drives but it is not. i have wd UltraStar (SAS), WD WD20EFRX (SATA), and ST8000NM0045(SATA). it afects them all if they are connected to dell server only. 

2) to wake up disks from sleep you need to access them. there is 2 options --in my case --  or unraid started by miracle  write something only when it is connected to dell machine or more prabable dell is "doing something" to wake disks up. Maby check smart or do other "checky" things. Also Dell is known from making things hard if you don't use dell hardware. and by the way i have segate exos 7e10 (S/N WREDA0LB if you want to check) branded by DELL with del firmware  and you know what it sleeps like a baby. But it shlould not becouse it is segate :) 

 

That is why i can tell with clear conscience it is DELL fault. but i intend to check 2 things.

a) put there old hewlett packard h330 card with flashed lsi firmware. if it helps i will know that problem is not Dell server platform but controller. i need to wait for sas cables becouse this controller have diferent connectors.

b) flash hba330 with not dell firmware and if disks will stay aslep than we will know it is dell firmare not faulty controller. after that i will get back to you to point definite culprit (wishpering) witch is DELL ofc.  :)

 

i didn't done this thing before so it will take me some time to ask uncle google for help.

 

Link to comment
14 hours ago, Spokz said:

Are they in IT mode, no dell bs? What cards?

Yes, both in IT mode. 

One is a PERC H810 in HBA mode.  That one is running my external MD1200 disk shelf.  Those drives all sleep perfectly.

The other is a PERC H730, also in HBA mode.  That one is running the internal drives connected to the backplane.  Most of the drives sleep fine, except for the 5x 6TB Seagate drives I bought a couple months ago.

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.