Date: Sat, 19 Feb 2011 12:01:37 +0000 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: DStaal@usa.net Cc: freebsd-questions@freebsd.org Subject: Re: ZFS-only booting on FreeBSD Message-ID: <4D5FB121.6090102@infracaninophile.co.uk> In-Reply-To: <97405dd7ad34c6cbecebfdda327d1e83.squirrel@www.magehandbook.com> References: <97405dd7ad34c6cbecebfdda327d1e83.squirrel@www.magehandbook.com>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig3E13FE86A5C131F5E38B9B18 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 18/02/2011 15:59, Daniel Staal wrote: >=20 > I've been reading over the ZFS-only-boot instructions linked here: > <http://wiki.freebsd.org/ZFS> (and further linked from there) and have = one > worry: >=20 > Let's say I install a FreeBSD system using a ZFS-only filesystem into a= > box with hotswapable hard drives, configured with some redundancy. Tim= e > passes, one of the drives fails, and it is replaced and rebuilt using t= he > ZFS tools. (Possibly on auto, or possibly by just doing a 'zpool > replace'.) >=20 > Is that box still bootable? (It's still running, but could it *boot*?)= Why wouldn't it be? The configuration in the Wiki article sets aside a small freebsd-boot partition on each drive, and the instructions tell you to install boot blocks as part of that partitioning process. You would have to repeat those steps when you install your replacement drive before you added the new disk into your zpool. So long as the BIOS can read the bootcode from one or other drives, and can then access /boot/zfs/zpool.cache to learn about what zpools you have, then the system should boot. > Extend further: If *all* the original drives are replaced (not at the s= ame > time, obviously) and rebuilt/resilvered using the ZFS utilities, is the= > box still bootable? Yes, this will still work. You can even replace all the drives one-by-one with bigger ones, and it will still work and be bootable (and give you more space without *requiring* the system be rebooted). > If not, what's the minimum needed to support booting from another disk,= > and using the ZFS filesystem for everything else? This situation is described in the Boot ZFS system from UFS article here: http://wiki.freebsd.org/RootOnZFS/UFSBoot I use this sort of setup for one system where the zpool has too many drives in it for the BIOS to cope with; works very well booting from a USB key. In fact, while the partitioning layout described in the http://wiki.freebsd.org/RootOnZFS articles is great for holding the OS and making it bootable, for using ZFS to manage serious quantities of disk storage, other strategies might be better. It would probably be a good idea to have two zpools: one for the bulk of the space built from whole disks (ie. without using gpart or similar partitioning), in addition to your bootable zroot pool. Quite apart from wringing the maximum usable space out of your available disks, this also makes it much easier to replace failed disks or use hot spares. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate JID: matthew@infracaninophile.co.uk Kent, CT11 9PW --------------enig3E13FE86A5C131F5E38B9B18 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.16 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk1fsSsACgkQ8Mjk52CukIxlBgCcDizQIcWjjjHenX31YltchPSx D/gAn1bqaUsCEG0/g13WBmZ74vwjpRsJ =wkwd -----END PGP SIGNATURE----- --------------enig3E13FE86A5C131F5E38B9B18--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4D5FB121.6090102>