OK, so for others who might stumble upon this thread ... the
zpool create
options are not the problem.
Let's start with CORE because that is what I know. Let's assume that you want to create a mirrored pool on the drives ada0 and ada1, respectively.
1. Get rid of any partition information that might be on the drives:
Code:
gpart destroy -f ada0
gpart destroy -f ada1
2. Create a GPT partition scheme:
Code:
gpart create -s gpt ada0
gpart create -s gpt ada1
3. Create swap partitions:
Code:
gpart add -t freebsd-swap -s 2g ada0
gpart add -t freebsd-swap -s 2g ada1
If you changed the default swap partition size to anything but 2g (the default) in System > Advanced, then you need to substitute that value for 2g.
4. Create ZFS partitions:
Code:
gpart add -t freebsd-zfs ada0
gpart add -t freebsd-zfs ada1
5. Find the rawuuid values of the second partition of each of the disks:
Code:
gpart list ada0
[...]
2. Name: ada0p2
[...]
rawuuid: cdf41064-858b-11ea-a52c-0cc47afa3c72
[...]
gpart list ada1
2. Name: ada1p2
[...]
rawuuid: cdbefe36-858b-11ea-a52c-0cc47afa3c72
[...]
6. Now create your zpool with default values:
Code:
zpool create -o altroot=/mnt mypool mirror gptid/cdf41064-858b-11ea-a52c-0cc47afa3c72 gptid/cdbefe36-858b-11ea-a52c-0cc47afa3c72
7. Now you still MUST export the pool from the CLI and import it in the UI:
Code:
zpool export mypool
That's why I wrote there's probably no point in doing that. If you go ahead and just
zpool create
on the raw devices, neither your status display nor any extension or disk replacement operation in the UI will work. To use the pool in TrueNAS it MUST be constructed in specifically this way. The final export/import is necessary for the UI to know about the pool and record its existence in the configuration database.
@Samuel Tai can possibly add a
midclt
call for the import via UI so it can all be done in the CLI. Worth the effort? Your decision.
Now for SCALE you need to create the same partition scheme only you use (probably)
parted
in ways I am not familiar with. And of course different partition types. You can then probably get the UUIDs of the partitions with
lsblk
. When creating the pool you need to omit the
gptid/
part from partition references - these are FreeBSD specific. Just use the plain UUIDs. Probably. As I wrote I am not as familiar with Linux as I am with FreeBSD.
Finally just as with CORE you MUST export and re-import the pool.
HTH,
Patrick