linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Paul Richards <paul.richards@gmail.com>
To: dm-devel@redhat.com, linux-lvm@redhat.com
Subject: [linux-lvm] lvmcache comes back dirty after unclean shutdown
Date: Fri, 8 May 2020 09:26:23 +0100	[thread overview]
Message-ID: <CAMoswehmi-hhp2M0w_8nEwX5CwPKKR7YW9jw1QrNzE=PFqKcRw@mail.gmail.com> (raw)

Hello,
I would like to add a warning to the lvmcache man page about its
suitability in environments that expect unclean shutdowns.

I've been using lvmcache on my laptop which has a small nvme drive and
a much larger hdd.  I am using approx 60GiB of the nvme drive as a
cache for the 1TiB HDD.

With both "writethrough" and "writeback" modes an unclean shutdown
results in the entire cache being marked as dirty.  On next boot the
system then spends a long time (4+ hours) writing the cache out to
disk.  From what I can see this is known behavior of lvmcache ([1] and
[2]).  It's even documented in the kernel device mapper docs [3].

It seems to me that dm-cache and lvmcache are not appropriate for
environments that expect unclean shutdowns.  In those environments I
have found bcache to be a bit more robust.

This is not a criticism of lvmcache and dm-cache.  I am sure they
perform well in more robust environments.  But I wonder if it would be
appropriate to add a warning note to the lvmcache man page about this
issue?


I am using Ubuntu 20.04 currently, if that's relevant, and I saw the
same issue with 18.04.


1: https://www.redhat.com/archives/dm-devel/2019-July/msg00114.html
2: https://www.redhat.com/archives/dm-devel/2014-December/msg00143.html
3: https://github.com/torvalds/linux/blame/79dede78c0573618e3137d3d8cbf78c84e25fabd/Documentation/admin-guide/device-mapper/cache.rst#L140-L143

                 reply	other threads:[~2020-05-08  8:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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='CAMoswehmi-hhp2M0w_8nEwX5CwPKKR7YW9jw1QrNzE=PFqKcRw@mail.gmail.com' \
    --to=paul.richards@gmail.com \
    --cc=dm-devel@redhat.com \
    --cc=linux-lvm@redhat.com \
    /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).