[linux-lvm] corruption on reattaching cache
zkabelac at redhat.com
Mon Jun 13 08:48:21 UTC 2016
Dne 10.6.2016 v 12:51 Markus Mikkolainen napsal(a):
> could there atleast be some kind of a warning if the reattaching will result
> in you destroying your filesystem? or possibly make the "--splitcache" warn
> that this is a debug feature and the result might be bad?
I'll try to provide some fixing commit to let reattach without
zeroing require -Zn with lvconvert.
> basically NOTHING suggested to me that i might be doing something that could
> destroy my filesystem.
>> Dne 9.6.2016 v 22:24 Markus Mikkolainen napsal(a):
>>> 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
>>> lv which was then synchronized and detached. Then I reattached it and
>>> detached it again. What was interesting is that after the second detach it
>>> synchronized AGAIN starting from 100% , and then I started getting
>>> errors. I immediately shutdown, and forced an fsck , and didnt lose that
>>> data, but still had some stuff to correct.
>>> It looked to me like a detached cache, being reattached will retain all
>>> data on it, even though it was supposed to be written to the backing disk,
>>> then instead of marking it clean on attaching, it will continue serving
>>> data from the cache.
>> Yes - known issue, --splitcache is rather for 'debugging' purposes.
>> Use --uncache and create new cache when needed.
>> Splitted cache needs to be cleared on reattachment - but that needs further
>> code rework.
>> The idea behind is - we want to support 'offline' writeback of data as ATM
>> cache target doesn't work well if there is any disk error - i.e. cache is in
>> writeback mode and has 'error' sector - you can't clean such cache...
>> linux-lvm mailing list
>> linux-lvm at redhat.com
>> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
> linux-lvm mailing list
> linux-lvm at redhat.com
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
More information about the linux-lvm