Date: Mon, 10 Mar 2014 12:51:46 -0700 From: <dteske@FreeBSD.org> To: "'David Christensen'" <dpchrist@holgerdanske.com> Cc: dteske@freebsd.org, freebsd-questions@freebsd.org Subject: RE: FreeBSD 10 installer and ZFS root Message-ID: <1cb801cf3c9a$2c7e7970$857b6c50$@FreeBSD.org> In-Reply-To: <531E0287.6060907@holgerdanske.com> References: <53197EF6.4070902@holgerdanske.com> <5319913D.4040207@infracaninophile.co.uk> <10334f5b74b05d9445d071bd08f73a24@dweimer.net> <531A0A0B.3010902@holgerdanske.com> <eca03739afb425884241ed23c4202a7b@dweimer.net> <531D51EF.1080804@holgerdanske.com> <531D6737.4020708@infracaninophile.co.uk> <531E0287.6060907@holgerdanske.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> -----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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1cb801cf3c9a$2c7e7970$857b6c50$>