2

Can anyone point in the right direction on how to remove SWAP out of a RAID1 configuration? 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 data 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]

The swap device is md0.

1
  • You may want to ask a new question about your performance problems--swap on RAID 1 should perform fine, unless your drives' interface is slow and they are on the same controller. (Related: Should swap and RAID-1 mix?) Jan 22, 2013 at 5:41

2 Answers 2

3

This is no different than managing any other swap partition:

Use swapoff mdX to remove it from consideration for swap usage.

Then use mdadm to take that array out of service and then delete it. man mdadm,

and the Software RAID HOWTO is very clear on these administrative tasks.

0

Not an answer to your question, but anyone looking at this might want to look at this anser before deciding to move their swap off RAID1. That answer gives a nice overview of the considerations involved and might convince you to keep your swap in the RAID1 :-)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .