This is an after-action report for the benefit of anyone who might be in a similar situation.
After deciding that deactivating the LVM partition was ok, I booted into my live cd again. I now had the boot partition first as the primary partition, an extended partition second containing the third LVM partition followed by some unallocated space not contained in any partition. But at this point I ran into a snag. I could not find a way in gparted to move the unallocated space to the left past the nested pair of partitions with the lvm so it would be adjacent to the boot partition. I decided to expand the container partition (sdd2) to include the unallocated space again. I deactivated the lvm partition and edited the container to add the following unallocated space. Once I had done that I moved the contained partition (sdd5) to the right so the unallocated disk space was at the beginning of the the container partition rather than at the end. In the resize dialog for the nested partition there were text boxes saying, "Free space preceding (MiB)," "New size (MiB)" and "Free space following (MiB)". The "following" space was my 1G of empty disk space, so I changed the "preceding" space to that size and the "following" space to zero. I then applied (edit, apply). I could not figure out a way to perform this move using the mouse and the gui slider, but typing in the values worked.
Because this was disk copying from the same disk to itself I was hoping this would be reasonably fast but in fact it took ten hours to move 1.82TB. So be prepared; that's a lot of TikTok viewing. If I had realized it was going to take ten hours I would have checked the weather before starting to see if there were any storms in the forecast.
At the end of this move I now had the unallocated space at the beginning of the container partition (sdd2). I selected the container partition and brought up the resize dialog. Unlike the contained LVM partition it reported that there was no unallocated space before and none after. Again I could not figure out how to use the gui and the slider to resize the partition. There being no reported space before or after, I also did not see at first how to move the unallocated space at the start of the contain partition outside of it. Then I noticed that the dialog had two values, "Minimum size" and "Maximum size", displayed, and that the "Minimum size" was exactly 1G smaller than the "Maximum size". So I set the "New size" to be the minimum size, and here I hit another snag. I got the error message,
Code: Select all
gparted bug a partition cannot end (some number here) after the end of the device (%2).
This seemed to be due to the sdd2 partition not being aligned on a suitable boundary. So instead of resizing the container partition (sdd2) to the reported minimum size I resized it to the minimum size plus 2M, because I knew that was the amount that was unallocated before I started. I had to restart gparted before I could get this to work, but once I did applied the new size to the container partition (sdd2) I now had the unallocated space minus 2M outside the sdd2 partition and adjacent to the sdd1 partition. From here it was downhill. I resized the boot partition (sdd1) so it used all the unallocated space and applied. I was expecting to have to use resize2fs to expand the first partition's filesystem but apparently gparted did this for me automatically.
End result: profit! The /boot partition now has 1.24G of space. No data loss on any partition. The process was not as smooth as silk; it was not clear to me how to proceed forward with gparted a couple times, but in the end I stumbled through the maze.
Aside: the live cd figured out my 27 inch monitor on boot, but when the live cd screen display timed out, it would put up a black screen and would not display the dialog to log back in. I had to type the password in blind (the password for the default user "user" is "live"). Once logged in again the screen would remember how to draw itself and display properly, albeit with a dialog for reconfiguring the display drawn on it. The first time this happened it was quite disconcerting because I was waiting for a two terabyte partition to finish moving. This was to take many hours, and I wanted to look at the progress. If logging in blind hadn't worked I would have had to guess when the partition was done moving and then push the power switch. Needless to say I'm glad it didn't come to that. I think this is because the monitor powers down after being idle for a long time, and when it revives to put up the login screen, the live disk isn't able to perform its monitor recognition code. Whatever defaults the live disk is using do not match what the monitor wants, and so until the login was complete all I could see was a black screen.
Aside: when performing gparted operations the "deactivation" of the lvm disk was not sticky. I would apply an operation and afterwards find the partition was locked and active again. I kept having to deactivate the same partition. This wasn't a problem; it was just a bit surprising.
Aside: on boot the disk device names can change between boots of the live cd. I have referred to the disk here as "sdd" and the partitions as "sdd1," "sdd2" and "sdd5," but at one point they came up as "sdc" instead of "sdd". Not a problem; just something to be aware of.