Proper mountpoints for ZFS Root

I recently changed my root ZFS from a mechanical HDD to a smaller SSD. I did it with "syncoid" as syncoid -r zroot zroot2, but some mountpoints were not preserved.

But I think my mountpoints are messed up, here's what they look like:
Code:
zroot                                          101G   107G       96K  /zroot
zroot/ROOT                                    61.0G   107G      104K  /zroot/ROOT
zroot/ROOT/13.1-RELEASE-p1_2022-09-05_084755   104M   107G     29.9G  /zroot/ROOT/13.1-RELEASE-p1_2022-09-05_084755
zroot/ROOT/13.1-RELEASE-p2_2022-11-04_140801   107M   107G     24.8G  /zroot/ROOT/13.1-RELEASE-p2_2022-11-04_140801
zroot/ROOT/13.1-RELEASE_2022-08-12_222505     98.2M   107G     29.4G  /zroot/ROOT/13.1-RELEASE_2022-08-12_222505
zroot/ROOT/default                            60.7G   107G     28.8G  /zroot/ROOT/default
zroot/tmp                                      515M   107G      515M  /tmp
zroot/usr                                     38.9G   107G       96K  none
zroot/usr/home                                32.0G   107G     9.72G  /usr/home
zroot/usr/ports                               5.32G   107G     5.25G  /usr/ports
zroot/usr/src                                 1.51G   107G     1.48G  /usr/src
zroot/var                                      220M   107G      183M  /var
zroot/var/audit                                152K   107G       88K  /var/audit
zroot/var/crash                                156K   107G       92K  /var/crash
zroot/var/log                                 36.8M   107G     34.7M  /var/log
zroot/var/mail                                 204K   107G      148K  /var/mail
zroot/var/tmp                                  384K   107G      304K  /var/tmp

I think zroot/ROOT/default is supposed to have / as mountpoint, but I'm not sure about the 13.1-RELEASE-- ones ( created by freebsd-update)

I know I lost my pkg DB but I suspect it's in one of the other ROOT pools

I think they're all supposed to be mounted as / and they're overlaid? But I don't want to mess up my system any further.
 
You need to have a boot-enivronment-hierarchy.
My mountpoints
Code:
zroot               ->  none
zroot/ROOT          ->  none
zroot/ROOT/default  ->  legacy

zroot/usr     -> none
zroot/var     -> none

zroot/usr/home      ->  /usr/home
...
 
This is a fairly default system:
Code:
dice@maelcum:~ % zfs list -o name,canmount,mountpoint
NAME                                       CANMOUNT  MOUNTPOINT
zroot                                      on        /zroot
zroot/ROOT                                 on        none
zroot/ROOT/13.1-RELEASE_2022-11-06_211508  noauto    /
zroot/ROOT/default                         noauto    /
zroot/tmp                                  on        /tmp
zroot/usr                                  off       /usr
zroot/usr/home                             on        /usr/home
zroot/usr/ports                            on        /usr/ports
zroot/usr/src                              on        /usr/src
zroot/var                                  off       /var
zroot/var/audit                            on        /var/audit
zroot/var/crash                            on        /var/crash
zroot/var/log                              on        /var/log
zroot/var/mail                             on        /var/mail
zroot/var/tmp                              on        /var/tmp
 
Basically all the Boot Environments have a mountpoint of / BUT the big key is they all have either canmount off or noauto. Activating one using bectl/beadm (or selecting from loader) is what causes it to mount correctly on /.

That's what SirDice and Alain De Vos are showing you.

Can you show the output of the same zfs list command that SirDice did?
 
ok so here is my output:

Code:
NAME                                          CANMOUNT  MOUNTPOINT
zroot                                         on        /zroot
zroot/ROOT                                    on        /zroot/ROOT
zroot/ROOT/13.1-RELEASE-p1_2022-09-05_084755  on        /zroot/ROOT/13.1-RELEASE-p1_2022-09-05_084755
zroot/ROOT/13.1-RELEASE-p2_2022-11-04_140801  on        /zroot/ROOT/13.1-RELEASE-p2_2022-11-04_140801
zroot/ROOT/13.1-RELEASE_2022-08-12_222505     on        /zroot/ROOT/13.1-RELEASE_2022-08-12_222505
zroot/ROOT/default                            on        /zroot/ROOT/default
zroot/tmp                                     on        /tmp
zroot/usr                                     on        none
zroot/usr/home                                on        /usr/home
zroot/usr/ports                               on        /usr/ports
zroot/usr/src                                 on        /usr/src
zroot/var                                     on        /var
zroot/var/audit                               on        /var/audit
zroot/var/crash                               on        /var/crash
zroot/var/log                                 on        /var/log
zroot/var/mail                                on        /var/mail
zroot/var/tmp                                 on        /var/tmp

from what i understand, I should "zfs set" those properties to make them match SirDice's ouput?
 
Back
Top