I have accidentally configured my SSD as a backing device instead of a caching device. Simply trying either one of the following:

sudo make-bcache -C /dev/sdb1
sudo make-bcache -C /dev/sdb

Gives the errors:

Can't open dev /dev/sdb1: Device or resource busy
Can't open dev /dev/sdb: Device or resource busy

How does one rectify a situation like this?


You need to tell the kernel to close the bcache device before rerunning make-bcache on the underlying device.

To close a backing device:

echo 1 > /sys/block/<device>/bcache/stop

To close a cache device:

echo 1 > /sys/block/<device>/bcache/set/unregister

(See the documentation for more details.)

So in your case, if you accidentally configured the /dev/sdb1 partition as a backing device, you can close it with

echo 1 > /sys/block/sdb/sdb1/bcache/stop

and then rerun make-bcache with the --wipe-bcache option to overwrite the previous setup:

make-bcache --wipe-bcache -C /dev/sdb1
  • You can add the -Backing devs simultaneously. It saves a step later. You don't have to do all of that registering. And anyway - haven't the bcache-tools provided more direct options for this stuff yet? – mikeserv Jun 26 '15 at 3:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.