Unable to remove unused vm disk on LVM

Fantu

Member
Jan 23, 2024
51
14
8
Hi, today I tried to remove unused and not configured disk but failed with:
update VM 100: -delete unused0
TASK ERROR: lvremove 'pve/vm-100-disk-0' error: Logical volume pve/vm-100-disk-0 is used by another device.
I also tried to shutdown the vm (even if don't use it) but gave same error.
I also checked the only other vm on this test proxmox server and don't show it.
Is it a bug, or is there something I don't know? (FWIK should be possible to remove it as not really used)
Some days ago I moved it to another storage (from proxmox gui) deselecting "remove origin" (for safety) but now I want to remove it as not needed anymore.

I also noticed another thing: on gui option of move disk to another storage it lists also the same storage (where it is currently), that I suppose should not be list on destination storage list.

Thanks for any reply, and sorry for my bad english.

Code:
pveversion --verbose
proxmox-ve: 8.1.0 (running kernel: 6.5.13-1-pve)
pve-manager: 8.1.4 (running version: 8.1.4/ec5affc9e41f1d79)
proxmox-kernel-helper: 8.1.0
proxmox-kernel-6.5.13-1-pve-signed: 6.5.13-1
proxmox-kernel-6.5: 6.5.13-1
proxmox-kernel-6.5.11-8-pve-signed: 6.5.11-8
proxmox-kernel-6.5.11-7-pve-signed: 6.5.11-7
ceph-fuse: 16.2.11+ds-2
corosync: 3.1.7-pve3
criu: 3.17.1-2
glusterfs-client: 10.3-5
ifupdown2: 3.2.0-1+pmx8
ksm-control-daemon: 1.4-1
libjs-extjs: 7.0.0-4
libknet1: 1.28-pve1
libproxmox-acme-perl: 1.5.0
libproxmox-backup-qemu0: 1.4.1
libproxmox-rs-perl: 0.3.3
libpve-access-control: 8.1.1
libpve-apiclient-perl: 3.3.1
libpve-common-perl: 8.1.0
libpve-guest-common-perl: 5.0.6
libpve-http-server-perl: 5.0.5
libpve-network-perl: 0.9.5
libpve-rs-perl: 0.8.8
libpve-storage-perl: 8.0.5
libspice-server1: 0.15.1-1
lvm2: 2.03.16-2
lxc-pve: 5.0.2-4
lxcfs: 5.0.3-pve4
novnc-pve: 1.4.0-3
proxmox-backup-client: 3.1.4-1
proxmox-backup-file-restore: 3.1.4-1
proxmox-kernel-helper: 8.1.0
proxmox-mail-forward: 0.2.3
proxmox-mini-journalreader: 1.4.0
proxmox-widget-toolkit: 4.1.3
pve-cluster: 8.0.5
pve-container: 5.0.8
pve-docs: 8.1.3
pve-edk2-firmware: 4.2023.08-4
pve-firewall: 5.0.3
pve-firmware: 3.9-2
pve-ha-manager: 4.0.3
pve-i18n: 3.2.0
pve-qemu-kvm: 8.1.5-3
pve-xtermjs: 5.3.0-3
qemu-server: 8.0.10
smartmontools: 7.3-pve1
spiceterm: 3.3.0
swtpm: 0.8.0+pve1
vncterm: 1.8.0
zfsutils-linux: 2.2.2-pve2
 
Last edited:
Hey,

can you see the unused disk when executing blkid or lsblk ?
Since it's given with 'pve/vm-100-disk-0' I assume it's a within a ZFS pool ?

If it's a ZFS pool what's the output from zfs list ?

You can post the output in code inserts

Best
 
Hi, I'm not using ZFS, is on LVM, also the output show that fails lvremove command.

Code:
blkid | grep pve-vm--100--disk--0
/dev/mapper/pve-vm--100--disk--0p1: LABEL="Riservato per il sistema" BLOCK_SIZE="512" UUID="EA12D2C412D294C3" TYPE="ntfs" PARTUUID="e6cda0c7-01"
/dev/mapper/pve-vm--100--disk--0p2: BLOCK_SIZE="512" UUID="9A2EDC1D2EDBF06D" TYPE="ntfs" PARTUUID="e6cda0c7-02"
/dev/mapper/pve-vm--100--disk--0: PTUUID="e6cda0c7" PTTYPE="dos"

Was a disk used by a Windows vm (now used the copy moved to another storage), now is neither used by the vm nor one of its partitions mounted on the host

also lsof don't show something using it
Code:
lsof /dev/pve/vm-100-disk-0

is correctly shown as used instead the new disk (from move to another storage), when vm is running:
Code:
lsof /dev/test/vm-100-disk-0
COMMAND     PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
kvm     3076858 root   30u   BLK 252,21      0t0 1850 /dev/test/../dm-21
 

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!