You are not logged in.

#1 2020-12-25 10:57:45

cdwijs
Member
Registered: 2010-04-24
Posts: 309

/etc/tmpfiles.d/ does not actually wite values

I'm configuring bcache, by writing some values in /sys. [1]

I've made this file. After a reboot, the values are not written:

cat /etc/tmpfiles.d/my-bcache.conf
w /sys/block/bcache0/bcache/sequential_cutoff - - - - 0
w /sys/block/bcache0/bcache/cache_mode - - - - writeback
w /sys/block/bcache0/bcache/writeback_delay - - - - 1000
w /sys/fs/bcache/da08eea4-b81c-44aa-ac6c-c0b76b7cf063/congested_read_threshold_us - - - - 0
w /sys/fs/bcache/da08eea4-b81c-44aa-ac6c-c0b76b7cf063/congested_write_threshold_us - - - - 0
w /sys/block/bcache1/bcache/sequential_cutoff - - - - 0
w /sys/block/bcache1/bcache/cache_mode - - - - writeback
w /sys/block/bcache1/bcache/writeback_delay - - - - 1000
w /sys/fs/bcache/95ac1f02-7682-479a-bc59-90c186f39978/congested_read_threshold_us - - - - 0
w /sys/fs/bcache/95ac1f02-7682-479a-bc59-90c186f39978/congested_write_threshold_us - - - - 0

Giving these commands on the terminal does work:

echo 0 > /sys/block/bcache0/bcache/sequential_cutoff
echo writeback > /sys/block/bcache0/bcache/cache_mode
echo 1000 > /sys/block/bcache0/bcache/writeback_delay
echo 0 > /sys/fs/bcache/da08eea4-b81c-44aa-ac6c-c0b76b7cf063/congested_read_threshold_us
echo 0 > /sys/fs/bcache/da08eea4-b81c-44aa-ac6c-c0b76b7cf063/congested_write_threshold_us
echo 0 > /sys/block/bcache1/bcache/sequential_cutoff
echo writeback > /sys/block/bcache1/bcache/cache_mode
echo 1000 > /sys/block/bcache1/bcache/writeback_delay
echo 0 > /sys/fs/bcache/95ac1f02-7682-479a-bc59-90c186f39978/congested_read_threshold_us
echo 0 > /sys/fs/bcache/95ac1f02-7682-479a-bc59-90c186f39978/congested_write_threshold_us

What did I miss?

[1] https://wiki.archlinux.org/index.php/Bcache#Configuring

Offline

Board footer

Powered by FluxBB