Assuming you're asking me, partitions because raw devices may not be exactly the same size and partitioning lets you set things up on good alignment.Neat! Did you use partitions or raw devices?
gpart create -s GPT ada0
gpart create -s GPT ada1
gpart add -a 1M -l SSD_serial# -t freebsd-zfs ada0
gpart add -a 1M -l SSD_serial# -t freebsd-zfs ada1
sysctl vfs.zfs.min_auto_ashift=12
(is already in my /etc/sysctl.conf) zpool create datadump mirror gpt/SSD_serial# gpt/SSD_serial#
Separating the OS and "data" is good, I've been doing that for a long time, it makes upgrading things easy. Consider what you want to put on the new mirror, I typically put /usr/home there (multiple users you can create a dataset for each one) and a generic "data" dataset.Will the mirror be automatically added to my existing system or do I have to create a "mountpoint" beforehand like e.g. /mnt?
# smartctl -a /dev/ada0 | grep Serial
Serial Number: BTHC7410008H400VGN
# smartctl -a /dev/ada1 | grep Serial
Serial Number: BTHC534204D4400VGN
# gpart show ada0
=> 40 781422688 ada0 GPT (373G)
40 1024 1 freebsd-boot (512K)
1064 984 - free - (492K)
2048 33554432 2 freebsd-swap (16G)
33556480 180355072 3 freebsd-zfs (86G)
213911552 25165824 4 freebsd-zfs (12G)
239077376 542345352 5 freebsd-zfs (259G)
# gpart list ada0 | grep label
label: 410008H400VGN:p1
label: 410008H400VGN:p2
label: 410008H400VGN:p3
label: 410008H400VGN:p4
label: 410008H400VGN:p5
# zpool status zroot
pool: zroot
state: ONLINE
scan: scrub repaired 0B in 00:03:30 with 0 errors on Wed Apr 5 03:21:10 2023
config:
NAME STATE READ WRITE CKSUM
zroot ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
gpt/410008H400VGN:p3 ONLINE 0 0 0
gpt/34204D4400VGN:p3 ONLINE 0 0 0
errors: No known data errors
# gmirror status
Name Status Components
mirror/swap COMPLETE ada0p2 (ACTIVE)
ada1p2 (ACTIVE)
# swapinfo
Device 1K-blocks Used Avail Capacity
/dev/mirror/swap.eli 16777212 0 16777212 0%
# gpart show da0
=> 40 5860533088 da0 GPT (2.7T)
40 5860533088 1 freebsd-zfs (2.7T)
# smartctl -a /dev/da0 | grep Serial
Serial Number: ZC135AE5
# gpart list da0 | grep label
label: L0:ZC135AE5
# zpool status tank
pool: tank
state: ONLINE
scan: scrub repaired 0B in 07:26:21 with 0 errors on Thu Feb 9 10:32:49 2023
config:
NAME STATE READ WRITE CKSUM
tank ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
gpt/L1:ZC1564PG ONLINE 0 0 0
gpt/L6:WMC1T1408153 ONLINE 0 0 0
mirror-1 ONLINE 0 0 0
gpt/L0:ZC135AE5 ONLINE 0 0 0
gpt/L5:WMC1T2195505 ONLINE 0 0 0
mirror-2 ONLINE 0 0 0
gpt/L4:ZC12LHRD ONLINE 0 0 0
gpt/L3:WCC4N5CVZ6V4 ONLINE 0 0 0
mirror-3 ONLINE 0 0 0
gpt/L2:ZC1AKXQM ONLINE 0 0 0
gpt/L7:WE23ZTX9 ONLINE 0 0 0
special
mirror-5 ONLINE 0 0 0
gpt/34204D4400VGN:p5 ONLINE 0 0 0
gpt/410008H400VGN:p5 ONLINE 0 0 0
logs
mirror-4 ONLINE 0 0 0
gpt/410008H400VGN:p4 ONLINE 0 0 0
gpt/34204D4400VGN:p4 ONLINE 0 0 0
errors: No known data errors