Manually access VM disk data

Kha0sK1d

New Member
Oct 16, 2019
3
0
1
My data volume group has filled up to 100%. I had to forcefully stop the VMs from the commandline because they received io-error. I would like to access the filesystems within each VM and delete data. I can't figure out how to do that. Presumably they are mounted somewhere or I can mount them to cd inside? Any help is appreciated. Thanks!

I tried this and it failed:
Code:
root@vm:/tmp# mkdir /tmp/tmpvol
root@vm:/tmp# mount /dev/pve/vm-106-disk-0 /tmp/tmpvol -o ro,user
mount: wrong fs type, bad option, bad superblock on /dev/mapper/pve-vm--106--disk--0,
       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try
       dmesg | tail or so.

For reference:

Proxmox version 5.4-3

Code:
root@vm:~# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
data pve twi-aotzD- 64.49g 100.00 3.11
root pve -wi-ao---- 29.50g
swap pve -wi-ao---- 8.00g
vm-100-disk-1 pve Vwi-aotz-- 20.00g data 34.11
vm-101-disk-1 pve Vwi-a-tz-- 10.00g data 77.98
vm-102-disk-1 pve Vwi-a-tz-- 105.26g data 9.64
vm-103-disk-1 pve Vwi-a-tz-- 10.00g data 46.33
vm-104-disk-1 pve Vwi-a-tz-- 10.00g data 34.79
vm-105-disk-0 pve Vwi-a-tz-- 40.00g data 7.44
vm-106-disk-0 pve Vwi-a-tz-- 64.00g data 44.74

root@vm:/var/lib# df -h
Filesystem Size Used Avail Use% Mounted on
udev 5.9G 0 5.9G 0% /dev
tmpfs 1.2G 115M 1.1G 10% /run
/dev/mapper/pve-root 29G 2.5G 25G 9% /
tmpfs 5.9G 43M 5.9G 1% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 5.9G 0 5.9G 0% /sys/fs/cgroup
/dev/fuse 30M 20K 30M 1% /etc/pve

root@vm:/dev# vgs
VG #PV #LV #SN Attr VSize VFree
pve 1 10 0 wz--n- 118.74g 14.75g

Storage 'local-lvm' on node 'vm' is of type LVM-Thin
 
Can't you boot the VM from a Live ISO and take a look at the VM disks from there?
 
Can't you boot the VM from a Live ISO and take a look at the VM disks from there?
Do you mean change the ISO image the VM boots from to be some linux distro live cd? I'm still not sure how I would mount those devices even inside that, or would it just show up as the available filesystem? I'm also afraid of overwriting my data.

I feel like there should be an easier solution.
 
Yes, assuming the disks are already assigned to the VM, booting from a Linux distro ISO should allow you to see the disks from that? If you’re worried about making any changes, better to take a backup of the underlying VM / disk image files first before making any changes?
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!