[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: multiple swap areas and RAID 1



On 8/8/2012 8:25 AM, Georgi Naplatanov wrote:
Hi.

I'm going to configure Debian GNU/Linux with software RAID 1 and I think
to put swap area on RAID 1 (/dev/mdX), but someone told me that if the
computer have multiple swap partition (e.g. /dev/sda2, /dev/sdb2) with
equal priorities, linux kernel will mirror swap area between different
devices. Is that true ? I mean kernel 2.6.32 and 3.2.x.

Best regards
Georgi



I think the kernel will swap on multiple devices, of course, but doesn't mirror data across them. For redundancy, you need RAID 1 or 10 Swapping on RAID 0 is not redundant and is unnecessary, swap on other RAID types has performance issues.

More sophisticated disk pooling schemes and file systems like ZFS can provide safety, too. You can swap on nearly anything that mounts as a block device. Whether you should is a matter for study. I put swap on RAID 1 md0 swap partition. Some Linux distributions' installers will even put swap on LVM logical volumes. Whether that makes sense, I've never been able to decide.

MArk


Reply to: