jails Boot Script order on FreeBSD

Hi everyone,

I a bit confuse about how ordering script process on startup.

A bit of background :
I used to you jail by the passed on memory drive (mdconfig) which was working really well.
I moved recently and now I have few jail hosting on my server, full using zfs. All zfs mount point is there and jails can start.

I also added few mount point in my fstab that I want to mount in some jail. Example I have the zfs mount : /tank/jail/X and I want to mount nullfs /tank/jail/X/Y in jail 1 and /tank/jail/X/Z in jail 2
These mount worked as well.

Now here is the point :
I used to use jail_enable to YES in rc.conf and jail_list to let my system know which jail I wanted to start (based on the jail.conf file).

1 - On start my jail will start anyway, independently of "jail_list" setting in my rc.conf. It looks like the système is reading the jail.conf without check the jail_list parameter.
2 - The jails start before that the fstab can mount the directory in there. If I stop the jail, process the mount -a everything is good and I can see my mount point ( /tank/jail/X/Y /tank/jail/X/Z). If I start manually my jail again, that work.

So I'm not sure exactly the source of the issue...
Is that due to the boot sequencing starting jail before mounting my config in fstab ?

Thank you




 
On start my jail will start anyway, independently of "jail_list" setting in my rc.conf. It looks like the système is reading the jail.conf without check the jail_list parameter.
It shouldn't. The system only starts jails that are listed in jail_list.

The jails start before that the fstab can mount the directory in there.
Use /etc/fstab.<jailname> so it's mounted/unmounted when the jail starts/stops.
 
Back
Top