Code:… # zpool status pool: zroot state: ONLINE config: NAME STATE READ WRITE CKSUM zroot ONLINE 0 0 0 ada0p4 ONLINE 0 0 0 errors: No known data errors
so,maybe :
zpool create ssd mirror /dev/gpt/zfs0 /dev/gpt/disk1 ? is this correct ?
… group these SSD disks to create a single large SSD disk …
zpool attach zroot /dev/ada0p4 /dev/ada1p1
=> 40 976773088 ada0 GPT (466G)
40 532480 1 efi (260M)
532520 1024 2 freebsd-boot (512K)
533544 984 - free - (492K)
534528 4194304 3 freebsd-swap (2.0G)
4728832 972044288 4 freebsd-zfs (464G)
976773120 8 - free - (4.0K)
=> 40 976773088 ada1 GPT (466G)
40 964689920 1 freebsd-zfs (460G)
964689960 12083168 - free - (5.8G)
-n
allows you to perform a dry run. zpool add -n zroot /dev/ada1p1
… Once you've added a vdev to a pool, you basically cannot remove it without recreating the pool from scratch. …
Does it means that I should destroy the content of the two ssd disks ?
No,I don't want to create a mirror. I want to enlarge
Use mirror. If you need more space, get bigger disks. Period.
That's no longer true as of OpenZFS 0.8 (FreeBSD 13.0 uses 2.0). You can remove basically any top-level vdev except for raidzN and draidzN, reducing the space in a pool.Please note, from <https://unix.stackexchange.com/a/532601/13260> (with added emphasis):
root@mowa219-gjp4-8570p-freebsd:~ # zpool create blah /dev/da3p1
root@mowa219-gjp4-8570p-freebsd:~ # zpool status blah
pool: blah
state: ONLINE
config:
NAME STATE READ WRITE CKSUM
blah ONLINE 0 0 0
da3p1 ONLINE 0 0 0
errors: No known data errors
root@mowa219-gjp4-8570p-freebsd:~ # zpool add -n blah /dev/da4p1
would update 'blah' to the following configuration:
blah
da3p1
da4p1
root@mowa219-gjp4-8570p-freebsd:~ # zpool add blah /dev/da4p1
root@mowa219-gjp4-8570p-freebsd:~ # mount | grep blah
blah on /blah (zfs, local, nfsv4acls)
root@mowa219-gjp4-8570p-freebsd:~ # touch /blah/touched
root@mowa219-gjp4-8570p-freebsd:~ # time zpool remove blah /dev/da4p1
0.000u 0.004s 0:27.76 0.0% 0+0k 0+1io 0pf+0w
root@mowa219-gjp4-8570p-freebsd:~ # file /blah/touched
/blah/touched: empty
root@mowa219-gjp4-8570p-freebsd:~ # zpool status -v blah
pool: blah
state: ONLINE
remove: Removal of vdev 1 copied 76K in 0h0m, completed on Sun Apr 3 20:23:55 2022
96 memory used for removed device mappings
config:
NAME STATE READ WRITE CKSUM
blah ONLINE 0 0 0
da3p1 ONLINE 0 0 0
errors: No known data errors
root@mowa219-gjp4-8570p-freebsd:~ # zfs unmount blah
root@mowa219-gjp4-8570p-freebsd:~ # zpool destroy blah
root@mowa219-gjp4-8570p-freebsd:~ # zpool labelclear /dev/da3p1
root@mowa219-gjp4-8570p-freebsd:~ # zpool labelclear /dev/da4p1
root@mowa219-gjp4-8570p-freebsd:~ #