[linux-lvm] corruption on reattaching cache

Markus Mikkolainen itm at kabuto.fi
Thu Jun 9 20:24:33 UTC 2016

I seem to have hit the same snag as Mark describes in his post.


with kernel 4.4.6 I detached (--splitcache) a writeback cache from a 
mounted lv which was then synchronized and detached. Then I reattached it 
and shortly detached it again. What was interesting is that after the 
second detach it synchronized AGAIN starting from 100% , and then I 
started getting filesystem errors. I immediately shutdown, and forced an 
fsck , and didnt lose that much data, but still had some stuff to correct.

It looked to me like a detached cache, being reattached will retain all 
cached data on it, even though it was supposed to be written to the 
backing disk, and then instead of marking it clean on attaching, it will 
continue serving old data from the cache.

More information about the linux-lvm mailing list