# Sharing a dataset with multiple jails



## joholo (Apr 13, 2016)

Hello,

I recently installed FreeBSD on my new server. Right now I have one jail running with transmission on it, seeding different Ubuntu versions. Couldn't get the port working, but the package worked excellent.

So now I want to create two other jails. One with a NFS/Samba share and one which can stream to a Logitech squeezebox. The problem is they need to share the same dataset. While the handbook has documentation about NFS, but apparently it's not possible to mount a NFS share in a jail? https://lists.freebsd.org/pipermail/freebsd-jail/2011-June/001565.html

tl;dr: How can jails share the same dataset for sharing files between them?

ps. I use sysutils/iocage to manage my jails


----------



## SirDice (Apr 13, 2016)

Use nullfs(5) to mount it multiple times on other locations. Can also be added to each jail's /etc/fstab.<jailname>.


----------



## joholo (Apr 13, 2016)

Okay, thanks will take a look at it.


----------



## junovitch@ (May 4, 2016)

joholo said:


> ps. I use sysutils/iocage to manage my jails



It's a bit harder to find because of the UUIDs compared to ezjail in SirDice's mention above but I just copy/paste something like this so I don't have to figure it out.
`echo "/path/to/folder /iocage/jails/`iocage get host_hostuuid <my_tag_here>`/root/path/to/folder nullfs ro 0 0" >> /iocage/jails/`iocage get host_hostuuid <my_tag_here>`/fstab`


----------

