p.freebsd.org (Postfix) with ESMTPSA id 4VShXJ010vzYK5 for ; Mon, 29 Apr 2024 11:52:31 +0000 (UTC) (envelope-from olce@freebsd.org) From: Olivier Certner To: freebsd-fs@freebsd.org Subject: Re: How to create overlay file system on FreeBSD? Date: Mon, 29 Apr 2024 20:52:21 +0900 Message-ID: <1987710.vslOlgHxSZ@francois> Organization: FreeBSD In-Reply-To: References: <823a4c68-37ad-4fd9-9a54-f49f25f3b50c@callfortesting.org> List-Id: Filesystems List-Archive: https://lists.freebsd.org/archives/freebsd-fs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-fs@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart5980539.Zv9zXsTiuT"; micalg="pgp-sha384"; protocol="application/pgp-signature" --nextPart5980539.Zv9zXsTiuT Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii"; protected-headers="v1" From: Olivier Certner To: freebsd-fs@freebsd.org Subject: Re: How to create overlay file system on FreeBSD? Date: Mon, 29 Apr 2024 20:52:21 +0900 Message-ID: <1987710.vslOlgHxSZ@francois> Organization: FreeBSD MIME-Version: 1.0 Hello, What you describe is exactly the point of unionfs(5). I'll suggest that you have a look at mount_unionfs(8). Note however that, with the current implementation, it is not directly possible to have a separate mount point for the union itself: It will either shadow the lower layer (default behavior) or the upper layer (with mount option 'below'). You can workaround that using a nullfs(5) mount before mounting the union. The main caveat is that unionfs(5) is notoriously hard to implement right, is very much dependent on lots of VFS internals and was almost unmaintained for a very long time. In the past few years, there has been some significant effort to at least stabilize it (avoid crashes, deadlocks and other locking problems, etc.), so you may want to give it a shot and see if that is enough for your use case. I've been contracted by the FreeBSD Foundation to work, among others, on a full revamp of unionfs, aimed at stability, consistency and well-defined behavior in contorted cases, so at least the situation is bound to change, although it is not going to happen overnight but will rather take a year or more after the kick-off. Thanks and regards. -- Olivier Certner --nextPart5980539.Zv9zXsTiuT Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQIzBAABCQAdFiEEmNCxHjkosai0LYIujKEwQJceJicFAmYvifUACgkQjKEwQJce Jie9Bg//Zq/3vVUP0E2AHumZstsma5+uLHubkGb104GkmTQdnJQ8/MhhOz4ozdgI KSfXKWdwrPAw4EgpBwpal7ywpxRpa/MDR3mQs2X1ZpA+7Ditz2Qmc3ssFCvGQ0Ev ChC8/09MXUkxtKzD4nV4XjCom/bKnSE5VyQtyj6ik/9iqT3+bU2BKmomuBvibk0B JTSh4FzfW0OLK8zlYAmzgd00I+byLKu7YL3sB33YWefOCGXuxWDD/q6c70t4xooz 2YAyQU4njhSsbvMBPiU1FIi/GfhPG0CDNC3XI/HoJfkafI6i2q9c6pRmfSxMwm0r q+ZC4/g1L8jDz1i8UNmQ823x2pZCxhTh73HeYgLmRuV2VOdntm/UU7sDKzVPylQ0 FQb1uwmJXGqQKG8mwFZxGL37IUh7BCeaiI96tp/dKENcdemmxXIUMGIb48bkgkll +ZnV/8L+Vj7fzbfSSExGhKC+8XOpG16Deow+YwLC0EJ6X6MYtOQqFjIZE0XA1pyF WYH0G+dupbN077p3f9L2fgG6bX6kb0g7cd0/oMbcY3vKtQjV1BtGHe4KUkWaEXuZ HAayq/d6m/rnGN1sSYikpQrsioqcCLWkRNmVyURgmDH1ADnXobPH2OTzRstgpxSq nt6QqtvSCK6Dwjfqv46fpqTYDxBeg3lehIRV3Yo4QP3aXxE+l+s= =rezP -----END PGP SIGNATURE----- --nextPart5980539.Zv9zXsTiuT--