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>,
	Marcin Wolcendorf <antymat+redhat@chelmska.waw.pl>
Subject: Re: [linux-lvm] lvmcache writethrough synchronisation at system startup
Date: Wed, 5 Dec 2018 15:23:21 +0100	[thread overview]
Message-ID: <bdb0d980-2e33-bba3-6d81-747d8143699d@redhat.com> (raw)
In-Reply-To: <20181205061938.vbkwk6ydnehacxml@chelmska.waw.pl>

Dne 05. 12. 18 v 7:19 Marcin Wolcendorf napsal(a):
> Hi Everyone,
> 
> Recently I have set up a simple lvmcache on my machine. This is a write-through
> cache, so in my view it should never be necessary to copy data from the
> cachepool to the origin LV. But this is exactly what happens: on system start
> the
> 
> lvs -o+cache_policy,cache_settings,cache_mode
> 
> displays something like:
>    LV     VG   Attr       LSize   Pool     Origin       Data%  Meta%  Move Log Cpy%Sync Convert CachePolicy CacheSettings CacheMode
>    home   main Cwi-aoC---  21.83t [cache1] [home_corig] 99.99  0.55            90.39            smq                       writethrough
> 
> and for a next day or two it writes the whole cachepool to the origin. The data
> on the cached LV seems fine as long as sha512 is concerned.
> 
> Is this supposed to be that way?
> 
> My setup:
> I have 2 mdraid devices: one 24T raid6, one 1T raid1, and one separate SSD. All
> are LUKS-encrypted, SSD is partitioned into MBR boot partition, encrypted /boot
> partition and a big encrypted partition for a PV. The encrypted block devices
> (except /boot) are PVs in my VG. The 24T RAID holds the origin LV, the 1T RAID
> is made into a cachepool.

Hi

I'd say in your case it's very important which version of kernel is in use, as 
there very couple fixes solving this issue in not too long history.


Secondary issue is - it's always good idea there is correct shutdown process
instead of just 'power-off' althouhg in 'writethrough' case it should not be 
that big issue (but here applies the advice number one - use recent kernels).


Regards

Zdenek

  reply	other threads:[~2018-12-05 14:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-05  6:19 [linux-lvm] lvmcache writethrough synchronisation at system startup Marcin Wolcendorf
2018-12-05 14:23 ` Zdenek Kabelac [this message]
2018-12-05 15:01   ` Marcin Wolcendorf
2018-12-06 11:32     ` Zdenek Kabelac

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=bdb0d980-2e33-bba3-6d81-747d8143699d@redhat.com \
    --to=zkabelac@redhat.com \
    --cc=antymat+redhat@chelmska.waw.pl \
    --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).