This is a good question. In the publicly released dm-cache code, the
cache mappings are stored in memory so when the client node fails the
locally modified dirty blocks will be lost.
Internally, we are testing a new version which has several
improvements to address this issue. One is to flush the dirty blocks
periodically in background and the other is to store the cache
mappings persistently. With these new features, we believe the
reliability of write-back caching would be much improved.
Feel free to let me know if you have any question.
- Ming
On Sat, Oct 15, 2011 at 7:01 AM, Joseph Glanville
<joseph.g...@orionvm.com.au> wrote:
> Hi Ming Zhao
>
> I have been getting started with dm-cache and have a quick question.
> If I enable write-back cache mode can I recover the data in the cache in
> event of a power failure etc? Is there a log which stores which blocks have
> been flushed to the source device?
>
> Thanks!
>
> Joseph.
> --
> Founder | Director | VP Research
> Orion Virtualisation Solutions | www.orionvm.com.au | Phone: 1300 56 99 52 |
> Mobile: 0428 754 846
>
Yes, once we make the cache mappings persistently stored in the cache
device, we will be able to discover the locally modified blocks and
flush them after a failure.
Best,
- Ming
On Sat, Oct 15, 2011 at 12:48 PM, Joseph Glanville
<joseph.g...@orionvm.com.au> wrote:
> Hi Ming,
>
> Are you talking about when the source device fails the the client is still
> functional?
> I guess this can only happen if the backing device is network attached or
> there is some other kind of I/O error on the source device.
>
> I am more interested in the case where both the cache and the backing device
> are on the same node and the whole node loses power.
> Can I replay the log on the cache device to flush the cached writes to disk?
>
> Thanks,
> Joseph.