linux-bcache.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Can you switch caching modes on the fly during use?
@ 2023-02-06  9:54 Robert Krig
  2023-02-09  2:38 ` Eric Wheeler
  0 siblings, 1 reply; 2+ messages in thread
From: Robert Krig @ 2023-02-06  9:54 UTC (permalink / raw)
  To: linux-bcache

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Can you switch caching modes on the fly during use?
  2023-02-06  9:54 Can you switch caching modes on the fly during use? Robert Krig
@ 2023-02-09  2:38 ` Eric Wheeler
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Wheeler @ 2023-02-09  2:38 UTC (permalink / raw)
  To: Robert Krig; +Cc: linux-bcache

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-02-09  2:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-06  9:54 Can you switch caching modes on the fly during use? Robert Krig
2023-02-09  2:38 ` Eric Wheeler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).