Hello everyone
I recently set up Nextcloud in a jail using apache24, mariadb101 and php70 on FreeBSD 10.3.
After rebooting my server the jail will not come up correctly. It won't mount datasets and all the packages I installed and their configuration seems gone.
I used the following scripts to automount datasets when the jail starts:
http://vedad.kajtaz.net/perso/ezjail/rc.boot.zfs
http://vedad.kajtaz.net/perso/ezjail/rc.mount.zfs
http://vedad.kajtaz.net/perso/ezjail/rc.shutdown.zfs
Here's my /etc/jail.conf:
The poststart and poststop scripts will
Stopping the jail takes forever. If I restart it and execute
as many times as I restarted the jail. Same thing inside the jail. The data itself (Nextcloud data and database) still lives in the corresponding datasets.
Any suggestions are welcome.
Best Regards
Philipp
I recently set up Nextcloud in a jail using apache24, mariadb101 and php70 on FreeBSD 10.3.
After rebooting my server the jail will not come up correctly. It won't mount datasets and all the packages I installed and their configuration seems gone.
pkg info
only returns pkg.I used the following scripts to automount datasets when the jail starts:
http://vedad.kajtaz.net/perso/ezjail/rc.boot.zfs
http://vedad.kajtaz.net/perso/ezjail/rc.mount.zfs
http://vedad.kajtaz.net/perso/ezjail/rc.shutdown.zfs
Here's my /etc/jail.conf:
Code:
# /etc/jail.conf
exec.start = "/bin/sh /etc/rc";
exec.stop = "/bin/sh /etc/rc.shutdown";
exec.clean;
host.hostname = "$name";
mount.devfs;
path = "/zroot/jails/$name";
nextcloud {
persist = true;
exec.poststart = "/bin/sh /usr/local/bin/jail_scripts/nextcloud/jail_datasets.sh";
exec.start = "/bin/sh /usr/local/etc/jails/rc.boot.zfs zroot/jails/nextcloud/zroot zroot/jails/nextcloud/db tank/nextcloud/data";
exec.stop = "/bin/sh /usr/local/etc/jails/rc.shutdown.zfs";
exec.poststop = "/bin/sh /usr/local/bin/jail_scripts/nextcloud/unjail_datasets.sh";
allow.mount = true;
allow.mount.zfs = true;
enforce_statfs = 1;
interface = "ixl0.50";
ip4.addr = "192.168.50.41";
}
The poststart and poststop scripts will
/sbin/zfs jail nextcloud <dataset>
or unjail them respectively.Stopping the jail takes forever. If I restart it and execute
mount
on the host, I see the line
Code:
devfs on /zroot/jails/nextcloud/dev (devfs, local, multilabel)
as many times as I restarted the jail. Same thing inside the jail. The data itself (Nextcloud data and database) still lives in the corresponding datasets.
Any suggestions are welcome.
Best Regards
Philipp