I tried wiping a disk that was previously used as a LVM and got this error:
disk/partition '/dev/sdc' has a holder (500)
I’ve found a working solution on: https://www.diy-viking.com/proxmox-disk-partition-has-a-holder/
DIY Viking says that the previously used disk still has old configuration that must be removed before wiping the disk.
In the ProxMox shell type:
lsblk
This will list volumes, in my case it’s:
root@proxmox:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 1.8T 0 disk
└─sda1 8:1 0 1.8T 0 part /mnt/data-disk-2tb
sdb 8:16 0 3.6T 0 disk
sdc 8:32 0 1.8T 0 disk
├─immichi--nas-immichi--nas_tmeta 252:15 0 15.9G 0 lvm
│ └─immichi--nas-immichi--nas-tpool 252:17 0 1.8T 0 lvm
│ ├─immichi--nas-immichi--nas 252:18 0 1.8T 1 lvm
│ ├─immichi--nas-vm--106--disk--0 252:19 0 200G 0 lvm
│ ├─immichi--nas-vm--107--disk--0 252:20 0 175G 0 lvm
│ ├─immichi--nas-vm--104--disk--0 252:21 0 100G 0 lvm
│ ├─immichi--nas-vm--105--disk--0 252:22 0 20G 0 lvm
│ └─immichi--nas-vm--103--disk--0 252:23 0 32G 0 lvm
└─immichi--nas-immichi--nas_tdata 252:16 0 1.8T 0 lvm
└─immichi--nas-immichi--nas-tpool 252:17 0 1.8T 0 lvm
├─immichi--nas-immichi--nas 252:18 0 1.8T 1 lvm
├─immichi--nas-vm--106--disk--0 252:19 0 200G 0 lvm
├─immichi--nas-vm--107--disk--0 252:20 0 175G 0 lvm
├─immichi--nas-vm--104--disk--0 252:21 0 100G 0 lvm
├─immichi--nas-vm--105--disk--0 252:22 0 20G 0 lvm
└─immichi--nas-vm--103--disk--0 252:23 0 32G 0 lvm
sdd 8:48 0 111.8G 0 disk
├─sdd1 8:49 0 1007K 0 part
├─sdd2 8:50 0 1G 0 part
└─sdd3 8:51 0 110.8G 0 part
├─pve-swap 252:0 0 8G 0 lvm [SWAP]
├─pve-root 252:1 0 37.7G 0 lvm /
├─pve-data_tmeta 252:2 0 1G 0 lvm
│ └─pve-data-tpool 252:6 0 49.3G 0 lvm
│ └─pve-data 252:7 0 49.3G 1 lvm
└─pve-data_tdata 252:3 0 49.3G 0 lvm
└─pve-data-tpool 252:6 0 49.3G 0 lvm
└─pve-data 252:7 0 49.3G 1 lvm
root@proxmox:~#
To be able to wipe my SDC, I will have to remove all these entries connected to my SDC but in reverse order, starting with the lowest and progressing towards the top.
The command to remove an entry is:
dmsetup remove <NAME>
Name is obviously the name of an entry, so in my case I will start with:
dmsetup remove immichi--nas-vm--103--disk--0
and finish with:
dmsetup remove immichi--nas-immichi--nas_tmeta