Re: ZFS in a jail

From: Gelsema, P \(Patrick\) <"Gelsema,>
Date: Mon, 3 Dec 2007 15:55:30 +0100 (CET)
On Mon, December 3, 2007 14:20, Andrew Kolchoogin wrote:
> On Mon, December 3, 2007 14:02, Andrew Kolchoogin wrote:
>> >> > Did you add the zfs device to be available for your jails in
>> >> > devfs.rules? In the ruleset applying for the jails you need to add:
>> >> >
>> >> > add path zfs unhide
>> >>
>> >> hulk is the host, batman is the jail.
>> >>
>> >> hulk# cat /etc/rc.conf | grep devfs
>> >> jail_batman_devfs_enable="YES"
>> >> devfs_system_ruleset="zfsenable"
>> > jail_batman_devfs_ruleset="zfsenable"
>>
>> They are 2 seperate lines. Any idea on how to get zfs in the jail? I
>> have
>> been told I had to add the devfs rules for zfs.
>     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 :)
> --
>     Andrew.
>

Hi Andrew,

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?

hulk# zfs get all
NAME              PROPERTY       VALUE                  SOURCE
zfspublic         type           filesystem             -
zfspublic         creation       Mon Dec  3 15:13 2007  -
zfspublic         used           1.69G                  -
zfspublic         available      911G                   -
zfspublic         referenced     24.0K                  -
zfspublic         compressratio  1.00x                  -
zfspublic         mounted        yes                    -
zfspublic         quota          none                   default
zfspublic         reservation    none                   default
zfspublic         recordsize     128K                   default
zfspublic         mountpoint     /zfspublic             default
zfspublic         sharenfs       off                    default
zfspublic         checksum       on                     default
zfspublic         compression    off                    default
zfspublic         atime          on                     default
zfspublic         devices        on                     default
zfspublic         exec           on                     default
zfspublic         setuid         on                     default
zfspublic         readonly       off                    default
zfspublic         jailed         off                    default
zfspublic         snapdir        hidden                 default
zfspublic         aclmode        groupmask              default
zfspublic         aclinherit     secure                 default
zfspublic         canmount       on                     default
zfspublic         shareiscsi     off                    default
zfspublic         xattr          off                    temporary
zfspublic         copies         1                      default
zfspublic/batman  type           filesystem             -
zfspublic/batman  creation       Mon Dec  3 15:14 2007  -
zfspublic/batman  used           1.69G                  -
zfspublic/batman  available      911G                   -
zfspublic/batman  referenced     1.69G                  -
zfspublic/batman  compressratio  1.00x                  -
zfspublic/batman  mounted        yes                    -
zfspublic/batman  quota          none                   default
zfspublic/batman  reservation    none                   default
zfspublic/batman  recordsize     128K                   default
zfspublic/batman  mountpoint     /s/public              local
zfspublic/batman  sharenfs       off                    default
zfspublic/batman  checksum       on                     default
zfspublic/batman  compression    off                    default
zfspublic/batman  atime          on                     default
zfspublic/batman  devices        on                     default
zfspublic/batman  exec           on                     default
zfspublic/batman  setuid         on                     default
zfspublic/batman  readonly       off                    default
zfspublic/batman  jailed         on                     local
zfspublic/batman  snapdir        hidden                 default
zfspublic/batman  aclmode        groupmask              default
zfspublic/batman  aclinherit     secure                 default
zfspublic/batman  canmount       on                     default
zfspublic/batman  shareiscsi     off                    default
zfspublic/batman  xattr          off                    temporary
zfspublic/batman  copies         1                      default


>
>
Received on Mon Dec 03 2007 - 13:55:49 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:23 UTC