Hi :)

I'm trying to create a scripted bcache setup for an EC2 AMI. It'll
detect appropriate EBS devices, join them in a raid0 array, then do
the same for ephemeral devices. This results in /dev/md0 and /dev/md1.

So far so good.

My script fails when I try to create the bdev;

    # make-bcache --bdev /dev/md0
    Can't open dev /dev/md0: Device or resource busy

Interesting thing is, I now have
/sys/devices/virtual/block/md0/bcache, though no /sys/block/bcache0.

I can echo 1 > /sys/devices/virtual/block/md0/bcache/stop and the
md0/bcache directory disappears. Trying again, I get:

    # make-bcache --bdev /dev/md0
    Already a bcache device on /dev/md0, overwrite with --wipe-bcache
    # make-bcache --bdev --wipe-bcache /dev/md0
    Can't open dev /dev/md0: Device or resource busy

And /sys/devices/virtual/block/md0/bcache reappears.

What gives? This seems pretty strange to me.

The kernel is 3.13.0-19-generic #39-Ubuntu SMP Fri Mar 21 14:18:44 UTC
2014 x86_64 x86_64 x86_64 GNU/Linux

Thanks,
Daniel :)
--
To unsubscribe from this list: send the line "unsubscribe linux-bcache" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to