LXC disk larger than LV and run out of space

krikey

Renowned Member
Aug 15, 2018
142
31
68
UK
I've done something really stupid. I've allocated 300GB of space to a LXC container but my Logical Volume only has 233GB. This was ok, until the LXC started to use more and now will not boot.

The Volume group and Physical volume also have no space left.

Is there anything I can do to recover/resize the LV and try to rescue some files?
 
Ok after racking my brains I came up with a solution:

Install a new drive (USB, SCSI, SATA) and create a new VG. After which I can format the new drive as Linux LVM and then add the space to the existing LV

However I found that the existing VG had a small amount of free space (16GB) which I was able to grab and add this to the LV. Once added the LXC would boot perfectly.

Lesson learned (hopefully) and I hope that this helps out someone else who is just as dense as me.