Date: Fri, 17 Feb 2017 08:37:07 +0000 From: Matthew Seaman <matthew@FreeBSD.org> To: freebsd-questions@freebsd.org Subject: Re: default zfs layout - FreeBSD 11.0 - /var and /usr not mounted ?! Message-ID: <bcc62f59-7ce0-a3db-995c-b6a36093ef8e@FreeBSD.org> In-Reply-To: <11840e40-a706-625d-da03-e2f663342058@monkeybrains.net> References: <11840e40-a706-625d-da03-e2f663342058@monkeybrains.net>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --fE4t69Fb522vCMb6TaGuQ2IIKeSnVQ7kX Content-Type: multipart/mixed; boundary="jvrS1Jn89HO16OPqwjW8cLItDWw7FvWgd"; protected-headers="v1" From: Matthew Seaman <matthew@FreeBSD.org> To: freebsd-questions@freebsd.org Message-ID: <bcc62f59-7ce0-a3db-995c-b6a36093ef8e@FreeBSD.org> Subject: Re: default zfs layout - FreeBSD 11.0 - /var and /usr not mounted ?! References: <11840e40-a706-625d-da03-e2f663342058@monkeybrains.net> In-Reply-To: <11840e40-a706-625d-da03-e2f663342058@monkeybrains.net> --jvrS1Jn89HO16OPqwjW8cLItDWw7FvWgd Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 17/02/2017 07:17, Rudy wrote: >=20 > I installed a new system and did the default ZFS layout and noticed /va= r > and /usr are not mounted by default. Any reason? Seems like files > dropped in /usr (eg, usr/local) end up in the ROOT/default. Maybe I am= > just thinking about ZFS incorrectly... >=20 >> zfs get mounted > NAME PROPERTY VALUE SOURCE > zroot mounted yes - > zroot/ROOT mounted no - > zroot/ROOT/default mounted yes - > zroot/data mounted yes - > zroot/tmp mounted yes - > zroot/usr mounted no - > zroot/usr/home mounted yes - > zroot/usr/ports mounted yes - > zroot/usr/src mounted yes - > zroot/var mounted no - > zroot/var/audit mounted yes - > zroot/var/crash mounted yes - > zroot/var/log mounted yes - > zroot/var/mail mounted yes - > zroot/var/tmp mounted yes - >=20 > Seems like /usr/local would be a handy mount point as well... >=20 > Also, i intend to use this box for jails and feel like all the > filesystems below /zroot/var don't make much sense. What layout are yo= u > using for as a jail host? >=20 > I'm thinking of blowing away all the mount points below var and just > having one /var with noatime, noexec, nosuid, compression. Bad idea? This is deliberate and a design feature intended for use with boot environments. The zroot/usr and zroot/var ZFSes exist solely to create the hierarchy that allows eg. zroot/usr/ports to be mounted as an independent ZFS. The actual /var on your system is part of the zroot/ROOT/default ZFS --- that's one big ZFS that contains all the parts of your system that would be affected by an upgrade. Stuff like /var/log or /usr/ports uses this mechanism so they can be outside the boot environment (ie. so they will be mounted unchanged after a system upgrade) but still appear in the standard places in your filesystem. In some ways this is working around historical baggage -- the standard layout of a unix filesystem was developed way before ZFS was invented, and if we were starting from scratch now, we'd probably come up with something different. There's basically no chance that anyone will support rearranging the layout nowadays though. Cheers, Matthew --jvrS1Jn89HO16OPqwjW8cLItDWw7FvWgd-- --fE4t69Fb522vCMb6TaGuQ2IIKeSnVQ7kX Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQJ8BAEBCgBmBQJYprYzXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NTNBNjhCOTEzQTRFNkNGM0UxRTEzMjZC QjIzQUY1MThFMUE0MDEzAAoJELsjr1GOGkATWS0P/iTjwNUif3+fVmasTvGcvn3o ghhkIxwtAPeoS1ld04z7iU3jaA4GTEHBLs9MwyjNslUFkPRRIzwkyo8Zj2iazrrA trvxUqfwe3T3onu0awewVNWzOj+gIhoMJlYHB0Kd9OZ1eLtSTqTQneRxG2DaWSVO qlgnWfXZPjQZ+76Sv94osAIk/42nYlEZxrymtgGNNdXbRX6iuOtAb1nyWY8rnVr8 hsQjOjR+AQSCgCFd7bO1Hy2MwIULmSypoBvNvaHw7KPNeDFmjVcYuCGSiwMMhVAv sHtIQ40ksy65HMfa7mmcRDAXEGEqcaSGUj+2rx9WbogdCIXO5myr5CWdf6OMPciG 6AJuHJCnmOJPwWi4jbQa7NkZqYXS0mEBwb0C34baa6IzWoXIcWUcoQgQDQ6Zi8QJ 23Kx3lnMSsHNxQBL1umc7trVGf151GTBoAinmFcOS6Hxqw9StoJqQZ3vD4VeEbIV YXWuB0OiDQUyG1gl+WEjG2/JS7++mCrV3JM8IRvONfhgS4vJb/ICO0YSBM9Z/7IB UwNeSbIDTSQljdyK2mhSvEBNxLL2qj2qUVpUoBVGSbS1Q6KXRjG+x4Hqaan6V9eJ fTVOmNTQDpK7DR2hXavkX6uG6KrRfqlvRLs01E5aMDA9RuQLsKlOabrWx+Gz/Wlz 65E1vSUiuH5xBLT/zh23 =m2BV -----END PGP SIGNATURE----- --fE4t69Fb522vCMb6TaGuQ2IIKeSnVQ7kX--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bcc62f59-7ce0-a3db-995c-b6a36093ef8e>