Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Spin Down/Up Drives via Bash Script?

Featured Replies

 

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. 

 

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.

  • 4 years later...
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 by mathiasdoe

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.

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...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.