Hello, I am using FreeBSD 14.0R
I try to attach a same ssd to zroot zpool
while using the gpart restore, I cannot get extract same result.
Why there are two free space at first and last partition?
if I manualy create gpt schema, it is fine.
I check gpart restore, there no more other options I can try
Code:
root@vmhost:~ # uname -a
FreeBSD vmhost 14.0-RELEASE FreeBSD 14.0-RELEASE #0 releng/14.0-n265380-f9716eee8ab4: Fri Nov 10 05:57:23 UTC 2023 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
while using the gpart restore, I cannot get extract same result.
Code:
root@vmhost:~ # gpart show ada0
=> 40 1875384928 ada0 GPT (894G)
40 532480 1 efi (260M)
532520 67108864 2 freebsd-swap (32G)
67641384 1807743584 3 freebsd-zfs (862G)
root@vmhost:~ # gpart backup ada0 | gpart restore -F ada1
root@vmhost:~ # gpart show ada1
=> 34 1875384941 ada1 GPT (894G)
34 6 - free - (3.0K)
40 532480 1 efi (260M)
532520 67108864 2 freebsd-swap (32G)
67641384 1807743584 3 freebsd-zfs (862G)
1875384968 7 - free - (3.5K)
if I manualy create gpt schema, it is fine.
Code:
root@vmhost:~ # gpart destroy -F ada1
ada1 destroyed
root@vmhost:~ # gpart create -s gpt ada1
ada1 created
root@vmhost:~ # gpart add -t efi -l efiboot0 -s 532480 ada1
ada1p1 added
root@vmhost:~ # gpart add -t freebsd-swap -s 67108864 ada1
ada1p2 added
root@vmhost:~ # gpart add -t freebsd-zfs ada1
ada1p3 added
root@vmhost:~ # gpart show ada1
=> 40 1875384928 ada1 GPT (894G)
40 532480 1 efi (260M)
532520 67108864 2 freebsd-swap (32G)
67641384 1807743584 3 freebsd-zfs (862G)