Solved Thin jail trying to mount their nullfs only if already mounted, resulting in failure to start.

I have made a new jail config, using separate fstab files like in the new handbook version.

Now the strange thing is, that if I service jail start <myjail>, it fails because it apparently does not mount the nullfs filesystems in the file defined by the jail config entry mount.fstab = "/jails/containers/${name}.fstab";.
But if I manually mount these nullfs by mount -aF myjail.fstab and then try to start the jail, it fails as well, complaining that the mount command failed because already mounted.

Any idea what could cause that strange behavior? What could I have done wrong?


Edit: More precisely, this is what confuses me:
Code:
# mount -aF test2.fstab
# service jail start test2
Starting jails: cannot start jail  "test2":
mount_nullfs: /jails/containers/test2: Resource deadlock avoided
jail: test2: /sbin/mount -t nullfs -o ro /jails/templates_ro/13.2-RELEASE /jails/containers/test2: failed
.
# umount -aF test2.fstab
# service jail start test2
Starting jails: test2jls: jail "test2" not found
.
#

So I'll take a walk and meditate why it is not found...
 
Thank you Emrion! Calling /usr/sbin/jail directly instead of the service wrapper is more elegant. I will do so in my scripts!
The error was that I forgot mount.devfs... *facepalming* ?
 
Back
Top