Date: Fri, 15 Jan 2021 20:53:06 +0100 From: Miroslav Lachman <000.fbsd@quip.cz> To: freebsd-jail@freebsd.org, Julien Cigar <julien@perdition.city> Subject: Re: dedicated dataset for jail data Message-ID: <b538ca08-1604-e5b0-43ed-7d8c943de2dd@quip.cz> In-Reply-To: <20210115151759.knt226zijxh453xf@x1> References: <20210115151759.knt226zijxh453xf@x1>
next in thread | previous in thread | raw e-mail | index | archive | help
On 15/01/2021 16:17, Julien Cigar wrote: > Hello, > > I have a host with a lot of jails, which are deployed automatically with > Saltstack (thanks to https://github.com/silenius/jails-formula). I > usually create two datasets per jail: one for the jail itselfs, and one > for the "data". The idea is to be able to easily upgrade the jail > without touching the "data". So I have something like (1). > > I have one fstab per jail which mount the corresponding "data" dataset > under the jail, something like: > > ~/ cat /etc/fstab.nextcloud > /data/jails/nextcloud /jails/nextcloud/data nullfs rw 0 0 > > I'd like to know if there is a better way of handling this, without > involving nullfs if possible and how do people usually manage that..? > > (1) https://gist.github.com/silenius/f1899ebb5cf58ca33b3e5edafc85d549 I am using nullfs to mount shared basejail in to each jail. I prefere to have filesystems for jails mounted all the time so I can manage (backup, configure, update) files even if jail is not running. No fstab is needed for this scenario. But if you want to mount / unmount jail's datasets when jail start / stop you can set these ZFS filesystems as "legacy" (no automatic mount at boot) and then mount them with /etc/fstab.jailname as you use nullfs now. Miroslav Lachman
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b538ca08-1604-e5b0-43ed-7d8c943de2dd>