I have a EC2 instance with a an ssd on xvdm (20 gb, 60 iops) and another ssd on xvdb (16 gb, better iops - instance store). The xvdm contains a mysql database and I'm trying to join these 2 disks in a raid 1 with write-behind to the slower disk. So I do
mdadm --create /dev/md0 --size=15995392 --level=1 --raid-devices=2 \
--bitmap=internal --write-behind=1024 --assume-clean missing \
--write-mostly /dev/xvdm
I've set the size manually so that I can add smaller xvdb:
mdadm --manage /dev/md0 --add /dev/xvdb
I then see Rebuild status
in mdadm --detail /dev/md0
and once it finished rebuilding, I try to mount it with mount /dev/md0 /mnt/mysql
but get:
mount: /dev/md0 is write-protected, mounting read-only
mount: wrong fs type, bad option, bad superblock on /dev/md0,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so.
dmesg | tail
does not seem to have anything useful.
I can't change the size of the fast xvdb by ec2 design, and don't want to change the size of the bigger xvdm
because ec2 limits iops to 3X volume size in GB and even though I'm not going to use the additional (20 - 16) 4 GB of space, I still want to have and pay for the iops - it's cheaper than provisioned iops magnetic volume.
So why does not linux let me use the raid?