Root on ZFS

Matthew Law matt at webcontracts.co.uk
Thu Mar 4 16:00:39 UTC 2010


On Thu, March 4, 2010 3:44 pm, Randal L. Schwartz wrote:
>>>>>> "Matthew" == Matthew Law <matt at webcontracts.co.uk> writes:
>
> Matthew> I am following this wiki page to move to zfs root:
> Matthew> http://wiki.freebsd.org/ZFSOnRoot
>
> If you're running RELEASE-8 or later, I've gotten this to work just fine:
>
>   http://wiki.freebsd.org/RootOnZFS/GPTZFSBoot

Thanks, guys.

Yes, I am on 8-RELEASE.  I was really looking to create a 3-disk raidz or
raidz2 volume with 1 hot spare.  I happened across this page:

http://wiki.freebsd.org/RootOnZFS/GPTZFSBoot/RAIDZ2

and started to follow that.

> Currently live on two slices at arpnetworks.com with that.
>
> The trickiest part is that Arp installs an existing system on the disk,
> and the instructions there don't tell how to remove it. :(
>
> I can't remember the workaround, but someone in IRC told me.
> ("gpart destroy" didn't work, because it said "already in use")

I ran into this and figured out I need to remove each slice first.  But it
did take a little head scratching.

I installed a minimal OS from a USB stick onto a single SATA drive.  After
testing it was installed and running OK, I rebooted and chose the fixit
option from sysinstall and followed the above guide.

I've got to this part:

7. 'Create ZFS Pool zroot'

Fixit# mkdir /boot/zfs
Fixit# zpool create zroot raidz2 /dev/gpt/disk0 /dev/gpt/disk1 /dev/gpt/disk2
Fixit# zpool set bootfs=zroot zroot

The zpool create command fails because I don't have '/dev/gpt' - I take it
I haven't actually installed with gpt in the first place?  Can I go back
and do that and what's the advantage of gpt?

Finally, I had problems with the SAS card in this box, which is a bog
standard LSI SAS8041E.  I can install OK, but on rebooting it can't find
the root slice, panics and drops me into mountroot.  Where I get stuck.

Any help much appreciated,

Matt.




More information about the freebsd-questions mailing list