LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 02-02-2007, 11:47 PM   #1
robbe751
LQ Newbie
 
Registered: Feb 2007
Posts: 7

Rep: Reputation: 0
Weird behaviour of mdadm/software RAID5


Hi,

I have a setup like the following:
-3xSATA Seagate 400GB (same drives) on an ASUS M2NPV-VM
-/dev/sd[a|b|c] are members of the RAID5 /dev/md0

The status of /dev/md0 is clean, persistent sb etc.

Now I noticed that /dev/sda has no partition on it. /dev/sdb and sdc have an 'fd' autodetect partition on them. This is weird already.
So I go ahead and remove sda from the array, zero the superblocks and for good measure do a

sudo dd if=/dev/zero of=/dev/sda count=1M

Now I partition sda properly with sda1 as 'fd' autodetect. When I now

sudo mdadm /dev/md0 --add /dev/sda1

I only get

mdadm: add new device failed for /dev/sda1 as 3: Invalid argument

The funny thing is, when I --add /dev/sda instead, it works and starts rebuilding the array. Why do I have to add the whole disk, rather than the partition? This doesn't make sense to me.

Any hints or directions?

-Jan.
 
Old 02-02-2007, 11:57 PM   #2
jonwatson
Member
 
Registered: Jun 2004
Location: Nova Scotia, Canada!
Distribution: Ubuntu
Posts: 170

Rep: Reputation: 30
That sounds somwehat logical to me. When you set up a RAID5 with 3 disks, you lose a disk as the RAID uses it for...well...the mirror and other RAIDey stuff. It's not a user-accessible partitioned drive much like a swap partition isn't a user-accessible partition.

Check out a RAID calculator for fun and games:

http://www.google.ca/search?q=raid+c...ient=firefox-a

Last edited by jonwatson; 02-02-2007 at 11:59 PM.
 
Old 02-03-2007, 01:55 AM   #3
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
Post your /etc/mdadm.conf and the steps that you did to create the array.

From the mdadm manual, it stated it will create a spare when creating a RAID-5 array, so technically you need four hard drives for RAID-5. You can get around this by specifying the option --force. I agree this way as the minimum quantity of drives for RAID-5 setups because it provides redundancy after the array is created using three hard drives and including a hot spare.

To make software RAID-5 be reliable, I recommend four separate IDE/SATA controllers. This will be more reliable when a controller fails. However, when considering using RAID-5, I strongly recommend hardware RAID controllers because software RAID doing RAID-5 transactions will penalize your computer if you are not using a system with multiple processors.
 
  


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
raid5 with mdadm does not ron or rebuild adiehl Linux - General 12 07-26-2010 10:01 AM
RAID5 using mdadm, how to mount /dev/md0? ggduff Linux - Software 4 11-14-2007 01:59 AM
Weird behaviour of mdadm/software RAID5 robbe751 Linux - Software 2 02-03-2007 10:32 PM
Growing RAID5 with mdadm not working in 2.6.17? Fredde87 Linux - Software 1 08-24-2006 03:45 AM
grow a raid5 with mdadm (kernel 2.6.17) best practice? DD.Jarod Linux - Software 1 08-14-2006 11:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 11:42 AM.

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