From owner-freebsd-questions@freebsd.org Tue Apr 18 04:05:03 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 61D14D43C95 for ; Tue, 18 Apr 2017 04:05:03 +0000 (UTC) (envelope-from dpchrist@holgerdanske.com) Received: from holgerdanske.com (holgerdanske.com [IPv6:2001:470:0:19b::b869:801b]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "holgerdanske.com", Issuer "holgerdanske.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D34E1793 for ; Tue, 18 Apr 2017 04:05:03 +0000 (UTC) (envelope-from dpchrist@holgerdanske.com) Received: from 99.100.19.101 ([99.100.19.101]) by holgerdanske.com with ESMTPSA (ECDHE-RSA-AES128-GCM-SHA256:TLSv1.2:Kx=ECDH:Au=RSA:Enc=AESGCM(128):Mac=AEAD) (SMTP-AUTH username dpchrist@holgerdanske.com, mechanism PLAIN) for ; Mon, 17 Apr 2017 20:54:44 -0700 Subject: Re: Some ZFS questions To: freebsd-questions@freebsd.org References: From: David Christensen Message-ID: Date: Mon, 17 Apr 2017 20:55:42 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit 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: Tue, 18 Apr 2017 04:05:03 -0000 On 04/17/2017 11:41 AM, Andrea Venturoli wrote: > Hello. > > I'm a novice to ZFS and right now I'm conducting some experiments on > 10.3. I've got some questions which might be obvious or FAQs, but I can > assure I looked for an afternoon and found no answer. https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/zfs.html https://www.freebsd.org/cgi/man.cgi?query=zpool&apropos=0&sektion=8&manpath=FreeBSD+11.0-RELEASE+and+Ports&arch=default&format=html https://www.freebsd.org/cgi/man.cgi?query=zfs&apropos=0&sektion=8&manpath=FreeBSD+11.0-RELEASE+and+Ports&arch=default&format=html http://open-zfs.org/wiki/System_Administration https://www.michaelwlucas.com/os/fmzfs https://www.michaelwlucas.com/os/fmaz > I first installed from the USB image and choose Auto-ZFS options when > the installer came to partitioning. > The install was succesful and "zfs list" would show something like the > following (please note this is not an exact copy & paste, since I > destroyed that install in the meantime): > >> zroot 781M 93.2G 144K none >> zroot/ROOT 777M 93.2G 144K none >> zroot/ROOT/default 777M 93.2G 777M / >> zroot/tmp 176K 93.2G 176K /tmp >> zroot/usr 616K 93.2G 144K /usr >> zroot/usr/home 184K 93.2G 184K /usr/home >> zroot/usr/ports 144K 93.2G 144K /usr/ports >> zroot/usr/src 144K 93.2G 144K /usr/src >> zroot/var 1.20M 93.2G 608K /var >> zroot/var/crash 148K 93.2G 148K /var/crash >> zroot/var/log 178K 93.2G 178K /var/log >> zroot/var/mail 144K 93.2G 144K /var/mail >> zroot/var/tmp 152K 93.2G 152K /var/tmp > > What puzzles me is "zroot/ROOT": why do we need that? Why do we mount > "zroot/ROOT/default" as root instead of simply mounting "zroot" at /? Many data set properties are inheritable. So, you could set some properties on zroot that affect the entire pool, set some properties on zroot/ROOT that affect all root file systems, and set some properties on zroot/ROOT/default for your default root environment. I haven't tried it, but AFAIK it is possible to have multiple root data sets (e.g. "file systems"). So, if/when you create another root environment, say zroot/ROOT/custom, it will inherit such properties from zroot and zroot/ROOT. I'm still a ZFS noob, so I'll pass on your other questions. David