[linux-lvm] Filesystem corruption with LVM's pvmove onto a PV with a larger physical block size
ifranzki at linux.ibm.com
Tue Mar 5 07:53:12 UTC 2019
On 05.03.2019 01:12, Stuart D. Gathman wrote:
> On Mon, 4 Mar 2019, Cesare Leonardi wrote:
>> Today I repeated all the tests and indeed in one case the mount failed: after pvmoving from the 512/4096 disk to the 4096/4096 disk, with the LV ext4 using 1024 block size.
>> The error happened where you guys expected. And also for me fsck showed no errors.
>> But doesn't look like a filesystem corruption: if you pvmove back the data, it will become readable again:
> THAT is a crucial observation. It's not an LVM bug, but the filesystem
> trying to read 1024 bytes on a 4096 device.
Yes that's probably the reason. Nevertheless, its not really the FS's fault, since it was moved by LVM to a 4069 device.
The FS does not know anything about the move, so it reads in the block size it was created with (1024 in this case).
I still think LVM should prevent one from mixing devices with different physical block sizes, or at least warn when pvmoving or lvextending onto a PV with a larger block size, since this can cause trouble.
> I suspect it could also
> happen with an unaligned filesystem on a 4096 device.
eMail: ifranzki at 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/
More information about the linux-lvm