From owner-freebsd-questions@FreeBSD.ORG Mon Mar 10 19:52:00 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2C4BE99E; Mon, 10 Mar 2014 19:52:00 +0000 (UTC) Received: from mx1.fisglobal.com (mx1.fisglobal.com [199.200.24.190]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7E9E0812; Mon, 10 Mar 2014 19:51:58 +0000 (UTC) Received: from smarthost.fisglobal.com ([10.132.206.193]) by ltcfislmsgpa03.fnfis.com (8.14.5/8.14.5) with ESMTP id s2AJpudY007977 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Mon, 10 Mar 2014 14:51:56 -0500 Received: from THEMADHATTER (10.242.181.54) by smarthost.fisglobal.com (10.132.206.193) with Microsoft SMTP Server id 14.3.174.1; Mon, 10 Mar 2014 14:51:55 -0500 From: Sender: Devin Teske To: "'David Christensen'" References: <53197EF6.4070902@holgerdanske.com> <5319913D.4040207@infracaninophile.co.uk> <10334f5b74b05d9445d071bd08f73a24@dweimer.net> <531A0A0B.3010902@holgerdanske.com> <531D51EF.1080804@holgerdanske.com> <531D6737.4020708@infracaninophile.co.uk> <531E0287.6060907@holgerdanske.com> In-Reply-To: <531E0287.6060907@holgerdanske.com> Subject: RE: FreeBSD 10 installer and ZFS root Date: Mon, 10 Mar 2014 12:51:46 -0700 Message-ID: <1cb801cf3c9a$2c7e7970$857b6c50$@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 15.0 Thread-Index: AQF0C2PIOT0DD3gD1tjGF6Qa8NBRSQKo1RoEAUpEAJABeRIy2QLDDkCEAVpqnP0CUWSQhgEucmDPmyjQDlA= Content-Language: en-us X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.11.87, 1.0.14, 0.0.0000 definitions=2014-03-10_03:2014-03-10,2014-03-10,1970-01-01 signatures=0 Cc: dteske@freebsd.org, freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Mar 2014 19:52:00 -0000 > -----Original Message----- > From: David Christensen [mailto:dpchrist@holgerdanske.com] > Sent: Monday, March 10, 2014 11:21 AM > To: freebsd-questions@freebsd.org > Subject: Re: FreeBSD 10 installer and ZFS root > > On 03/10/2014 12:18 AM, Matthew Seaman wrote: > > On 10/03/2014 05:47, David Christensen wrote: > >> Question -- do I need to make swap size equal to or larger than RAM? > > No. You don't /need/ to do this, especially nowadays with machines > > having large amounts of RAM (by which I mean much more than just 4GB, > > which is a fairly routine amount nowadays). In your case I'd advise a > > swap size of something between RAM+delta or 2 x RAM. 4GB is about the > > minimum you can run a serious ZFS based server with, although for > > light duties or experimental purposes you can manage ZFS with much less > RAM. > > Thanks for the reply. :-) > > > Okay. That's the old-school swap size calculation -- I'm surprised the installer > defaulted to 2g. > > > > I wouldn't make ada0s1a a ZFS partition if all it is intended to do is > > hold an unencrypted /boot -- UFS gives you everything you need for that > > use case, and all the extra ZFS goodness isn't really relevant there. > > The installer made that decision. > [Devin Teske] The installer makes ada0s1a a mirrored vdev so that any disk in the pool can be booted from. Imagine what would happen if you had only a single boot partition that was not mirrored and you lost that drive? > > >> ada0 is the raw block device. > >> ada0s1 is a primary partition table entry pointing to an extended > >> partition table. > >> The extended partition table contains partitions ada0s1a, ada0s1b, > >> and ada0s1d. > > Yes, that is correct. > > Okay. > > > >> Question -- can I adjust the size of ada0s1a and ada0s1d during > >> installation? > > I take it you mean 'can I install using different partition sizes?' > > rather than 'can I change the sizes of the partitions after the fact?' > > Yes. > > > > The installer contains a pretty reasonable partition editor, or it is > > entirely possible to boot the install media to a live FS and set up your > > drives from the command line, and then continue the installation using > > the installer. > > I assume that the installer is a collection of shell scripts driving > statically-compiled utility programs (everything in BusyBox?), and that > the various command sequences and options are encoded in the scripts. > Some options are made visible through the UI (swap size, boot > encryption, 4K alignment of pools, etc.). I was hoping for a simple way > to adjust other options, especially boot partition size. > > > Looking at the amount of work the installer ZFS partitioning sub-system > does, I'd rather not attempt to do all that by hand. Scripts are good > at that kind of thing. > [Devin Teske] And the installer is scriptable. Try executing the following command to see how it can be scripted... awk '/GLOB/{exit}/CONFIG/,/GLOB/&&/^[A-Z]+=/{print}' \ /usr/libexec/bsdinstall/scripts/zfsboot | less > > If the installer boot loader creates a RAM disk, copies the installer > suite to there, and then lights it off, I might be able to choose Shell > early on, edit the right script, and then re-launch the installer. > [Devin Teske] Yes, or create a /etc/installerconfig that sets ZFSBOOT_* variables before kicking off "bsdinstall zfsboot" (and later the distextract, etc.). HINT: If /etc/installerconfig exits with failure status, nothing else is performed before reboot (allowing you to control the install 100% by calling the various parts to the installation). -- Devin _____________ The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you.