To create a RAID-Z pool with 2 parity disks (
raidz2), you can run:
zpool create datapool raidz2 <disk1> <disk2> <disk3> ...
You shouldn't use
mdadm in this configuration at all. ZFS implements volume management itself -- using
mdadm on the same devices ZFS is using will corrupt your data. Also, once you've created the pool, you can't change the data redundancy settings (unless it's on new disks you're adding, or unless you copy the data out of the existing pool, wipe, and rebuild the pool from scratch).
However, you still can't run the command above for only 3 disks if you want
raidz2. The idea behind RAID-Z is basically the same as mirroring -- you want to reduce the chances that disks failing will result in data loss by storing redundant information -- except that it's supposed to reduce the total amount of redundant information you have to store to reconstruct the data if disks die. But, if you want to survive failures of all but one disk, you must have all your data on that last surviving disk, since there is no another disk you can read to reconstruct the data.
Therefore, mirroring is the best you can do with only 3 disks, if you want 2-failure redundancy:
zpool create datapool mirror <disk1> <disk2> <disk3>
However, I believe you could use
raidz1 instead if 1-failure redundancy is ok:
zpool create datapool raidz1 <disk1> <disk2> <disk3>