Re: ZFS-only booting on FreeBSD
- From: Matthew Seaman <m.seaman@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 19 Feb 2011 12:01:37 +0000
On 18/02/2011 15:59, Daniel Staal wrote:
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:
Let's say I install a FreeBSD system using a ZFS-only filesystem into a
box with hotswapable hard drives, configured with some redundancy. Time
passes, one of the drives fails, and it is replaced and rebuilt using the
ZFS tools. (Possibly on auto, or possibly by just doing a 'zpool
replace'.)
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 same
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
--
Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard
Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
JID: matthew@xxxxxxxxxxxxxxxxxxxxxx Kent, CT11 9PW
Attachment:
signature.asc
Description: OpenPGP digital signature
- Follow-Ups:
- Re: ZFS-only booting on FreeBSD
- From: Daniel Staal
- Re: ZFS-only booting on FreeBSD
- References:
- ZFS-only booting on FreeBSD
- From: Daniel Staal
- ZFS-only booting on FreeBSD
- Prev by Date: Re: Best Laptop to buy for Freebsd Without OS?
- Next by Date: Re: booting a kernel directly from stage 1/2
- Previous by thread: ZFS-only booting on FreeBSD
- Next by thread: Re: ZFS-only booting on FreeBSD
- Index(es):
Relevant Pages
|