LinuxQuestions.org
Register a domain and help support LQ
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 01-31-2010, 11:09 PM   #1
anuragccsu
LQ Newbie
 
Registered: Jun 2009
Posts: 11

Rep: Reputation: 0
query on mdadm for support of adding a disk to a running linear array


Hi All,

I am using mdadm 2.6.4 for managing RAIDs on Linux kernel 2.6.18. I've a query like whenever i tried to add a new disk to a running linear array(JBOD)i get a message "cannot add new disk to this array"

The exact steps are as follows:
create a new array as:
mdadm -C /dev/md0 -llinear -n2 /dev/sata/ /dev/sata2

it is getting added and i am able to see with -D command.

Now add a new disk sata3 as follows:

mdadm --grow /dev/md0 --add /dev/sata3 I get the output as:

md: sdb has invalid sb, not importing!
md: md_import_device returned -22
mdadm: cannot add new disk to this array.

So my first doubt is whether mdadm 2.6.4 supports this features or not if it supports then do i need to change the driver?

Please help!

Last edited by anuragccsu; 02-02-2010 at 10:32 PM.
 
Old 02-02-2010, 01:23 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: 327Reputation: 327Reputation: 327Reputation: 327
It's saying that the superblock on sdb (the device you're adding, I suspect) is not valid for the operation. Prior to adding a drive to a RAID, I usualy:

Code:
dd if=/dev/zero of=/dev/xxx bs=512 count=1000
Then fdisk or parted/gparted to initialize. This makes sure the system doesn't pick up any stray old superblocks.
 
Old 02-03-2010, 01:54 AM   #3
anuragccsu
LQ Newbie
 
Registered: Jun 2009
Posts: 11

Original Poster
Rep: Reputation: 0
Hi above,
thanks for your reply, i tried in the way you suggested but still the problem is same.
one more thing i've found out is that if we check this runnig array disk support for other RAID levels as i checked it for RAID5 it is adding the new disk to the runnig array as "spare", so is this what we mean by Hotadd or the new disk can be added as a active disk to the runnig array in any RAID level?
Thanks
 
Old 02-03-2010, 02:50 AM   #4
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: 327Reputation: 327Reputation: 327Reputation: 327
I created a linear two drive array:

Code:
fdisk /dev/sdb
n,1,enter,enter,t,1,fd,w

fdisk /dev/sdc
n,1,enter,enter,t,1,fd,w

mdadm -C /dev/md0 -llinear -n2 /dev/sdb1 /dev/sdc1

cat /proc/mdstat:
Personalities : [linear] 
md0 : active linear sdc1[1] sdb1[0]
      192512 blocks 64k rounding
      
unused devices: <none>
Next, I created a third device:

Code:
fdisk /dev/sdd
n,1,enter,enter,t,1,fd,w
I then added it to the array:

Code:
mdadm --grow /dev/md0 --add /dev/sdd1

cat /proc/mdstat:
Personalities : [linear] 
md0 : active linear sdd1[2] sdc1[1] sdb1[0]
      288768 blocks 64k rounding
      
unused devices: <none>
There were no problems, using:

mdadm-3.0.3-2.fc12.x86_64
kernel-2.6.32.7-37.fc12.x86_64

You might want to recheck your steps, or update your software.
 
  


Reply

Tags
linux, mdadm, raid


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
Failed RAID5 disk array, questions about mdadm and recovery HellesAngel Linux - General 13 04-08-2012 05:30 AM
Add disk to raid1 array in imsm container with mdadm (not losing data). 82801ER ICH5R moon300 Linux - General 7 01-06-2010 03:39 PM
mdadm clean install of four drives overwritting any previous raid5 disk array javaholic Linux - Server 15 10-13-2008 11:05 AM
Need Help adding Fibre Channel Disk array to Red Hat 7.3 beeman000 Linux - General 1 10-07-2003 01:15 PM
could redhat advance server 2.1 support 2T disk array? wind Linux - Hardware 1 05-04-2003 04:58 AM


All times are GMT -5. The time now is 12:29 PM.

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