Unable to remove and wipe old pve disk with lvm volume

cjdnad

Member
Jul 21, 2022
40
2
13
I have an old disk from and old system that failed. I am trying to clean it up on my current new cluster.

It has LVM volume, BIOS and EFI

I have tried wipe, lvremove and so many variations of removal commands, but it just won't wipe.

Can anyone assist please?

Many thanks


sdc 8:32 0 238.5G 0 disk
├─sdc1 8:33 0 1007K 0 part
├─sdc2 8:34 0 512M 0 part
└─sdc3 8:35 0 238G 0 part

root@pveryzen:~# pvdisplay
--- Physical volume ---
PV Name /dev/sdc3
VG Name pve
PV Size 237.97 GiB / not usable <1.32 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 60921
Free PE 4096
Allocated PE 56825
PV UUID bayDPd-8lN3-lxl3-2tZF-ovdr-SD9v-yN0ucu

--- Volume group ---
VG Name pve
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 6804
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 12
Open LV 0
Max PV 0
Cur PV 1
Act PV 1
VG Size 237.97 GiB
PE Size 4.00 MiB
Total PE 60921
Alloc PE / Size 56825 / 221.97 GiB
Free PE / Size 4096 / 16.00 GiB
VG UUID 0lwMeJ-ZdnJ-S1uf-B9dG-EFcc-kF0G-YvFHDq
 
This cleanup all on sdc and take a while: dd if=/dev/zero of=/dev/sdc bs=1024k
 
This cleanup all on sdc and take a while: dd if=/dev/zero of=/dev/sdc bs=1024k
Still no luck sadly

root@pveryzen:~# dd if=/dev/zero of=/dev/sdc bs=1024k

dd: error writing '/dev/sdc': No space left on device
244199+0 records in
244198+0 records out
256060514304 bytes (256 GB, 238 GiB) copied, 723.391 s, 354 MB/s

Does the script needs adjusting a little? Says no space left on device

Thanks!
 
No, that's correct as it's has written until the end of the disk and it's empty now. Look at "fdisk -l /dev/sdc", lsblk, pvdisplay etc :)
 
  • Like
Reactions: cjdnad
No, that's correct as it's has written until the end of the disk and it's empty now. Look at "fdisk -l /dev/sdc", lsblk, pvdisplay etc :)
root@pveryzen:~# fdisk -l /dev/sdc
Disk /dev/sdc: 238.47 GiB, 256060514304 bytes, 500118192 sectors
Disk model: Tech
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: E7CE7042-C645-4FC5-A7E6-E4F1947B8A85

Device Start End Sectors Size Type
/dev/sdc1 34 2047 2014 1007K BIOS boot
/dev/sdc2 2048 1050623 1048576 512M EFI System
/dev/sdc3 1050624 500118158 499067535 238G Linux LVM

Partition 1 does not start on physical sector boundary.



sdc 8:32 0 238.5G 0 disk
├─sdc1 8:33 0 1007K 0 part
├─sdc2 8:34 0 512M 0 part
└─sdc3 8:35 0 238G 0 part


root@pveryzen:~# pvdisplay
--- Physical volume ---
PV Name /dev/sdc3
VG Name pve
PV Size 237.97 GiB / not usable <1.32 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 60921
Free PE 4096
Allocated PE 56825
PV UUID bayDPd-8lN3-lxl3-2tZF-ovdr-SD9v-yN0ucu






Also shows under LVM and LVM-Thin. It's being a bit stubborn no?
Current cluster is all zfs
 
Last edited:
Maybe have to reboot as this a "old data" in ram, seen somethink with nvme drives before too and after reboot the partitions cannot even more recognized then.
 
  • Like
Reactions: cjdnad