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.

Spinup all disks via network command

Featured Replies

I can easily turn on my UnRAID server remotely via a simple WOL command; but there are two other things I'd like to be able to do just as easily -- and I'm not sure how (if at all) these can be done.

 

(1)  Spin up all the disks.    Clearly this is trivial with the Web interface (just click the button) ... but what I'm looking for is a simply command that can be executed as a batch file (or a scheduled task) to spin up all the disks a couple minutes before a scheduled middle-of-the-night backup utility runs.  {Yes, they'll spin individually as needed, but I'd like the server to simply be at full speed when the backup starts).

 

(2)  Shut down the server.  Again, simple with the web interface -- but is there an easy way to do this from a Windows command line?    I know there's a simple utility that will let me schedule an automatic shutdown at a specified time -- but I'd like to do it when a specific batch file that can take a widely variable time to run has completed.

 

 

1) here the spindown function from unmenu. shouldnt be too hard to wrap that in a bash script. there might already be something easier but i dont know.

function  SpinUp( disk, cmd, f) {
    # Spin Up drives
    # loop through the drives spinning them up by using the spinup command if available or
    # by reading a single "random" block from each /dev/md* device in turn if not.  
    srand() # important to get random numbers when unmenu is re-started.
    for ( i =0; i<numdisks; i++ ) {
#print disk_name[i] ORS
        if ( disk_name[i] == disk || disk == "All Disks" ) {
            if ( has_spinup == "true" ) {
               cmd="/root/mdcmd spinup " i " >/dev/null 2>&1"
            } else {
               # calculate a random block between 1 and the max blocks on the device
               skip_blocks = 1 + int( rand() * disk_size[i] );

               #cmd="dd if=/dev/" disk_device[i] " of=/dev/null count=1 bs=1k skip=" skip_blocks " >/dev/null 2>&1"
               cmd="dd if=/dev/" disk_name[i] " of=/dev/null count=1 bs=1k skip=" skip_blocks " >/dev/null 2>&1"
            }
            #print cmd ORS
            system(cmd);
        }
    }
}

 

2) windows command line? no. but check the wiki for the powerdown script and you can easily do if from a terminal.

  • Author

Thanks Joe,

 

Invoking a web page with the "Spin Up" or "Spin Down" commands works just fine.

 

  • 2 years later...

This command: http://tower/main.htm?cmdSpinUpAll=Spin%20up works fine for my OLD version (4.7) of unRAID to spin up all drives.

 

Can someone post the actual HTTP command (similar to form of the above command) for versions 5.0 and above?

 

Thanks

The_Keymaker

  • 11 months later...

Sorry for bringing up this old thread, but I would like to know if there exists a command to spin up all disks via a URL in v6.

 

I have tried "http://tower/update.htm?cmdSpinUpAll=Spin%20up" and "http://tower/main.htm?cmdSpinUpAll=Spin%20up" but both didnt work.

I get a 404 file not found.

 

I checked the website source code and i guess these are the interesting lines:

<form name="otherOps" method="POST" action="/update.htm" target="progressFrame">
<input type="hidden" name="startState" value="STARTED">
<table class="array_status">
  <tr>
  <td></td>
  <td><input type="submit" name="cmdSpindownAll" value="Spin Down" style="width:80px"><input type="submit" name="cmdSpinupAll" value="Spin Up" style="width:80px"></td>
  <td><strong>Spin Down</strong> will immediately spin down all disks.<br><strong>Spin Up</strong> will immediately spin up all disks.</td>
  </tr>

 

Any ideas?

Sorry for bringing up this old thread, but I would like to know if there exists a command to spin up all disks via a URL in v6.

Yes. Use the search feature to find a recent thread that has the solution. There was one just a few days ago.

Thanks BRiT,  i tried the search function but used different search words.

Exactly what i was looking for!

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.