December 5, 201411 yr Author Show me where you got the cache_dirs plugin. You mean where it is located on my thumb drive? No. Where is it in the forum.
December 7, 201411 yr It is the version 1.6.7 that comes with ikosa's control panel. http://lime-technology.com/forum/index.php?topic=28873.0 I found that the original from JoeL has version 1.6.9 http://lime-technology.com/forum/index.php?topic=4500.0 Would that fix my issue?
December 7, 201411 yr It is the version 1.6.7 that comes with ikosa's control panel. http://lime-technology.com/forum/index.php?topic=28873.0 I found that the original from JoeL has version 1.6.9 http://lime-technology.com/forum/index.php?topic=4500.0 Would that fix my issue? Probably not. For v5, there isn't a significant difference between v1.6.7 and v1.6.9. The problem does not appear to be CacheDirs though. The 2 unsuccessful shutdowns had 2 devices that were still busy, blocking shutdown. The successful shutdown found no busy devices to stop it.
December 7, 201411 yr Author It's not the cache_dirs script that is the problem. It appears to be a plugin issue. When cache_dirs is shut down the log should look like this: Dec 6 14:23:24 Tower rc.unRAID[24800][24876]: Running: "/usr/local/emhttp/plugins/dynamix.cache.dirs/event/unmounting_disks" Dec 6 14:23:24 Tower cache_dirs: killing cache_dirs process 3768 I didn't see this in your log. The cache_dirs/unmounting_disks event should run a /etc/rc.d/rc.cachedirs script on this event that looks like: stop) [ -x /usr/sbin/cache_dirs ] && /usr/sbin/cache_dirs -q Powerdown has been changed from 2.10 on to walk through the unmounting_disks events and execute any shutdown scripts found. Previously powerdown did a brute force process kill that made things shutdown. You can either get the plugin author to verify that their plugin does have the unmounting_disks rc.cachedirs script working properly, or roll back to a previous powerdown version (2.10). The reason for these changes is to not force plugins to work properly. Plugin authors need to conform to the needs of unRAID start and stop strategies to insure proper operation of unRAID and the plugins. Powerdown was originally written to overcome these issues, but it is no longer appropriate for this to be done.
December 8, 201411 yr This morning I checked my server's status and he did not shut down last night. Here's the log. Dec 7 09:39:00 Tuerke auto_s3_sleep: ----------- auto_s3_sleep version 1.1 --------------------- Dec 7 09:39:00 Tuerke auto_s3_sleep: Configuration settings: Dec 7 09:39:00 Tuerke auto_s3_sleep: Power down instead of sleep: yes Dec 7 09:39:00 Tuerke auto_s3_sleep: Check HDD activity: yes Dec 7 09:39:00 Tuerke auto_s3_sleep: Check TCP activity: yes Dec 7 09:39:00 Tuerke auto_s3_sleep: Check SSH connections: no Dec 7 09:39:00 Tuerke auto_s3_sleep: Check TELNET connections: yes Dec 7 09:39:00 Tuerke auto_s3_sleep: Check for online clients: 192.168.178.150 192.168.178.153 Dec 7 09:39:00 Tuerke auto_s3_sleep: Check local logins: yes Dec 7 09:39:00 Tuerke auto_s3_sleep: Check for lock file (tmp/nos3sleep.lock): yes Dec 7 09:39:00 Tuerke auto_s3_sleep: No sleep/powerdown during hours: 18 19 20 21 22 23 Dec 7 09:39:00 Tuerke auto_s3_sleep: Save SMART values before powerdown: no Dec 7 09:39:00 Tuerke auto_s3_sleep: Log message destination: debug logging disabled Dec 7 09:39:00 Tuerke auto_s3_sleep: --- After wake up from sleep: ---- Dec 7 09:39:00 Tuerke auto_s3_sleep: Renew DHCP: no Dec 7 09:39:00 Tuerke auto_s3_sleep: Force GB LAN: yes Dec 7 09:39:00 Tuerke auto_s3_sleep: ------------------------------------------------------------ Dec 7 09:54:01 Tuerke crond[1303]: failed parsing crontab for user root: /usr/local/sbin/mover |& logger Dec 7 09:54:31 Tuerke cache_dirs: killing cache_dirs process 3329 Dec 7 10:03:51 Tuerke emhttp: shcmd (62): /usr/sbin/hdparm -y /dev/sdm &> /dev/null Dec 7 10:14:12 Tuerke kernel: mdcmd (65): spindown 1 Dec 7 10:14:12 Tuerke kernel: mdcmd (66): spindown 7 Dec 7 10:54:01 Tuerke crond[1303]: failed parsing crontab for user root: /usr/local/sbin/mover |& logger Dec 7 11:54:01 Tuerke crond[1303]: failed parsing crontab for user root: /usr/local/sbin/mover |& logger Dec 7 12:54:01 Tuerke crond[1303]: failed parsing crontab for user root: /usr/local/sbin/mover |& logger Dec 7 13:54:01 Tuerke crond[1303]: failed parsing crontab for user root: /usr/local/sbin/mover |& logger Dec 7 14:54:01 Tuerke crond[1303]: failed parsing crontab for user root: /usr/local/sbin/mover |& logger Dec 7 15:54:01 Tuerke crond[1303]: failed parsing crontab for user root: /usr/local/sbin/mover |& logger Dec 7 16:54:01 Tuerke crond[1303]: failed parsing crontab for user root: /usr/local/sbin/mover |& logger Dec 7 17:54:01 Tuerke crond[1303]: failed parsing crontab for user root: /usr/local/sbin/mover |& logger Dec 7 18:54:01 Tuerke crond[1303]: failed parsing crontab for user root: /usr/local/sbin/mover |& logger Dec 7 19:54:01 Tuerke crond[1303]: failed parsing crontab for user root: /usr/local/sbin/mover |& logger Dec 7 20:54:01 Tuerke crond[1303]: failed parsing crontab for user root: /usr/local/sbin/mover |& logger Dec 7 21:54:01 Tuerke crond[1303]: failed parsing crontab for user root: /usr/local/sbin/mover |& logger Dec 7 22:54:01 Tuerke crond[1303]: failed parsing crontab for user root: /usr/local/sbin/mover |& logger Dec 7 23:54:01 Tuerke crond[1303]: failed parsing crontab for user root: /usr/local/sbin/mover |& logger Dec 8 00:39:03 Tuerke auto_s3_sleep: ----------- auto_s3_sleep version 1.1 --------------------- Dec 8 00:39:03 Tuerke auto_s3_sleep: All conditions for powerdown are met: Dec 8 00:39:03 Tuerke auto_s3_sleep: Power down instead of sleep: yes Dec 8 00:39:03 Tuerke auto_s3_sleep: Check HDD activity: 0 Dec 8 00:39:03 Tuerke auto_s3_sleep: Check TCP activity: 13 Dec 8 00:39:03 Tuerke auto_s3_sleep: Check SSH connections: 0 Dec 8 00:39:03 Tuerke auto_s3_sleep: Check TELNET connections: 0 Dec 8 00:39:03 Tuerke auto_s3_sleep: Check for online clients: nobody online Dec 8 00:39:03 Tuerke auto_s3_sleep: Check local logins: 0 Dec 8 00:39:03 Tuerke auto_s3_sleep: Check for lock file (tmp/nos3sleep.lock): 0 Dec 8 00:39:03 Tuerke auto_s3_sleep: No powerdown during hours: 18 19 20 21 22 23 Dec 8 00:39:03 Tuerke auto_s3_sleep: ---------------- powering down now ------------------------- Dec 8 00:39:03 Tuerke atd[14470]: Exec failed for mail command: No such file or directory Dec 8 00:54:01 Tuerke crond[1303]: failed parsing crontab for user root: /usr/local/sbin/mover |& logger Dec 8 01:54:01 Tuerke crond[1303]: failed parsing crontab for user root: /usr/local/sbin/mover |& logger Dec 8 02:54:01 Tuerke crond[1303]: failed parsing crontab for user root: /usr/local/sbin/mover |& logger Dec 8 03:54:01 Tuerke crond[1303]: failed parsing crontab for user root: /usr/local/sbin/mover |& logger Dec 8 04:54:01 Tuerke crond[1303]: failed parsing crontab for user root: /usr/local/sbin/mover |& logger Dec 8 05:54:01 Tuerke crond[1303]: failed parsing crontab for user root: /usr/local/sbin/mover |& logger I don't have many plugins running. It's cachedirs, snap, unMENU, myMain, Control Panel. By the way, who/what is causing this line: Dec 8 05:54:01 Tuerke crond[1303]: failed parsing crontab for user root: /usr/local/sbin/mover |& logger Mover? Why? What is it trying to do?
December 8, 201411 yr Author This morning I checked my server's status and he did not shut down last night. Here's the log. Dec 7 09:39:00 Tuerke auto_s3_sleep: ----------- auto_s3_sleep version 1.1 --------------------- Dec 7 09:39:00 Tuerke auto_s3_sleep: Configuration settings: Dec 7 09:39:00 Tuerke auto_s3_sleep: Power down instead of sleep: yes Dec 7 09:39:00 Tuerke auto_s3_sleep: Check HDD activity: yes Dec 7 09:39:00 Tuerke auto_s3_sleep: Check TCP activity: yes Dec 7 09:39:00 Tuerke auto_s3_sleep: Check SSH connections: no Dec 7 09:39:00 Tuerke auto_s3_sleep: Check TELNET connections: yes Dec 7 09:39:00 Tuerke auto_s3_sleep: Check for online clients: 192.168.178.150 192.168.178.153 Dec 7 09:39:00 Tuerke auto_s3_sleep: Check local logins: yes Dec 7 09:39:00 Tuerke auto_s3_sleep: Check for lock file (tmp/nos3sleep.lock): yes Dec 7 09:39:00 Tuerke auto_s3_sleep: No sleep/powerdown during hours: 18 19 20 21 22 23 Dec 7 09:39:00 Tuerke auto_s3_sleep: Save SMART values before powerdown: no Dec 7 09:39:00 Tuerke auto_s3_sleep: Log message destination: debug logging disabled Dec 7 09:39:00 Tuerke auto_s3_sleep: --- After wake up from sleep: ---- Dec 7 09:39:00 Tuerke auto_s3_sleep: Renew DHCP: no Dec 7 09:39:00 Tuerke auto_s3_sleep: Force GB LAN: yes Dec 7 09:39:00 Tuerke auto_s3_sleep: ------------------------------------------------------------ Dec 7 09:54:01 Tuerke crond[1303]: failed parsing crontab for user root: /usr/local/sbin/mover |& logger Dec 7 09:54:31 Tuerke cache_dirs: killing cache_dirs process 3329 Dec 7 10:03:51 Tuerke emhttp: shcmd (62): /usr/sbin/hdparm -y /dev/sdm &> /dev/null Dec 7 10:14:12 Tuerke kernel: mdcmd (65): spindown 1 Dec 7 10:14:12 Tuerke kernel: mdcmd (66): spindown 7 Dec 7 10:54:01 Tuerke crond[1303]: failed parsing crontab for user root: /usr/local/sbin/mover |& logger Dec 7 11:54:01 Tuerke crond[1303]: failed parsing crontab for user root: /usr/local/sbin/mover |& logger Dec 7 12:54:01 Tuerke crond[1303]: failed parsing crontab for user root: /usr/local/sbin/mover |& logger Dec 7 13:54:01 Tuerke crond[1303]: failed parsing crontab for user root: /usr/local/sbin/mover |& logger Dec 7 14:54:01 Tuerke crond[1303]: failed parsing crontab for user root: /usr/local/sbin/mover |& logger Dec 7 15:54:01 Tuerke crond[1303]: failed parsing crontab for user root: /usr/local/sbin/mover |& logger Dec 7 16:54:01 Tuerke crond[1303]: failed parsing crontab for user root: /usr/local/sbin/mover |& logger Dec 7 17:54:01 Tuerke crond[1303]: failed parsing crontab for user root: /usr/local/sbin/mover |& logger Dec 7 18:54:01 Tuerke crond[1303]: failed parsing crontab for user root: /usr/local/sbin/mover |& logger Dec 7 19:54:01 Tuerke crond[1303]: failed parsing crontab for user root: /usr/local/sbin/mover |& logger Dec 7 20:54:01 Tuerke crond[1303]: failed parsing crontab for user root: /usr/local/sbin/mover |& logger Dec 7 21:54:01 Tuerke crond[1303]: failed parsing crontab for user root: /usr/local/sbin/mover |& logger Dec 7 22:54:01 Tuerke crond[1303]: failed parsing crontab for user root: /usr/local/sbin/mover |& logger Dec 7 23:54:01 Tuerke crond[1303]: failed parsing crontab for user root: /usr/local/sbin/mover |& logger Dec 8 00:39:03 Tuerke auto_s3_sleep: ----------- auto_s3_sleep version 1.1 --------------------- Dec 8 00:39:03 Tuerke auto_s3_sleep: All conditions for powerdown are met: Dec 8 00:39:03 Tuerke auto_s3_sleep: Power down instead of sleep: yes Dec 8 00:39:03 Tuerke auto_s3_sleep: Check HDD activity: 0 Dec 8 00:39:03 Tuerke auto_s3_sleep: Check TCP activity: 13 Dec 8 00:39:03 Tuerke auto_s3_sleep: Check SSH connections: 0 Dec 8 00:39:03 Tuerke auto_s3_sleep: Check TELNET connections: 0 Dec 8 00:39:03 Tuerke auto_s3_sleep: Check for online clients: nobody online Dec 8 00:39:03 Tuerke auto_s3_sleep: Check local logins: 0 Dec 8 00:39:03 Tuerke auto_s3_sleep: Check for lock file (tmp/nos3sleep.lock): 0 Dec 8 00:39:03 Tuerke auto_s3_sleep: No powerdown during hours: 18 19 20 21 22 23 Dec 8 00:39:03 Tuerke auto_s3_sleep: ---------------- powering down now ------------------------- Dec 8 00:39:03 Tuerke atd[14470]: Exec failed for mail command: No such file or directory Dec 8 00:54:01 Tuerke crond[1303]: failed parsing crontab for user root: /usr/local/sbin/mover |& logger Dec 8 01:54:01 Tuerke crond[1303]: failed parsing crontab for user root: /usr/local/sbin/mover |& logger Dec 8 02:54:01 Tuerke crond[1303]: failed parsing crontab for user root: /usr/local/sbin/mover |& logger Dec 8 03:54:01 Tuerke crond[1303]: failed parsing crontab for user root: /usr/local/sbin/mover |& logger Dec 8 04:54:01 Tuerke crond[1303]: failed parsing crontab for user root: /usr/local/sbin/mover |& logger Dec 8 05:54:01 Tuerke crond[1303]: failed parsing crontab for user root: /usr/local/sbin/mover |& logger I don't have many plugins running. It's cachedirs, snap, unMENU, myMain, Control Panel. By the way, who/what is causing this line: Dec 8 05:54:01 Tuerke crond[1303]: failed parsing crontab for user root: /usr/local/sbin/mover |& logger Mover? Why? What is it trying to do? The Powerdown plugin is not doing this. You have something doing a sleep/powerdown.
December 9, 201411 yr Yes, I have a script that is checking some conditions and then calls ---------------- powering down now -------------------------"| logger -t$P [ -x /sbin/powerdown ] && /sbin/powerdown [ -x /usr/local/sbin/powerdown ] && /usr/local/sbin/powerdown break; Either the above command is not found in the 2.13 or there is an error stopping the execution. Dec 8 00:39:03 Tuerke auto_s3_sleep: ---------------- powering down now ------------------------- Dec 8 00:39:03 Tuerke atd[14470]: Exec failed for mail command: No such file or directory
December 9, 201411 yr Author Yes, I have a script that is checking some conditions and then calls ---------------- powering down now -------------------------"| logger -t$P [ -x /sbin/powerdown ] && /sbin/powerdown [ -x /usr/local/sbin/powerdown ] && /usr/local/sbin/powerdown break; Either the above command is not found in the 2.13 or there is an error stopping the execution. Dec 8 00:39:03 Tuerke auto_s3_sleep: ---------------- powering down now ------------------------- Dec 8 00:39:03 Tuerke atd[14470]: Exec failed for mail command: No such file or directory Something is not adding up. When the powerdown plugin is installed and you run the powerdown script you should see the following in the syslog: Nov 30 19:14:09 Tower rc.unRAID[14764][14765]: Powerdown V2.13 I didn't see this in your log. You have to specifically install the powerdown plugin to get the powerdown 2.13 features. The stock powerdown script that is replaced with additional features when the powerdown plugin is installed. I'm not sure why you are running the two powerdown scripts. The /sbin/powerdown and the /usr/local/sbin/powerdown should both be the same. Executing both of them is not a good idea. Post your full syslog so I can see more details if you need more help.
December 9, 201411 yr I'm not sure why you are running the two powerdown scripts. The /sbin/powerdown and the /usr/local/sbin/powerdown should both be the same. Executing both of them is not a good idea. This was taken from a former version of auto_s3_sleep. I don't know why it is called twice. Perhaps for the case that one is not existing? I'm no expert. As for the installation. Initially I had the powerdown script installed with unMENU. As there is no update routine for a standalone powerdown script, I redirected the automatic install on startup in the powerdown.conf to the new package from your repository (2.13) that I saved on the stick also. I will check to see if the powerdown script is working from command line.
December 9, 201411 yr Found the issue with 2.13 Somehow the downloaded files from github were corrupted. Downloaded once again and now it's working. When calling powerdown -? from console I get this: Dec 9 21:31:29 Tuerke powerdown[14169]: Powerdown initiated Dec 9 21:31:29 Tuerke powerdown[14172]: Powerdown V2.13 Dec 9 21:31:29 Tuerke rc.unRAID[14173][14174]: Processing /etc/rc.d/rc.unRAID.d/ kill services scripts. Dec 9 21:31:29 Tuerke rc.unRAID[14178][14179]: Processing /etc/rc.d/rc.unRAID.d/ kill scripts. Dec 9 21:31:29 Tuerke powerdown[14183]: Initiating Shutdown with '-?' Seems OK. Are the scripts executed even with powerdown -? like the log states? I also commented this line in the autos_s3_sleep script so that powerdown will be called only once. [ -x /usr/local/sbin/powerdown ] && /usr/local/sbin/powerdown I'm going to monitor how shutdowns will performed now.
December 16, 201411 yr Hi! I am running 6b10a and I run a single VM with win8.1 as it´s OS. I have created the VM using kvm. I also use vmmgr (a a PHP libvirt-based Web interface for managing virtual machines created by dmacias) but I automated my Unraid and VM start to enable autostart. My start sequence is: push unraid power button > array starts > array automounts shares > VM autostart. Nothing else is running in my lan. How can I automate that when I close my VM also unraid unmounts my shares and Unraid safely shutsdown? Any help is appreciated! Rgds.
December 16, 201411 yr Author Hi! I am running 6b10a and I run a single VM with win8.1 as it´s OS. I have created the VM using kvm. I also use vmmgr (a a PHP libvirt-based Web interface for managing virtual machines created by dmacias) but I automated my Unraid and VM start to enable autostart. My start sequence is: push unraid power button > array starts > array automounts shares > VM autostart. Nothing else is running in my lan. How can I automate that when I close my VM also unraid unmounts my shares and Unraid safely shutsdown? Any help is appreciated! Rgds. Read the OP about K and S scripts and see if that won't accomplish what you want.
December 17, 201411 yr Hi! I am running 6b10a and I run a single VM with win8.1 as it´s OS. I have created the VM using kvm. I also use vmmgr (a a PHP libvirt-based Web interface for managing virtual machines created by dmacias) but I automated my Unraid and VM start to enable autostart. My start sequence is: push unraid power button > array starts > array automounts shares > VM autostart. Nothing else is running in my lan. How can I automate that when I close my VM also unraid unmounts my shares and Unraid safely shutsdown? Any help is appreciated! Rgds. Just thought of this on the fly (not tested, aka AT YOUR OWN RISK!) but you could try these commands at the unRAID console / SSH session to setup a hook script to shutdown the host when a VM is stopped: mkdir -p /etc/libvirt/hooks/ echo -e '#!/bin/bash \n[ "$2" = "stopped" ] && /usr/local/sbin/powerdown' > /etc/libvirt/hooks/qemu chmod +x /etc/libvirt/hooks/qemu From there you can start your VM (if it's not already running) and then just shutdown windows. After windows completes its shutdown then the array should stop and the host machine should power off automatically. If you ever needed to remove the hook script you could just run this from the unRAID console or SSH, before you shutdown windows VM of course: rm /etc/libvirt/hooks/qemu Also, if you need to manage the array (e.g. stop the array) you'll probably need to remove the script before doing so because stopping the array will normally stop libvirt (which would shutdown your VM and host machine).
December 17, 201411 yr Hi dlandon/eschultz, Eschultz, if I follow your steps -but I run a second vm- when I close one of them Unraid will be closed (even is my other vm is still running), right? I am guessing this, since I cannot analyze your script due to my limited linux knowledge. K/S scripts are an excellent option but I will need some time to learn how to wirte a script. I have not much time now for that. Have anyone tried them with kvm? I think the best option for me now would be the basic powerdown script that -when power button is pressed- triggers the following commands: STOP the array + POWERDOWN the array. In this way I can use it only when I am sure all my VM´s have been previously closed. It will then close Unraid (so I can run a headless setup). I will try it. Thx for support. Rgds.
December 18, 201411 yr Hi dlandon/eschultz, Eschultz, if I follow your steps -but I run a second vm- when I close one of them Unraid will be closed (even is my other vm is still running), right? I am guessing this, since I cannot analyze your script due to my limited linux knowledge. K/S scripts are an excellent option but I will need some time to learn how to wirte a script. I have not much time now for that. Have anyone tried them with kvm? I think the best option for me now would be the basic powerdown script that -when power button is pressed- triggers the following commands: STOP the array + POWERDOWN the array. In this way I can use it only when I am sure all my VM´s have been previously closed. It will then close Unraid (so I can run a headless setup). I will try it. Thx for support. Rgds. If you're running multiple VMs but you only want to shutdown the whole system when your main windows VM is shutdown then here's the tweaked script from my prior post: mkdir -p /etc/libvirt/hooks/ echo -e '#!/bin/bash \n[ "$1" = "win81vm" ] && [ "$2" = "stopped" ] && /usr/local/sbin/powerdown' > /etc/libvirt/hooks/qemu chmod +x /etc/libvirt/hooks/qemu Just replace the win81vm string above with the actual name of your windows vm from vm manager. So what does this script do? Well, when libvirt starts or stops a VM it'll look to see if the file /etc/libvirt/hooks/qemu exists, and if so, will execute it with some parameters: /etc/libvirt/hooks/qemu <guest_name> <operation> My script just checks if the guest_name is win81vm and the operation is stopped then run the special powerdown command for unraid. You can read about these hooks in detail from here: https://www.libvirt.org/hooks.html
December 18, 201411 yr Excellent eschulz! I will definitely have a look at this when I have some time. The for help.
January 2, 201511 yr Every time my server shuts down from the script I have, I get an email from the PowerDown script telling me that it powered down. How do I disable these emails? I'm aware of the version. This is the output from the email: DONE Powerdown initiated Powerdown V2.06
January 3, 201511 yr Author Powerdown doesn't send emails. It's an event email sent by another process.
January 3, 201511 yr Powerdown doesn't send emails. It's an event email sent by another process. How do I track down which process is sending the email? I think I remember it starting around the time I installed the APC plugin, but I can't find anything there that would do this either.
March 10, 201511 yr So I've installed this plugin on v6b14. Am I right in thinking it should cleanly stop running plugins & docker containers? I have only 2 docker containers, LMS and Plex, as well as the Snap plugin, but on rebooting the server, a parity check is automatically started, as if the array hasn't been shutdown cleanly. I am running "powerdown" from the command line FWIW. Thanks for any help.
March 10, 201511 yr Author So I've installed this plugin on v6b14. Am I right in thinking it should cleanly stop running plugins & docker containers? I have only 2 docker containers, LMS and Plex, as well as the Snap plugin, but on rebooting the server, a parity check is automatically started, as if the array hasn't been shutdown cleanly. I am running "powerdown" from the command line FWIW. Thanks for any help. Post a syslog from your unclean shutdown. The logs are on the flash at /logs.
March 10, 201511 yr Here's the log from yesterday. Coincidently, last night I turned the server off with the physical power button, and today it booted without requiring a parity check. Thanks for looking in to it syslog-20150309-210108.txt
March 10, 201511 yr Author Here's the log from yesterday. Coincidently, last night I turned the server off with the physical power button, and today it booted without requiring a parity check. Thanks for looking in to it This log shows a clean shutdown.
Archived
This topic is now archived and is closed to further replies.