Parzival Posted April 16, 2019 Share Posted April 16, 2019 Hello all I am trying to find the command Unraid uses to spin down and up disks so that I can add this to a bash script. My use case is that I know after a certain time my server will not be accessed for usually 12~ hours so I would like to spin down the drives at that time as there is no need for them to be up. Does anybody know what the command is as I've scoured the forum but have not found anything up to date that works. Quote Link to comment
Squid Posted April 16, 2019 Share Posted April 16, 2019 mdcmd spindown x mdcmd spinup x But, simplest way is to simply set drive spindown timers in the drive's settings. That way unRaid will spin down the drives when not accessed. Quote Link to comment
mathiasdoe Posted September 26, 2023 Share Posted September 26, 2023 (edited) On 4/16/2019 at 2:49 PM, Squid said: mdcmd spindown x mdcmd spinup x But, simplest way is to simply set drive spindown timers in the drive's settings. That way unRaid will spin down the drives when not accessed. Did this command change? Doing mdcmd spindown sdc for example returns "/usr/local/sbin/mdcmd: line 11: echo: write error: Invalid argument". Edit: emcmd cmdSpindown=disk1 works. Edited September 26, 2023 by mathiasdoe Quote Link to comment
JonathanM Posted September 27, 2023 Share Posted September 27, 2023 On 9/26/2023 at 10:50 AM, mathiasdoe said: Doing mdcmd spindown sdc Because Unraid is basically a new install every boot, the sdX designations can and do change when there are hardware changes, and sometimes when there are only software changes. Any scripted disk reference needs to use something OTHER than the sdX designation or you risk applying the command to the completely wrong disk. Quote Link to comment
Recommended Posts
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.