November 22, 200916 yr If I am going to shutdown the server manually (due to lack of power management), I need to disable the parity check... How can I do that?
November 22, 200916 yr If I am going to shutdown the server manually (due to lack of power management), I need to disable the parity check... How can I do that? To shut the array down cleanly, you need to first "Stop" the array, and then power down. If the array is stopped first, a parity check will not occur when you next power up. (If not stopped cleanly, unRAID has no way of knowing parity is good, so it re-checks it upon power up. This shutdown could have been abrupt, as in a power failure, and data not fully written to the disks,) The easiest way to do this is from the unRAID web-interface. If you need to stop the array from the linux command line, the "powerdown" command can be used. In a few recent builds Tom has included his version of "powerdown" It basically presses the button on the web-user-interface for you. It will not work if the web-interface cannot be reached. I don't think it will work on the most current release if you have any disks that cannot be un-mounted because they are busy. It will sit there until they are not busy. There is a however a "powerdown" package developed by one of the forum members that will work even if the web-interface does not. It is also far more complete in it saves various system logs for possible review the next time you reboot. It will terminate processes holding disks busy. I strongly suggest you download and install it. It too is named "powerdown" and once installed can be invoked by typing the full path to it: /sbin/powerdown You can find the powerdown script here: http://lime-technology.com/wiki/index.php?title=Powerdown_script Joe L.
November 24, 200916 yr Author Something is not right. I am running beta 11, it has powerdown script. I run powerdown script (it takes about a minute or two, until I hear 'beep'), and then I run 'reboot'. Everything from inside telnet session Parity is still run..
November 24, 200916 yr Something is not right. I am running beta 11, it has powerdown script. I run powerdown script (it takes about a minute or two, until I hear 'beep'), and then I run 'reboot'. Everything from inside telnet session Parity is still run.. I would report that behavior to Lime-technology. As I already said, all the command Tom supplies does is to simulate pressing the shutdown button on the user interface It does this (equivalent to pressing the button on the interface named "shutdown"): # Have emhttp do all the work as if user clicked 'shutdown' in webGui. /usr/bin/wget -q -O - localhost/update.htm?shutdown=apply >/dev/null The button on the interface to power down the array is not normally visible unless the array is first stopped. Furthermore, the "Stop" button is named "cmdStop" so it is possible that Tom's command is not stopping the array first. The "HTML" for the powerdown button on the user-interface is this: <td class="cmd-action"><span class="button"><input type="submit" name="shutdown" value="Power down"></span></td> Normally the "Power down" button is not visible unless the array is stopped. I'm guessing that when you use his "powerdown" command you are pressing the "Power down" button on the user-interface without stopping the array first, therefore, the parity check is needed when you reboot. I've never used his new command. In fact, with your test results, I probably will not use it at all, I'll use the one developed by the user-community member if I need stop the array from the command line. Joe L.
November 24, 200916 yr Author I ran actually the powerdown command from the telnet session, did not use the one in UI.
November 24, 200916 yr I ran actually the powerdown command from the telnet session, did not use the one in UI. I know... Tom's "powerdown" command in telnet runs a shell script that invokes "wget" on the "localhost" port on the server (it is where the web-interface web-server listens) "wget" is a process that simulates a browser accessing the user-interface, so in effect, you pressed the button on the user-interface that is not normally visible unless the array is first stopped. Because the array was not stopped cleanly, it needs to have a parity check upon restart. Install the "powerdown" package I listed previously, then shut down by typing /sbin/powerdown (using the full path to the alternate command so it is used instead of the one Tom recently added) and you will shut down cleanly.
November 24, 200916 yr Author thanks, I think I already installed this package. I installed unMenu yesterday and then installed most of the packages list on the 'packages' page I will try specifying the full path thanks
November 25, 200916 yr Author /sbin/powerdown indeed works just fine! Thanks!! There is a bug then in Tom's supplied powerdown script.. Tom, do you need anything from me to fix that? Why not just to incorporate "community" script? thanks,
November 25, 200916 yr One reason not to incorporate the "community" script is because of it's behavior. In my opinion, it's entirely too aggressive in how it deals with processes using the drives. Those processes should not be stopped by sending 'kill -${signal}' in /etc/rc.d/rc.unRAID; they should be stopped via /etc/rc.d/rc.local_shutdown or their own shutdown scripts. The way it's currently done leaves too much uncontrolled. For example, here is my minimal /etc/rc.d/rc.local_shutdown script. #!/bin/sh # # /etc/rc.d/rc.local_shutdown: local system shutdown script. if [ -x /etc/rc.d/rc.transmission-daemon ]; then . /etc/rc.d/rc.transmission-daemon stop fi if [ -x /etc/rc.d/rc.sabnzbd ]; then . /etc/rc.d/rc.sabnzbd stop fi if [ -x /etc/rc.d/rc.eggdrop ]; then . /etc/rc.d/rc.eggdrop stop fi # kick off unraid powerdown [ -x /etc/rc.d/rc.unRAID ] && /etc/rc.d/rc.unRAID stop For symmetry here is my startup script: #!/bin/sh # # /etc/rc.d/rc.local: Local system initialization script. # # Put any local startup commands in here. Also, if you have # anything that needs to be run at shutdown time you can # make an /etc/rc.d/rc.local_shutdown script and put those # commands in there. # kick off identd if [ -x /etc/rc.d/rc.oidentd ]; then . /etc/rc.d/rc.oidentd start fi # Invoke the 'go' script if [ -f /boot/config/go ]; then echo "Starting unRAID GO script..." fromdos </boot/config/go >/var/tmp/go chmod +x /var/tmp/go /var/tmp/go fi if [ -x /etc/rc.d/rc.unRAID ]; then echo "Starting unRAID..." . /etc/rc.d/rc.unRAID start fi if [ -x /etc/rc.d/rc.sabnzbd ]; then echo "Starting Usenet daemon..." . /etc/rc.d/rc.sabnzbd start fi if [ -x /etc/rc.d/rc.transmission-daemon ]; then echo "Starting Torrent daemon..." . /etc/rc.d/rc.transmission-daemon start fi if [ -x /etc/rc.d/rc.eggdrop ]; then echo "Starting IRC daemon..." . /etc/rc.d/rc.eggdrop start fi # invoke apc ups if [ -x /etc/rc.d/rc.apcupsd ]; then echo "Starting APC UPS daemon..." . /etc/rc.d/rc.apcupsd start fi
November 25, 200916 yr One reason not to incorporate the "community" script is because of it's behavior. In my opinion, it's entirely too aggressive in how it deals with processes using the drives. Those processes should not be stopped by sending 'kill -${signal}' in /etc/rc.d/rc.unRAID; they should be stopped via /etc/rc.d/rc.local_shutdown or their own shutdown scripts. The way it's currently done leaves too much uncontrolled. The rc.unRAID from powerdown package installs itself into the /etc/rc.d/rc.local_shutdown. It's really a last resort if other packages have not installed shutdown calls into /etc/rc.d/rc.local_shutdown and/or have not shut themselves down. The code to kill uses standard practice of a SIGTERM, sleep, then a final SIGKILL if the process is still active. It's not the be all end all of shutting down the array perfectly. It was just an emergency catch all so you are not coming up with a dirty array and thus going through a lengthy parity check. Perhaps the rc.unRAID script should be called in /etc/rc.d/rc.6 before the umounts. I think the system 5 way of doing it with named S## and K## scripts is better. Then it is easier to set the order.
November 25, 200916 yr One reason not to incorporate the "community" script is because of it's behavior. In my opinion, it's entirely too aggressive in how it deals with processes using the drives. Those processes should not be stopped by sending 'kill -${signal}' in /etc/rc.d/rc.unRAID; they should be stopped via /etc/rc.d/rc.local_shutdown or their own shutdown scripts. The way it's currently done leaves too much uncontrolled. For example, here is my minimal /etc/rc.d/rc.local_shutdown script. #!/bin/sh # # /etc/rc.d/rc.local_shutdown: local system shutdown script. if [ -x /etc/rc.d/rc.transmission-daemon ]; then . /etc/rc.d/rc.transmission-daemon stop fi if [ -x /etc/rc.d/rc.sabnzbd ]; then . /etc/rc.d/rc.sabnzbd stop fi if [ -x /etc/rc.d/rc.eggdrop ]; then . /etc/rc.d/rc.eggdrop stop fi # kick off unraid powerdown [ -x /etc/rc.d/rc.unRAID ] && /etc/rc.d/rc.unRAID stop For symmetry here is my startup script: #!/bin/sh # # /etc/rc.d/rc.local: Local system initialization script. # # Put any local startup commands in here. Also, if you have # anything that needs to be run at shutdown time you can # make an /etc/rc.d/rc.local_shutdown script and put those # commands in there. # kick off identd if [ -x /etc/rc.d/rc.oidentd ]; then . /etc/rc.d/rc.oidentd start fi # Invoke the 'go' script if [ -f /boot/config/go ]; then echo "Starting unRAID GO script..." fromdos </boot/config/go >/var/tmp/go chmod +x /var/tmp/go /var/tmp/go fi if [ -x /etc/rc.d/rc.unRAID ]; then echo "Starting unRAID..." . /etc/rc.d/rc.unRAID start fi if [ -x /etc/rc.d/rc.sabnzbd ]; then echo "Starting Usenet daemon..." . /etc/rc.d/rc.sabnzbd start fi if [ -x /etc/rc.d/rc.transmission-daemon ]; then echo "Starting Torrent daemon..." . /etc/rc.d/rc.transmission-daemon start fi if [ -x /etc/rc.d/rc.eggdrop ]; then echo "Starting IRC daemon..." . /etc/rc.d/rc.eggdrop start fi # invoke apc ups if [ -x /etc/rc.d/rc.apcupsd ]; then echo "Starting APC UPS daemon..." . /etc/rc.d/rc.apcupsd start fi I agree... it needs rework once we get the hooks needed for a clean shutdown of add-ons. For now, it is fine, but once we get into version 5.0 of unRAID, lots of the add-on packages will need to evolve, "powerdown" being only one of them. Joe L.
November 25, 200916 yr I think the system 5 way of doing it with named S## and K## scripts is better. Then it is easier to set the order. I agree... It will be far easier once we get a "before array-stop event" and "after array start" event. "/sbin/powerdown" I think needs an addition to handle loop device mounts, I don't think it does that just yet. But as WeeboTech said, it is FAR better than the "powerdown" script Tom recently added, as it (The lime-technology version) just submits via "wget" a press of the "Power down" button to emhttp, apparently without stopping the array first. That method is useless if emhttp has crashed or is unavailable for some reason. Joe L.
November 25, 200916 yr I agree... it needs rework once we get the hooks needed for a clean shutdown of add-ons. For now, it is fine, but once we get into version 5.0 of unRAID, lots of the add-on packages will need to evolve, "powerdown" being only one of them. Powerdown won't be needed once there is an API for add ons and there is some form of event manager that calls the startup/shutdown scripts.
November 25, 200916 yr I agree... it needs rework once we get the hooks needed for a clean shutdown of add-ons. For now, it is fine, but once we get into version 5.0 of unRAID, lots of the add-on packages will need to evolve, "powerdown" being only one of them. Powerdown won't be needed once there is an API for add ons and there is some form of event manager that calls the startup/shutdown scripts. Useless emhttp has crashed or is unavailable for some reason.
November 25, 200916 yr I agree... it needs rework once we get the hooks needed for a clean shutdown of add-ons. For now, it is fine, but once we get into version 5.0 of unRAID, lots of the add-on packages will need to evolve, "powerdown" being only one of them. Powerdown won't be needed once there is an API for add ons and there is some form of event manager that calls the startup/shutdown scripts. Useless emhttp has crashed and is unavailable for some reason. I think that if emhttp calls out to a script that does the shutdowns, then that same line can be added to /etc/rc.d/rc.local_shutown or /etc/rc.d/rc.6
Archived
This topic is now archived and is closed to further replies.