So, here I was, demonstrating my LVM script to a new friend in the Houston Linux User’s Group meeting on Wednesday, and in testing above 23.04 Desktop, I see that my LVM configuration is not even recognized – Canonical apparently changed the Installer on 23.04 and up (per Ubuntu forum posts). So, for a 24.04 (latest LTS) to use LVM, I’m starting the install with Ubuntu 22.04 and going up from there.
LVM, or Logical Volume Manager is a storage management system that allows for the use of any available storage into a pool for extending or protecting data. It claims disks or partitions on disks and adds them as available storage to a volume group. This group can be made of any number of physical volumes and when joined to the pool (volume group), logical volumes can be created with a RAID setting, that will determine how the logical volume is used (extend, RAID 0), or protected (RAID 1 – mirror, 3 – striped with dedicated parity, or 5 – striped with parity). Since this is test and only one drive is available to my system, I’d only be interested in extending. I first got my experience with LVM with a large HPE Superdome system running HP-UX that was backed ended with a SAN. Since the SAN was RAIDed and resilient, we used the extend capabilities for filesystems that started getting full. I use this same paradigm for my local Linux implementations. I can simply add a virtual disk into the VM and extend any number of partitions.
My new 22.04 Live CD to setup the LVM:
Now, get the script from Github (https://www.github.com/HoustonGeek/rancher), and copy into a vi session:
As you can see, I setup for UEFI boot (EFI Fat16 partition at the start of the disk), and then segment out home, boot, and var – so that a logging or too many downloads don’t crater the root volume, which makes up the rest of the disk after also accounting for the swap file. Set it executable and run the script. Now run the installer, and select “Something else” on the Installation Type layout the directories:
On the later reelases of Ubuntu, this only shows a /dev/sda2 partition – it doesn’t read the LVM configuration.
Next, verify the changes and off it goes and installs. After a reboot, we have our properly laid out LVM configuration and can start the upgrade.
In looking at the new command in Ubuntu – “do-release-upgrade”, but before I can get there – updates are available…
Now back to do-release-upgrade – and it’s says the next it 23.10.
Here goes the next release…
With that complete, I try it again to bump up to 24.04. Hmmm, I know there’s another….
So, there’s an option for this command a “-d” to get to look at non-equivalent releases (LTS and non-LTS). I didn’t need it from 22.04 LTS to 23.10, but looks like I do for 23.10 to 24.04 LTS.
While that runs – I check the filesystems – LVM still in effect!
After I answer a few questions for the installation, it completes and I check the filesystem again.
And finally, I have an Ubuntu 24.04 installation with LVM up and running.