Problem: /dev/sdb1 is always recognized as lvm/dm partition.
Cause: Myself...
("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!
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
dmsetup remove /dev/mapper/1ATA_WDC_WD5002ABYS-18B1B0_WD-WCASYE035842
This was my first try, also did this first thing before trying other things.
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))
dd if=/dev/zero |pv| dd of=/dev/sdb bs=8192
Changed /dev/sdb1 to lvm in the hope it could then be removed permanently from device-mapper.
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% /
tmpfs 16G 0 16G 0% /dev/shm
/dev/sda1 485M 55M 405M 12% /boot
/dev/mapper/vg_node1-lv_od 164G 6,2G 150G 4% /ct/od
There is no 'dm' command.