Can't make swap on raid partition

Hi,

While installing SUSE 11, I made several RAID1 partitions, one of which I (tried to) set up as swap space. I thought that SUSE installation would take care of everything, but apparently my swap space is not there. So I figured I have to run **mkswap **and swapon.

When I ran ‘mkswap /dev/md0’, it said “error: swap area needs to be at least 40kB.”

So I ran ‘cat /proc/mdstat’ and saw that /dev/md0 was set to “auto-read-only” so I made it readwrite using ‘mdadm -w /dev/md0’. But I’m still getting the same mkswap error message.

Why is mkswap complaining that the size is 40kB? The partition is 1GB.

cat /proc/mdstat

Personalities : [raid1] [raid0] [raid6] [raid5] [raid4]
md3 : active raid1 sda4[0] sdb4[1]
466254356 blocks super 1.0 [2/2] [UU]
bitmap: 0/445 pages [0KB], 512KB chunk

md1 : active raid1 sda2[0] sdb2[1]
104408 blocks super 1.0 [2/2] [UU]
bitmap: 0/7 pages [0KB], 8KB chunk

md2 : active raid1 sda3[0] sdb3[1]
20972784 blocks super 1.0 [2/2] [UU]
bitmap: 2/161 pages [8KB], 64KB chunk

md0 : active raid1 sda1[0] sdb1[1]
1052212 blocks super 1.0 [2/2] [UU]
bitmap: 0/9 pages [0KB], 64KB chunk

Thanks.

-Wubbzy

Hi,

I’ve run into the same problem. Seems the raid get’s flagged as read-only:

md2 : active (auto-read-only) raid1 sda3[0] sdb3[1]
9438112 blocks super 1.0 [2/2] [UU]
bitmap: 0/145 pages [0KB], 32KB chunk

I can set it r/w manully but on reboot it gets flagged as read-only agin.

Did you find a solution?