LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Raid 1 after reinstall (https://www.linuxquestions.org/questions/linux-newbie-8/raid-1-after-reinstall-598985/)

familyogre 11-12-2007 04:58 AM

Raid 1 after reinstall
 
Hi There

I've been running Fedora 6 for about 8 months, but the main disk failed and so i've had to reinstall.

Luckily, all my files were on two seperate 160gb disks in a raid 1 array.

I've got Fedora 7 up and running nicely, however i can't see to find a way to plug the raid array back in without recreating it from scratch and thus overwriting all my data.

Any pointers would be most appreciated.

Cheers
FamilyOgre.

Simon Bridge 11-12-2007 06:22 AM

If you used the default f7 install, you can probably add the extra drive as part of the LVM volume. Look it up.

Basically, you needed to have set up RAID during the installation.

mrrangerman 11-12-2007 11:30 AM

Well it will depend on what kind of raid1 you setup, was it a software or hardware raid1? It sound to me like you put your OS on it's own drive and then setup the raid1 array across the two 160gb drives.

A hardware raid array the logic is managed by the controller so all the OS will see is a drive. Thus all you would need to do is setup a mount point for the array and edit your fstab to mount it at boot time.

A software raid on the other hand the logic is managed by the kernel and the logic is setup/written at installation time. When you lost the drive containing your Fedora 6 the kernel logic was lost also. I'm not sure if there is a way that that could be replaced without a fresh raid setup.

My guess is that the only way you are going to be able to recreate the software raid1 array will be to start fresh. I know you don't want to hear that. Can you mount one of the 160gb drives to get to your data? If you are going to setup a software raid1 in the future I would have the OS on it as well. That way if you lose a drive then all you would have to do is replace the drive and have raid rebuild the drive.

Or buy a raid controller card and use hardware raid, but that can put a dent in the wallet.

familyogre 11-12-2007 01:46 PM

a search based around "software raid" and " LVM volume" did the job and it was suprisingly easy.


mrrangerman, your asumptions were correct, i had an old disk with the FC6 install on it (which died) and two new 160gbs with my dbs and files on.

Firstly i tried mounting one volume but it didn't like that as the file system wasn't correct, so i poked around and came up with a clean solution.

(based on this article: http://www.linuxjournal.com/article/8874)
It was:

mdadm --examine --scan /dev/hdb1 /dev/hdc1 which came back with

ARRAY /dev/md0 level=raid1 num-devices=2..... etc


then i copied that info into /etc/mdadm.conf

then ran
mdadm -A -s

then
cat /proc/mdstat

then mounted the array and saved it in fstab.

I think i was lucky in that my orginal array wasn't volgroup00, if it had been i'd have been in more of a mess.

thanks for your pointers.


All times are GMT -5. The time now is 01:19 AM.