Score:3

22.04.2 server image is *three* times the size of 22.04.1: why?

ec flag
EML

I'm sorry to have to say it, but the 22.04.2 server install has exploded. Unreasonably. What's going on?

I've been packaging Ubuntu-based VMs for several years, first on 20.04.x, then 22.04, 22.04.1, and now 22.04.2. These are based on the server downloads. The last two were:

-rw-rw-r-- 1 qemu qemu 1474873344 Nov  5 11:28 ubuntu-22.04.1-live-server-amd64.iso
-rw-rw-r-- 1 qemu qemu 1975971840 Mar  3 16:21 ubuntu-22.04.2-live-server-amd64.iso

The 20.04 server images came in at about 2 GB after initial installation, increasing to about 4 GB after adding a lot of extra custom stuff. These worked fine on a 6 GB VM. 22.04 got more difficult, but after gutting out snap final disk usage was still less than 4 GB, even with auto security updates on (which are expensive). These run fine on an 8 GB VM, with 50% of the SSD disk always free.

22.04.2 is in a completely different league. The standard server install starts out at 6.6 GB, before adding in anything else. Even the minimised install starts out at 6.2 GB, and has a habit of missing out important programs (what server doesn't need rsync and cron, for instance?)

So, basically, the base server image has more than tripled in size, and you've got to go to at least 12 GB SSD, and probably 16, to get a usable 22.04.2 server.

Why? What exactly is so wonderful about 22.04.2 that needs all this disk space?

Jeff avatar
mx flag
I'm putting this in as a comment, because this potential answer is based on a hypothesis that I just created: The server image is equipped with more server-level software than Ubuntu Desktop. Considering the fact that server software has a tendency to have more security features than basic software, it will take up more space than basic graphical software. I'm assuming that the new versions of Ubuntu Server are shipped with a live environment of sorts for testing and experimentation. Again, this is just a hypothesis.
FedKad avatar
cn flag
Can you compare machines of the last two versions by using `du` or some kind of directory based disk usage utility and show the top bloated directories?
waltinator avatar
it flag
AskUbuntu has nothing to do with packaging Ubuntu releases. Ask canonical.com
waltinator avatar
it flag
I’m voting to close this question because AskUbuntu doesn't package Ubuntu.
Andrew Lowther avatar
jp flag
You need to find what specifically is using that storage. If I perform a base server install with the 22.04 installer isos then I end up with root filesystems of `22.04: 2.7GB`, `22.04.1: 2.8GB`, `22.04.2: 2.9GB`.
ec flag
EML
@AndrewLowther: curious. Those numbers are pretty much what I expect. I wonder if the image has been mislabelled - I'll check it over in detail tomorrow.
ec flag
EML
I got on the computer for 10 minutes, and found the culprit: the swap file is a 4GB file at `/swap.img`, and is counted in `df` for `/`. The installer defaults have changed on 22.04.2; I'll have to go back and find out exactly what it did, and why.
Score:1
ec flag
EML

The defaults for the 22.04.2 console install (for the server image, at least) have changed for the partitioning. 22.04.1 gave you a usable LVM setup (although with no swap space, which may be fine depending on your circumstances). 22.04.2 gives you lots of free space, and creates a swap file at /swap, which isn't great. df was showing 6.3GB in /, rather than 2.3GB, because it was counting the default 4GB swap file in the totals.

If you're doing a console install, and want a sane LVM setup, you basically need to

  1. Select 'Use entire disk' on 'Guided storage configuration' (ie. leave everything at the defaults), and
  2. Delete everything on the next page ('Storage configuration'), and start again

I've attached an image for a sane setup for a 20GB device:

  1. The swap device should ideally be an LVM logical volume, and not a swap file

  2. In this case, I've given the swap device 2GB. Red Hat have a good summary of swap recommendations in their Managing storage devices doc, section 13

  3. This is a server, so I have a single LV for / (and no extra LV for /home, for example)

  4. The default boot partition size is 1.77GB, for some reason. This seems way over the top, and I've reduced it to 1GB. Note that this has to go on a separate partition, and not LVM, because the boot loader can't handle LVM (on Red Hat, at least)

enter image description here

Jeff avatar
in flag
To avoid this new situation, can I continue installing with the 22.04.1 ISO and just dist-upgrade later to get the latest kernel? Am I missing out anything not using the 22.04.2 installer?
ec flag
EML
@Jeff - I don't think you're missing out on anything, but can't really be sure. I've done several 22.04.2 images since this post, and the `dist-upgrade` on top of 22.04.2 currently adds almost nothing. I personally would bite the bullet and set up the new storage configuration explicitly.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.