Celeb Glow
general | March 05, 2026

Should a Linux Swap partition be on the RAID?

When setting up a new system, if I am planning on mirroring two hard drives, what should I do with the SWAP area? I can think of three things I can do...

  1. Do a mirror of the SWAP partition
  2. Stripe it for speed
  3. Create two separate SWAP partitions

I can see number 1 just seeming "normal" compared to the rest of the partitions, but does it need to be mirrored? Would the system break if the Stripe (option 2) died? Would the system use both SWAP partitions if I created two separate ones? What would be the ideal setup?

1

1 Answer

Swap is memory, so if it died you'd probably get a kernel panic. At the very least, you'd see some binaries crash. That being said, if you don't need / want your system to keep running after a disk up and dies on you, go ahead and stripe because performance is king re:swap.

4

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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