LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Software Raid Question(install new disk with mdraid) (http://www.linuxquestions.org/questions/linux-software-2/software-raid-question-install-new-disk-with-mdraid-445936/)

poj 05-18-2006 12:56 AM

Software Raid Question(install new disk with mdraid)
 
I have 2 harddisks(hda,hdc) and built them as Software RAID array(mdraid) when install FC3.

Now I found that hdc is bad and need to replace. I'm not sure, Can I just replace it with a brandnew disk then mdraid will partition and copy everything for me? or I need to prepare partition table first before replace the old one.

another question is how can I know that mdraid will copy from hda to new hdc(that what I want) or it will copy from hdc to hda.

joe4psu 05-18-2006 06:47 AM

removing/adding drives to arrays
 
Hopefully someone will help verify what I am about to say. These commands are found in the Manage mode help/man/info of the mdadm command.

- mark drive to be removed as "failed" if it is not already listed as failed
mdadm /dev/md? -f /dev/hd?
mdadm -D /dev/md? will display the info on the array, mdadm -E /dev/hd? displays pretty much the same info

- remove the failed drive
mdadm /dev/md? -r /dev/hd? removes the failed device from the array, now install the new drive

- hot add the new drive, the new drive will be synched to the drive that remained installed
mdadm /dev/md? -a /dev/hd? adds the drive

Verify the array with mdadm -E /dev/md?

I hope this helps.

Joe

Oops, I just realized that you said mdraid. The above is my guess with mdadm. Probably not much help then...

RanDrake10 05-18-2006 04:54 PM

Do you have a mirrored or striped array?

poj 05-23-2006 06:50 AM

thanks everyone, I try patition new disk the same as another, add partition to array by

mdadm /dev/md? -a /dev/hd?

and now it work.:)


All times are GMT -5. The time now is 12:28 AM.