I have a Ubuntu 11.10 headless machine setup with Software RAID 1. It has two drives, each drive has a main boot partition (sda1 & sdb1) and a small swap partition. I created a raid for the boot partitions (md0) but not for the swap partitions. OOpps!!?? The machine appears to be running fine, but how is the box handling swap? Is it striped, mirrored, or unused on one of the partitions. Should I create a second RAID for the swap partitions?
Linux – Forgot to create a second RAID for swap partitions in Software RAID 1. Will it work
linuxraid1software-raidUbuntu
Related Topic
- Linux – move an entire software RAID1 array containing Linux to another machine
- Device in software RAID 10 array: clean, degraded. Ouch
- Ubuntu – RAID degraded on Ubuntu server
- How to coax RHEL / CentOS / SL 7 into booting normally with degraded software RAID 1
- RAID – mdadm RAIDs of Partitions or Partitions of RAID
- Linux – Create an Image of a disk having software raid partitions
Best Answer
swapon -s
will show your current active swap setup. If you see both swap-partitions with the same priority the kernel will stripe across these swap-devices.If you do not need swap (i.e. you have got enough free+cached ram to take up what is currently in swap), you can deactivate swap online:
swapoff -a
. If swap is in use it will take a moment to load the swapped areas into ram.Now you can safely build your raid1, mkswap on that device, edit fstab and
swapon -a
. If you use swap as resume-device you need to reconfigure that as well to the new device.