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.

Command for Spinning up all disks

Featured Replies

Hi there,

i use the unRaid Server together with Media Portal to serve my HTPC's.

Because i dont need the Server the whole time i put it to S3 when not needed.

 

THe problem is that if it comes out of S3 the disks spin down and one of the Media Portal component can't deal with it, not showing my my TV Series anymore.

 

So what i want to do is to spin up the disk when the server comes out of S3. On the Webgui there is a command for spinning up all drives at once, how can i do this on the command line?

Hi there,

i use the unRaid Server together with Media Portal to serve my HTPC's.

Because i dont need the Server the whole time i put it to S3 when not needed.

 

THe problem is that if it comes out of S3 the disks spin down and one of the Media Portal component can't deal with it, not showing my my TV Series anymore.

 

So what i want to do is to spin up the disk when the server comes out of S3. On the Webgui there is a command for spinning up all drives at once, how can i do this on the command line?

 

It takes two commands:

 

/usr/bin/wget  -q  -O  -  localhost/update.htm >/dev/null

/usr/bin/wget  -O  -  --post-data  'startState=STARTED&cmdSpinUpAll=Spin Up'  localhost/update.htm

  • Author

Thanks for that hint.

 

Would there also be an way to do that with the mdcmd tool within unRaid, unfortunatly i have nowhere found an dokumentation for that command.

Thanks for that hint.

 

Would there also be an way to do that with the mdcmd tool within unRaid, unfortunatly i have nowhere found an dokumentation for that command.

I do not know of a command to spinup all the disks using mdcmd, jusy individual disks.

/root/mdcmd spinup 1

/root/mdcmd spinup 2

/root/mdcmd spinup 3

(will spin up disks 1,2,3)

 

 

  • Author

Okay then what i have to do is to evaluate how many disks are in the System, and then using a loop in my S3 Script to spin up all disk's with the mdcmd tool.

Okay then what i have to do is to evaluate how many disks are in the System, and then using a loop in my S3 Script to spin up all disk's with the mdcmd tool.

This will do it: 

for disknum in 0 `ls /dev/md* | sed "sX/dev/mdXX"`; do /root/mdcmd spinup $disknum; done

 

If you do not want to spin up the parity disk, you can use:

for disknum in `ls /dev/md* | sed "sX/dev/mdXX"`; do /root/mdcmd spinup $disknum; done

 

the mdcmd interface will not spin up the cache drive, since it is not part of the protected array.  That has to be done with hdparm.

 

Joe L.

  • Author

Thanks Joe thats great i will try that in the S3 script when it works like expected i will post the script here and in the suitable Script Topic.

  • Author

Joe do you think your cache_dir script maybe could also help me without spinning up the drives after S3?

Joe do you think your cache_dir script maybe could also help me without spinning up the drives after S3?

no
  • 6 months later...

Hello, complete unraid noob here.

 

I am unsure where to copy the "for disknum in 0 `ls /dev/md* | sed "sX/dev/mdXX"`; do /root/mdcmd spinup $disknum; done" code in my S3 script?

 

This is what I have in my S3.sh. (pretty standard, taken for others in the forums)

 

--------

#!/bin/bash

 

 

drives="/dev/sda /dev/sdb /dev/sdc /dev/sdd /dev/sde"

timeout=20

 

 

count=20

while [ 1 ]

do

  hdparm -C $drives | grep -q active

  if [ $? -eq 1 ]

  then

    count=$[$count-1]

  else

    count=$timeout

  fi

  if [ $count -le 0 ]

  then

    # Do pre-sleep activities

    sleep 5

 

    # Go to sleep

    echo 3 > /proc/acpi/sleep

 

    # Do post-sleep activities

    # Force a DHCP renewal (shouldn't be used for static-ip boxes)

    /sbin/dhcpcd -n

    sleep 5

 

    count=$timeout

  fi

  # Wait a minute

  echo COUNT $count

  sleep 60

done

---------

 

Thanks in advance.

 

Archived

This topic is now archived and is closed to further replies.

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.