From: vaLentin chernoZemski <valentin@siteground.com>
To: Mike Snitzer <snitzer@redhat.com>
Cc: linux-lvm@redhat.com
Subject: Re: [linux-lvm] lvremove does not pass discards if volume is part of thin pool
Date: Tue, 11 Aug 2015 11:07:43 +0300 [thread overview]
Message-ID: <55C9AD4F.5050900@siteground.com> (raw)
In-Reply-To: <20150810174900.GC22719@redhat.com>
> Plese verify your kernel has this commit:
> 19fa1a6756e ("dm thin: fix discard support to a previously shared block")
>
> But it doesn't look like you're using snapshots so this may not matter.
The kernel we are using includes the changes listed in that commit.
> If you do have the patch I referenced above then something else is going
> on. You should probably run with: lvremove -vvvv to see if lvm is
> actually issuing a discard. Or you could use blktrace to see if the
> thin device you're removing is actually receiving a discard.
lsblk -D shows DISC-ZERO as 1 for loop dev, thingroup_tmeta and
thingroup_tdata
However it shows DISC-ZERO as 0 for thingroup-tpool in both tmeta and
tdata sections and all its child devices.
It appears to me that for some reason device mapper or kernel (not sure
which should do that) are not advertising _tpool_ tmeta and tdata
devices to support discards (as confirmed by lsblk). That's why during
lvremove lvm skips issuing discards on those devices.
The only references in lvremove -f -vvvv that are stating discards are those
#libdm-deptree.c:2681 Suppressed testgroup-thingroup (253:36)
identical table reload.
#ioctl/libdm-iface.c:1795 dm status (253:35) ON [16384] (*1)
#libdm-deptree.c:1444 Thin pool transaction id: 3 status: 3
32/2560 1679/160928 - rw discard_passdown.
#ioctl/libdm-iface.c:1795 dm message (253:35) OF delete 1
[16384] (*1)
#ioctl/libdm-iface.c:1795 dm message (253:35) OF
set_transaction_id 3 4 [16384] (*1)
#ioctl/libdm-iface.c:1795 dm status (253:35) ON [16384] (*1)
#libdm-deptree.c:1444 Thin pool transaction id: 4 status: 4
18/2560 0/160928 - rw discard_passdown.
#activate/dev_manager.c:3127 Creating CLEAN tree for thingroup.
#activate/dev_manager.c:1789 Getting device info for
testgroup-thingroup
[LVM-qg1G3n02Kkjm0KKnhGhzP7JfoeGiiemlrsYfP0Ti5MCUiiPOWhTxoyRlvclhd3EH-pool]
#ioctl/libdm-iface.c:1795 dm info
LVM-qg1G3n02Kkjm0KKnhGhzP7JfoeGiiemlrsYfP0Ti5MCUiiPOWhTxoyRlvclhd3EH-pool OF
[16384] (*1)
#ioctl/libdm-iface.c:1795 dm deps (253:36) OF [16384] (*1)
#ioctl/libdm-iface.c:1795 dm deps (253:35) OF [16384] (*1)
#ioctl/libdm-iface.c:1795 dm deps (253:34) OF [16384] (*1)
#ioctl/libdm-iface.c:1795 dm deps (253:33) OF [16384] (*1)
Those are the name of the devices with those minor major numbers:
testgroup-thingroup (253:36)
`-testgroup-thingroup-tpool (253:35)
|-testgroup-thingroup_tdata (253:34)
| `- (7:2)
`-testgroup-thingroup_tmeta (253:33)
`- (7:2)
testgroup-testvol (253:37)
`-testgroup-thingroup-tpool (253:35)
|-testgroup-thingroup_tdata (253:34)
| `- (7:2)
`-testgroup-thingroup_tmeta (253:33)
`- (7:2)
And this is the output of lsblk -D
NAME DISC-ALN
DISC-GRAN DISC-MAX DISC-ZERO
|-testgroup-thingroup_tmeta (dm-33) 0
4K 4G 1
| `-testgroup-thingroup-tpool (dm-35) 0
64K 64K 0
| |-testgroup-thingroup (dm-36) 0
64K 64K 0
| `-testgroup-testvol (dm-37) 0
64K 64K 0
`-testgroup-thingroup_tdata (dm-34) 0
4K 4G 1
`-testgroup-thingroup-tpool (dm-35) 0
64K 64K 0
|-testgroup-thingroup (dm-36) 0
64K 64K 0
`-testgroup-testvol (dm-37) 0
64K 64K 0
I am yet to test with latest kernel, libdevmapper, and lvm2 but if you
have any other ideas I will be happy to hear.
Sincerely,
vaLentin
next prev parent reply other threads:[~2015-08-11 8:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-10 8:56 [linux-lvm] lvremove does not pass discards if volume is part of thin pool vaLentin chernoZemski
2015-08-10 17:49 ` Mike Snitzer
2015-08-11 8:07 ` vaLentin chernoZemski [this message]
2015-08-11 14:35 ` Mike Snitzer
2015-08-11 14:56 ` vaLentin chernoZemski
2015-08-12 7:46 ` Peter Rajnoha
2015-08-12 7:57 ` Peter Rajnoha
2015-08-19 10:40 ` vaLentin chernoZemski
2016-01-22 17:18 ` Tomas Janousek
2016-01-26 17:03 ` Tomas Janousek
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=55C9AD4F.5050900@siteground.com \
--to=valentin@siteground.com \
--cc=linux-lvm@redhat.com \
--cc=snitzer@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.