Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 03-26-2008, 01:59 AM   #1
LQ Newbie
Registered: Mar 2008
Posts: 1

Rep: Reputation: 0
RAID5 data rebuilding by mdadm results in corrupted data!

one of the devices in my software RAID5 array was removed due to unclean rebooting. /var/log/messages showed:

md: bind<sda3>
md: bind<sdb3>
md: kicking non-fresh sda3 from array!
md: unbind<sda3>

This was also true for another device that was part of a RAID1 array (/dev/sda1)

the status of these devices, when checked using `mdadm -D /dev/md*` was "removed".

also `mdadm -E /dev/sd[a-d]3|grep Event` showed that sda3 had a different Events number (0.4647) than sdc3 and sdd3 (0.8721011). (Note: sdb3 also had a slightly different Events number, 0.8721010 but did not give any error message in /var/log/messages or any bad status when mdadm -E /dev/sdb3 was done)

I tried to rebuild my data by simply removing and readding the faulty devices, by

mdadm /dev/md0 --fail /dev/sda1 --remove /dev/sda1
mdadm /dev/md0 --add /dev/sda1

This seemed to work fine and the device synced in a couple of minutes. So, I did the same with /dev/sda3

mdadm /dev/md2 --fail /dev/sda3 --remove /dev/sda3
mdadm /dev/md2 --add /dev/sda3.

However, this resulted in an error and sda3 could not be added. The status, which was "Not active, degraded" before doing this, now changed to "Active, not started".

So, to start the device I ran the command

mdadm --run /dev/md2

which started the rebuilding process of /dev/sda3

At this point I thought that I was going to save my data, but as it turned out the data that was rebuilt is highly corrupt. A lot of files have garbage and a lot of files/directories don't have any timestamps etc. Some of the original filenames are listed when I do an ls, but I can't open them. there are entries like

?--------- ? ? ? ? ? filename

when I do ls -l

Does this mean that I have lost my data entirely now? Or is there a way to let mdadm know how exactly it should go about regenerating this device so that it gets the data correctly. as of now, mdadm thinks that all the RAID devices are clean.

Thanks in advance to anyone who can point me to any solution to this


data, loss, mdadm, raid5, rebuild

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
rebuilding mysql data files Red Squirrel Linux - Server 2 02-13-2008 10:38 PM
data backup and sync/mdadm question kpachopoulos Linux - Server 1 12-09-2007 08:11 PM
how to retrieve data from broken RAID5 DreamerX Linux - Enterprise 9 11-08-2007 09:37 AM
Reiserfsck stops when rebuilding tree at 50% - trying to recover deleted data vangelis Linux - Software 6 10-23-2006 12:34 PM
get my data back after mdadm --create RicoCarmen Linux - General 1 10-23-2005 07:18 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:48 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration