frenziedengi
Dabbler
- Joined
- Feb 22, 2013
- Messages
- 14
I have a few jails setup on my FreeNAS 9.1.1 installation.
I am having a problem with the jails when they get stopped: it seems like when the jail get's stopped (via the Stop button in FreeNAS GUI, or via system reboot/shutdown), it's like "the plug is getting pulled" from the server (i.e. none of the processes/services get a chance to shutdown properly).
For example, I have a jail with MySQL installed (via pkg_add). I have added mysql_enable="yes" to /etc/rc.conf and MySQL will startup fine when the jail starts. If I stop the jail, the *pid file does not get deleted (which is what lead me to believe the service is not getting stopped properly), and some of the files that it uses are still "locked" which causes problems the next time that the jail starts up (MySQL fails to start).
So here are my questions:
1. What mechanism is used to stop the jail (how is the jail terminated behind the scenes of pressing stop button, or during a reboot)?
2. How to properly shutdown a jail, including shutting down services that are part of a jail?
My findings so far:
FreeBSD jail documentation: http://www.freebsd.org/cgi/man.cgi?...=FreeBSD+9.1-RELEASE&arch=default&format=html
This indicates that you can use the exec.stop argument to list what scripts to run when the jail is terminated, typically /etc/rc.shutdown. I am guessing that either this script is being run, and it is not effective, or it is not being run at all.
Thank you.
I am having a problem with the jails when they get stopped: it seems like when the jail get's stopped (via the Stop button in FreeNAS GUI, or via system reboot/shutdown), it's like "the plug is getting pulled" from the server (i.e. none of the processes/services get a chance to shutdown properly).
For example, I have a jail with MySQL installed (via pkg_add). I have added mysql_enable="yes" to /etc/rc.conf and MySQL will startup fine when the jail starts. If I stop the jail, the *pid file does not get deleted (which is what lead me to believe the service is not getting stopped properly), and some of the files that it uses are still "locked" which causes problems the next time that the jail starts up (MySQL fails to start).
So here are my questions:
1. What mechanism is used to stop the jail (how is the jail terminated behind the scenes of pressing stop button, or during a reboot)?
2. How to properly shutdown a jail, including shutting down services that are part of a jail?
My findings so far:
FreeBSD jail documentation: http://www.freebsd.org/cgi/man.cgi?...=FreeBSD+9.1-RELEASE&arch=default&format=html
This indicates that you can use the exec.stop argument to list what scripts to run when the jail is terminated, typically /etc/rc.shutdown. I am guessing that either this script is being run, and it is not effective, or it is not being run at all.
Thank you.