Does software raid break when reinstalling the OS? If yes, is there any way to prevent it, or recreate it without data loss after the reinstall? If no, is there anything you have to remember when doing it so it doesn't? Or is it just fixed automagically?
The particular OS I am wondering about is Windows 7 and Vista, but more general answers are more than welcome.
Software RAID is RAID handled by drivers in the OS. By definition, when you're installing a new OS onto disks configured with software RAID the new OS is going to see the disks as "disks", rather than as a RAID volume. (A hardware RAID controller abstracts the disks in the RAID volume away and shows the OS a generic "disk".)
If you're installing the same OS, it should "detect" the existing software RAID configuration and use it. That will vary from OS to OS.
Edit:
Finding official Microsoft documentation on this is proving needlessly difficult. From what I'm finding, Windows 7 Professional, Enterprise, and Ultimate support software RAID 0 and RAID 1. My experience with prior versions of Windows client OSs was that no software RAID was permitted.
In Linux there is a special partion type for software RAID. At first you create partitions on each HDD, then assemble them into array. In begining of each partition persistent superblock is written, so kernel could recognise existing RAIDs.
In my practice restoring RAID after OS reinstall was quite easy. Basically OS will automaticly find existed RAID and restore it. That is correct if HDDs were not reconnected in different order in SATA, SAS, SCSI ports and their device names got changed. In that case you will need to assemble them manually.
The answer is of course "it depends" :-)
The new OS needs to detect that the old OS used RAID and in which configuration or it can't access the data.
Most OS will do that in most cases, It worked for me with installations of Linux, OSX and Solaris, all of it RAID1 mirroring. I don't have any experience with Windows.
Well, if you are running mirroring (RAID1) you could always try to shut down the PC/server, remove one of the disks and insert it into another PC/server and see if you can access it.
If it works you can just reinstall the other disk, and then insert© the old disk.