All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zygo Blaxell <ce3g8jdj@umail.furryterror.org>
To: Marc MERLIN <marc@merlins.org>
Cc: Roman Mamedov <rm@romanrm.net>,
	Andrea Gelmini <andrea.gelmini@gmail.com>,
	Andrei Borzenkov <arvidjaar@gmail.com>,
	Josef Bacik <josef@toxicpanda.com>,
	Chris Murphy <lists@colorremedies.com>,
	Qu Wenruo <quwenruo.btrfs@gmx.com>,
	"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: Suggestions for building new 44TB Raid5 array
Date: Mon, 13 Jun 2022 16:08:07 -0400	[thread overview]
Message-ID: <YqeZJ1j2ZYGpvY7v@hungrycats.org> (raw)
In-Reply-To: <20220613181322.GP1664812@merlins.org>

On Mon, Jun 13, 2022 at 11:13:22AM -0700, Marc MERLIN wrote:
> On Mon, Jun 13, 2022 at 02:21:07AM +0500, Roman Mamedov wrote:
> > I'd suggest to put the LUKS volume onto an LV still (in case you don't), so you
> > can add and remove cache just to see how it works; unlike with bcache, an LVM
> 
> In case I decide to give that a shot, what would the actual LVM
> command(s) look like to create a null LVM? You'd just make a single PV
> using the cryptestup decrypted version of the mdadm raid5 and then an LV
> that takes all of it, but after the fact you can modify the LV and add a
> cache?

Some variables:

	vg=name of VG...
	device=name of cache device (SSD) PV...
	base=name of existing backing (HDD) LV...
	meta=meta$base
	pool=pool$base

Add a cache LV to an existing LV with:

	lvcreate $vg -n $meta -L 1G $device
	lvcreate $vg -n $pool -l 90%PVS $device
	lvconvert -f --type cache-pool --poolmetadata $vg/$meta $vg/$pool
	lvconvert -f --type cache --cachepool $vg/$pool $vg/$data --cachemode writethrough

Uncache with:

	lvconvert -f --uncache $vg/$data

Note that 'lvconvert' will flush the entire cache back to the backing
store during uncache at minimum IO priority, so it will take some time
and can be prolonged indefinitely by a continuous IO workload on top.
Also, the uncache operation will propagate any corruption in the SSD
cache back to the HDD LV, even in writethrough mode.

> Mart
> -- 
> "A mouse is a device used to point at the xterm you want to type in" - A.S.R.
>  
> Home page: http://marc.merlins.org/                       | PGP 7F55D5F27AAF9D08
> 

  parent reply	other threads:[~2022-06-13 20:51 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-11  4:51 Suggestions for building new 44TB Raid5 array Marc MERLIN
2022-06-11  9:30 ` Roman Mamedov
     [not found]   ` <CAK-xaQYc1PufsvksqP77HMe4ZVTkWuRDn2C3P-iMTQzrbQPLGQ@mail.gmail.com>
2022-06-11 14:52     ` Marc MERLIN
2022-06-11 17:54       ` Roman Mamedov
2022-06-12 17:31         ` Marc MERLIN
2022-06-12 21:21       ` Roman Mamedov
2022-06-13 17:46         ` Marc MERLIN
2022-06-13 18:06           ` Roman Mamedov
2022-06-14  4:51             ` Marc MERLIN
2022-06-13 18:10           ` Zygo Blaxell
2022-06-13 18:13         ` Marc MERLIN
2022-06-13 18:29           ` Roman Mamedov
2022-06-13 20:08           ` Zygo Blaxell [this message]
2022-06-14  6:36             ` Torbjörn Jansson
2022-06-20 20:37       ` Andrea Gelmini
2022-06-21  5:26         ` Zygo Blaxell
2022-07-06  9:09           ` Andrea Gelmini
2022-06-11 23:44 ` Zygo Blaxell
2022-06-14 11:03 ` ronnie sahlberg
     [not found] ` <5e1733e6-471e-e7cb-9588-3280e659bfc2@aqueos.com>
2022-06-20 15:01   ` Marc MERLIN
2022-06-20 15:52     ` Ghislain Adnet
2022-06-20 16:27       ` Marc MERLIN
2022-06-20 17:02     ` Andrei Borzenkov
2022-06-20 17:26       ` Marc MERLIN

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=YqeZJ1j2ZYGpvY7v@hungrycats.org \
    --to=ce3g8jdj@umail.furryterror.org \
    --cc=andrea.gelmini@gmail.com \
    --cc=arvidjaar@gmail.com \
    --cc=josef@toxicpanda.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=lists@colorremedies.com \
    --cc=marc@merlins.org \
    --cc=quwenruo.btrfs@gmx.com \
    --cc=rm@romanrm.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.