jail and dedicated zfs dataset
CyberLeo Kitsana
cyberleo at cyberleo.net
Wed Feb 5 12:02:46 UTC 2020
On 2/4/20 3:44 PM, Jacques Foucry wrote:
> Hi folks,
>
> I'm trying to create a jail (for the mail) with a dedicated zfs dataset.
>
> On the host, the dataset in tank/root/mails wiht /var/mail as mountpoint.
> jailed property in on
<snip>
> My /etc/jail.conf¹ definition for the dataset is:
>
> exec.poststart = "/sbin/zfs jail mail tank/root/mails";
> exec.poststart += "zfs mount -a";
> exec.stop = "/sbin/zfs unjail mail tank/root/mails";
> persist=true;
> mount.fstab="/etc/fstab.${name}";
<snip>
> And mounting by hand failed:
> # zfs mount -a
> cannot mount 'tank/root/mails': Insufficient privileges
You will need to set 'allow.mount' and 'allow.mount.zfs' in jail.conf
for the jail in question.
Also, exec.poststart runs in the context of the host, not the jail, so
running zfs mount -a there may not have the effect you expect.
--
Fuzzy love,
-CyberLeo
<CyberLeo at CyberLeo.Net>
Technical Administrator
CyberLeo.Net Webhosting
http://www.CyberLeo.Net
Element9 Communications
http://www.Element9.net
Furry Peace! - http://www.fur.com/peace/
More information about the freebsd-questions
mailing list