Prior to "properly" understanding BEs (Boot Environments) I used the following workflow:
This basically means that I create a new BE, boot into it, perform modifications and then either stay in that newly created BE if things worked out or roll back to the previous BE.
However, I came to the understanding that a more reasonable workflow is to create a BE, NOT activating & booting into it but rather staying in the same BE (eg. default) and only rolling back to the newly created BE if necessary.
This means that I now have a machine where
I wanted to "migrate" to the "new" approach of using BEs as described above. For this, my planned workflow is:
However,
Note: My jails are not named jail1 to jail8. I just replaced the actual jail names for the sake of this post.
So I'm a bit confused here.
Why would
How does one go about figuring out the actual problem (why the dataset is busy) and eventually resolving the problem?
Code:
bectl create 20220312
bectl activate 20220312
shutdown -r now
# perform actual update (eg. freebsd-update or update from source)
shutdown -r now
However, I came to the understanding that a more reasonable workflow is to create a BE, NOT activating & booting into it but rather staying in the same BE (eg. default) and only rolling back to the newly created BE if necessary.
This means that I now have a machine where
bectl list
shows:
Code:
jbo@knox:~ % bectl list
BE Active Mountpoint Space Created
20220506 NR / 7.68G 2022-05-06 14:08
default - - 29.6G 2020-07-21 16:09
I wanted to "migrate" to the "new" approach of using BEs as described above. For this, my planned workflow is:
- Remove BE default
- Rename the currently active BE to default
- Activate & boot into the renamed default BE
- Optionally remove other BEs
However,
bectl destroy -o deafult
shows:
Code:
jbo@knox:~ % doas bectl destroy -o default
cannot destroy 'zroot/ROOT/default/jail4': dataset is busy
unknown error
zfs list
shows:
Code:
jbo@knox:~ % zfs list
NAME USED AVAIL REFER MOUNTPOINT
nvme 1.23M 225G 96K /nvme
nvme/cbsd 96K 225G 96K /nvme/cbsd
storage 10.7T 6.34T 128K /storage
storage/emby 10.6T 6.34T 10.6T /storage/emby
storage/nextcloud 114G 6.34T 114G /storage/nextcloud
zroot 37.2G 186G 88K /zroot
zroot/ROOT 37.1G 186G 88K none
zroot/ROOT/20220506 7.68G 186G 5.66G /
zroot/ROOT/default 29.5G 186G 5.52G /
zroot/ROOT/default/jail1 462M 186G 209M /usr/jails/jails-data/jail1-data
zroot/ROOT/default/jail2 199M 186G 114M /usr/jails/jails-data/jail2-data
zroot/ROOT/default/jail3 16.3G 186G 5.45G /usr/jails/jails-data/jail3-data
zroot/ROOT/default/jail4 2.30G 186G 2.30G /usr/jails/jails-data/jail4-data
zroot/ROOT/default/jail5 965M 186G 574M /usr/jails/jails-data/jail5-data
zroot/ROOT/default/jail6 1.01G 186G 1.01G /usr/jails/jails-data/jail6-data
zroot/ROOT/default/jail7 3.45G 186G 2.61G /usr/jails/jails-data/jail7-data
zroot/ROOT/default/jail8 4.84G 186G 2.00G /usr/jails/jails-data/jail8-data
zroot/tmp 852K 186G 456K /tmp
zroot/usr 872K 186G 88K /usr
zroot/usr/home 496K 186G 252K /usr/home
zroot/usr/ports 144K 186G 88K /usr/ports
zroot/usr/src 144K 186G 88K /usr/src
zroot/var 6.66M 186G 88K /var
zroot/var/audit 144K 186G 88K /var/audit
zroot/var/crash 144K 186G 88K /var/crash
zroot/var/log 4.13M 186G 1.42M /var/log
zroot/var/mail 1.96M 186G 1.76M /var/mail
zroot/var/tmp 208K 186G 88K /var/tmp
So I'm a bit confused here.
Why would
bectl list
show that only BE 20220506 is active and mounted (BE default shows no mountpoint) yet I'm not able to delete it due to the dataset being busy.How does one go about figuring out the actual problem (why the dataset is busy) and eventually resolving the problem?