LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 04-09-2011, 10:14 AM   #1
kemkem42
LQ Newbie
 
Registered: Sep 2005
Posts: 8

Rep: Reputation: 0
Assembly of an existing raid 5 array issues (debian)


Hi all,

After an hardware problem (dead motherboard), i've changed my server hardware.
There used to be an raid 5 array on this server (was a debian 5), composed of 4x 1Tb drives.

I'm not really sure of my array integrity so far. But should be ok.
(Tested on spared hardware but got some bad shutdowns, so I stopped and wait for new hardware)

The problem right know is that after installing a new debian 6, on new hardware, my devices names has changed.

Raid devices Before : sda1 sdb1 sdc1 sdd1
Raid devices After : sdb1 sdc1 sdd1 sde1

When i'm trying to assemble raid using
Code:
mdadm --assemble /dev/md0 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1
I receive
Code:
mdadm: /dev/md0 assembled from 2 drives and 1 spare - not enough to start the array.
root@pacem:~# cat /proc/mdstat
Personalities :
md0 : inactive sdd1[1](S) sdc1[4](S) sde1[3](S) sdb1[2](S)
      3907039744 blocks
I've read here http://ubuntuforums.org/archive/index.php/t-410136.html that it should be possible to use "mdadm --create" to restore this, but i'm a bit scared..

Any suggestions ?

Thanks a lot

Here's my "mdadm --examine" output for each drive
Code:
root@pacem:~# mdadm --examine /dev/sd[bcde]1
/dev/sdb1:
          Magic : a92b4efc
        Version : 0.90.00
           UUID : 72f23314:6604bd26:2657f2ae:544b650d
  Creation Time : Sun Sep 27 18:12:27 2009
     Raid Level : raid5
  Used Dev Size : 976759936 (931.51 GiB 1000.20 GB)
     Array Size : 2930279808 (2794.53 GiB 3000.61 GB)
   Raid Devices : 4
  Total Devices : 4
Preferred Minor : 0
 
    Update Time : Sat Apr  2 20:03:47 2011
          State : clean
 Active Devices : 3
Working Devices : 4
 Failed Devices : 0
  Spare Devices : 1
       Checksum : cf55b9b8 - correct
         Events : 120
 
         Layout : left-symmetric
     Chunk Size : 64K
 
      Number   Major   Minor   RaidDevice State
this     2       8       49        2      active sync   /dev/sdd1
 
   0     0       0        0        0      removed
   1     1       8       17        1      active sync   /dev/sdb1
   2     2       8       49        2      active sync   /dev/sdd1
   3     3       8       33        3      active sync   /dev/sdc1
   4     4       8        1        4      spare   /dev/sda1
 
/dev/sdc1:
          Magic : a92b4efc
        Version : 0.90.00
           UUID : 72f23314:6604bd26:2657f2ae:544b650d
  Creation Time : Sun Sep 27 18:12:27 2009
     Raid Level : raid5
  Used Dev Size : 976759936 (931.51 GiB 1000.20 GB)
     Array Size : 2930279808 (2794.53 GiB 3000.61 GB)
   Raid Devices : 4
  Total Devices : 4
Preferred Minor : 0
 
    Update Time : Sat Apr  2 20:07:32 2011
          State : clean
 Active Devices : 2
Working Devices : 3
 Failed Devices : 1
  Spare Devices : 1
       Checksum : cf55ba80 - correct
         Events : 126
 
         Layout : left-symmetric
     Chunk Size : 64K
 
      Number   Major   Minor   RaidDevice State
this     4       8        1        4      spare   /dev/sda1
 
   0     0       0        0        0      removed
   1     1       8       17        1      active sync   /dev/sdb1
   2     2       0        0        2      faulty removed
   3     3       8       33        3      active sync   /dev/sdc1
   4     4       8        1        4      spare   /dev/sda1
 
/dev/sdd1:
          Magic : a92b4efc
        Version : 0.90.00
           UUID : 72f23314:6604bd26:2657f2ae:544b650d
  Creation Time : Sun Sep 27 18:12:27 2009
     Raid Level : raid5
  Used Dev Size : 976759936 (931.51 GiB 1000.20 GB)
     Array Size : 2930279808 (2794.53 GiB 3000.61 GB)
   Raid Devices : 4
  Total Devices : 4
Preferred Minor : 0
 
    Update Time : Sat Apr  2 20:07:32 2011
          State : clean
 Active Devices : 2
Working Devices : 3
 Failed Devices : 1
  Spare Devices : 1
       Checksum : cf55ba90 - correct
         Events : 126
 
         Layout : left-symmetric
     Chunk Size : 64K
 
      Number   Major   Minor   RaidDevice State
this     1       8       17        1      active sync   /dev/sdb1
 
   0     0       0        0        0      removed
   1     1       8       17        1      active sync   /dev/sdb1
   2     2       0        0        2      faulty removed
   3     3       8       33        3      active sync   /dev/sdc1
   4     4       8        1        4      spare   /dev/sda1
 
/dev/sde1:
          Magic : a92b4efc
        Version : 0.90.00
           UUID : 72f23314:6604bd26:2657f2ae:544b650d
  Creation Time : Sun Sep 27 18:12:27 2009
     Raid Level : raid5
  Used Dev Size : 976759936 (931.51 GiB 1000.20 GB)
     Array Size : 2930279808 (2794.53 GiB 3000.61 GB)
   Raid Devices : 4
  Total Devices : 4
Preferred Minor : 0
 
    Update Time : Sat Apr  2 20:07:32 2011
          State : clean
 Active Devices : 2
Working Devices : 3
 Failed Devices : 1
  Spare Devices : 1
       Checksum : cf55baa4 - correct
         Events : 126
 
         Layout : left-symmetric
     Chunk Size : 64K
 
      Number   Major   Minor   RaidDevice State
this     3       8       33        3      active sync   /dev/sdc1
 
   0     0       0        0        0      removed
   1     1       8       17        1      active sync   /dev/sdb1
   2     2       0        0        2      faulty removed
   3     3       8       33        3      active sync   /dev/sdc1
   4     4       8        1        4      spare   /dev/sda1
 
Old 04-10-2011, 04:29 AM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
The RAID Wiki explains the details of using mdadm create to recover safely.

Quote:
When an array is created, the data areas are not written to, *provided* the array is created in degraded mode; that is with a 'missing' device.
 
Old 04-11-2011, 03:41 AM   #3
kemkem42
LQ Newbie
 
Registered: Sep 2005
Posts: 8

Original Poster
Rep: Reputation: 0
Ok,

So i'll have to re-create the array

Someone from another forum currently assist me, it's better

Using mdadm --examine output, it may be possible to re-create the array using the right drives order (witch is the most confusing)

Results soon
 
  


Reply



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
Manual assembly of RAID array works, won't come up on boot. Bviper Linux - Software 1 06-08-2010 09:30 PM
Fresh install of Linux - Want to keep existing RAID array hd1080 Linux - Software 5 04-12-2010 03:19 PM
Assembly problems with Raid 5 Array TexasMike Linux - Hardware 3 07-24-2009 11:09 AM
using mdadm to grow an existing RAID 1 array kevburger Linux - Hardware 1 08-18-2005 08:17 AM
Dual-booting on an existing WinXP Raid 1 array?? bobbryce Fedora - Installation 1 06-28-2005 01:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:54 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration