I installed Ubuntu 18.04 onto an old PC that had a 320 Mb IDE HDD. Everything seemed to work well so I used Clonezilla to clone the install onto a 512 Mb SDD.
Even though I set Clonezilla to expand the partitions, it didn't do so. I'm guessing this is because I built 18.04 using LVM which I fully acknowledge I don't know a lot about.
In the process of trying to expand the root file system I may have clobbered the swap partition. I get conflicting results from various commands.
At this point, I would like to salvage this installation, mostly to increase my knowledge on how LVM works and how to correct problems and mistakes. One of the problems I am having is that many/most of the related questions here on this topic are not relevant for LVM file systems and have answers that use Gparted and Gnome-disk to answer the questions. I think I got myself in trouble following answers/advice that was not relevant for LVM.
I did try using Gparted on a liveCD and apparently it doesn't work for LVM system. Yes? I think this is where I inadvertently deleted the swap partition. So I'm really in the weeds on this and could use some direction from some kind soul on where to go from here.
If someone could verify whether Clonezilla can be used to clone LVM file systems as part of their answer, that would be great. And answer I saw at Restoring clonezilla image to newly created LVM partition indicates problems using Clonexzilla and I did have to use a rescue tool to make the target SSD bootable. This is why I am asking if my current situation is salvageable.
According to LVM and gnome-disk, the swap file is still there:
lvm> lvdisplay --- Logical volume --- LV Path /dev/ubuntu-vg/root LV Name root VG Name ubuntu-vg LV UUID NmDtyn-XhW7-OV4n-5Kfq-V3QB-ldt7-d8325P LV Write Access read/write LV Creation host, time ubuntu, 2018-07-05 20:40:17 -0700 LV Status available # open 1 LV Size <297.13 GiB Current LE 76065 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:0 --- Logical volume --- LV Path /dev/ubuntu-vg/swap_1 LV Name swap_1 VG Name ubuntu-vg LV UUID E3Ichc-YH2h-ucFD-dU9a-F4QR-Bb2s-QBCSJp LV Write Access read/write LV Creation host, time ubuntu, 2018-07-05 20:40:17 -0700 LV Status available # open 2 LV Size 980.00 MiB Current LE 245 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:1
DF and Gparted indicate it isn't
Filesystem 1K-blocks Used Available Use% Mounted on udev 4019588 0 4019588 0% /dev tmpfs 816612 1928 814684 1% /run /dev/mapper/ubuntu--vg-root 305622000 60366628 229660876 21% / tmpfs 4083052 47160 4035892 2% /dev/shm tmpfs 5120 4 5116 1% /run/lock tmpfs 4083052 0 4083052 0% /sys/fs/cgroup /dev/sdb1 976720644 128516860 848203784 14% /hdd tmpfs 816608 20 816588 1% /run/user/120 tmpfs 816608 52 816556 1% /run/user/1000
I have 8 Gb of RAM so the system will probably run fine without a swap partition but I'd still like to correct this for my own knowledge's sake.
I can't seem to find a LVM GUI tool and I am skittish about fooling with this further using the CLI.
I apologize in advance that this question probably comes across as flaky and not in accordance with this forums standards. I did read the wiki and other material here relating to LVM architecture and could probably solve this on my own if I could find the Logical Volume Management tool software. I'd very much appreciate everyone's indulgence on this as I request a little help and direction.