September 16, 201213 yr 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.
September 17, 201213 yr 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.
September 18, 201213 yr See here: http://lime-technology.com/forum/index.php?topic=22006.msg195337;topicseen#msg195337
September 20, 201213 yr Author Thanks Joe, Invoking a web page with the "Spin Up" or "Spin Down" commands works just fine.
October 9, 201411 yr 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
September 13, 201510 yr 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?
September 13, 201510 yr 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.
September 13, 201510 yr 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.