ZFS in a jail

Andrew Kolchoogin andrew at rinet.ru
Tue Dec 4 02:22:45 PST 2007


> >     Yes, I've told you what you should to do. First part you have been
> > done already -- you've edited /etc/devfs.rules and added new
> > configuration subsection with instructions to unhide /etc/zfs.
> >     Please do the second part: instruct the /etc/rc.d/jail to apply
> > these rules to DEVFS instance mounted into your jail. Just change
> > 'devfs_system_ruleset' to 'jail_batman_devfs_ruleset' and restart your
> > jail -- /etc/rc.d/jail does NOT pay attention to system-wide DEVFS
> > ruleset variables, it uses per-jail ones.
> >     If you have configured all the things correctly, you MUST
> > see /path/to/root/of/your/jail/dev/zfs :)
> this is working. Thanks.
> 
> THe only problem is that after every reboot I have to rerun the following
> commands to get things working again.
> 
> hulk# zfs jail 4 zfspublic/batman
> batman# zfs mount -a
> 
> If I don't do the jail 4 command the command batman# zfs get all does not
> return anything.
> 
> Seems like the zfs jail 4 command is not remembered.
> The zfs manpage does not tell of where to store these settings.
> 
> Any pointers?
    As far as I can understand, it was done intentionally. No "jailed"
setting is stored in ZFS structures, and personally for me it was easier
to write script that jails ZFS file systems needed for particular jail
during startup time.

    May be pjd@ can comment on this?-)
-- 
    Andrew.




More information about the freebsd-stable mailing list