Upgrading Ubuntu 18.04.4 to 20.04

My home NAS / Plex server is currently running Ubuntu Server 18.04.4. I have no plans to upgrade until Canonical releases 20.04.1, but in the meantime I wondered if I could run through the procedure in a VM to see if there are any gotchas going from 18.04.4 to 20.04.

I’m also using LVM to manage my RAID setup. I have 4 physical volumes just shy of 10TB (according to sudo pvscan):

  • /dev/sdb – vg1 – WD 3TB Red 5400RPM
  • /dev/sdc – vg1 – WD 3TB Red 5400RPM
  • /dev/sdd – vg0 – WD 2TB Red 7200RPM
  • /dev/sde – vg0 – WD 2TB Red 7200RPM

Not sure why I bought two different speeds, but I kept them grouped together. Running sudo lvscan I get:

  • ACTIVE /dev/vg0/home [3.00 TiB] — where home folders and backups are stored
  • ACTIVE /dev/vg1/media [6.00 TiB] — all media for Plex

I built my VM with LVM enabled and it decides to give me a paltry 4GB root partition. I don’t know if this is enough disk space to do an upgrade, so I need to resize it first. This isn’t a problem I’ll have with my NAS since I already created those filesystems as large as the physical media will allow. But this might be handy to note if I ever add another drive down the line.

On my VM, running sudo vgdisplay I get:

  • ubuntu-vg, lvm2, read/write, resizable, VG size = 9.00 GiB, PE size = 4.00 MiB

Creating a snapshot before doing this, just to make sure I don’t hose the filesystem afterwards:

$ sudo lvresize --size +4G /dev/ubuntu-vg/ubuntu-lv --resizefs

Now when I type df -h I can see I have plenty of space available to try to do-release-upgrade:

                                  Size Used Avail Use% Mounted on
/dev/mapper/ubuntu--vg-ubuntu--lv 7.9G 1.9G  5.7G  25% /

After a reboot to make sure everything comes back up the same, I type:

$ sudo do-release-upgrade -d

Upgrade script says it needs to download about 450MB of new packages, so that’s a lot less than I was expecting (probably didn’t need to resize anything after all).

After a short while, the upgrade finishes. I can still login without any problems. Typing df -h, I can see about 600MB has been used by the upgrade:

                                  Size Used Avail Use% Mounted on
/dev/mapper/ubuntu--vg-ubuntu--lv 7.9G 2.5G  5.1G  33% /

This is very reassuring, but I think I’m still going to wait until 20.04.1 to upgrade my Plex server.

One thought on “Upgrading Ubuntu 18.04.4 to 20.04

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s