PDA

View Full Version : Hot add and re-build of array



itplanett
12th August 2008, 04:14 PM
hi,

I am attempting to hotadd and rebuild an array over 2 SATAII hard drives. I booted into rescue mode with ability to write.

i get a "Cannot open /dev/sda1:device or resource busy" message when I issue the command
mdadm /dev/md0 --add /dev/sda1
mdadm /dev/md1 --add /dev/sda3

and I am attempting to do this as root.

Also this is my output when I enter cat /proc/mdstat

Md1 : active raid 1 sda3 [0] sdb3 [1]
xxxxxxxx b;pcls [2/2] [UU]

Md0 : active raid 1 sda1 [0] sdb1 [1]
xxxxxxxx b;pcls [2/2] [UU]

any idea as to why this is happening?

marcelkraan
12th August 2008, 11:12 PM
No i really know
software raid sux

i have bought a 3ware raid controller and iam happy with it

marcelkraan
12th August 2008, 11:12 PM
Now i really know
software raid sux

i have bought a 3ware raid controller and iam happy with it

A.Serbinski
13th August 2008, 03:25 AM
You need to provide more detail regarding what you did to end up in the state that you're in.... I can think of several reasons why you could get this problem, but what it comes down to is this;

You're trying to add resources to the arrays that are ALREADY PRESENT.
Now the big question is WHY are they already present? They're present either because you already added them, or because you never removed them when you pulled out /dev/sda!

Are you aware that when you change the device, you need to "mdadm /dev/md0 --remove /dev/sda1" before you can "mdadm /dev/md0 --add /dev/sda1"?



If I were to guess about what happened, I would guess this sequence of events;

1) You created the array and life was good.
2) A disk failed, so you physically disconnected it.
3) You installed a new disk, partitioned it.
4) You attempted to run the commands you listed.
5) It gave you those error messages you showed.

What you missed is step 3b) "mdadm /dev/md0 --remove /dev/sda1; mdadm /dev/md1 --remove /dev/sda3".


Oh, and a little hint about getting better information about your array. "mdadm --detail --scan /dev/md0"


hi,

I am attempting to hotadd and rebuild an array over 2 SATAII hard drives. I booted into rescue mode with ability to write.

i get a "Cannot open /dev/sda1:device or resource busy" message when I issue the command
mdadm /dev/md0 --add /dev/sda1
mdadm /dev/md1 --add /dev/sda3

and I am attempting to do this as root.

Also this is my output when I enter cat /proc/mdstat

Md1 : active raid 1 sda3 [0] sdb3 [1]
xxxxxxxx b;pcls [2/2] [UU]

Md0 : active raid 1 sda1 [0] sdb1 [1]
xxxxxxxx b;pcls [2/2] [UU]

any idea as to why this is happening?

A.Serbinski
13th August 2008, 03:35 AM
Now i really know
software raid sux

i have bought a 3ware raid controller and iam happy with it

Failure to know how to work software raid is no excuse to say that it "sux" (whatever that means). Both software and hardware raid have their own strengths and weaknesses. The (only) strength that hardware raid has over software raid is performance. It is most definitely faster than software raid when properly implemented. Software raid is much more flexible than hardware raid. It is not limited to the hardware that the array was created on and it works at the partition level rather than at the device level.

The only kind of raid that has NO REDEEMING VALUE WHATSOEVER is FAKERAID. This is a software implementation designed to *LOOK* like hardware raid. It is the culmination of all the weaknesses of BOTH software AND hardware raid, with the added trouble of often being limited to a single operating system.


Regardless of what type of raid you are using, it is critically important to know how its management software works. What has been listed above is NOT a software failure, it is a user error, and fortunately, this is by far the easiest kind of error to correct.