Unable to remove unwanted VM disc

nottledim

New Member
Jun 1, 2023
9
1
3
I'm in a funny situation where I have a disc hanging about after the VM has been removed. The disc exists because I had 2 copies of the VM, one running the other on standby. The standby was removed.

When I try to remove the errant disc the message reported is Logical volume local-nvme/vm-503-disk-1 is used by another device and I can find nothing to to tell me what other device that might be. I'm guessing it's the clone but I can't see any evidence.

Now the errant disc had the same partition and filesystem UUIDs so there's a reason there might be confusion. I've changed all the UUIDs, GUIDs etc of the errant disc so I can see no commonality anymore. I've shutdown the working clone but still can't remove the unwanted disc.

I'm not sure it's interesting but blockid reports this where 503 is an "unknown guest":

Code:
/dev/mapper/local--nvme-vm--503--disk--1p1: PARTLABEL="BIOS boot partition" PARTUUID="522314ee-ff43-4716-b5f5-fd325ade77fb"
/dev/mapper/local--nvme-vm--503--disk--1p2: SEC_TYPE="msdos" UUID="EBD4-FFBA" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="EFI-System" PARTUUID="0299c47a-68c2-4388-9178-70ae8d858576"
/dev/mapper/local--nvme-vm--503--disk--1p3: LABEL="archroot" UUID="5b9ef62e-6647-44f7-9312-b79c1dcc8049" UUID_SUB="450ac9fe-7cfc-49ac-8038-d22e2b537515" BLOCK_SIZE="4096" TYPE="btrfs" PARTLABEL="Linux filesystem" PARTUUID="f0362a50-848d-414e-8eee-c331dd8f503e"
/dev/mapper/local--nvme-vm--503--disk--1: PTUUID="2e9ee93f-e17d-4c65-901d-e549b93ab139" PTTYPE="gpt"

and for the working clone:

/dev/mapper/local--nvme-vm--530--disk--1p1: PARTLABEL="BIOS boot partition" PARTUUID="8ac02d1c-55d5-49d3-a111-4ef0a605288c"
/dev/mapper/local--nvme-vm--530--disk--1p2: SEC_TYPE="msdos" UUID="6175-A842" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="EFI-System" PARTUUID="51390813-aa3f-4d67-b388-890e6019ac3f"
/dev/mapper/local--nvme-vm--530--disk--1p3: LABEL="archroot" UUID="8dcfda61-cdd3-432b-a8a6-98c334b63783" UUID_SUB="450ac9fe-7cfc-49ac-8038-d22e2b537515" BLOCK_SIZE="4096" TYPE="btrfs" PARTLABEL="Linux filesystem" PARTUUID="44370db4-c951-446f-8dc9-537de5e1ffd0"
/dev/mapper/local--nvme-vm--530--disk--1: PTUUID="c5cf109d-d8bd-4577-84a0-06c4c36c0147" PTTYPE="gpt"

What might I have to do to remove this disc?

Thanks
 
Just to complete this; what I did was to use gdisk to access disc partition table on the unwanted disc, whence I deleted all the partitions and wrote the out the partition table. Then I ran partprobe which generated warnings for the missing partitions. Ignoring that I then ran lvremove which completed successfully. In retrospect I think all my mucking about with UUIDs was pointless.
 

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!