Can anyone point in the right direction on how to remove SWAP out of a RAID1 configuration on Ubuntu 10.04 server? According to the Ubuntu Advanced installation guide, here, it said to add swap to the raid but I am having some serious performance issues. I would like to remove it from the array and recreate it, with the same size, on the two separate drives. Zero data loss on the other array is a must.
Its a remote computer so I would prefer to do it via command-line if possible.
Here is the output from cat /proc/mdstat
md0 : active raid1 sdb1[1] sda1[0]
19530688 blocks [2/2] [UU]
md1 : active raid1 sdb2[1] sda2[0]
957230016 blocks [2/2] [UU]
Swap is on the md0 device.
Thanks
Assuming you've got swap on
/dev/md1
, this should work (this is in a root prompt):If you use
sudo
for these (as you probably should), you'll need to changeecho $foo >> $blah
toecho $foo | sudo tee -a $blah$
.Meanwhile it depends on the version of kernel you use, LSR RAID-1 can give performance boost when reading from it — due to possible read balancing. Also, making swap not using RAID-1 means you have unstable OS (app hangs/crash) when one of the disks has failed. In other words, it's rather senseless idea.