[SOLVED] sda has a holder...

there's a ~ symbol at the end of your command that should not be there.
Ugh, I didn't spot that. Yeah, that'd explain the permission denied thing. No permission to create arbitrary nodes in the /sys device tree, even for the root user. ;)
 
Last edited:
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.
Amazing!!! It works! Thanks
 
Was just fiddeling around and came up with the following:

Bash:
lsblk -r | awk '/ceph--[a-f0-9-]*/ {print $1}' | sed 's/^`-//' | xargs -I {} sudo dmsetup remove "{}"

In sum I had to do the following:

Bash:
systemctl stop ceph-mon.target
systemctl stop ceph-mgr.target
systemctl stop ceph-mds.target
systemctl stop ceph-osd.target
rm -rf /etc/systemd/system/ceph*
killall -9 ceph-mon ceph-mgr ceph-mds
rm -rf /var/lib/ceph/mon/  /var/lib/ceph/mgr/  /var/lib/ceph/mds/
pveceph purge
apt purge ceph-mon ceph-osd ceph-mgr ceph-mds
apt purge ceph-base ceph-mgr-modules-core
rm -rf /etc/ceph/*
rm -rf /etc/pve/ceph.conf
rm -rf /etc/pve/priv/ceph.*

reboot

lsblk -r | awk '/ceph--[a-f0-9-]*/ {print $1}' | sed 's/^`-//' | xargs -I {} sudo dmsetup remove "{}"

sgdisk --zap-all /dev/nvme0n1
sgdisk --zap-all /dev/nvme1n1

wipefs -fa /dev/nvme0n1
wipefs -fa /dev/nvme1n1
 
Last edited:
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.
Thank you! This fixed my issue!
 

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!