# ZFS zone: new feature or major bug?



## Beeblebrox (Mar 27, 2012)

zfs(1M)() has entries at several sections regarding Zone:


> zoned=on | off
> Controls whether the dataset is managed from a non-global zone. See the "Zones" section for more information. The default value is off.
> 
> Zones (almost 1 page section)
> For more information about zonecfg syntax, see zonecfg(1M)


zonecfg(1M)() also appears as link at the end on the man pages website.

Two issues about this:
1. It looks like maybe ZFS -v >28 is about to be launched and the man page got ahead of its self, or the web based man page is off its rocker.
2. Pretty sure that Jailed NFS (nfsd) hosted on ZFS fails to start because of non-global zone settings that need to be changed with
`# zfs set zoned=on tank0/jailfolder`


----------



## jem (Mar 27, 2012)

The references to zones are just because the zfs man page was imported from Solaris without any modification.


----------



## Beeblebrox (Mar 27, 2012)

I suspected as such and that's somewhat easily corrected - while this is not:


> 2. Pretty sure that Jailed NFS (nfsd) hosted on ZFS fails to start because of non-global zone settings


----------



## _martin (Mar 27, 2012)

Indeed, man pages were just 'copied'. ATTRIBUTES section in man page gives you more hints to this - this man page is in SUNWzfsu package, which is a solaris one.

But who knows, guys are importing more and more goods from Illumos, so maybe someday ..


----------



## Sylhouette (Mar 27, 2012)

> But who knows, guys are importing more and more goods from Illumos, so maybe someday ..



It has already been done. 
FreeBSD 9.0 STABLE has a new man page, which is more FreeBSD centric.
Here is the commit log.

http://freshbsd.org/commit/freebsd/r229576

regards
Johan


----------



## Beeblebrox (Mar 27, 2012)

So, what is to be done about this, then?

```
# zfs set sharenfs=on root/jail/pxe
cannot set property for 'root/jail/pxe': 'sharenfs' cannot be set on dataset in a non-global zone
```
Does jail need to be a separate zpool? Or is a new zpool named "pxe" required under root/jails/pxe?


----------



## Sylhouette (Mar 27, 2012)

Does the following work, replace 192.168.0.0/24 with your own network of course.


```
zfs set sharenfs="maproot=root,network 192.168.0.0/24" root/jail/pxe
```

regards
Johan


----------



## jem (Mar 27, 2012)

Beeblebrox said:
			
		

> So, what is to be done about this, then?
> 
> ```
> # zfs set sharenfs=on root/jail/pxe
> ...



I'd have to ask why ZFS thinks that dataset is in a non-global zone, when zones don't exist on FreeBSD.

If there are any zone-related properties set on that dataset, try setting them back to default by having the dataset inherit the property from its parent.


----------



## Beeblebrox (Mar 28, 2012)

> If there are any zone-related properties set on that dataset


No settings - that's why I raised the question, since the only way to set zone for ZFS is through zoned/zonecfg.


----------

