Saturday, December 5, 2015

make-bcache: Device or resource busy

When setting up bcache, I ended up being halfway there. Bcache could not be set up, because it's not a blank block device.

sudo make-bcache -C /dev/sda3 -B /dev/sdb1 --wipe-bcacheDevice /dev/sda3 already has a non-bcache superblock, remove it using wipefs and wipefs -a

Wiping up the partition would not work as bcache is already using it for something

sudo wipefs -a /dev/sda3
wipefs: error: /dev/sda3: probing initialization failed: Device or resource busy

Also detaching the device from bcache won't work, since the bcache0 is not really there yet.

echo eb99feda-fac7-43dc-b89d-18765e9febb6 > /sys/block/bcache0/bcache/detach
cd /sys/block/bcache0 bash: cd: /sys/block/bcache0: No such file or directory
Seems the solution was to stop the bcache instead:

cd /sys/fs/bcache/eb99feda-fac7-43dc-b89d-18765e9febb6
sudo sh -c "echo 1 > stop"




No comments:

Post a Comment