[opensuse] Software RAID recovery
Dear list, hypothetically: How do I recover a software RAID 1? It was easy to install it, using 10.3 installer. But what do I have to do if something happens? Let's say one of two harddiscs is broken. OK, I turn the computer off, change the broken harddisc to a working one. And THEN? What do I have to do now? How do I get the mirrored data to the new disc? Is there something like a primary and a secondary disc? Is there a difference which harddisc dies? Could the system keep running if I just remove the damaged disc? Does the installer have a option for recovering RAID? Any good documentation about RAID 1 known? Thanks! -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 11/18/2007 05:57 AM, Johannes Nohl wrote:
Dear list,
hypothetically: How do I recover a software RAID 1?
It was easy to install it, using 10.3 installer. But what do I have to do if something happens? Let's say one of two harddiscs is broken. OK, I turn the computer off, change the broken harddisc to a working one. And THEN? What do I have to do now? How do I get the mirrored data to the new disc?
It is rather simple, but you didn't say what kind of RAID 1. I will assume linux software RAID 1, since you mentioned doing it via the installer. After replacing the disk, assuming it is a new disk, you first need to partition it. It needs to be the same size partitions as previously. For example here I have a raid 1 root (/) and /home. mdadm --detail /dev/md0 (which is root, md1 is home) will give you detailed info about your raid array, especially which partitions are part of the array. So, for mine it is /dev/sda5 and /dev/sdb5. Let's say /dev/sda went bad and was replaced. If it was now partitioned, mdadm /dev/md0 -a /dev/sda5 would add that partition back to the array. This would cause the array to sync (no need to format the disk) and copy over the data from the other disk. Caveat, assuming your BIOS is set to boot from sda (1st HD), grub will need to be reinstalled.
Is there something like a primary and a secondary disc? No Is there a difference which harddisc dies?
Not really. You can install grub on both MBRs, but since booting only happens from one HD, there is a difference.
Could the system keep running if I just remove the damaged disc?
Yes, assuming you had hot swappable disks.
Does the installer have a option for recovering RAID?
Not sure, but this can be done via command line. For more info, man mdadm.
Any good documentation about RAID 1 known?
I'm sure there is, but there are different kinds, which are quite different. There is true hardware raid through cards, there is fake raid, built in to many mainboards these days, and there is linux software raid. I am most familiar with the latter. man mdadm has a lot of good info. Google would also get you a lot of reading material. -- Joe Morris Registered Linux user 231871 running openSUSE 10.3 x86_64 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Saturday 2007-11-17 at 22:57 +0100, Johannes Nohl wrote:
hypothetically: How do I recover a software RAID 1?
It was easy to install it, using 10.3 installer. But what do I have to do if something happens? Let's say one of two harddiscs is broken. OK, I turn the computer off, change the broken harddisc to a working one. And THEN? What do I have to do now? How do I get the mirrored data to the new disc?
Basically, repartition the new disk, and add the partitions to the raid array.
Is there something like a primary and a secondary disc? Is there a difference which harddisc dies?
To the raid, no.
Could the system keep running if I just remove the damaged disc?
Yep, it could, provided it can boot. The array would work in degraded mode, and of course, if that disk goes bad too then you are hosed.
Does the installer have a option for recovering RAID?
I don't think so. I haven't seen it.
Any good documentation about RAID 1 known?
cer@nimrodel:~> ls /usr/share/doc/howto/en/txt/ | grep -i raid ATA-RAID-HOWTO.gz Antares-RAID-sparcLinux-HOWTO.gz Boot+Root+Raid+LILO.gz DPT-Hardware-RAID-HOWTO.gz Linux-Promise-RAID1-HOWTO.gz Root-RAID-HOWTO.gz Software-RAID-0.4x-HOWTO.gz Software-RAID-HOWTO.gz <======== - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFHP5R7tTMYHG2NR9URAtDiAJ9bmSatHPoheXJPoMaWyNS2ehqHHQCfUrZ2 k79/5aE/9Nh5gk6iHRmsiSY= =gGEf -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (3)
-
Carlos E. R.
-
Joe Morris (NTM)
-
Johannes Nohl