# Jail BastilleBSD : mount a dataset of host ?



## Ernie95 (Mar 25, 2022)

Hi All,
I am testing jail with BastilleBSD. It works fine but I have a specific need : how can I mount a dataset of the host ?

I see the mount option (or fstab) of the jail.

But not too much detail for the possible option.

How to mount a dataset of the host ?

Same also if I want to mount a nfs share : possible via the mount option of the jail ?

I am not expert with mount or fstab file. Thanks for your help


----------



## chrbr (Mar 26, 2022)

You can specify mount options in /etc/fstab.JAILNAME. At lest thisis the case for "manual" jail handling. But as far as I know the modern jail handling tools support that fstab file as well. Please see the example below.

```
cat /etc/fstab.fox
/var/cache/pkg /usr/jails/fox/var/cache/pkg nullfs rw,late 0 0
/usr/home/chris/Downloads /usr/jails/fox/usr/home/chris/Downloads nullfs rw,late 0 0
```
When the jail is started the cache directory for storing the downloaded files from `pkg upgrade` is made available in the jail named fox. By doing so the files can be re-used. Additionally a download directory is shared between the host and the jail. You can use the nullfs option of mount(8) for testing, too.

I hope this is a good starting point. Unfortunately I have no idea about nfs.


----------



## Ernie95 (Apr 2, 2022)

Thanks. I will try.


----------

