Failure to Automatically Register bcache with a RAM Drive After the Server is Rebooted
Symptom
When a RAM drive is used as a cache drive, it cannot be automatically registered with bcache after the server is rebooted. Specifically, after the lsblk command is executed, the bcache drive of each back-end drive is missing. The cause is that the bcache information stored on the RAM drive is lost when the server is rebooted. In this case, the needed bcache information does not exist on the RAM drive and the registration fails.
Handling Procedure
Perform the following steps to manually register bcache with the RAM drive:
- Check whether /dev/sdb has a bcache drive.
lsblk /dev/sdb
- The command output indicates that /dev/sdb has a bcache partition and the registration is complete. No further action is required.

In this example, the partition name of /dev/sdb is bcache1. No matter what the value following bcache is, it is considered that /dev/sdb has a bcache partition.
- The command output indicates that /dev/sdb does not have a bcache partition. You need to perform the following operations.

- The command output indicates that /dev/sdb has a bcache partition and the registration is complete. No further action is required.
- Check whether bcache is running.
cat /sys/block/sdb/bcache/running 0
If running is 0, bcache is not running. If running is 1, bcache is running.
- If the value of running in 2 is 0, perform this step to stop bcache. Otherwise, the registration is complete and no further action is required.
echo 1 > /sys/block/sdb/bcache/stop
- Perform Enabling the Big Data Smart Prefetch.
Parent topic: Troubleshooting