From owner-freebsd-questions@freebsd.org Wed Sep 8 01:28:44 2021 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1B853671F23 for ; Wed, 8 Sep 2021 01:28:44 +0000 (UTC) (envelope-from dpchrist@holgerdanske.com) Received: from holgerdanske.com (holgerdanske.com [184.105.128.27]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "holgerdanske.com", Issuer "holgerdanske.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H44KQ6Xpgz3FLb for ; Wed, 8 Sep 2021 01:28:42 +0000 (UTC) (envelope-from dpchrist@holgerdanske.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=holgerdanske.com; s=nov-20210719-112354; t=1631064512; bh=fqUi1/21pQGc8A9K88nx73olr/c+IYcgrPbhXosO5AI=; h=Received:Subject:To:References:From:Message-ID:Date:User-Agent: MIME-Version:In-Reply-To:Content-Type:Content-Language: Content-Transfer-Encoding; b=IH8lVAp6+MjasRsuTsPT3TbMJ4e7xX57F/EuBJcxQDKRU32+NEJoRgAqwGav6G1Tm 9avVzrmcvjIjj/nBKKdy1N2TRBC6Uxsk92c3LTnPtwKMSWbw2Op4db7UPGZBLf9Ads K6EyZWusPUe0M9Z5nwQAtawnvMZpM9D//cKQvSzPn0YnOOrOJWBioDwYK7FWmjX0Es pj/9m7rx/tPJLXbMyFGNiym/FHmXqci9JbnkjXwT3C+L7QdUna283As/7ExChNtQEd CnoSMnddf2yNdca/9O3O1gfsyTJ6LOqWkP70NmkrGULy24H539rAl8aF6eUujmPQWM 4TGZo4p9OeTtDfcskD0zKIx9yixudmky1FxRSelpO9jrPauYvS/VZsOiGcDQveVwsN eT3zsTKu81ZjUn6KpM+PMlfb3u7p+A5fJ3LxnpYqKyNlGtkyapQnS525DaAxQzP4UP cvlszr18aWXV2MHjDRKvMwdbaR3hyuoSTFvLORZKgiyW7bghRjyrjJoBWCO4+pQdCY u2LdLBhWpD1tu8Ne6edTQZehgsepQvU07MkbmCRkvUIwPhElcU/48L3vo8cgyp3LYD 9+etQY7yVtAegyQrLNxvTJUVssyb0mcF6GWumgO7E8bay8hrsW9/2Jx5u41r7lDEoO LeQf5ZcsQjPvSRJrtcYHM8LY= Received: from 99.100.19.101 (99-100-19-101.lightspeed.frokca.sbcglobal.net [99.100.19.101]) by holgerdanske.com with ESMTPSA (TLS_AES_128_GCM_SHA256:TLSv1.3:Kx=any:Au=any:Enc=AESGCM(128):Mac=AEAD) (SMTP-AUTH username dpchrist@holgerdanske.com, mechanism PLAIN) for ; Tue, 7 Sep 2021 18:28:32 -0700 Subject: Re: zfs newbie To: freebsd-questions@freebsd.org References: From: David Christensen Message-ID: <8c1c61d2-2b55-ae46-3304-9bfdcd6bd2d1@holgerdanske.com> Date: Tue, 7 Sep 2021 18:28:28 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4H44KQ6Xpgz3FLb X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=holgerdanske.com header.s=nov-20210719-112354 header.b=IH8lVAp6; dmarc=pass (policy=none) header.from=holgerdanske.com; spf=pass (mx1.freebsd.org: domain of dpchrist@holgerdanske.com designates 184.105.128.27 as permitted sender) smtp.mailfrom=dpchrist@holgerdanske.com X-Spamd-Result: default: False [-3.95 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[holgerdanske.com:s=nov-20210719-112354]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+a]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; DKIM_TRACE(0.00)[holgerdanske.com:+]; DMARC_POLICY_ALLOW(-0.50)[holgerdanske.com,none]; NEURAL_HAM_SHORT(-0.95)[-0.947]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6939, ipnet:184.104.0.0/15, country:US]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-questions]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Sep 2021 01:28:44 -0000 On 9/7/21 3:17 PM, Doug Denault wrote: > > Following the default 12.2 zfs install I got one pool (zroot) and a > dataset for each of the traditional mount points. So zfs list shows: > > NAME                 USED  AVAIL  REFER  MOUNTPOINT > zroot                279G  6.75T    88K  /zroot > zroot/ROOT          1.74G  6.75T    88K  none > zroot/ROOT/default  1.74G  6.75T  1.74G  / > zroot/tmp            176K  6.75T   176K  /tmp > zroot/usr            277G  6.75T    88K  /usr > zroot/usr/home       276G  6.75T   276G  /usr/home > zroot/usr/ports       88K  6.75T    88K  /usr/ports > zroot/usr/src        670M  6.75T   670M  /usr/src > zroot/var           47.5M  6.75T    88K  /var > zroot/var/audit       88K  6.75T    88K  /var/audit > zroot/var/crash       88K  6.75T    88K  /var/crash > zroot/var/log        820K  6.75T   820K  /var/log > zroot/var/mail      46.3M  6.75T  46.3M  /var/mail > zroot/var/tmp         88K  6.75T    88K  /var/tmp > > I had consultant configure another server for us. He set up the disk > array with one dataset. so zfs list on this system give: > > NAME    USED  AVAIL  REFER  MOUNTPOINT > zroot  2.65G  13.2T  2.62G  legacy > > From a sysadmin view I rather like the multiple datasets. Are there > advantages to one over the other? I have a SOHO LAN with one primary FreeBSD 12.2 server (CVS and Samba) and various Windows, macOS, iOS, and Debian clients. As another reader mentioned, you can set ZFS properties differently on different datasets. You can also apply different disaster preparedness/ recovery policies to different datasets -- e.g. snapshots and replication. However, more datasets means more work and more complexity. Few of the standard ZFS CLI tools work recursively on nested datasets. For example, how to do you make a tree of 10 nested datasets read-only with one shell command? Or, make them read-write? Or, replicate them to another pool? Or do today's backup replication job when datasets have been added, removed, and/or renamed since yesterday's? Or, selectively destroy old snapshots? Performing these use-cases by hand is tedious and error prone. Automating them is non-trivial. I would estimate the system administration complexity of nested ZFS datasets as O(N*log(N)). But, my primary comment on your ZFS listings is that you put root on a 6.75T pool (!) and your consultant put root on a 13.2T pool (!). It is my practice to keep my OS instances small enough to fit onto a single "16 GB" device, and to put my data on RAID in a file server. This allows me to quickly, easily, and reliably take and restore raw binary images of the OS devices. How are you going to backup and restore your OS images? David