Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
07-26-2007, 09:31 PM
|
#1
|
LQ Newbie
Registered: Jul 2007
Posts: 5
Rep:
|
Major problem with software raid (mdadm) and disk failure
Ok, this is the case:
I've got two raid-5 arrays with software raid, both with three disks.
Setup:
md0 has hdb2, hdd1 and sda1
md1 has hdb5, hdd3 and sda3
Tonight, the system lost power due to a power spike. The result was a reboot where it attempted to fix the raid, but it didn't exactly work. I have now booted a live CD and using utilities there.
It seems the checksum value is slightly off for all disks. And the update time is the same for some disks, but not all.
When I try mdadm --assemble /dev/md1 (or md0) with various options like force, scan, auto, etc - I get error messages like only 1 drive found, not enough.. no disks found and no mention of md0/1 found in config file.
What should I do? Which partitions (two in each array) do I pick as "these two are the one I should rebuild with"? And how do I actually FORCE mdadm to start an array with those two set devices?
See files in ... for output from mdadm.
Assistance deeply appreciated...
|
|
|
07-26-2007, 10:33 PM
|
#3
|
Member
Registered: Sep 2006
Location: Munich, Germany
Distribution: Debian / Ubuntu
Posts: 298
Rep:
|
Hi norwolf,
md1 should be startable from just hdb5 and sda3, as those two still match. Once it is up, let it rebuild hdd3.
md0 will be trickier, because none of the disks match. hdd1 is the worst (oldest) so that's the one you want to start without and rebuild later, once you have the array going with just hdb2 and sda1.
I don't know if mdadm will let you assemble the array with hdb2 and sda1, maybe with some force/run persuasion. Worst case would be to actually re-create the array from those two disks.
|
|
|
07-26-2007, 11:23 PM
|
#4
|
LQ Newbie
Registered: Jul 2007
Posts: 5
Original Poster
Rep:
|
well, I haven't found a command that will do that yet. I've tried mdadm --assemble /dev/md1 --force, mdadm --assemble /dev/md1 --scan, etc. Any clues?
|
|
|
07-26-2007, 11:39 PM
|
#5
|
Member
Registered: Sep 2006
Location: Munich, Germany
Distribution: Debian / Ubuntu
Posts: 298
Rep:
|
Have you tried explicitly giving the device names of the partitions you want to add?
I can't test it right now, but something like
Code:
mdadm --assemble /dev/md1 /dev/hdb5 /dev/sda3
Then add --force and --run as needed. ;o)
|
|
|
07-27-2007, 12:33 AM
|
#6
|
Member
Registered: Sep 2006
Location: Munich, Germany
Distribution: Debian / Ubuntu
Posts: 298
Rep:
|
Good news after a quick test: it should work painlessly as suggested.
For md1:
Code:
mdadm --assemble /dev/md1 /dev/hdb5 /dev/sda3
mdadm /dev/md1 --add /dev/hdd3
For md0:
Code:
mdadm --assemble /dev/md0 /dev/hdb2 /dev/sda1 --force
mdadm /dev/md0 --add /dev/hdd1
(And obviously do a fsck afterwards, especially on md0)
|
|
|
07-27-2007, 05:27 AM
|
#7
|
LQ Newbie
Registered: Jul 2007
Posts: 5
Original Poster
Rep:
|
Quote:
Originally Posted by rupertwh
Have you tried explicitly giving the device names of the partitions you want to add?
I can't test it right now, but something like
Code:
mdadm --assemble /dev/md1 /dev/hdb5 /dev/sda3
Then add --force and --run as needed. ;o)
|
Tried the following:
# mdadm --assemble /dev/md1 /dev/hdb5 /dev/sda3
no devices found for /dev/md1
# mdadm --assemble --force /dev/md1 /dev/hdb5 /dev/sda3
no devices found for /dev/md1
# mdadm --assemble --run /dev/md1 /dev/hdb5 /dev/sda3
no devices found for /dev/md1
# mdadm --assemble --force --run /dev/md1 /dev/hdb5 /dev/sda3
no devices found for /dev/md1
Although - the devices ARE there.
|
|
|
07-27-2007, 06:45 AM
|
#8
|
Member
Registered: Sep 2006
Location: Munich, Germany
Distribution: Debian / Ubuntu
Posts: 298
Rep:
|
hm, intersting.
Try adding a '-v' switch on the assemble, maybe that'll give some useful info.
PS: Is there a /etc/mdadm/mdadm.conf on the system you are trying to assemble from (i.e. the live cd)? If so, please post the contents.
Last edited by rupertwh; 07-27-2007 at 06:53 AM.
|
|
|
07-27-2007, 07:14 AM
|
#9
|
LQ Newbie
Registered: Jul 2007
Posts: 5
Original Poster
Rep:
|
Quote:
Originally Posted by rupertwh
hm, intersting.
Try adding a '-v' switch on the assemble, maybe that'll give some useful info.
PS: Is there a /etc/mdadm/mdadm.conf on the system you are trying to assemble from (i.e. the live cd)? If so, please post the contents.
|
-v didn't give any more info.
No, there isn't an /etc/mdadm.conf or /etc/mdadm/mdadm.conf. The entire system is offline, we've got it booting from a rescue CD.
|
|
|
All times are GMT -5. The time now is 02:41 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|