LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 09-04-2012, 09:22 AM   #1
tgaler1
LQ Newbie
 
Registered: Jul 2009
Posts: 12

Rep: Reputation: 0
Rebuilding Mirror for Software Raid 0 on CentOS box?


Linux newbie here. Software Raid 0 Centos 5.4 box. One of the 4 drives on the box had faults, so it needed to be swapped out. I need to use mdadm to rebuild the new disk but i'm not sure exactly how to alter the steps i've seen in a few tutorials to exactly mimic my environment. The tutorial below gives some insight, but it's moreso on how to build the array initially vs rebuild an array once a drive has been swapped.

http://blog.bloke.com/2010/03/create...nd-line-mdadm/

Any help/tips on how to add the new drive into the array?

On boot, the server will get to the point during boot where it "Checking Filesystems" and then it will fail with:

"/dev/md2 clean
/dev/md3 the superblock could not be read or does not describe a correct ext2 filesystem
an error occurred during the file system check. Dropping you to a shell; the system will reboot when you leave the shell
Give root password for maintenance"


cat /proc/mdstat gives the following output:

md0: active raid1 sda1[0]
104320 blocks [2/1] [U_]

md1: active raid1 sda2[0]
8385856 blocks [2/1] [U_]

md3: inactive sda5[0] sdd2[3] sdc2[2]
282113400 blocks

md2: active raid10 sdd1[3] sdc1[2] sda3[0]
67103232 blocks 256k chunks 2 near-copies [4/3] [U_UU]

unused devices: none

Thanks for any assistance on how to proceed.

Last edited by tgaler1; 09-04-2012 at 11:24 AM.
 
Old 09-06-2012, 07:25 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,362

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Are you REALLY sure you want RAID0 on md3? That stripes all the data across all the partitions with no parity or redundancy ie if one partition breaks, you lose the lot and have to go to a backup to recover.

Basically as described in that link you have to

1. fdisk sda, sdd, sdc and create the partitions (ie the sizes) and set the type to 'fd'
2. run 'partprobe' to force the kernel to accept them without a reboot, or reboot if it won't.
Try
Code:
cat /proc/partitions to check
3. create the raid
Code:
mdadm -C /dev/md3 --level=raid0 --raid-devices=3 /dev/sda5 /dev/sdd2 /dev/sdc2
The rest as per the first code box on that page (adjust disk names/mounts etc).
The first code box is the short version; the rest is a more detailed step by step version.
 
  


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
software raid (mirror); mount partition jtag Linux - Software 4 05-08-2011 07:09 PM
software raid mirror split as a backup? newbuyer17 Linux - General 5 12-08-2009 05:29 AM
Help with software mirror (Raid) setup in startup drummer54 Linux - Newbie 2 03-24-2009 11:46 PM
Recovering Software RAID Mirror rootking Linux - Software 1 11-01-2004 07:32 PM
software raid/mirror in MDK 9.1? basicaccess Mandriva 2 09-19-2003 04:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:41 PM.

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