Cannot zero superblock mdadm raid5

fewjr

New Member
Hello all,
Well I pulled my old Ubuntu Server out of the basement to set it up with a newer version f Ubuntu Server. I haven't had the server running since 12.x.x! I installed 18.04.1 LTS to the boot drive, (120GB). I have 3 WD red drives in raid5 originally. I wanted to change to raid10 mdadm style. So I umounted and stopped /dev/md0. Then I lsblk to see the raid members. I had sdb1, sbc1, sdd1. I then did mdadm --zero-superblock of each drive but sdb1 will not zero. I have already removed persistent references in /etc/fstab and commented out the array in mdadm.conf. Then I updated initramfs.
Everything was going good with the new install but I ran into this hiccup redoing my array. I'm not sure what to do at this point. Could someone please give me some guidance on this one? I have been trying to find the solution for a couple hours now. Thank you in advance.
 


wizardfromoz

Super Moderator
Staff member
Gold Supporter
G'day @fewjr and welcome to linux.org :)

I'm moving this Thread to General Server where it will attract an audience more specific to your needs. We had a RAID thread there just recently involving one of my fellow Aussies.

I can't help, myself, but I will watch with interest.

Good luck

Chris Turner
wizardfromoz
BTW - might want to start reading a book, lol. Only you, me, and someone who joined a minute ago online - very quiet :confused:. Maybe there's something on TV we are missing. :rolleyes:
 

fewjr

New Member
Thank you for the response. I was wondering why so quiet! I'll look for replies here then. I'm pretty anxious to get this figured out. I am reading....a lot. Not much I care to watch on TV these days. Take care down there friend.
 

fewjr

New Member
Well it sure is lonely in here. I was hoping there was an easy fix someone might know. I ordered another WD Red drive. I wanted to have 4 drives anyway. I'm going to pull the drive I can't zero and replace it. Then reinstall 18.4 and start over. Then I'm going to put the suspect drive in another computer that's sitting here and use gparted on it. The drive is basically unused so hopefully I can get it back to factory. If all goes well I'll add it back to the new array.
I'm still game to try to fix it as it is now if someone is out there with an idea or the knowledge as to what is going on.
 

Lazydog

Member
How many times did you run the command? Sometimes you need to do it several time.
 

fewjr

New Member
Hello, thanks for the response.
I did it quite a few times. Like I said above, I have already removed persistent references in /etc/fstab and commented out the array in mdadm.conf. Then I updated initramfs. I should have waited until I figured out why the third drive wasn't zeroing before I went on with those steps! My bad.
 

fewjr

New Member
I ran:
sudo mdadm --zero-superblock --force /dev/sdf1

Then:
sudo mdadm --stop /dev/md0

Next:
[email protected]:~$ sudo mdadm --create /dev/md0 --verbose --level=raid10 --raid-devices=4 /dev/sdf1 /dev/sdg1 /dev/sdh1 missing

So I finally got to this point and this was with help from someone.

[email protected]:~$ lsblk -o NAME,SIZE,FSTYPE,TYPE,MOUNTPOINT
NAME SIZE FSTYPE TYPE MOUNTPOINT
sde 111.8G disk
└─sde1 111.8G ext4 part /
sdf 1.8T disk
└─sdf1 1.8T linux_raid_member part
└─md0 3.7T raid10
sdg 1.8T disk
└─sdg1 1.8T linux_raid_member part
└─md0 3.7T raid10
sdh 1.8T disk
└─sdh1 1.8T linux_raid_member part
└─md0 3.7T raid10
sr0 1024M rom

[email protected]:~$ sudo blkid
[sudo] password for goblin:
/dev/sdh1: UUID="e0d13ffb-8a8f-22a9-a0b4-4ba8c7ac92a8" UUID_SUB="630ddc5a-4e79-003c-771d-6658d190e2c4" LABEL="Goblinservant:0" TYPE="linux_raid_member" PARTUUID="00088bfc-01"
/dev/sde1: UUID="04de2114-03d1-4788-8a2a-0dd55ded89f1" TYPE="ext4" PARTUUID="55bfcd04-01"
/dev/sdf1: UUID="e0d13ffb-8a8f-22a9-a0b4-4ba8c7ac92a8" UUID_SUB="1e531906-c5ee-7392-81e1-ba558c6b3212" LABEL="Goblinservant:0" TYPE="linux_raid_member" PARTUUID="000f3f42-01"
/dev/sdg1: UUID="e0d13ffb-8a8f-22a9-a0b4-4ba8c7ac92a8" UUID_SUB="c0b650e0-b5b8-a19c-abe5-1174af793fdd" LABEL="Goblinservant:0" TYPE="linux_raid_member" PARTUUID="00018d04-01"
 
Last edited:

fewjr

New Member
Now I need to make sure the array shows up in /etc/mdadm/mdadm.conf. I'm going to
add another drive, partition it, and add it to the array. Then format and mount the array.
 
Last edited:

Jarret B

Active Member
Staff member
I would definitely put the drive on another system and remove the partition completely. Wipe out the GPT or MSDOS partition as well and completely start over with that drive.
I remember using USB Sticks to play around with RAID in Linux. Sometimes I did have to repartition a Stick to rebuild a new RAID. Give it a try and see if it helps.
 


Members online



Top