Can't enable writeback
I've installed kernel 3.10.7 on Ubuntu 13.04 amd64, and bcache-tools from https://launchpad.net/~mighost/+archive/ppa/+build/4767454/+files/bcache-tools_1.0-1ppa1%7Eraring_amd64.deb. I can create a bcache volume and mount and use it without any problems using writethrough (120GB Intel 330 SSD caching a WD 2GB HDD), but when I try to enable writeback:
sudo echo writeback > /sys/block/bcache0/cache_mode
it returns the error
bash: /sys/block/bcache0/cache_mode: No such file or directory
/sys/block/bcache0 exists as a link:
ls -l /sys/block/bc*
lrwxrwxrwx 1 root root 0 Aug 17 15:58 /sys/block/bcache0 ->
../devices/virtual/block/bcache0
Suggestions on how to enable writeback?
Nick Payne
Quoted 7 lines
I try to enable writeback:
sudo echo writeback >
/sys/block/bcache0/cache_modeit returns the error
bash:
/sys/block/bcache0/cache_mode: No such file or directory
You're confusing bcache0 with bcache0/bcache
echo writeback |sudo tee -a /sys/block/bcache0/bcache/cache_mode
will work.
Quoted 4 lines · Gabriel de Perthuis
Quoted 4 lines
I try to enable writeback:
sudo echo writeback >
/sys/block/bcache0/cache_mode
Quoted 8 lines
Quoted 3 lines
it returns the error
bash:
/sys/block/bcache0/cache_mode: No such file or directoryYou're confusing bcache0 with bcache0/bcache
echo writeback |sudo tee -a
/sys/block/bcache0/bcache/cache_modewill work.
Thanks, that works. The command I was originally trying to use is what is shown in the documentation at http://evilpiepirate.org/git/linux-bcache.git/tree/Documentation/bcache.txt. It has
# echo writeback > /sys/block/bcache0/cache_mode
as the command to run.