LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 03-01-2009, 12:59 PM   #1
seaking1
LQ Newbie
 
Registered: Jan 2009
Posts: 21

Rep: Reputation: 16
mdadm array doesn't assemble


I have a system running fc10 and am setting up a software RAID array using mdadm. I have an array working in RAID 5 with 5 disks but after a reboot (or the devices are stopped in some other way) the array will not assemble with mdadm --assemble and with mdadm --auto-detect it builds it with 4 disks and a spare.

Could someone help me out?

Also when I use --examine on a device, it says there is no superblock and tells me nothing.

Thanks.
 
Old 03-02-2009, 03:55 AM   #2
mesiol
Member
 
Registered: Nov 2008
Location: Lower Saxony, Germany
Distribution: CentOS, RHEL, Solaris 10, AIX, HP-UX
Posts: 731

Rep: Reputation: 137Reputation: 137
Hi,

are all partitions on the disks type fd?
Does mdadm work when you use it with the disk names attached like
Code:
mdadm --assemble --update=summaries  /dev/md0 /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1
?
 
Old 03-02-2009, 11:50 AM   #3
seaking1
LQ Newbie
 
Registered: Jan 2009
Posts: 21

Original Poster
Rep: Reputation: 16
I did find one drive that was not raid autodetect (fd) and fixed that. I am trying a rebuild now but that will take a long time to check.

I also wonder, is there a way I may prevent my drives from getting new names whenever I swap some out? Having them get their device names at boot time is quite difficult when you have an array set up using a specific list of devices and perhaps you added a few drives or something.

Thanks more.
 
Old 03-02-2009, 12:28 PM   #4
mesiol
Member
 
Registered: Nov 2008
Location: Lower Saxony, Germany
Distribution: CentOS, RHEL, Solaris 10, AIX, HP-UX
Posts: 731

Rep: Reputation: 137Reputation: 137
Hi,

take a search at google for devlabel. This will give persistent devicenames for disks across reboots and replacements.
 
Old 03-02-2009, 12:29 PM   #5
mesiol
Member
 
Registered: Nov 2008
Location: Lower Saxony, Germany
Distribution: CentOS, RHEL, Solaris 10, AIX, HP-UX
Posts: 731

Rep: Reputation: 137Reputation: 137
Hi,

i found a nice description how devlabel works here.
 
Old 03-02-2009, 01:40 PM   #6
seaking1
LQ Newbie
 
Registered: Jan 2009
Posts: 21

Original Poster
Rep: Reputation: 16
When I try to rebuild with

mdadm --incremental --rebuild /dev/md0

it replies

no recognisable superblock on /dev/md0

Is there a way to rebuild the superblock or something?

Last edited by seaking1; 03-02-2009 at 01:42 PM.
 
Old 03-05-2009, 12:03 AM   #7
mesiol
Member
 
Registered: Nov 2008
Location: Lower Saxony, Germany
Distribution: CentOS, RHEL, Solaris 10, AIX, HP-UX
Posts: 731

Rep: Reputation: 137Reputation: 137
Hi,

Code:
--incremental
will add a device to an existing array. So i think your commandline is wrong, because you try to add /dev/md0 which is an existing array. Normally you would add additional disks to an array eg. for replacement.
 
Old 03-05-2009, 09:48 PM   #8
seaking1
LQ Newbie
 
Registered: Jan 2009
Posts: 21

Original Poster
Rep: Reputation: 16
?ok

What is the syntax to rebuild an array?

Do md arrays function like real RAID 5 (in my case)? Initially I was trying to test by building array, physically removing drive, and rebuilding... but after removal of drive I could still mount up? Twice. I think this is strange, it did some live rebuild, in 5 seconds, without asking? I don't really what's up.

And do you know what's going on with all my superblock errors? Whenever I try a command to modify or view array it tells me about how it can't read superblock. I can now assemble the array directly though.

For removal of a drive would I use:
mdadm --manage /dev/md0 --remove /dev/sdb1
 
Old 03-06-2009, 09:34 AM   #9
mesiol
Member
 
Registered: Nov 2008
Location: Lower Saxony, Germany
Distribution: CentOS, RHEL, Solaris 10, AIX, HP-UX
Posts: 731

Rep: Reputation: 137Reputation: 137
Hi,

not sure if i all understand right

Sure you can mount your RAID-5 while one disk is gone. This is the purpose of RAID Yes md devices works like real RAID.

It's correct to remove a disk with --remove. Did you also have add a new disk or re-add an existing one? You can use --add to add a new disk or --re-add to add a disk previously removed.

The superblock errors occurs in case of incorrect usage. For example when you try to access the md-device istead of physical disk (in your --incremental for example you tried to access /dev/md0, but you have to use a physical devicename like /dev/sdb1).
 
  


Reply

Tags
mdadm, raid, software


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
mdadm fails to assemble reconnected drives (debian, raid0) SandRock Linux - Software 12 11-09-2008 12:06 PM
mdadm: fails to assemble array. All 8 devices report being "slot 0" mesosphere Linux - General 1 06-11-2008 10:42 AM
mdadm assemble weirdness with partitionable RAID0 Schneckl Linux - Software 0 08-28-2007 05:45 PM
mdadm fails to assemble my RAID device tomhildebrand Fedora 6 06-28-2007 12:08 AM
preserving old /dev/md0 - mdadm problem with --create/--assemble tiainte Linux - Kernel 2 03-11-2007 05:58 AM


All times are GMT -5. The time now is 12:34 AM.

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