# help with ZFS quotas, df, and jails



## wonslung (Feb 28, 2010)

Hello, i have an interesting issue....I'm not sure if there is a solution or not.

I have a system using ZFS and I'd like to find a way to make zfs mounted filesystems show up on df inside of a jail....is this possible at all?

For example, let's say i have a jail at /usr/jails/jail-a

and i create a zfs filesystem for a users home dir with a 100g


```
zfs create tank/user1
zfs set quota=100g tank/user1
```

then i mount it on the jail like so:

```
zfs set mountpoint=/usr/jails/jail-a/user/home/user1 tank/user1
```

is there any solution to making such a filesystem show up on df  from inside the jail?  The reason this is important is there are applications which need to find this data, and right now df just shows the jails /



EDIT:

just had a thought...is it possible to mount a ZFS filesystem as a legacy mount using the jails fstab?


----------



## Erratus (Jun 6, 2010)

In man zfs can be read:

*zfs jail* jailid filesystem

           Attaches  the given file system to the given jail. From now on this
           file system tree can be managed from within a jail if the  "jailed"
           property  has  been  set.   To use this functionality, sysctl secu-
           rity.jail.enforce_statfs should  be  set  to  0  and  sysctl  secu-
           rity.jail.mount_allowed should be set to 1.


*zfs unjail* jailid filesystem

           Detaches the given file system from the given jail.

Maybe someone can give a usefull example on this?


----------



## phoenix (Jun 8, 2010)

That property is not supported on FreeBSD at this time.


----------

