Re: freebsd-update install no space left on device

From: Edward Sanford Sutton, III <mirror176_at_hotmail.com>
Date: Tue, 29 Jul 2025 10:14:07 UTC
On 7/29/25 01:47, Frank Leonhardt wrote:
 > On 28/07/2025 02:59, Robert wrote:
 >> On 7/27/2025 9:16 PM, atsac wrote:
 >>> Hi,
 >>>
 >>> Have you checked 'bectl list’?
 >>>
 >>> On a zfs install, updating creates a Boot Environment for the previous
 >>> install, so the previous version can be booted up on demand. These Boot
 >>> Environments can build up and consume a fair amount of disk space:
 >>>
 >>>    ~> bectl list
 >>>    BE                                Active Mountpoint Space Created
 >>>    12.3-RELEASE_2021-12-15_122800    -      -          104M
 >>> 2021-12-15 12:28
 >>>    13.0-RELEASE-p4_2021-12-15_135123 -      -          36.1M
 >>> 2021-12-15 13:51
 >>>    13.1-RELEASE-p3_2022-11-16_135244 -      -          1.36G
 >>> 2022-11-16 13:52
 >>>    13.1-RELEASE-p4_2022-12-13_192926 -      -          3.00G
 >>> 2022-12-13 19:29
 >>>    13.1-RELEASE_2022-11-02_154039    -      -          1.61G
 >>> 2022-11-02 15:40
 >>>    default                           NR     /          48.6G
 >>> 2016-06-04 03:16
 >>>
 >>> you can remove them with 'bectl destroy':
 >>>
 >>>    ~> sudo bectl destroy 13.0-RELEASE-p4_2021-12-15_135123
 >>>    ~> sudo bectl destroy 13.1-RELEASE-p3_2022-11-16_135244
 >>>
 >>> which releases the space consumed by the BE.
 >>
 >> I do remember reading about that, thanks for the reminder. My free
 >> disk space is a good 65% again now. That clear up the free space
 >> issue, and after a reboot, the zroot/ROOT/default size is now 2.9GB,
 >> up from 2.0GB but still not the 5.7GB is was yesterday. Is this 
expected?
 >>
 >> -- Robert
 >>
 > The mystery to me isn't the free space, it's that the total space has
 > changed. I'm watching this in case someone can explain.

   I seem to recall df uses zfs-incompatible math: size=available+used. 
That works if you don't use features like compression, deduplication, 
parity, snapshots, more than one dataset per pool, etc. Otherwise its 
best to either not use df with zfs datasets or become aware of its 
shortcomings. You would want to replace `df -h` with `zfs list -o 
name,usedds,avail,mountpoint` for closest I know of as a direct 
equivalent but you lose 'size' and 'capacity' columns and there is some 
other slight text differences in case you try to process the output with 
scripts. While learning to do things different, `zfs list -o space` and 
other variations are more useful than the usual df output and you can 
ask for the exact output you care about.

 > You can adjust the available space in a dataset (e.g. zfs get
 > quota,refquota zroot/ROOT/default) to stop a dataset consuming the whole
 > pool with a rogue logger process (or user) , but you'd know if you'd set
 > it yourself.
 >
 > I don't quite trust df with zfs  - "zfs list" may be more accurate.
 >
 > zfs list -t all -o name,used,avail,quota,refer,refquota,mountpoint
 >
 > Regards, Frank.
 >
 >
 >
 >
 >