Strange zfs filesystems

dougs

Active Member

Reaction score: 11
Messages: 159

After upgrading from 12.2-RELEASE-p7 to 13.0-RELEASE, I noticed the following in the filesystems:

Code:
[root@backup 29.Jul 10:29am ~]# df
Filesystem                                             1K-blocks       Used       Avail Capacity  Mounted on
zroot/ROOT/13.0-RELEASE                                 47624324   14742528    32881796    31%    /
devfs                                                          1          1           0   100%    /dev
fdescfs                                                        1          1           0   100%    /dev/fd
zroot/ROOT/12.2-RELEASE-p7/tmp                          32882080        284    32881796     0%    /tmp
zroot/ROOT/12.2-RELEASE-p7/usr                          36618696    3736900    32881796    10%    /usr
zroot/ROOT/12.2-RELEASE-p7/var                          37102088    4220292    32881796    11%    /var
zroot/ROOT/12.2-RELEASE-p7/root                         37621684    4739888    32881796    13%    /root
zroot/ROOT/12.2-RELEASE-p7/var/run                      32882636        840    32881796     0%    /var/run
zroot/ROOT/12.2-RELEASE-p7/var/log                      33134404     252608    32881796     1%    /var/log
zroot/ROOT/12.2-RELEASE-p7/usr/local                    39563904    6682108    32881796    17%    /usr/local
zroot/ROOT/12.2-RELEASE-p7/var/empty                    32882012        216    32881796     0%    /var/empty
zroot/ROOT/12.2-RELEASE-p7/usr/home                     32882468        672    32881796     0%    /usr/home
zroot/ROOT/12.2-RELEASE-p7/var/mail                     32882012        216    32881796     0%    /var/mail
zroot/ROOT/12.2-RELEASE-p7/usr/obj                      33452724     570928    32881796     2%    /usr/obj
zroot/ROOT/12.2-RELEASE-p7/usr/src                      34380848    1499052    32881796     4%    /usr/src
zroot/ROOT/12.2-RELEASE-p7/usr/ports                    35312988    2431192    32881796     7%    /usr/ports
zroot/ROOT/12.2-RELEASE-p7/var/crash                    32881964        168    32881796     0%    /var/crash
zroot/ROOT/12.2-RELEASE-p7/var/audit                    32882036        240    32881796     0%    /var/audit
zroot/ROOT/12.2-RELEASE-p7/var/tmp                      32881984        188    32881796     0%    /var/tmp
zroot/ROOT/12.2-RELEASE-p7/usr/ports/distfiles          35154988    2273192    32881796     6%    /usr/ports/distfiles
zdata                                                12249486239         86 12249486152     0%    /zdata
[...]

Why is / on 13.0-RELEASE while the rest are on 12.2-RELEASE-p7? The folders below the root folder should not be displaying the release name. Instead these should have the following naming convention as follows:

Code:
zroot/ROOT/tmp                          32882080        284    32881796     0%    /tmp
zroot/ROOT/usr                          36618696    3736900    32881796    10%    /usr
zroot/ROOT/var                          37102088    4220292    32881796    11%    /var
zroot/ROOT/root                         37621684    4739888    32881796    13%    /root
zroot/ROOT/var/run                      32882636        840    32881796     0%    /var/run
zroot/ROOT/var/log                      33134404     252608    32881796     1%    /var/log
zroot/ROOT/usr/local                    39563904    6682108    32881796    17%    /usr/local
zroot/ROOT/var/empty                    32882012        216    32881796     0%    /var/empty
zroot/ROOT/usr/home                     32882468        672    32881796     0%    /usr/home
zroot/ROOT/var/mail                     32882012        216    32881796     0%    /var/mail
zroot/ROOT/usr/obj                      33452724     570928    32881796     2%    /usr/obj
zroot/ROOT/usr/src                      34380848    1499052    32881796     4%    /usr/src
zroot/ROOT/usr/ports                    35312988    2431192    32881796     7%    /usr/ports
zroot/ROOT/var/crash                    32881964        168    32881796     0%    /var/crash
zroot/ROOT/var/audit                    32882036        240    32881796     0%    /var/audit
zroot/ROOT/var/tmp                      32881984        188    32881796     0%    /var/tmp
zroot/ROOT/usr/ports/distfiles          35154988    2273192    32881796     6%    /usr/ports/distfiles

Is it related to what I did using bectl by removing the "default" environment prior to the upgrade?

Code:
[root@backup 29.Jul 10:30am ~]# bectl list
BE              Active Mountpoint Space Created
12.2-RELEASE-p7 -      -          30.1G 2017-08-07 11:10
13.0-RELEASE    NR     /          14.2G 2021-07-28 13:14
[root@backup 29.Jul 10:32am ~]#

If so, how can undo this? Or can I just rename 12.2-RELEASE-p7 to default?
 

xtaz

Well-Known Member

Reaction score: 142
Messages: 472

It's because the listed datasets are not part of the boot environment. Because if you switch between boot environments you don't want things like your home directories or mail folders going back in time along with the rest of the o/s.

If you deleted the default one then the 12.2 one would have been promoted to become the active dataset. It's just a name, you can rename it to anything you like, or even delete it.

bectl rename 12.2-RELEASE-p7 default. This will rename it to default.

or bectl destroy 12.2-RELEASE-p7. This will delete it so that it becomes 13.0-RELEASE.
 
OP
dougs

dougs

Active Member

Reaction score: 11
Messages: 159

How do I remove the datasets that I don't want part of the boot environment from the boot environment?
 

xtaz

Well-Known Member

Reaction score: 142
Messages: 472

The boot environment is everything that is mounted under zroot/ROOT/<name>. All of the other datasets are outside of the boot environment, so things like zroot/usr/home or zroot/usr/src will not change.

If you want to take something out of a boot environment then you have to create a new dataset for it and mount it over the top of the / one.
 
OP
dougs

dougs

Active Member

Reaction score: 11
Messages: 159

If you used bectl(8) to create the snapshot: did you inadvertently or intentionally use option -r?
I unintentionally might have. How does one remove a child filesystem from the boot environment and not lose the dataset in the process?
 
Top