ZFS + mfsBSD + dump restore

Today I thought I would start having a look at ZFS on a mirrored root. I downloaded mfsBSD 9.0-RELEASE i386 special edition and burnt it to a bootable DVD. I then ran # zfsinstall -r mirror -d ada0 -d ada1 /cdrom/9.0-RELEASE-i386.tar.xz -s 4G -c

This ran great and set up my two drives in a mirrored configuration with ZFS and a 4GB swapfile. There are just two things I am unsure of:
  1. If I run # zpool status it shows that the pool name is "tank" but if I am in the root and do an # ls it doesn't show up there? In the past when I have experimented with ZFS (not on root though) and I create a pool called "tank" I can see it off the root (ie: /tank). Is it handled differently on a root drive?
  2. Now that I have created a mirrored root drive with ZFS I would like to restore an existing system to it. I have this system in a dump file that I created with dump. What are the steps I should use to restore the system from a dump file (that I have on a USB key) to the mirrored ZFS root drive? Is this possible? I tried booting into single user mode with the mfsBSD DVD but I can't see the root pool.
Thank you! :e
 
Assuming you haven't rebooted you'll be running mfsBSD from the memory disk and the tank pool will either not be mounted or it'll be mounted under a temporary alternate root.

Check # zpool get altroot tank and # zfs get mountpoint tank.
 
I had rebooted. After I had run the zfsinstall command I removed the DVD from the drive and rebooted. I was then running FreeBSD 9 from the mirrored ZFS drives.
 
By default zfs will mount the zpool at /<name> but in your case it'll be mount to /. For example, I have the following:
Code:
 zfs get mountpoint zroot
NAME   PROPERTY    VALUE       SOURCE
zroot  mountpoint  /           local
 
idownes said:
By default zfs will mount the zpool at /<name> but in your case it'll be mount to /. For example, I have the following:
Code:
 zfs get mountpoint zroot
NAME   PROPERTY    VALUE       SOURCE
zroot  mountpoint  /           local

Aaah, thanks. That makes sense.

Can anyone comment on restoring a dump file to a ZFS root?
 
That's what I thought but once I booted into the shell from the DVD I wasn't sure where to restore to. Usually I mount my USB drive (which contains the dump file) and then run [cmd=]restore -rf /media/restore.dump[/cmd] and then I edit my /etc/fstab:
Code:
/dev/label/MirrorSwap               none            swap    sw              0       0
/dev/ufs/MirrorRootFS               /               ufs     rw              1       1
but this obviously changes having ZFS now as the filesystem.
 
Back
Top