Proxmox – Unable to wipe disk – disk/partition ‘/dev/sdX’ has a holder (500) – on mirrored disks


When deleting a disk from the Proxmox UI, you are presented with several options. Depending on where you started, you might get this problem:

Reading through the forums it’s hard to deduce what next, and also that really depends on your file system. In my case I had drives previously attached to a RAID hardware card. Those drives were moved to the motherboard. To get the full picture with the disk layout, I find lsblk to be the best tool. In my instance, I have this:

# lsblk
sdb 8:16 0 3.6T 0 disk 
├─md125 9:125 0 3.6T 0 raid1 
└─md127 9:127 0 0B 0 md 
sdc 8:32 0 3.6T 0 disk 
├─md125 9:125 0 3.6T 0 raid1 
└─md127 9:127 0 0B 0 md 
sdd 8:48 0 3.6T 0 disk 
├─md126 9:126 0 3.6T 0 raid0 
└─md127 9:127 0 0B 0 md

So next the mission starts to see what we can do to “wipe disk” successfully. Here is the first command I tried:

# wipefs -fa /dev/sdb
/dev/sdb: 4 bytes were erased at offset 0x3a3817d5e00 (ddf_raid_member): de 11 de 11
root@hv7:/var/lib/vz/template/iso# wipefs -fa /dev/sdb

As you can see below, the above command just removed the ddf_raid_member Usage column and changed it to Device Mapper. In this instance, lsblk still showed the mirrors.

To be clear, pvs and dmsetup ls didn’t do anything for me on my system, it didn’t pick up any data related to these mirrors.

After thinking about this more carefully, I used cat /proc/mdstat to see what that produces:

# cat /proc/mdstat 
Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
md125 : active raid1 sdc[1] sdb[0]
3906249728 blocks super external:/md127/1 [2/2] [UU]

md126 : active raid0 sdd[0]
3906249728 blocks super external:/md127/2 256k chunks

md127 : inactive sdc[2](S) sdb[1](S) sdd[0](S)
2306568 blocks super external:ddf

Ah! So it seems the holder is the mirror. Next, how to remove the mirror holder?

mdadm --stop /dev/md125
mdadm --stop /dev/md126
mdadm --stop /dev/md127

Success! The Usage column now has “No” and I was able to wipe.

Share this article

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top