From owner-freebsd-questions@FreeBSD.ORG Sun Feb 15 05:58:10 2015 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 95C8D84A for ; Sun, 15 Feb 2015 05:58:10 +0000 (UTC) Received: from mail-wi0-x233.google.com (mail-wi0-x233.google.com [IPv6:2a00:1450:400c:c05::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 25F41C87 for ; Sun, 15 Feb 2015 05:58:10 +0000 (UTC) Received: by mail-wi0-f179.google.com with SMTP id hi2so19974356wib.0 for ; Sat, 14 Feb 2015 21:58:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=fBeaYB3itooT4azacm5z2lOWSbcTgNrHoNRR+KzcUWc=; b=mN1TgKcQr9MJPcUt9zu4Ol8CdvBXYVjDjieuwmoP5fFwyNlkGMhhCuIFnFeDwDN59Y Z+1IRoWgI+dpDIwAUgAQWTIOFg50/xKDCaHRO5boC9/H/aH26dffqduQ7PvdAwGiTige RA8JBsGT7xRV+VU7aZ+Fyt0G4yXhjn05AnkxrhuzIhAIdQB1ras+wpq/CpRFQinKMoby wDzmegWLBDOEZCyDeU0Cj8ehFY1h7fDs8EYsFCrYRp+bspNQvE4oj+TBkZ+L/YTV/i1s BLMnuhO3gPEOTq3LgQVolVoZDV7r592vMnTD4Tr8UeoTFoH13QirhYt1emJWv6IO5mdT RCJg== MIME-Version: 1.0 X-Received: by 10.194.237.34 with SMTP id uz2mr35745996wjc.157.1423979888539; Sat, 14 Feb 2015 21:58:08 -0800 (PST) Received: by 10.194.241.132 with HTTP; Sat, 14 Feb 2015 21:58:08 -0800 (PST) In-Reply-To: <54E01849.3020500@complete.org> References: <54E01849.3020500@complete.org> Date: Sun, 15 Feb 2015 13:58:08 +0800 Message-ID: Subject: Re: 10.1 ZFS - why canmount=off for /usr and /var by default? From: Ben Woods To: John Goerzen Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "freebsd-questions@freebsd.org" X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Feb 2015 05:58:10 -0000 To quote Allan Jude when I posed this question to him: "The /usr dataset has 'canmount' set to off. It only exists so that other datasets can be created under it. The idea here is that you want /usr/bin and /usr/local etc to be included in the / dataset, as that is the one used for boot environments. To use boot environments, you need to install the tool from the ports tree: sysutils/beadm-devel We'll discuss this more on the [bsdnow.tv] show, and maybe do a tutorial sometime soonish." In summary, the /usr and /var datasets will not actually have any files stored in them. Any sub-datasets that ARE mounted will have the files in them, and other files that sit under /usr or /var which are not in a sub-dataset will actually be stored in the zroot/ROOT/default dataset (and available for boot environments). -- From: Benjamin Woods woodsb02@gmail.com On 15 February 2015 at 11:53, John Goerzen wrote: > > So this is a fresh 10.1-RELEASE install, with the guided/automatic ZFS > setup on a single hard disk. Couldn't be simpler, right? Except > something is odd with /usr and /var. Consider: > > # zfs list | egrep 'NAME|usr' > NAME USED AVAIL REFER MOUNTPOINT > zroot/usr 607M 216G 96K /usr > zroot/usr/home 180K 216G 180K /usr/home > zroot/usr/ports 607M 216G 607M /usr/ports > zroot/usr/src 96K 216G 96K /usr/src > > Now, I've installed 5GB of packages into /usr/local. There's no way > /usr is only using 607M. So I thought, hmm, maybe they're not being > mounted. And indeed: > > # zfs list -o name,mountpoint,canmount,mounted | egrep 'NAME|no' > NAME MOUNTPOINT CANMOUNT MOUNTED > zroot none on no > zroot/ROOT none on no > zroot/usr /usr off no > zroot/var /var off no > > And, of course: > > # df -h /usr/local > Filesystem Size Used Avail Capacity Mounted on > zroot/ROOT/default 220G 4.5G 216G 2% / > > (I have compress=lz4 set for everything) > > So, the next question is: why? Why is there a /usr and a /var, which > show up in zfs list with a mountpoint of /usr and /var, but which aren't > being mounted? Why is canmount=off for these? And if canmount=off, why > give it a mountpoint which looks rather misleading in a zfs list? > > I promise to stop asking questions soon! :-) > > Thanks, > > John > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to " freebsd-questions-unsubscribe@freebsd.org"