I just installed 10.3-amd64 Root-on-ZFS on a single disk - ada0. Now I would like to add a second disk as a mirror to the pool.
I am looking for the best way to create the mirror and [hopefully] have a boot-able system if a single disk fails.
The second disk is ada1. The disks are the same size and make/model.
I am unsure if this is the way to do it:
1.
2. Add /dev/ada1p2 to /etc/fstab as swap
3.
4.
The handbook shows this process but leaves out step 2 and has some weird notes around step 4 bringing 'da0' into the discussion seemingly out of nowhere.
Are these four steps correct? Does anything else need to be done around step 2 to get both disks participating in the swap? Does it make sense to do that? Is step 4 sufficient to have a boot-able ada1 if ada0 fails?
zpool status
says zroot is on ada0p3 gpart show
says ada0 has 1-boot, 2-swap, 3-zfsI am looking for the best way to create the mirror and [hopefully] have a boot-able system if a single disk fails.
The second disk is ada1. The disks are the same size and make/model.
I am unsure if this is the way to do it:
1.
gpart backup ada0 | gpart restore -F ada1
2. Add /dev/ada1p2 to /etc/fstab as swap
3.
zpool attach zroot ada0p3 ada1p3
4.
gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada1
The handbook shows this process but leaves out step 2 and has some weird notes around step 4 bringing 'da0' into the discussion seemingly out of nowhere.
Are these four steps correct? Does anything else need to be done around step 2 to get both disks participating in the swap? Does it make sense to do that? Is step 4 sufficient to have a boot-able ada1 if ada0 fails?