Description of problem: I want to add a third swap mirror, before reorganizing my partitions, and mdadm won't let me. I could be doing something wrong, but I cannot see any way the target has any less space than the two existing swap components. Version-Release number of selected component (if applicable): v2.5.4 How reproducible: Always (other --add operations work properly) Steps to Reproduce: 1. mdadm /dev/md3 -v --add /dev/sdc3 Actual results: mdadm: add new device failed for /dev/sdc3 as 2: No space left on device Expected results: Add /dev/sdc3 as spare for /dev/md3 Additional info: [root@inspector ~]# fdisk -l Disk /dev/sda: 750.1 GB, 750156374016 bytes 255 heads, 63 sectors/track, 91201 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 33 265041 fd Linux raid autodetect /dev/sda2 34 1065 8289540 fd Linux raid autodetect /dev/sda3 1066 1587 4192965 fd Linux raid autodetect /dev/sda4 1588 91201 719824455 5 Extended /dev/sda5 1588 5764 33551721 fd Linux raid autodetect /dev/sda6 5765 91201 686272671 fd Linux raid autodetect Disk /dev/sdb: 750.1 GB, 750156374016 bytes 255 heads, 63 sectors/track, 91201 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdb1 * 1 33 265041 fd Linux raid autodetect /dev/sdb2 34 1065 8289540 fd Linux raid autodetect /dev/sdb3 1066 1587 4192965 fd Linux raid autodetect /dev/sdb4 1588 91201 719824455 5 Extended /dev/sdb5 1588 5764 33551721 fd Linux raid autodetect /dev/sdb6 5765 91201 686272671 fd Linux raid autodetect Disk /dev/sdc: 250.0 GB, 250000000000 bytes 255 heads, 63 sectors/track, 30394 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdc1 1 33 265041 fd Linux raid autodetect /dev/sdc2 34 1065 8289540 fd Linux raid autodetect /dev/sdc3 1066 1587 4192965 fd Linux raid autodetect /dev/sdc4 1588 30394 231392227+ 5 Extended /dev/sdc5 1588 5764 33551721 fd Linux raid autodetect /dev/sdc6 5765 30394 197840443+ fd Linux raid autodetect Disk /dev/md2: 4293 MB, 4293525504 bytes 2 heads, 4 sectors/track, 1048224 cylinders Units = cylinders of 8 * 512 = 4096 bytes Disk /dev/md2 doesn't contain a valid partition table Disk /dev/md5: 702.7 GB, 702743117824 bytes 2 heads, 4 sectors/track, 171568144 cylinders Units = cylinders of 8 * 512 = 4096 bytes Disk /dev/md5 doesn't contain a valid partition table Disk /dev/md4: 34.3 GB, 34356854784 bytes 2 heads, 4 sectors/track, 8387904 cylinders Units = cylinders of 8 * 512 = 4096 bytes Disk /dev/md4 doesn't contain a valid partition table Disk /dev/md3: 8488 MB, 8488419328 bytes 2 heads, 4 sectors/track, 2072368 cylinders Units = cylinders of 8 * 512 = 4096 bytes Disk /dev/md3 doesn't contain a valid partition table Disk /dev/md1: 271 MB, 271319040 bytes 2 heads, 4 sectors/track, 66240 cylinders Units = cylinders of 8 * 512 = 4096 bytes Disk /dev/md1 doesn't contain a valid partition table [root@inspector ~]# cat /etc/fstab /dev/md1 /boot ext2 defaults 1 2 /dev/md2 / ext3 defaults 1 1 /dev/md3 swap swap defaults 0 0 /dev/md4 /var ext3 noexec,nosuid,nodev,noatime,nodiratime 1 2 /dev/md5 /home ext3 defaults 1 2 tmpfs /dev/shm tmpfs defaults 0 0 devpts /dev/pts devpts gid=5,mode=620 0 0 sysfs /sys sysfs defaults 0 0 proc /proc proc defaults 0 0 /dev/sdc1 /sdc1 vfat noauto 0 0 /dev/sdc2 /sdc2 ext3 noauto 1 2 /dev/scd0 /cdrom udf noauto,user 0 0 [root@inspector ~]# swapon -s Filename Type Size Used Priority /dev/md3 partition 8289464 49336 -1
Please close; this was my mistake.
I'll close the bug out, but in case someone searches and comes across this in the future, I'd also like to have the answer to your issue in the bug. From what I can tell above, I'm guessing that you had a 2 disk raid1 array, and doing an add is what wasn't working. In which case, I would say correct, the array has to be grown to a three disk raid1 array before you can add the new disk. I assume you did that (grew the array to a 3 disk raid 1 array) and then things worked fine.
Different problem, actually. I had the kickstart.cfg file wrong, so sda2 & sdb2 were assigned to md3 and sda3 & sdb3 were assigned to md2. When I tried to assign an 8gb component to a 4gb mirror, it worked; when I tried to assign a 4gb component to an 8gb mirror, it failed (which was the correct response).