|
|
Log in / Subscribe / Register

Don't underestimate cloud image builders

Don't underestimate cloud image builders

Posted May 14, 2022 7:14 UTC (Sat) by Wol (subscriber, #4433)
In reply to: Don't underestimate cloud image builders by garloff
Parent article: Changing filesystem resize patterns

Or have something similar to LVM. When I snapshot an image I can allocate only a small amount of space. As I carry on working, the snapshot grows as required.

So have an lvm-style option that says "create 1TB volume, with initial 10GB allocation". Then when I run mkfs it thinks its got a terabyte to play with. We have things like trim, and all that, nowadays, so the volume level has all the information it needs to only allocate and use the actual space it needs.

This way (in line with Unix's "do one thing and do it well") we don't need to change any filesystems or anything - we just have a layer dedicated to "squashing" a disk image into the smallest real disk space reasonably possible. Maybe tweak the layers above to "format by allocating zeroes" rather than actually writing "this space is empty" data, and you can have large, optimised, allocation tables that don't actually take up any disk space.

Cheers,
Wol


to post comments

Don't underestimate cloud image builders

Posted May 14, 2022 8:54 UTC (Sat) by dtlin (subscriber, #36537) [Link] (1 responses)

LVM thin is that layer currently - you can "create 1TB volume, with initial 10GB allocation", under any filesystem. It would be more usable with a bit more integration - e.g. if the filesystem could report "90% used (out of 10GB available space)" rather than "0.9% used (out of 1TB virtual space)" - but it does work.

Don't underestimate cloud image builders

Posted May 14, 2022 23:34 UTC (Sat) by dgc (subscriber, #6611) [Link]

That's pretty much exactly what I've been proposing - the small mods to the filesystem I talked about and pointed to the patch series from 2017 are exactly the mods needed for the fs to 'report "90% used (out of 10GB available space)"'....

-Dave.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds