All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Teigland <teigland@redhat.com>
To: Eric Wheeler <dm-devel@lists.ewheeler.net>
Cc: Joe Thornber <thornber@redhat.com>, dm-devel@lists.linux.dev
Subject: Re: Stuck IOs with dm-integrity + md raid1 + dm-thin
Date: Fri, 1 Dec 2023 12:26:56 -0600	[thread overview]
Message-ID: <ZWolcKU3EIS55zO7@redhat.com> (raw)
In-Reply-To: <7bcbab39-9ad0-4e9-d49e-5c229689915f@ewheeler.net>

On Thu, Nov 30, 2023 at 04:40:00PM -0800, Eric Wheeler wrote:
> 	integritysetup format $idev0 --integrity xxhash64 --batch-mode
> 	integritysetup format $idev1 --integrity xxhash64 --batch-mode
> 
> 	integritysetup open --integrity xxhash64 --allow-discards $idev0 dm-integrity0
> 	integritysetup open --integrity xxhash64 --allow-discards $idev1 dm-integrity1
> 
> 	mdadm --create $MD_DEV --metadata=1.2 --assume-clean --level=1 --raid-devices=2 /dev/mapper/dm-integrity[01]
> 
> 	# 1. This should be enough to trigger it:
> 	SSD_DEV=$MD_DEV
> 
> 	# 2. If not, then wrap /dev/md9 in a linear target:
> 	#linear_add ssd $MD_DEV
> 	#SSD_DEV=/dev/mapper/ssd

Interesting that just adding a linear layer there would have some effect.

> 	# Create a writable header for the PV meta:
> 	dd if=/dev/zero bs=1M count=16 oflag=direct of=/tmp/pvheader
> 	loop=`losetup -f --show /tmp/pvheader`
> 	linear_add pv $loop /dev/nullb0
> 
> 	# Create the VG
> 	lvmdevices --adddev $SSD_DEV
> 	lvmdevices --adddev /dev/mapper/pv
> 	vgcreate $VGNAME /dev/mapper/pv $SSD_DEV
> 
> 	# Create the pool:
> 	lvcreate -n pool0 -L 1T $VGNAME /dev/mapper/pv
> 	lvcreate -n meta0 -L 512m $VGNAME $SSD_DEV
> 
> 	# Make sure the meta volume is on the SSD (it should be already from above):
> 	pvmove -n meta0 /dev/mapper/pv

I'd omit that pvmove if possible just in case it makes some unexpected
change.  You have more than enough layers to complicate things as it is
without pvmove adding dm-mirror to the mix.

> 	lvconvert -y --force --force --chunksize 64k --type thin-pool --poolmetadata $VGNAME/meta0 $VGNAME/pool0

It's not a bad idea to use mdraid over dm-integrity, but it would be
interesting to know if doing raid+integrity in lvm would have the same
problems. e.g.

lvcreate --type raid1 --raidintegrity y -m1 -L 512m -n meta0 $vg /dev/ram[01]
lvcreate -n pool0 -L 1T $vg /dev/nullb0
lvconvert --type thin-pool --poolmetadata meta0 $vg/pool0

Dave


  parent reply	other threads:[~2023-12-01 18:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-29  1:55 Stuck IOs with dm-integrity + md raid1 + dm-thin Eric Wheeler
     [not found] ` <CAJ0trDaipa_80xqVpDkJdm-SSCaN7g_O-m9-StG10P_DUxmtEA@mail.gmail.com>
     [not found]   ` <CAJ0trDbP4BFjb0KQ+t4Lh1JdVjP9sbMiwJEOXPkGEV_R95rFoQ@mail.gmail.com>
2023-11-29 19:51     ` Eric Wheeler
     [not found]       ` <CAJ0trDaRQaDicO9ho8Hokj68vEopaJwM8YKwPEjzYkWBXE0dWg@mail.gmail.com>
2023-11-30 19:34         ` Eric Wheeler
2023-11-30 21:08           ` Eric Wheeler
2023-12-01  0:40             ` Eric Wheeler
2023-12-01  7:37               ` Joe Thornber
2023-12-01 18:26               ` David Teigland [this message]
2023-12-02  2:18                 ` Eric Wheeler
2023-12-15 23:26                   ` Eric Wheeler
2024-01-11 12:34 ` Xiao Ni
2024-01-11 20:44   ` Eric Wheeler

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=ZWolcKU3EIS55zO7@redhat.com \
    --to=teigland@redhat.com \
    --cc=dm-devel@lists.ewheeler.net \
    --cc=dm-devel@lists.linux.dev \
    --cc=thornber@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 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.