URGENT: "mdadm: No md superblock detected" - Overclock.net - An Overclocking Community

Forum Jump: 

URGENT: "mdadm: No md superblock detected"

Thread Tools
post #1 of 8 (permalink) Unread 02-14-2019, 07:19 AM - Thread Starter
Linux Lobbyist
 
parityboy's Avatar
 
Join Date: Jan 2009
Location: 192.168.13.37
Posts: 3,687
Rep: 272 (Unique: 213)
URGENT: "mdadm: No md superblock detected"

OK, this has just happened.

I have two Samsung 850 EVO 1TB drives in RAID 0. I needed to reboot the machine and when it came backup I noticed this RAID 0 didn't restart. Using mdadm -E yielded "mdadm: No md superblock detected" on both /dev/sda1 and /dev/sdb1. I've trawled the search engines but the answers are of no help. I've checked the drives and they show no errors whatsoever.

How does this happen and how can I recover the RAID?

Many thanks.

Ryzen
(16 items)
CPU
Ryzen 7 1700
Motherboard
Gigabyte GA-AB350M Gaming 3
GPU
Palit GT-430
RAM
Corsair Vengeance LPX CMK16GX4M2B3000C15
RAM
Corsair Vengeance LPX CMK16GX4M2B3000C15R
Hard Drive
Samsung 970 Pro
Hard Drive
Samsung 850 EVO
Hard Drive
Storage Array
Hard Drive
Western Digital RE3
Power Supply
Seasonic PRIME 1000 Ultra
Cooling
AMD Wraith Spire
Case
Fractal Design Arc Mini R2
Operating System
Linux Mint 18.x
Monitor
Dell UltraSharp U2414H
Keyboard
Dell SK-8185
Mouse
Logitech Trackman Wheel
▲ hide details ▲
parityboy is offline  
Sponsored Links
Advertisement
 
post #2 of 8 (permalink) Unread 02-14-2019, 10:18 AM
10 year OCN Vet
 
enorbet2's Avatar
 
Join Date: Jan 2008
Location: Virginia
Posts: 3,394
Rep: 392 (Unique: 230)
Heya parityboy. I haven't run any raid in years so I'm not certain but I suspect it is possible a setting in BIOS got altered somehow. So for starters Is this in Legacy Mode, or UEFI?

Compone Accomoda Supera
enorbet2 is offline  
post #3 of 8 (permalink) Unread 02-14-2019, 01:48 PM - Thread Starter
Linux Lobbyist
 
parityboy's Avatar
 
Join Date: Jan 2009
Location: 192.168.13.37
Posts: 3,687
Rep: 272 (Unique: 213)
Heya

The PC is in UEFI mode and the SSDs are in AHCI mode as far as I know. The SSDs are not boot drives (luckily) but I would love to know why the MD superblock would vanish from both of them (assuming RAID 0 actually writes the superblock to both). I recently updated some system files (kernel, systemd) as part of a security update for KDE Neon 18.04 but that shouldn't affect a RAID superblock should it?

Ryzen
(16 items)
CPU
Ryzen 7 1700
Motherboard
Gigabyte GA-AB350M Gaming 3
GPU
Palit GT-430
RAM
Corsair Vengeance LPX CMK16GX4M2B3000C15
RAM
Corsair Vengeance LPX CMK16GX4M2B3000C15R
Hard Drive
Samsung 970 Pro
Hard Drive
Samsung 850 EVO
Hard Drive
Storage Array
Hard Drive
Western Digital RE3
Power Supply
Seasonic PRIME 1000 Ultra
Cooling
AMD Wraith Spire
Case
Fractal Design Arc Mini R2
Operating System
Linux Mint 18.x
Monitor
Dell UltraSharp U2414H
Keyboard
Dell SK-8185
Mouse
Logitech Trackman Wheel
▲ hide details ▲
parityboy is offline  
Sponsored Links
Advertisement
 
post #4 of 8 (permalink) Unread 02-15-2019, 02:57 AM
10 year OCN Vet
 
enorbet2's Avatar
 
Join Date: Jan 2008
Location: Virginia
Posts: 3,394
Rep: 392 (Unique: 230)
I'm going to continue to try to help out, especially with such little response from others so far, but I am at a distinct disadvantage in that I not only haven't done raid in a long time but I don't do UEFI nor systemd. I can see how a kernel update could possibly have skewed results possibly causing such a mess, but it seems to me the kernel hasn't even come into play yet in a UEFI system, so that's unlikely.

AFAIK one of the major differences between Legacy BIOS and UEFI is that Legacy depends on the Master Boot Record written into the partition or drive, while with UEFI that is all catalogued at Firmware level. I'm not aware that anything be written to the drive(s). I'm pretty sure there has to be a way to rebuild that catalogue since nothing on the drives should have changed, unless you know something you have yet not stated. That's the tack I'm going to take, that it is all in Firmware of CMOS... that which used to be called BIOS but now is something of a hybrid or substantial extension.

I'm hoping to learn as we go since I have little doubt that MBR will eventually disappear altogether and I'd prefer to not be stuck in an EOL situation.

Compone Accomoda Supera
enorbet2 is offline  
post #5 of 8 (permalink) Unread 02-15-2019, 08:51 AM - Thread Starter
Linux Lobbyist
 
parityboy's Avatar
 
Join Date: Jan 2009
Location: 192.168.13.37
Posts: 3,687
Rep: 272 (Unique: 213)
@enorbet2

OK, I seem to be back in business. Here's what happened...

The md superblock didn't actually disappear...because it was never created in the first place. When I created the array I created it with the --build option rather than the --create option. --build does not write a RAID superblock to the drives, so of course once the machine is restarted, the RAID cannot be auto-detected and therefore will not start on boot. Additionally, I had placed two LVM volumes on this array and as (what seems to be) a side effect of not writing a RAID superblock to the array, the LVM metadata is visible on both /dev/md0 (the array) and /dev/sda1 (the first drive in the array). This in turn has the effect of creating duplicate UUIDs when scanning for PVs and VGs, which means that the LVM volumes cannot be brought up.

Solution
1) Deactivate all LVs and VGs
Code:
lvchange -an <lv name>
vgchange -an <vg name>
2) Bring up the array but DO NOT destroy it or write a superblock to it (note: --build, --assume-clean)
Code:
sudo mdadm --build /dev/md0 --assume-clean --level=0 --raid-devices=2 --chunk=256 /dev/sda1 /dev/sdb1
3) Add a filter to /etc/lvm/lvm.conf to filter out all /dev/sd* devices but accept /dev/md* devices
Code:
filter = [ "a|/dev/md*|", "r|/dev/sd*|" ]
4) Bring the VGs and LVs back up
Code:
lvchange -ay <lv name>
vgchange -ay <vg name>
I'm now copying the data to an external drive. I may re-create the array properly this time around (--create, not --build) or I may wait and pick up a couple more units and go RAID 5. Either way, I've learned something.

P.S.
I would like to thank the bash gods for having such a long command line history. It's what made me realise what I'd done wrong when creating the array.

Ryzen
(16 items)
CPU
Ryzen 7 1700
Motherboard
Gigabyte GA-AB350M Gaming 3
GPU
Palit GT-430
RAM
Corsair Vengeance LPX CMK16GX4M2B3000C15
RAM
Corsair Vengeance LPX CMK16GX4M2B3000C15R
Hard Drive
Samsung 970 Pro
Hard Drive
Samsung 850 EVO
Hard Drive
Storage Array
Hard Drive
Western Digital RE3
Power Supply
Seasonic PRIME 1000 Ultra
Cooling
AMD Wraith Spire
Case
Fractal Design Arc Mini R2
Operating System
Linux Mint 18.x
Monitor
Dell UltraSharp U2414H
Keyboard
Dell SK-8185
Mouse
Logitech Trackman Wheel
▲ hide details ▲

Last edited by parityboy; 02-15-2019 at 08:57 AM.
parityboy is offline  
post #6 of 8 (permalink) Unread 02-15-2019, 09:20 AM
New to Overclock.net
 
acquacow's Avatar
 
Join Date: Aug 2015
Posts: 106
Rep: 2 (Unique: 2)
mdadm --detail --scan

See if it auto-detected it as ~md126 or something
acquacow is offline  
post #7 of 8 (permalink) Unread 02-15-2019, 09:56 AM
10 year OCN Vet
 
enorbet2's Avatar
 
Join Date: Jan 2008
Location: Virginia
Posts: 3,394
Rep: 392 (Unique: 230)
That's great news! Just for the fun of it if you wanna know just how long ago it was that I ran a RAID, here's a clue - it was a SCSI Hardware RAID LOL

Compone Accomoda Supera
enorbet2 is offline  
post #8 of 8 (permalink) Unread 02-16-2019, 08:37 AM - Thread Starter
Linux Lobbyist
 
parityboy's Avatar
 
Join Date: Jan 2009
Location: 192.168.13.37
Posts: 3,687
Rep: 272 (Unique: 213)
@enorbet2

Oh Lord! I remember SCSI hardware; those 68-pin LVDS connectors...

@acquacow

The RAID was originally created with no metadata whatsoever, so that command would not show anything.

Ryzen
(16 items)
CPU
Ryzen 7 1700
Motherboard
Gigabyte GA-AB350M Gaming 3
GPU
Palit GT-430
RAM
Corsair Vengeance LPX CMK16GX4M2B3000C15
RAM
Corsair Vengeance LPX CMK16GX4M2B3000C15R
Hard Drive
Samsung 970 Pro
Hard Drive
Samsung 850 EVO
Hard Drive
Storage Array
Hard Drive
Western Digital RE3
Power Supply
Seasonic PRIME 1000 Ultra
Cooling
AMD Wraith Spire
Case
Fractal Design Arc Mini R2
Operating System
Linux Mint 18.x
Monitor
Dell UltraSharp U2414H
Keyboard
Dell SK-8185
Mouse
Logitech Trackman Wheel
▲ hide details ▲
parityboy is offline  
Reply

Quick Reply
Message:
Options

Register Now

In order to be able to post messages on the Overclock.net - An Overclocking Community forums, you must first register.
Please enter your desired user name, your email address and other required details in the form below.
User Name:
If you do not want to register, fill this field only and the name will be used as user name for your post.
Password
Please enter a password for your user account. Note that passwords are case-sensitive.
Password:
Confirm Password:
Email Address
Please enter a valid email address for yourself.
Email Address:

Log-in



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 


Forum Jump: 

Posting Rules  
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off