LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 02-02-2007, 07:53 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-03-2007, 02:08 PM   #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: 328Reputation: 328Reputation: 328Reputation: 328
Make sure your /etc/mdadm.conf (or /etc/mdadm/mdadm.conf) contains the partition you are adding in the DEVICE statement.
 
Old 02-03-2007, 11:32 PM   #3
dgar
Member
 
Registered: Jun 2005
Location: Candia, NH
Distribution: Ubuntu, FC, RHE3, RHE4, CentOS
Posts: 121

Rep: Reputation: 15
I never use /etc/mdadm.conf

I set up a replacement disk with the following:
dd if=/dev/zero of=/dev/sda
sfdisk -d /dev/sdb | tee sdb.sfdisk
sfdisk /dev/sda < sdb.sfdisk
mdadm /dev/md0 --add /dev/sda1

That is if you are using partitions instead of the whole drive for the array...
Compare 'mdadm -E /dev/sdb' output to 'mdadm -E /dev/sdb1' and 'mdadm -E /dev/sda1'
 
  


Reply


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
raid5 with mdadm does not ron or rebuild adiehl Linux - General 12 07-26-2010 11:01 AM
RAID5 using mdadm, how to mount /dev/md0? ggduff Linux - Software 4 11-14-2007 02:59 AM
Growing RAID5 with mdadm not working in 2.6.17? Fredde87 Linux - Software 1 08-24-2006 04:45 AM
grow a raid5 with mdadm (kernel 2.6.17) best practice? DD.Jarod Linux - Software 1 08-14-2006 12:24 PM
Strange fdisk behaviour on a 3.6TB raid5 cabinet rvf400rr Linux - Enterprise 1 01-23-2006 05:20 PM


All times are GMT -5. The time now is 07:14 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration