9

I need to upgrade some drive firmware and I'd like to shut down bcache for the duration.

The docs show how to stop a bcache device:

stop

Write to this file to shut down the bcache device and close the backing device.

For me that will look like this:

echo 1 > /sys/block/bcache0/bcache/stop

and for the cache device:

echo 1 > /sys/fs/bcache/<set-uuid>/stop

But how do I bring the device back (without rebooting the server)?

1 Answer 1

5

Simply re-register each bcache device in the cache set (both backing and cache devices) to the kernel:

echo /dev/<path_to_device> > /sys/fs/bcache/register

Or, if the udev rules from bcache-tools are in place, then partprobe will automatically register the devices when they are scanned.

0

You must log in to answer this question.