Passing a limited amount of disk devices to jails

Konstantin Belousov kostikbel at gmail.com
Fri Jun 9 10:04:34 UTC 2017


On Fri, Jun 09, 2017 at 10:45:32AM +0200, Willem Jan Withagen wrote:
> Hi,
> 
> I'm writting/building a test environment for my ceph cluster, and I'm
> using jails for that....
> 
> Now one of the things I'd be interested in, is to pass a few raw disks
> to each of the jails.
> So jail ceph-1 gets /dev/ada1 and /dev/ada2 (and partitions), ceph-2
> gets /dev/ada2 and /dev/ada3.
> 
> AND I would need gpart to be able to work on them!
> 
> Would this be possible to do with the current jail implementation on
> 12-CURRENT?

Read about devfs(8) and devfs.conf(5), follow further references from there.
In short, devfs allows to specify rules for nodes visibility, and the
rules are applied per-mount.  Since jails use per-jail devfs mount, you
get dedicated namespace for the devfs nodes.


More information about the freebsd-jail mailing list