-1

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?

1 Answer 1

2

You forgot to create a file system.

mkfs.ext4 /dev/md0

or something like that.

1
  • There is an fs, but it's weird - I've got a 2 gb snapshot, when I create a 20 gb volume from it - I get the error I've posted, but when I make a 2 gb volume, it works ok.
    – Fluffy
    Dec 5, 2014 at 9:29

You must log in to answer this question.

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