Booting from an aribrary disk in ZFS RAIDZ on 8.x

Shane Ambler FreeBSD at ShaneWare.Biz
Wed Mar 6 02:56:15 UTC 2013


On 06/03/2013 05:14, Doug Poland wrote:
> Hello,
>
> I'm running ZFS filesystem ver 3, storage pool ver 14, on 8-STABLE
> amd64. The kernel build is rather dated from around Feb 2010.

You probably want to update that sometime.

> I have 6 disks in a RAIDZ configuration.  All disks were sliced
> the same with gpart (da(n)p1,p2,p3) with bootcode written to index 1,
> swap on index 2 and freebsd-zfs on index 3.
>
> Given this configuration, I should be able to boot from any of the 6
> disks in the RAIDZ.  If this is a true statement, how do I make that
> happen from the loader prompt?

You don't boot from an individual disk you boot from a zpool - all disks 
are linked together making one zpool "disk".

> At the loader prompt when I type show, I get the following relevant
> variables:
>
> 	currdev="zfs0"
> 	loaddev="disk1a:"
> 	vfs.root.mountfrom="zfs:rpool"

zfs:rpool is the "disk" you boot from.

I'm guessing that you ask as your machine isn't booting.
You probably need to boot from a cd and do adjustments.

You have zfs_load=yes in /boot/loader.conf ?
You have vfs.root.mountfrom="zfs:rpool" in /boot/loader.conf ?
You have zfs_enable=yes in /etc/rc.conf ?
You have zpool set bootfs=rpool rpool or similar?

I think it has been resolved recently but you used to have to copy the 
zpool.cache into /boot

Did you set the mountpoint when installing and not change it back?

I had issues with setting up with a mountpoint / and changing it to 
legacy. Setting the mountpoint as you want before setup then use altroot 
to mount it for install is the way to go.

If you search wiki.freebsd.org for zfs you can find several examples 
that may provide hints to what you missed.



More information about the freebsd-questions mailing list