[SOLVED] sda has a holder...

AngryAdm

Member
Sep 5, 2020
145
29
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)
 
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.
Thank you so much! This solved my issue!
 
Good day, I'm new to proxmox. I'm having a similar issue where I added two nvme drives from some other machines to my proxmox that were formally used as boot drives. I keep getting the error disk/partition '/dev/nvme1n1p3' has a holder (500) when I try to wipe nvme2n1 and nvme1n1. I can't figure out what I'm doing wrong.

1716306885216.png

1716306945397.png

This is what I get when I run the lsblk command

1716306998176.png

What is the command to remove nvme2n1 and nvme1n1 look like? I want to wipe these drives and then remount them for use in proxmox.
I keep getting the following error based on following what has been written in this thread.

1716307238288.png
 
So I found out how to fix this.

1716513755168.png

I just navigated to the LVM section under disks and deleted the entries that corresponded with the disks that were throwing the errors. Simple enough.
 
Yeah. From the command line you can run:

Bash:
# pvs

... to see if LVM is using any of the disks/partitions you want to free. There's also the dmsetup equivalent:

Bash:
# dmsetup ls

When you're using ZFS on the host, it's super common for Linux VM's to set up LVM and/or dmsetup on their (virtual) disks. Which can be noticed by LVM (or dmsetup) running on the Proxmox host, and then interferes in frustrating ways when trying to delete things on the host. Gaaaaah.
 
Last edited:
I'm having an issue on the last line:

Code:
root@pve01:~# echo "- - -" > /sys/class/scsi_host/host5/scan

I'm getting:

Code:
root@pve:~# echo "- - -" > /sys/class/scsi_host/host1/scan~
-bash: /sys/class/scsi_host/host1/scan~: Permission denied

And now under the PVE disks section in the GUI my SSD has disappeared, so I can't even see it to wipe it. Kind of lost at this point.
 
Uh oh. That kind of behaviour sounds like at least some of the disks (hard drives, ssds) have dropped off the system. As in, the system has lost the connection to some of your storage.

At this point I'd (without rebooting) copy off any data that is critically important to a different computer, which will only work _if_ the system can still access the data locally. Then I'd shut down the computer, pull out the power, then open it up and re-plug all of the connections back into it related to storage.

eg unplug all hard drive/ssd cables, then plug them back in. both power and data lines

Then do the same for any adapters / raid cards / similar. For good measure, you might want to do that for _every_ cable in the computer (even not storage related), just to be sure.

The purpose of the cable re-plugging is to carefully make sure there's not some flaky connection happening, which can lead to drives drop off like the above. Have personally had that happen before, though it's very rare.
 
Hi,
I'm having an issue on the last line:

Code:
root@pve01:~# echo "- - -" > /sys/class/scsi_host/host5/scan

I'm getting:

Code:
root@pve:~# echo "- - -" > /sys/class/scsi_host/host1/scan~
-bash: /sys/class/scsi_host/host1/scan~: Permission denied
there's a ~ symbol at the end of your command that should not be there.
And now under the PVE disks section in the GUI my SSD has disappeared, so I can't even see it to wipe it. Kind of lost at this point.
Please cross-check with e.g. lsblk and check your system journal for any errors.
 
  • Like
Reactions: justinclift

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!