Booting from ZFS mirror (post install)

James D. Parra jamesp at musicreports.com
Wed Sep 24 18:58:00 UTC 2014


Hello,

I installed to a single disk with "/" on ZFS. After using "dd" to mirror the partitions from disk one to disk two, I added the second disk, ada1s1d, to the zfs pool.

# zpool status
  pool: tank0
 state: ONLINE
 scan: resilvered 7.81G in 0h3m with 0 errors on Wed Sep 17 12:55:46 2014
config:

 NAME         STATE     READ WRITE CKSUM
 tank0        ONLINE       0     0     0
   mirror-0   ONLINE       0     0     0
     ada0s1d  ONLINE       0     0     0
     ada1s1d  ONLINE       0     0     0
<end>

The following is mounted;

# mount
tank0 on / (zfs, local, noatime, nfsv4acls)
devfs on /dev (devfs, local, multilabel)
/dev/label/boot0 on /boot-mount (ufs, local, noatime)
procfs on /proc (procfs, local)
linprocfs on /compat/linux/proc (linprocfs, local)
tank0/usr on /usr (zfs, local, noatime, nfsv4acls)
tank0/var on /var (zfs, local, noatime, nfsv4acls)
<end>

This is the output of gpart show;
<snip>
t# gpart show
=>        63  1953525105  ada0  MBR  (931G)
          63        1953        - free -  (976k)
        2016  1953523152     1  freebsd  (931G)

=>         0  1953523152  ada0s1  BSD  (931G)
           0     2097152       1  freebsd-ufs  (1.0G)
     2097152   809500672       2  freebsd-swap  (386G)
   811597824  1141925328       4  freebsd-zfs  (544G)

=>        63  1953525105  ada1  MBR  (931G)
          63        1953        - free -  (976k)
        2016  1953523152     1  freebsd  (931G)

=>         0  1953523152  ada1s1  BSD  (931G)
           0     2097152       1  freebsd-ufs  (1.0G)
     2097152   809500672       2  freebsd-swap  (386G)
   811597824  1141925328       4  freebsd-zfs  (544G)
<end>

The problem is that I cannot boot from the 2nd disk. I see that /boot-mount is UFS, so I must have missed a step, or more, in getting the 2nd disk bootable. I get the following error when booting from it.

<snip>
Trying to mount root from zfs:tank0:[]...
Mounting from zfs:tank0 failed with error 2
  Load variables
     vfs.root.mountfrom=zfs:tank0
<snip>

Any ideas on how I can get the 2nd disk to boot? (Sorry for the long post)

Thank you in advance.

James


More information about the freebsd-questions mailing list