Date: Thu, 8 Dec 2016 21:42:39 +0100 From: Miroslav Lachman <000.fbsd@quip.cz> To: SK <fbstable@cps-intl.org>, freebsd-jail <freebsd-jail@freebsd.org> Subject: Re: ZFS and Jail :: nullfs mount :: nothing visible from host Message-ID: <5849C5BF.7020005@quip.cz> In-Reply-To: <eed9efad-9bac-9d36-b75e-c41f9ea72a8b@cps-intl.org> References: <aa078173-e9f1-3f09-41d4-6613014b1119@cps-intl.org> <584986D0.3040109@quip.cz> <2b6346f8-ed02-0e6d-bd89-106098e7eb2d@cps-intl.org> <58499446.3050403@quip.cz> <eed9efad-9bac-9d36-b75e-c41f9ea72a8b@cps-intl.org>
next in thread | previous in thread | raw e-mail | index | archive | help
SK wrote on 2016/12/08 20:13: > Initially they were not visible from within the jail, but as I ran > zfs jail testJail gT/JailS/testJail > they were visible from inside. You can add zfs jail testJail gT/JailS/testJail to your jail.conf post exec so it will be executed automatically. > HOWEVER, I am unable to do any manipulation whatsoever from within the jail. > root@testJail:/ # zfs list > NAME USED AVAIL REFER MOUNTPOINT > gT 10.3G 199G 9.51G legacy > gT/JailS 832M 199G 20K /JailS > gT/JailS/testJail 546K 199G 827M /JailS/testJail > root@testJail:/ # zfs snapshot gT/JailS/testJail@test > *cannot create snapshots : permission denied* > root@testJail:/ # zfs create gT/JailS/testJail/test > *cannot create 'gT/JailS/testJail/test': permission denied* > root@testJail:/ # exit zfs list is good start. I never used zfs from within jail so I cannot comment on permission denied. I don't know what more must be done. > Even after the jail was able to see the dataset, the following sysctl > was still zero > security.jail.mount_zfs_allowed: 0 I think you don't need this sysctl, you just need to set proper jail options like allow.mount allow.mount.zfs and enforce_statfs (per jail) > I changed it to one, but that didn't seem to have the desired effect > (should have I restarted?) No restart needed. Sysctls are runtime configurable. If you need to preserve some sysctl settings after reboot you must put them in to /etc/sysctl.conf > below are some of the relevant settings. If you require any other > information, I'll try to send them as soon as I can. Send us `sysctl security.jail` from host and from jail too.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5849C5BF.7020005>