[linux-lvm] pvresize will cause a meta-data corruption with error message "Error writing device at 4096 length 512"
Heming Zhao
heming.zhao at suse.com
Fri Oct 11 11:50:41 UTC 2019
For _raw_write_mda_header(), the latest codes are same as stable-2.02.
And below usage is wrong, should be fixed.
```
if (!dev_write_bytes(mdac->area.dev, write1_start, (size_t)write1_size, write_buf)) {
... ...
dev_unset_last_byte(mdac->area.dev); <==== invalid code, this time fd had been released.
... ...
}
```
This issue only happened on our customer machine, when updating lvm2 from
2.02.120 (no bcache code) to 2.02.180 (contains bcache).
Thanks
zhm
On 10/11/19 6:38 PM, Zdenek Kabelac wrote:
> Dne 11. 10. 19 v 11:22 Heming Zhao napsal(a):
>> Only one thing I am confusion all the time.
>> When read/write error, lvm will call bcache_invalidate_fd & _scan_dev_close to close fd.
>> So the first successfully read (i.e.: f747), which following f748 finally has fc68's fd.
>> This will cause f747 metadata overwrite not f748.
>>
>>
>
> Hi
>
> Have you considered checking newer version of lvm2?
>
> Regards
>
> Zdenek
>
>
More information about the linux-lvm
mailing list