我要评分
获取效率
正确性
完整性
易理解

Stopping Bcache

Before disabling smart prefetch, stop the cluster service program.

  1. Stop the bcache RAM drive.
    1. Detach the cache drive.
      echo 1 > /sys/block/[bcache]/bcache/detach
    2. Deregister the cache drive.
      echo 1 > /sys/fs/bcache/[uuid]/unregister
    3. Delete the RAM drive.
      modprobe -r brd

      In the previous command, note the following for [bcache] and [uuid]:

      1. [bcache] is subject to the content of the /sys/block/ directory. All bcache devices in the directory must be processed in the same way.
      2. 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.
  2. Stop the bcache SSD.
    1. Detach the cache drive.
      echo 1 > /sys/block/[bcache]/bcache/detach
    2. Deregister the cache drive.
      echo 1 > /sys/fs/bcache/[uuid]/unregister

      In the previous command, note the following for [bcache] and [uuid]:

      1. [bcache] is subject to the content of the /sys/block/ directory. All bcache devices in the directory must be processed in the same way.
      2. 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.
  3. 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.

  4. 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.

  5. Uninstall the bcache driver.
    modprobe -r bcache