I read conflicting statements online, using "fake files" but that didn't work for me as I only wanted to create w/ 1 disk. You can only CREATE w/ 1 disk w/ striped. The you attached another disk later and switch to mirrored.
Best Source → https://blog.fosketts.net/2017/12/11/add-mirror-existing-zfs-drive/
Create Pool w/ 1 disk:
poolname=bigdatab dev=/dev/sdb1 mount=/mnt/zfs/$poolname zpool create -f $poolname $dev -o ashift=12 -m $mount zpool status
Using Fake File Notes: Didn't work, but I'm keeping notes...
https://blog.chaospixel.com/linux/2017/08/zfs-create-pool-with-missing-devices.html
https://docs.oracle.com/cd/E19253-01/819-5461/gazgm/index.html
Note: ZFS is very picky each drive/partition must be exact same size so I always make partition a bit smaller.
Find Real HDD Size:
/mnt/hdd# df | grep sdb /dev/sdb1 3627506976 70780 3443099812 1% /mnt/hdd/sdb
Set Variables:
poolname=bigdatac dev=/dev/sdc1 fakefile=/mnt/hdd/sdc/sdc1_sparse.img filesize=3627506976 mount=/mnt/zfs/$poolname
Create:
truncate -s $filesize $fakefile zpool create -f $poolname $dev $fakefile -o ashift=12 -m $mount mv $fakefile $fakefile.bak zpool status $poolname
Note:
- #zpool offline $poolname $fakefile #didn't work for me