Filled up disk and cannot boot

Joshua M

New Member
Feb 13, 2024
17
3
3
A guest VM has filled up the disk and cannot be booted. The virtual disk is: /dev/pve/vm-200-disk-0

I wanted to try to mount this from the host to delete some files, with the command: mount /dev/pve/vm-200-disk-0 /mnt

but get the error: mount: /mnt: wrong fs type, bad option, bad superblock on /dev/mapper/pve-vm--200--disk--0, missing codepage or helper program, or other error.

I'm not sure if this is because the disk is a disk image with sub-partitions. Anyone know how I can mount the partitions in this disk image (it is a standard Ubuntu 22.04 VM).
 
A guest VM has filled up the disk and cannot be booted. The virtual disk is: /dev/pve/vm-200-disk-0

I wanted to try to mount this from the host to delete some files, with the command: mount /dev/pve/vm-200-disk-0 /mnt

but get the error: mount: /mnt: wrong fs type, bad option, bad superblock on /dev/mapper/pve-vm--200--disk--0, missing codepage or helper program, or other error.

I'm not sure if this is because the disk is a disk image with sub-partitions. Anyone know how I can mount the partitions in this disk image (it is a standard Ubuntu 22.04 VM).
I'll add that I'm not using ZFS, just ext4/LVM.
 
OK. I figured it out. First I have to mount disk in loopback:

losetup --partscan -f /dev/mapper/pve-vm--200--disk--0

then i could activate the vg:

vgchange -ay ubuntu-vg

then i could mount the lv:

mount /dev/mapper/ubuntu--vg-ubuntu--lv /mnt
 
If this is a vm that you have control over (you own it / homelab) I would give some consideration to re-architecting it.

You don't need LVM in a VM. Give each LVM partition its own virtual disk (and use ext4, since XFS can't shrink) and resizing should be much easier for you in the future. You can even boot something like systemrescuecd and do it in gparted.
 
If this is a vm that you have control over (you own it / homelab) I would give some consideration to re-architecting it.

You don't need LVM in a VM. Give each LVM partition its own virtual disk (and use ext4, since XFS can't shrink) and resizing should be much easier for you in the future. You can even boot something like systemrescuecd and do it in gparted.
Yes, that makes sense. I just did the default Ubuntu install without thinking about it.
 
  • Like
Reactions: Kingneutron