ZFS Adding new mirror drive

I want to add an additional drive to my zfs mirror.
This is my partion table of disk da0p1

Code:
=>        40  7814037088  da0  GPT  (3.6T)
          40        1600    1  efi  (800K)
        1640        1024    2  freebsd-boot  (512K)
        2664        1432       - free -  (716K)
        4096     4194304    3  freebsd-swap  (2.0G)
     4198400  7809837056    4  freebsd-zfs  (3.6T)
  7814035456        1672       - free -  (836K)

Can I just copy the partion table to the new drive and the copy the EFI partion and Boot partion with the dd utility?

EFI Partion
dd if=/dev/da0p1 of=/dev/da3p1

Boot Partion
dd if=/dev/da0p2 of=/dev/da3p2

and then afterwards add the new drive to the zfs pool?
 
Yes, that sounds correct. If the disks are identical you can easily copy the partition table using gpart backup ... and gpart restore ....

Something like:
Code:
gpart backup da0 > parttable.txt
cat parttable.txt | gpart restore da3
 
Back
Top