I have a few jails running on a 11.0-RELEASE box. I have made several ZFS datasets available to them, and can mount/access them fine from within the jails.
However, when the jails start up, none of the datasets are mounted by default. I have to manually mount them with:
I have
which should (?) automatically mount the datasets at startup. Any ideas why it isn't?
Inside my jails, I get
which tells me at some point in the jail's "boot" process,
Relevant info:
/etc/sysctl.conf:
/etc/jail.conf:
However, when the jails start up, none of the datasets are mounted by default. I have to manually mount them with:
zfs mount -a
I have
zfs_enable="YES"
at the top of each jail's/etc/rc.conf. I looked in /etc/rc.d/zfs, which shows:
Code:
...
start_cmd="zfs_start"
...
zfs_start()
{
if [ `$SYSCTL_N security.jail.jailed` -eq 1 ]; then
zfs_start_jail
...
}
...
zfs_start_jail()
{
if [ `$SYSCTL_N security.jail.mount_allowed` -eq 1 ]; then
zfs mount -a
fi
}
which should (?) automatically mount the datasets at startup. Any ideas why it isn't?
Inside my jails, I get
#sysctl -n security.jail.jailed
1
#sysctl -n security.jail.mount_allowed
1
which tells me at some point in the jail's "boot" process,
zfs mount -a
should be run, but it doesn't seem like that's happening. When I run it manually post boot it works fine, which leads me to believe it's an issue with my startup procedure.Relevant info:
zfs get jailed,canmount DatasetName
NAME PROPERTY VALUE SOURCE
DatasetName jailed on local
DatasetName canmount on local
/etc/sysctl.conf:
security.jail.enforce_statfs=1
security.jail.mount_allowed=1
security.jail.mount_zfs_allowed=1
/etc/jail.conf:
...
exec.start = "/bin/sh /etc/rc"
mount.devfs
allow.mount=true
allow.mount.zfs=true
enforce_statfs=1
exec.poststart="/sbin/zfs jail JailName DatasetName..."
...