Thanks for the great discussion on this! In my case I'm running a home server, that can be taken down for short periods of time when needed. I'm more interested in maintaining my setup and data, so I set up a raid1 to give me some redundancy here. That way if a disk encounters a problem between backups, I have some built in protection. I usually do a full backup every week, sometimes two, but not more than that. I don't have to have a failsafe setup here, but would like to not loose data. Your thinking is correct and sound.
The reason I set up swap (and /boot, /, and /home) on raid was I was following the article about software raid on the opensuse wiki. That article indicated, and others I've read stated that in order to recover one lost disk with the other, ALL partitions on the disk had to be mirrored (not just /home for example). Is this true? No, that is not true. What is true is to recover, you need to be able to boot. Raid1 (assuming software raid1) can not be started by generic boot code in the MBR and needs to be booted via grub in the MBR, which is the Bios boot disk. If that dies, to be able to boot, you need to also have grub installed on the MBR of the second disk. After that, it can boot, load / and /home from only one disk if necessary. The only caveat is if you remove a disk (i.e remove the bad but do not replace) it will change disk naming), it could change disks mentioned in fstab). I have discovered if you change the BIOS boot order (i.e. to boot from
On 12/07/2007 07:51 AM, Jim Flanagan wrote: the good disk if the bad disk is the one with grub on the MBR), it changes the order of the disks as far as GRUB is concerned, hd0 is now the other disk. BUT, once booted with the new disk in place, you can partition and add them to the running degraded array without reboot.
I re-booted with the "noresume" option and can access swap now on the mirrored /dev/md1 so that's not an issue now, and I'm comfortable leaving swap mirrored on /dev/md1, but is that necessary or recommended?
For performance sake I could make swap not raid, but what does that do to my recovery situation in the future if needed? NA. Software raid can run (and even be built outside of Yast) with only one disk. It would work as normal even if a disk went bad (though when it failed and then got removed it would run very slow for a few minutes).
There is a lot of discussion regarding raid, and one thing I've learned is that there are many different implementations. Raid is not raid is not raid. It may be that the recovery issue related to the full disk being mirrored may be related to bios (fake) raid, and not an issue with linux software raid. But I am still unclear on this. So to ask my remaining question more clearly, can I recover a lost disk with the good one if it contains a mix of raid and non-raid partitions on it, or does the whole disk need to be raid1 for recovery? If you have data NOT mirrored on a bad disk, it is gone. All data should be mirrored. Since 8.2 IIRC it is no longer necessary to have a separate /boot to boot a raid partition. IMHO, swap is also not necessary, since that data is temporary by definition. I seldom see swap used. Everything else should be mirrored for data redundancy and
I did not, but it probably doesn't hurt. protection. HTH. -- 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