Stopping Bcache
Before disabling smart prefetch, stop the cluster service program.
- Stop the bcache RAM drive.
- Detach the cache drive.
echo 1 > /sys/block/[bcache]/bcache/detach
- Deregister the cache drive.
echo 1 > /sys/fs/bcache/[uuid]/unregister
- Delete the RAM drive.
modprobe -r brd
In the previous command, note the following for [bcache] and [uuid]:
- [bcache] is subject to the content of the /sys/block/ directory. All bcache devices in the directory must be processed in the same way.
- Set the [uuid] value in the command based on the content in the /sys/fs/bcache directory. All UUID devices in the directory must be processed in the same way.
- Detach the cache drive.
- Stop the bcache SSD.
- Detach the cache drive.
echo 1 > /sys/block/[bcache]/bcache/detach
- Deregister the cache drive.
echo 1 > /sys/fs/bcache/[uuid]/unregister
In the previous command, note the following for [bcache] and [uuid]:
- [bcache] is subject to the content of the /sys/block/ directory. All bcache devices in the directory must be processed in the same way.
- Set the [uuid] value in the command based on the content in the /sys/fs/bcache directory. All UUID devices in the directory must be processed in the same way.
- Detach the cache drive.
- Unmount the data drive that needs to be formatted as a bcache drive.
umount /data/[data]
Replace the unmount directory [data] with the actual name.
- Stop the bcache drive.
echo 1 > /sys/block/[bcache]/bcache/stop
[bcache] is subject to the content of the /sys/block/ directory. All bcache devices in the directory must be processed in the same way.
- Uninstall the bcache driver.
modprobe -r bcache
Parent topic: Disabling the Big Data Smart Prefetch