User Tools

Site Tools


proxmox:disks:remove_device_mapper_usage

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
proxmox:disks:remove_device_mapper_usage [2021/06/14 13:08] – created peterproxmox:disks:remove_device_mapper_usage [2021/06/14 13:16] (current) – [Solution] peter
Line 1: Line 1:
 ====== Proxmox - Disks - Remove Device Mapper usage ====== ====== Proxmox - Disks - Remove Device Mapper usage ======
 +
 +List the disk partitions
 +
 +<code bash>
 +lsblk -f
 +</code>
 +
 +returns:
 +
 +<code bash>
 +NAME                   FSTYPE      LABEL UUID                                   FSAVAIL FSUSE% MOUNTPOINT
 +sda                                                                                            
 +├─sda1                                                                                         
 +├─sda2                 vfat              8B1B-5126                               510.7M     0% /boot/efi
 +└─sda3                 LVM2_member       MA9I5I-auY3-MWGS-94Ad-6x3k-uuXl-nlhNQ9                
 +  ├─pve-swap           swap              3c213912-aa63-4daf-a2f1-c7926012e862                  [SWAP]
 +  ├─pve-root           ext4              7673ba15-2fd7-4dd2-844a-fda9850af328     51.3G     5% /
 +  ├─pve-data_tmeta                                                                             
 +  │ └─pve-data                                                                                 
 +  └─pve-data_tdata                                                                             
 +    └─pve-data                                                                                 
 +sdb                                                                                            
 +sdc                                                                                            
 +└─VM1-vm--100--disk--0                                                                         
 +sdd                                                                                            
 +sr0                                    
 +</code>
 +
 +<WRAP info>
 +**NOTE:**  The **sdc** disk shows that **VM1-vm--100--disk--0**.
 +
 +The usual approach to remove a partition from a disk does not work; i.e. by running this:
 +
 +<code bash>
 +fdisk /dev/sdc
 +</code>
 +
 +  * **p** (to print partitions),
 +  * and **d** (to delete a partition),
 +  * and **w** to write.
 +
 +</WRAP>
 +
 +
 +----
 +
 +===== Solution =====
 +
 +Try the following options:
 +
 +<WRAP important>
 +**WARNING:**  Ensure the correct device is used with these commands, as it will wipe all the data on the specified disk!
 +</WRAP>
 +
 +
 +<code bash>
 +wipefs -a -f /dev/sdc partprobe /dev/sdc pvesm scan
 +</code>
 +
 +or
 +
 +<code bash>
 +gdisk /dev/sdc
 +</code>
 +
 +  * then **x** for extra commands.
 +  * then **z** for zap.
 +
 +or
 +
 +<code bash>
 +sgdisk --zap-all /dev/sdc
 +</code>
 +
 +<WRAP info>
 +**NOTE:**  A reboot might be needed of Proxmox to show the fresh results.
 +</WRAP>
  
proxmox/disks/remove_device_mapper_usage.1623676092.txt.gz · Last modified: 2021/06/14 13:08 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki