Thread (2 messages) 2 messages, 2 authors, 2016-09-06

Re: How well does bcache cope with frequently changing cache device?

From: Kent Overstreet <hidden>
Date: 2016-09-06 02:27:36

On Sun, Sep 04, 2016 at 07:08:04PM +0200, Clemens Eisserer wrote:
Hi,

I am thinking about working with a root-fs on an external disk which
can be shared amongst different computers.
For this use-case the internal SSD could be used as caching device,
speeding up the access to the relativly slow external storage.

What I wonder is how well bcache can cope with changing caching
devices? Great would be if bcache could detect when a backing decive
was used with a different caching device in the meantime and
automatically invalidate the old/stale caching device - but to keep
the cache unmodified when this was not the case.

Is this use-case possible with bcache?
On its own bcache won't automatically invalidate the cached data - once a
backing device is associated with a certain cache, that backing device won't
come online until either the cache device is registered, or you detach it.

So you'll have to write your own scripts to check - "hey, is this backing device
associated with this cache device? if not, detach backing device, reformat cache
device, then attach cache device and backing device".
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help