0

i wanted to replace a broken zfs-drive on my server and got a "sealed" drive from my storage for that usage, but when i first checked the drive it shows me that there is a LVM on it.

My question is WHY there is a LVM at all and how can i wipe that drive for usage in the zfs-RAID. I have never seen such a thing on a new drive. So this may be a refurbished one? Smartctl tells me the drive has 0 hours runtime and is started just 2 times at all.

fdisk -l

Festplatte /dev/sdd: 1,82 TiB, 2000398934016 Bytes, 3907029168 Sektoren
Festplattenmodell: External
Einheiten: Sektoren von 1 * 512 = 512 Bytes
Sektorgröße (logisch/physikalisch): 512 Bytes / 512 Bytes
E/A-Größe (minimal/optimal): 512 Bytes / 512 Bytes

Festplatte /dev/md126: 1,82 TiB, 1998998994944 Bytes, 3904294912 Sektoren
Einheiten: Sektoren von 1 * 512 = 512 Bytes
Sektorgröße (logisch/physikalisch): 512 Bytes / 512 Bytes
E/A-Größe (minimal/optimal): 262144 Bytes / 262144 Bytes


mdadm --detail /dev/md126
/dev/md126:
Container : /dev/md/ddf0, member 5
Raid Level : raid0
Array Size : 1952147456 (1861.71 GiB 1999.00 GB)
Raid Devices : 1
Total Devices : 1

State : clean
Active Devices : 1
Working Devices : 1
Failed Devices : 0

Chunk Size : 256K

Consistency Policy : none

Container GUID : 496E7465:6C202020:1000005B:80863513:4942D23F:D19BDBD1
(Intel    12/12/18 22:06:07)
Seq : 00000010
Virtual Disks : 13

Number   Major   Minor   RaidDevice State
0       8       48        0      active sync   /dev/sdd

OK, i tried to delete that md126 and somehow managed that, but now there is still a md127 and i'm not able to zero the superblock.

[root@myPC# cat /proc/mdstat
Personalities : [raid0]
md127 : inactive sdd[0](S)
1367128 blocks super external:ddf
unused devices: <none>

[root@myPC]# lsblk
NAME    MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda       8:0    0 232,9G  0 disk
├─sda1    8:1    0   600M  0 part /boot/efi
├─sda2    8:2    0     1G  0 part /boot
└─sda3    8:3    0 231,3G  0 part /home
/
sdb       8:16   1     0B  0 disk
sdc       8:32   1     0B  0 disk
sdd       8:48   0   1,8T  0 disk
└─md127   9:127  0     0B  0 md
zram0   252:0    0   7,2G  0 disk [SWAP]

[root@myPC]# mdadm --detail /dev/md127
/dev/md127:
Version : ddf
Raid Level : container
Total Devices : 1

Working Devices : 1

Container GUID : 496E7465:6C202020:1000005B:80863513:4942D23F:D19BDBD1
(Intel    12/12/18 22:06:07)
Seq : 00000010
Virtual Disks : 13

Member Arrays :

Number   Major   Minor   RaidDevice

-       8       48        -        /dev/sdd
4
  • I tried to erase that LVM following bobcares.com/blog/removal-of-mdadm-raid-devices but i#m stuck now at a md127 lvm where i can't zero the superblock.
    – Chris9834
    Nov 7, 2023 at 13:58
  • Sounds anything but 'fresh', it's definitely not come from the factory like that. Have you tried just 'DD'ing zeros to sdd to clear the partition table?
    – Chopper3
    Nov 7, 2023 at 14:04
  • as i knew that LVM stuff is not completly part of the Partition Table. At least i rember darkly that somehow a new partition table does not solve LVM stuff, if i remember correctly.
    – Chris9834
    Nov 7, 2023 at 14:30
  • Well the DD should wipe it fully
    – Chopper3
    Nov 7, 2023 at 14:34

1 Answer 1

1

OK, seems i managed to delete that LVM stuff, following https://unix.stackexchange.com/questions/411206/how-to-wipe-md-raid-meta

[root@myPC]# mdadm --stop /dev/md127
mdadm: stopped /dev/md127

[root@myPC]# mdadm --zero-superblock /dev/sdd

[root@myPC]# cat /proc/mdstat
Personalities : [raid0]
unused devices: <none>

[root@myPC]# lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda      8:0    0 232,9G  0 disk
├─sda1   8:1    0   600M  0 part /boot/efi
├─sda2   8:2    0     1G  0 part /boot
└─sda3   8:3    0 231,3G  0 part /home
/
sdb      8:16   1     0B  0 disk
sdc      8:32   1     0B  0 disk
sdd      8:48   0   1,8T  0 disk
zram0  252:0    0   7,2G  0 disk [SWAP]

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .