Doc Chacha
Dabbler
- Joined
- Sep 18, 2016
- Messages
- 28
Hi all.
I've been wondering quite some days wether I should post thit or not. Having read a bunch of things on the forums, I think I should now ask for help.
Here's my setup:
-I have a VirtualBox jail (the default one), in which I created a Debian64 VM, running a Debian 8.6.0 64 bits distro. (First point -> I remember reading somewhere that 64 bits in virtualbox in FreeNAS were bad. Anyway, I tested it by replacing my 64 bit VM with a 32 bit one, and the problem stays the same)
-In that VM, I run an instance of Goodsync server, which has access to my main datasets via NFS shares (I did not go with the shared folders over a jail storage for various uid/gid problems)
The problem occurs at server shutdown... At this time, I'm stting up UPS at home on my two NAS, and I discovered this problem when FreeNAS shuts down at UPS warning threshold.
When I shutdown the server manualy, or when UPS service shuts it down, I get a system hang. My IPMI remote console is flooded with trap errors and kinds of memory dump... And finaly, it reboots (watchdog must play a part in the reboot). The problem is : it REBOOTS ! It doesn't just shuts down. So if I'm on UPS power, it's a real issue.
If I first shutdown the VM manualy, either using the web GUI or CLI via SSH, and *then* shut the server down, everything goes fine.
Long story short: I read a lot about this. I tried various comands in stop scripts, both in VM, in virtualbox jail... I tried to debug using commands to write things in files...
I finaly came on a post about stopping jails scripts. And digging in stopping scripts and pre stopping scripts, I realised that when stopping a jail, the process is:
1- stop networking
2-stop user mounts
3-launch custom stop script
4-unmount jail filesystem
5-other things
I think my problem occurs because the warden disconnects the jail from the network (and thus, the NFS shares) before it unmounts the NFS folders. I could tweak things there, in the stop scripts, but it's probably not a good idea to tinker with things like that.
I would like to have your point of view: is this behaviour causing my problem ? If so, could it be considered to be a bug ?
If not, what could cause that problem, and why would it work when I stop the VM manualy *before* I shutdown the server ?
(I know I will get some "a server should be up 24/7" answers. And I agree. My concern is to manage a worst case scenario, where I get a power loss long enough to drain my UPS battery, and the servers have to stop. They should have a chance to do it properly...)
Looking forward to read from this awesome community !
I've been wondering quite some days wether I should post thit or not. Having read a bunch of things on the forums, I think I should now ask for help.
Here's my setup:
-I have a VirtualBox jail (the default one), in which I created a Debian64 VM, running a Debian 8.6.0 64 bits distro. (First point -> I remember reading somewhere that 64 bits in virtualbox in FreeNAS were bad. Anyway, I tested it by replacing my 64 bit VM with a 32 bit one, and the problem stays the same)
-In that VM, I run an instance of Goodsync server, which has access to my main datasets via NFS shares (I did not go with the shared folders over a jail storage for various uid/gid problems)
The problem occurs at server shutdown... At this time, I'm stting up UPS at home on my two NAS, and I discovered this problem when FreeNAS shuts down at UPS warning threshold.
When I shutdown the server manualy, or when UPS service shuts it down, I get a system hang. My IPMI remote console is flooded with trap errors and kinds of memory dump... And finaly, it reboots (watchdog must play a part in the reboot). The problem is : it REBOOTS ! It doesn't just shuts down. So if I'm on UPS power, it's a real issue.
If I first shutdown the VM manualy, either using the web GUI or CLI via SSH, and *then* shut the server down, everything goes fine.
Long story short: I read a lot about this. I tried various comands in stop scripts, both in VM, in virtualbox jail... I tried to debug using commands to write things in files...
I finaly came on a post about stopping jails scripts. And digging in stopping scripts and pre stopping scripts, I realised that when stopping a jail, the process is:
1- stop networking
2-stop user mounts
3-launch custom stop script
4-unmount jail filesystem
5-other things
I think my problem occurs because the warden disconnects the jail from the network (and thus, the NFS shares) before it unmounts the NFS folders. I could tweak things there, in the stop scripts, but it's probably not a good idea to tinker with things like that.
I would like to have your point of view: is this behaviour causing my problem ? If so, could it be considered to be a bug ?
If not, what could cause that problem, and why would it work when I stop the VM manualy *before* I shutdown the server ?
(I know I will get some "a server should be up 24/7" answers. And I agree. My concern is to manage a worst case scenario, where I get a power loss long enough to drain my UPS battery, and the servers have to stop. They should have a chance to do it properly...)
Looking forward to read from this awesome community !