LinuxQuestions.org
Help answer threads with 0 replies.
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 09-13-2009, 10:46 AM   #1
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
Software raid5, is it using 2 or 3 partitions??


My setup is 3 partitions for raid5, /dev/hda6 /dev/hdb1 /dev/sda2 (hdb1 is whole disk)
Creating /dev/md0 with mdadm:
Code:
edgar:~# mdadm --create --verbose /dev/md0 --level=5 --raid-devices=3 /dev/hda6 /dev/hdb1 /dev/sda2
seems to work fine, array is created.
After reboot only 2 partitions are used, /dev/sda2 is said to be faulty.
I remove sda2 and recreates it. Then add it to array:
Code:
edgar:~# mdadm /dev/md0 --add /dev/sda2
Reboot. What do I have now?

Code:
edgar:~# mdadm --detail /dev/md0/
dev/md0:
        Version : 00.90
  Creation Time : Sun Sep 13 13:37:07 2009
     Raid Level : raid5
     Array Size : 27358464 (26.09 GiB 28.02 GB)
  Used Dev Size : 13679232 (13.05 GiB 14.01 GB)
   Raid Devices : 3
  Total Devices : 2
Preferred Minor : 0
    Persistence : Superblock is persistent

    Update Time : Sun Sep 13 17:38:06 2009
          State : clean, degraded
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

         Layout : left-symmetric
     Chunk Size : 64K

           UUID : d7dee44c:7886fe78:0a872d5f:65630445
         Events : 0.562

    Number   Major   Minor   RaidDevice State
       0       3        6        0      active sync   /dev/hda6
       1       3       65        1      active sync   /dev/hdb1
       2       0        0        2      removed
Code:
edgar:~# mdadm --examine /dev/sda2
/dev/sda2:
          Magic : a92b4efc
        Version : 00.90.00
           UUID : d7dee44c:7886fe78:0a872d5f:65630445
  Creation Time : Sun Sep 13 13:37:07 2009
     Raid Level : raid5
  Used Dev Size : 13679232 (13.05 GiB 14.01 GB)
     Array Size : 27358464 (26.09 GiB 28.02 GB)
   Raid Devices : 3
  Total Devices : 3
Preferred Minor : 0

    Update Time : Sun Sep 13 14:12:31 2009
          State : clean
 Active Devices : 3
Working Devices : 3
 Failed Devices : 0
  Spare Devices : 0
       Checksum : ffa6da05 - correct
         Events : 14

         Layout : left-symmetric
     Chunk Size : 64K

      Number   Major   Minor   RaidDevice State
this     2       8        2        2      active sync   /dev/sda2

   0     0       3        6        0      active sync   /dev/hda6
   1     1       3       65        1      active sync   /dev/hdb1
   2     2       8        2        2      active sync   /dev/sda2
See? Examinig sda2 and it's said to be active in the array. 3 raid devices, 3 used.
Looking at detail for /dev/md0 it is not. 3 raid devices but only 2 used.
What is true?? Where did I go wrong?
 
Old 09-30-2009, 08:30 PM   #2
erbngeek
LQ Newbie
 
Registered: Oct 2007
Posts: 6

Rep: Reputation: 2
Just a wild guess, but is /dev/sda2 an external USB drive? I tried to do this once with external USB drives, but had many intermittent problems. Ultimately I think the array is being initialized before the sda2 drive. Since RAID 5 can lose a drive and still operate, it loads but in a degraded state.

Perhaps you can disable auto raid until after the sda appears then manually (through a local script) assemble it so it doesn't have to rebuild each time.
 
Old 10-01-2009, 02:21 AM   #3
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Original Poster
Rep: Reputation: 127Reputation: 127
No USB-drive, all disks are internal - 2 ide & 1 sata.
You could be right, maybe the sata-drive is initialized after raid. I'll check that when I get home, thanks!
 
  


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
Software RAID5 - beware! Micro420 Ubuntu 7 05-20-2008 05:52 AM
Software RAID5 Difficulties jsaxton86 Linux - Software 1 05-12-2007 11:58 AM
mdadm, images over loopback, raid5, can't create partitions emat Linux - Software 1 05-03-2007 03:46 PM
Software RAID5 disasters Hamsjael Linux - Hardware 8 06-15-2005 04:05 AM
Resizing ext3 partitions on RAID5 array greenhornet Linux - General 2 04-09-2002 08:22 AM

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

All times are GMT -5. The time now is 01:25 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