Unable to remove partition from device-mapper
Problem: /dev/sdb1 is always recognized as lvm/dm partition.
Cause: Myself... :mad: ("SBT" in Swedish. ) A 500GB disk with one partition on it was used for OpenSuse raid. Now I ditched the server, removed the disk - without removing it from raid! :banghead: This disk is now second disk in a new server, with OS on it's first disk. But the disk and the partition /dev/sdb1 always turns up in /dev/mapper. When I mount /dev/sdb1 it is recognized as /dev/mapper/1ATA_WDC_WD5002ABYS-18B1B0_WD-WCASYE035842p1 It seems everything works, but I am still worried about this. This partition is now type 83 ext4, and not used in any raid or lvm. And the server is to be a production server, it's an oVirt node. What I have done to fix the issue: Tried to remove from dm: Code:
dmsetup remove /dev/mapper/1ATA_WDC_WD5002ABYS-18B1B0_WD-WCASYE035842p1 The /dev/mapper/ entries are removed, mounting now looks good - but it doesn't persist after reboot. So I continued: I used shred on the entire disk (#shred /dev/sdb) I zeroed out the beginning and end, when that didn't change anything I also zeroed out entire disk: Code:
dd bs=512 if=/dev/zero of=/dev/sdb count=8196 seek=$((`blockdev --getsz /dev/sdb` - 8196)) Did not work. The system is using lvm so I can't just deinstall it: Code:
/dev/mapper/vg_node1-lv_root 50G 12G 36G 24% / |
What's the output of the following commands?
# pvs # vgs # lvs |
[root@ctnode1 ~]# pvs
Code:
PV VG Fmt Attr PSize PFree Code:
VG #PV #LV #SN Attr VSize VFree Code:
LV VG Attr LSize Pool Origin Data% Move Log Cpy%Sync Convert |
lvm creates backup and archive files under /etc/lvm/. You may need to update those before rebooting. See vgcfgbackup.
|
Thanks, but that didn't help either.
I deleted (after backup-ing) /etc/lvm/archive/ /etc/lvm/backup/ /etc/lvm/cache/.cache and rebooted, no change. |
All times are GMT -5. The time now is 03:50 PM. |