[olug] software raid advice - swap?
George Neill
georgen at neillnet.com
Fri Mar 2 21:49:19 UTC 2007
Ryan,
> I'm setting up software raid (RAID1) on CentOS/RedHat. I've got two scsi
> drives I'm going to mirror as the / mount point. What should I do about
> swap space? I could place it on one of the scsi drives, but if that
> drives fails what happens? Bad stuff I imagine, so why even have raid
> if the system is going to fail when the drive does?
If you are concerned about a disk failure, which it appears you are.
You should mirror your swap space also.
> I believe I could create two swap partitions, one on each drive, and the
> OS would use both at the same time (based on some stuff I read). But
> there is still a good chance when a drive fails you're going to crash
> because there will be stuff swapped into that swap partition.
The two partitions set up in this fashion won't help you in the case
of a disk failure. Also if you don't set the priorities of the swap
space it won't act as you would expect it to either.
> The other option I'm thinking is to create the swap partition as another
> raid device, mirrored on both drives. I'm not sure thats possible.
> Whadda think?
It's most common now-a-days (on a desktop) to create two partitions,
1) /boot
2) everything else with LVM (yes even swap).
Obviously if this is a server and there are performance and/or other
requirements you may choose to set up swap (or other partitions) on
completely different disks, etc ...
If you need more swap space in this setup, you only have to grow it in LVM.
HTH,
George.
More information about the OLUG
mailing list