[CentOS] Re: How to enable my RAID again

Fri Oct 12 12:49:18 UTC 2007
Theo Band <theo.band at xanadu-wireless.com>

Scott Silva wrote:
> on 10/7/2007 10:40 PM Theo Band spake the following:
>> Scott Silva wrote:
>>> on 10/7/2007 2:41 PM Theo Band spake the following:
>>>> # mdadm -Q /dev/sda
>>>> /dev/sda: is not an md array
>>>> /dev/sda: No md super block found, not an md component.
>>>> # mdadm -Q /dev/sda1
>>>> /dev/sda1: is not an md array
>>>> /dev/sda1: No md super block found, not an md component.
>>>> # mdadm -Q /dev/sda2
>>>> /dev/sda2: is not an md array
>>>> So it looks like all info is lost. Can I create a new array with the
>>>> existing LVM partitions and the free partitions without destroying
>>>> any data?
>>> Your raid appears to be on /dev/sda3 /dev/sdb2 /dev/sdc2 /dev/sdd2
>>> Try  mdadm --examine --brief --scan --config=partitions
>>> and see if it sees anything.
>> # mdadm --examine --brief --scan --config=partitions
>> Nothing....
>> Indeed these are the partitions that are now unused and used to be part
>> of the raid. Any idea what could have gone wrong when I migrated to from
>> FC3 to Centos?
>> I also changed the mobo of this machine and changed the CPU from single
>> to a dual core one. I assume support is in the kernel, so no special
>> actions should be needed to get this to work during boot up.
>> Theo
> When you upgraded you might have formatted the partitions accidentally.
> If there is no raid data there, you can try something like testdisk to
> see if you can recover it, but chances are that your data is gone.
No I did not format the disk. All data was present, but by LVM. Every
disk has two partitions, one unused and one added to a volume group.

Just after I send the previous mail, I moved the two physical disks out
of the volume group (pvmove). The first disk went OK, just in the middle
of the move of the second disk I got a kernel panic. I was not able to
boot anymore. Even a rescue Centos4.4 CD did not work. As soon as it
started to look for existing installation it gave the same kernel panic.
And this was on a live system, with everyone looking over my shoulder :-(
Nice moment to try whether the backup server would work. (And it did, of
course :-)

I could solve the kernel panic by booting a FC7 live CD later on. It
just found the Volume group still with four physical disk partitions in
it. No extends were present on the two disk that I wanted to pull out of
the group. Using the lvm tools on the FC7 CD I was able to finish the
job. I installed FC7 using RAID1 on the two removed disks. After that I
booted in FC7 and copied my centos installation from the two old volume
group to the new raid1. After some fiddling with mkinitrd, I got is to
boot Centos4.5 from the RAID1 created by FC7.

So I expect a problem to exist with LVM and the kernel I'm using