-   Linux - Newbie (
-   -   Raid0 rebuild (

grpprod 04-28-2006 06:19 AM

Raid0 rebuild
I have a CentOS 4.2 with two identical HDDs, and the following software RAID configuration:

/dev/md0 (/boot) defined as RAID1
/dev/md1 (/swap) defined as RAID0
/dev/md2 (/) defined as RAID0

The system seems to have crashed, but no disks seem to have failed. Only /dev/md0 seems to be still active (using cat /proc/mdstat). I understand that RAID0 is not redundant, however using CentOS CD-ROM in rescue mode gives me the opportunity to access my root partition (/dev/md2). I can access my data although in a striped volume. So it seems that this RAID0 volume needs to be somehow 'reactivated'.

In rescue mode, I have created an /etc/raidtab, and then tried to use the following:

raidhotadd /dev/md2 /dev/hda3
raidhotadd /dev/md2 /dev/hdb3

but the response is:

can not hot-add disk: invalid argument

Any help would be appreciated.

WhatsHisName 04-28-2006 10:57 AM

CentOS4 uses mdadm, not raidtools.

Could you be more specific as to what you mean by “crashed” and what modifications you made just prior to the “crash”? Error messages would be helpful.

If you can mount and chroot in rescue mode, then it really doesn’t sound like a raid issue.

As a side issue, why do you have swap defined as a raid0? You should define the two partitions in fstab to be first priority swap (pri=1), which gives raid0 functionality.

grpprod 05-01-2006 04:00 AM

I mean that the system does not boot anymore. I thought it is a RAID issue because proc/mdstat does not show the RAID volumes to be active (UU).

I am not sure I understand what you mean for the swap issue, I would appreciate it if you could be a little bit more explanative.

WhatsHisName 05-01-2006 09:43 AM

If you can boot into rescue mode, search for the installation, mount it and chroot as you infer, then the raids are functioning.

If you boot into rescue mode, but don’t search/mount/chroot, then the raids are not started.

Regarding swap configuration, see the Software Raid HowTo section “2.3 Swapping on RAID”:

grpprod 05-02-2006 01:13 AM

So in this case, can the RAID still be rebuilt? Perhaps using mdadm?

All times are GMT -5. The time now is 04:18 AM.