ProxMox - Clearing disks for use

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

macrules34

Active Member
Mar 18, 2016
407
28
28
40
I have a cluster of 4 servers, 3 out of the 4 have the disk usage type as "Device Mapper", thus not allowing me to create any type of usable disk in proxmox.

What happened was that I had the cluster set-up and then I installed Ceph, and started adding the disks as OSD devices. Something went wrong and I went to remove the disks from the OSD status and that messed things up. So then I decided to re-install proxmox from scratch. Know the disks show up as Device Mapper and when I run lsblk --ascii I get the following:
Screen Shot 2020-05-06 at 2.43.58 PM.png

How do I clear /dev/sda and /dev/sdb so I can use them again?
 

vl1969

Active Member
Feb 5, 2014
634
76
28
Not 100% sure but pull them and use gparted on other machine to create new gpt table . Should clear everything from the disk.
 

Wolvez

New Member
Apr 24, 2020
18
4
3
Proxmox comes with gdisk installed. Just do:

gdisk /dev/sda
'x' for extra commands
'z' for zap

That will clear the GPT partition table.
Just double/triple check which disk you are zapping or you will have another problem.
 
  • Like
Reactions: vl1969

vl1969

Active Member
Feb 5, 2014
634
76
28
Proxmox comes with gdisk installed. Just do:

gdisk /dev/sda
'x' for extra commands
'z' for zap

That will clear the GPT partition table.
Just double/triple check which disk you are zapping or you will have another problem.
And that is why a said take it to another PC .
 

macrules34

Active Member
Mar 18, 2016
407
28
28
40
I tried the gdisk function but even after I "Zap" it its still shows as Device Mapper. Any ideas?
Screen Shot 2020-05-07 at 2.36.12 PM.png
 

macrules34

Active Member
Mar 18, 2016
407
28
28
40
Thanks @ PigLover

That seemed to do the trick, I just had to reboot the server for it to show up in Proxmox.
 

PigLover

Moderator
Jan 26, 2011
3,186
1,545
113
There is a way to re-trigger on your devices and get it to show up without reboot. But I can never recall what it is and, being lazy and overconfident in the redundancy I have set up, I just reboot too.
 

Goose

New Member
Jan 16, 2019
21
7
3
parted's disk scan seems to prompt the kernel to refresh the partition table cache

EDIT - Specifically partprobe

hdparm also works

Try googling reread partition table linux if you have issues again in the future