From: Ingo Franzki <ifranzki@linux.ibm.com>
To: "Stuart D. Gathman" <stuart@gathman.org>,
LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] Filesystem corruption with LVM's pvmove onto a PV with a larger physical block size
Date: Fri, 1 Mar 2019 08:59:13 +0100 [thread overview]
Message-ID: <c4b92bf0-208c-eaf8-bd1c-dcee27bbc2f0@linux.ibm.com> (raw)
In-Reply-To: <alpine.LRH.2.21.1902282235090.22202@fairfax.gathman.org>
On 01.03.2019 04:41, Stuart D. Gathman wrote:
> On Fri, 1 Mar 2019, Cesare Leonardi wrote:
>
>> I've done the test suggested by Stuart and it seems to contradict this.
>> I have pvmoved data from a 512/512 (logical/physical) disk to a newly added 512/4096 disk but I had no data corruption. Unfortunately I haven't any native 4k disk to repeat the same test.
>
> Use a loopback device with logical block size set to 4096 to confirm
> that your test does detect corruption (using the same LV, filesystem,
> data).
>
> I believe by "physical sector", the original reporter means logical,
> as he was using an encrypted block device that was virtual - there
> was no "physical" sector size. It was "physical" as far as the
> file system was concerned - where "physical" means "the next layer
> down".
Well, let me cite from https://www.saout.de/pipermail/dm-crypt/2019-February/006078.html from Ondrej Kozina which is also referenced in my original post:
"dm-crypt advertise itself as a block device with physical sector size
*at least* equal to encryption sector size. Traditionally it's been only
512B. So classical dm-crypt mapped over device with phys. sector size =
512B has no impact. If you mapped dm-crypt over block device with native
physical sector size = 4096 you got dm-crypt exposing same limits as
underlying block device. Again no problem. Just internally dm-crypt
performed encryption on 512B blocks, but it had no impact on exposed limits.
But things get a bit different with encryption sector size > 512B.
If you map dm-crypt with encryption sector size set to 4096B over block
device with physical sector size = 512B, dm-crypt must increase device
limits to 4096. Because when it does encryption it must be aligned to
4096 bytes (and same wrt minimal i/o size)."
>
> Indeed, even the rotating disk drives make the physical sector size
> invisible except to performance tests. SSD drives have a "sector" size
> of 128k or 256k - the erase block, and performance improves when aligned
> to that.
>
--
Ingo Franzki
eMail: ifranzki@linux.ibm.com
Tel: ++49 (0)7031-16-4648
Fax: ++49 (0)7031-16-3456
Linux on IBM Z Development, Schoenaicher Str. 220, 71032 Boeblingen, Germany
IBM Deutschland Research & Development GmbH / Vorsitzender des Aufsichtsrats: Matthias Hartmann
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294
IBM DATA Privacy Statement: https://www.ibm.com/privacy/us/en/
next prev parent reply other threads:[~2019-03-01 7:59 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-25 15:33 [linux-lvm] Filesystem corruption with LVM's pvmove onto a PV with a larger physical block size Ingo Franzki
2019-02-27 0:00 ` Cesare Leonardi
2019-02-27 8:49 ` Ingo Franzki
2019-02-27 14:59 ` Stuart D. Gathman
2019-02-27 17:05 ` Ingo Franzki
2019-03-02 1:37 ` L A Walsh
2019-02-28 1:31 ` Cesare Leonardi
2019-02-28 1:52 ` Stuart D. Gathman
2019-02-28 8:41 ` Ingo Franzki
2019-02-28 9:48 ` Ilia Zykov
2019-02-28 10:10 ` Ingo Franzki
2019-02-28 10:41 ` Ilia Zykov
2019-02-28 10:50 ` Ilia Zykov
2019-02-28 13:13 ` Ilia Zykov
2019-03-01 1:24 ` Cesare Leonardi
2019-03-01 2:56 ` [linux-lvm] Filesystem corruption with LVM's pvmove onto a PVwith " Bernd Eckenfels
2019-03-01 8:00 ` Ingo Franzki
2019-03-01 3:41 ` [linux-lvm] Filesystem corruption with LVM's pvmove onto a PV with " Stuart D. Gathman
2019-03-01 7:59 ` Ingo Franzki [this message]
2019-03-01 8:05 ` Ingo Franzki
2019-03-02 1:36 ` Cesare Leonardi
2019-03-02 20:25 ` Nir Soffer
2019-03-04 22:45 ` Cesare Leonardi
2019-03-04 23:22 ` Nir Soffer
2019-03-05 7:54 ` Ingo Franzki
2019-03-04 9:12 ` Ingo Franzki
2019-03-04 22:10 ` Cesare Leonardi
2019-03-05 0:12 ` Stuart D. Gathman
2019-03-05 7:53 ` Ingo Franzki
2019-03-05 9:29 ` Ilia Zykov
2019-03-05 11:42 ` Ingo Franzki
2019-03-05 16:29 ` Nir Soffer
2019-03-05 16:36 ` David Teigland
2019-03-05 16:56 ` Stuart D. Gathman
2019-02-28 14:36 ` Ilia Zykov
2019-02-28 16:30 ` Ingo Franzki
2019-02-28 18:11 ` Ilia Zykov
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=c4b92bf0-208c-eaf8-bd1c-dcee27bbc2f0@linux.ibm.com \
--to=ifranzki@linux.ibm.com \
--cc=linux-lvm@redhat.com \
--cc=stuart@gathman.org \
/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).