Hi,

I took a look a this again, to see how much of a potential gain it would
provide, and here is what I found:

    # df -h /
    Filesystem            Size  Used Avail Use% Mounted on
    /dev/mapper/cryptvol   98G   76G   22G  79% /

    # btrfs inspect-internal min-dev-size /
    104517861376 bytes (97.34GiB)

In other words, it doesn't look like one of the existing (safe)
approaches would be useful.

I'm guessing that this is the difference between

    # btrfs filesystem usage -b /
    Device size:                      104517861376
    Device allocated:                 104516812800

BTRFS-FILESYSTEM(8) indicates that "There are two ways to minimize the
filesystem on a given device. The btrfs inspect-internal min-dev-size
command, or iteratively shrink in steps."  So I wonder if you're asking
for syntactic candy that shrinks the filesystem by something like 512MB
every step, in a loop, until it gracefully fails.  Assuming it
safely and gracefully fails...

Regards,
Nicholas

Attachment: signature.asc
Description: PGP signature

Reply via email to