May 16, 201115 yr 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?
May 17, 201115 yr 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
May 17, 201115 yr 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.
May 17, 201115 yr 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)
May 17, 201115 yr 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.
May 17, 201115 yr 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.
May 17, 201115 yr 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.
May 23, 201115 yr Author Joe do you think your cache_dir script maybe could also help me without spinning up the drives after S3?
May 23, 201115 yr Joe do you think your cache_dir script maybe could also help me without spinning up the drives after S3? no
December 18, 201114 yr 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.