[SOLVED] sda has a holder...

AngryAdm

Member
Sep 5, 2020
145
23
18
93
So what? I do not care that it has a holder. Kill the holder and wipe the disk as asked! What is the reason for all these workarounds we constantly have to do to administrate these systems?

The disk was previously in a CEPH installation, it is no more, I need it for something else! I can't fathom the logic behind blocking wiping disks because of "holder" This is not Windows... this is linux!

To fix this stuff I once again have to come up with workaround...


1633947387441.png
 
Last edited:
1633948012995.png
How does one KILL THAT DEVICE MAPPER SO THAT I CAN USE THE DISKS!!!

AND NO... REBOOT IS NOT THE CORRECT ANSWER!!

sgdisk --zap-all no effect
dd ******* of=/dev/sdX = NO EFFECT!
 
Hi,
if the disk is actively in use, it cannot be cleanly wiped (the old user might still think it owns the disk afterwards...). For the LVM disks, check the output of pvsand remove the volume groups on the disks you want to wipe with vgremove. For the device-mapped disks, check with dmsetup ls and remove the mapping with dmsetup remove.
 
Solution once and for all to all those "disk is busy" "disk has holder" disk has....."

root@pve01:~# sgdisk --zap-all /dev/sdx
root@pve01:~# readlink /sys/block/sdx
../devices/pci0000:00/0000:00:01.1/0000:01:00.0/host5/port-5:10/end_device-5:10/target5:0:10/5:0:10:0/block/sdx
root@pve01:~# echo 1 > /sys/block/sdx/device/delete
root@pve01:~# echo "- - -" > /sys/class/scsi_host/host5/scan

Last line is build using hostid from the readlink output, hence highlighted.

This solves the pesky problem! The disk can now be wiped.
 
Last edited:
Hmm. This worked on my hdd but not on my nvme.

Can someone help me out what I need to do to get my nvme wiped?

Thanks
What is the usage of the nvme? Does it have a holder or what error do you get when wiping?
 
It was used as a Ceph OSD.

My Ceph became instable and now I am setting it up again (with the same disks as before, but unfortunately, I can't simply connect them again to the new installation but had to destroy them and recreate them and the latter does not work as there is still that holder)
 

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!