1

I'm installing Debian on a RAID5 array with 4 disks. If this were one big disk, I would create 16GB SWAP partition. Since it is a RAID with 4 disks, I am wondering should I create one 16GB SWAP partition on one disk? or 4 x 4GB SWAP partitions, one on each disk?

I've been searching around but can't find a straight answer.

  • I believe (but don't know for certain) you should only have one swap partition, even if it is distributed across your raid array. This question is regarding Raid 1, but I think it answers some of your questions: askubuntu.com/questions/245976/… – Jim Diroff II Aug 12 at 17:02
  • On a RAID array you don't get to choose which data goes on which disks. All the data goes on all the disks... – user253751 Aug 12 at 19:04
1

You should do this:

RAID5 (md0 or whatever)
 |
 `--lvm (on top of the RAID5)
    |
    +-- / (within the lvm)
    |
    `-- swap (within the lvm)

It's complex to do in the Debian installer but possible.

This will protect your swap partition from a drive failure, which is important because sudden disappearance of swap due to a drive or other error will make your system crash.

| improve this answer | |
  • Can you elaborate any more on how to do this exactly? I created an LVM on the raid, but then I was not able to create / or swap on the LVM. I had to abort the install. – PatMcTookis Aug 12 at 20:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.