Mdadm RAID 5 degradated array not mountable. Metadata lost?
Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Mdadm RAID 5 degradated array not mountable. Metadata lost?
Hi All.
Let's see who remembers anything about mdadm... :-)
I HAD a fully functional RAID 5 mdadm array of 3 disks... HAD!!!
until one proved to be defective... (I'm still waiting for the replacement).
I kept the computer off most of the time (while awaiting for the replacement).
A little while ago though, while I was restarting it (with the 2 working disks ONLY), it failed to boot.
Now it doesn't boot at all as it cannot mount the main raid partition.
I believe the data on the two disks SHOULD still be fine but somehow mdadm seems to have lost the metadata and it doesn't know how to mount that array anymore...
I have to start the computer with Ubuntu Live CD and this is the output when I try to assemble the existing arrays:
root@ubuntu:~# mdadm --assemble --scan
mdadm: No suitable drives found for /dev/md1
Here is the output of "--examine" instead (mdadm --examine /dev/sdx3")
root@ubuntu:~# mdadm --examine /dev/sda3
/dev/sda3:
Magic : a92b4efc
Version : 00.90.00
UUID : 00000000:00000000:00000000:00000000
Creation Time : Mon Sep 17 16:25:30 2012
Raid Level : -unknown-
Raid Devices : 0
Total Devices : 2
Preferred Minor : 1
Update Time : Mon Sep 17 16:35:28 2012
State : active
Active Devices : 0
Working Devices : 2
Failed Devices : 0
Spare Devices : 2
Checksum : be36f1ae - correct
Events : 1
Number Major Minor RaidDevice State
this 0 8 19 0 spare /dev/sdb3
I haven't found much information about it on the net, like a clear tutorial or something like that...
Anyway, my MDADM raid partition had several LVMs built on top, which I suppose it might make the whole thing even more complicated.
Is LVM supported by "raidpycovery"?
Regarding fixing my array, I thought that, since the data (afaik) seems to be there,
MAYBE recreating the array on top of the current one would tell mdadm how the array is supposed to work.
Considering I have sda3 and sdb3 left, I could run something something like:
mdadm --create --verbose /dev/md1 --level=5 --raid-devices=3 /dev/sda3 /dev/sdb3 missing
Does anyone know whether mdadm is smart enough to understand that there is already some data in the array
or it is simply going to wipe the whole thing?
Well.... I don't know how you will handle the upper layer stuff.... the lower layer "disk" will end up in a single image file (so you need a lot of room in order to rebuild the image of the disk). Check the readme included in the docs. There are examples on how to use it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.