From owner-freebsd-questions@freebsd.org Fri Feb 17 08:37:12 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE7B2CE09D1 for ; Fri, 17 Feb 2017 08:37:12 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from smtp.infracaninophile.co.uk (smtp.infracaninophile.co.uk [81.2.117.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.infracaninophile.co.uk", Issuer "infracaninophile.co.uk" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 54A2916A3 for ; Fri, 17 Feb 2017 08:37:12 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from liminal.local (unknown [IPv6:2001:8b0:151:1:1c1d:86a1:a200:b700]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: m.seaman@infracaninophile.co.uk) by smtp.infracaninophile.co.uk (Postfix) with ESMTPSA id EFCA11ABC for ; Fri, 17 Feb 2017 08:37:07 +0000 (UTC) Authentication-Results: smtp.infracaninophile.co.uk; dmarc=none header.from=FreeBSD.org Authentication-Results: smtp.infracaninophile.co.uk/EFCA11ABC; dkim=none; dkim-atps=neutral Subject: Re: default zfs layout - FreeBSD 11.0 - /var and /usr not mounted ?! To: freebsd-questions@freebsd.org References: <11840e40-a706-625d-da03-e2f663342058@monkeybrains.net> From: Matthew Seaman Message-ID: Date: Fri, 17 Feb 2017 08:37:07 +0000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <11840e40-a706-625d-da03-e2f663342058@monkeybrains.net> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="fE4t69Fb522vCMb6TaGuQ2IIKeSnVQ7kX" X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_00, PLING_QUERY, RDNS_NONE, SPF_SOFTFAIL autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on smtp.infracaninophile.co.uk X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Feb 2017 08:37:12 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --fE4t69Fb522vCMb6TaGuQ2IIKeSnVQ7kX Content-Type: multipart/mixed; boundary="jvrS1Jn89HO16OPqwjW8cLItDWw7FvWgd"; protected-headers="v1" From: Matthew Seaman To: freebsd-questions@freebsd.org Message-ID: 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--