Re: Can you switch caching modes on the fly during use?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 6 Feb 2023, Robert Krig wrote:

> Hi. I was just wondering.
> 
> My cache device is a MD Raid1 SSD.
> My backing device is a BTRFS Raid10 on 8 Spinning disks.
> 
> 
> Everything is setup as default. Which, as far as I recall means writethrough
> caching.
> 
> Can I just switch the caching mode on the fly while the filesystem is in use,
> without any risks of corruption, or do I need to detach the cache, unmount the
> FS, etc...?

Yep!

	# cat /sys/block/bcache0/bcache/cache_mode 
	writethrough [writeback] writearound none

	# echo writeback > /sys/block/bcache0/bcache/cache_mode

More info:
	https://www.kernel.org/doc/Documentation/bcache.txt

-Eric



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux ARM Kernel]     [Linux Filesystem Development]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux