linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Zdenek Kabelac <zkabelac@redhat.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Cc: mark@xwax.org
Subject: Re: [linux-lvm] corruption on reattaching cache
Date: Fri, 10 Jun 2016 11:09:50 +0200	[thread overview]
Message-ID: <f8db9f60-3250-1a34-4517-1bf9fe43f700@redhat.com> (raw)
In-Reply-To: <alpine.LRH.2.02.1606092320290.5953@inet.itmo.dyndns.org>

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.
>
> https://www.redhat.com/archives/linux-lvm/2015-April/msg00025.html
>
> 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.
>


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

Regards

Zdenek

  reply	other threads:[~2016-06-10  9:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-09 20:24 [linux-lvm] corruption on reattaching cache Markus Mikkolainen
2016-06-10  9:09 ` Zdenek Kabelac [this message]
2016-06-10 10:51   ` Markus Mikkolainen
2016-06-13  8:48     ` Zdenek Kabelac
2016-06-11  9:24   ` Mark Hills

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f8db9f60-3250-1a34-4517-1bf9fe43f700@redhat.com \
    --to=zkabelac@redhat.com \
    --cc=linux-lvm@redhat.com \
    --cc=mark@xwax.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).