[linux-lvm] Why LVM metadata locations are not properly aligned

Zdenek Kabelac zkabelac at redhat.com
Thu Apr 21 13:22:26 UTC 2016


On 21.4.2016 11:54, Zdenek Kabelac wrote:
> On 21.4.2016 06:08, Ming-Hung Tsai wrote:
>> Hi,
>>

>>
>> 1. The metadata locations (raw_locn::offset) are not properly aligned.
>>     Function _aligned_io() requires the IO to be logical-block aligned,
>>     but metadata locations returned by next_rlocn_offset() are 512-byte
>> aligned.
>>     If a device's logical block size is greater than 512b, then LVM need to use
>>     bounce buffer to do the IO.
>>     How about setting raw_locn::offset to logical-block boundary?
>>     (or max(logical_block_size, physical_block_size) for 512-byte logical-/4KB
>>      physical-block drives?)
>
> This looks like a bug - lvm2 should start to write metadata always on physical
> block aligned position.

Hi

I've opened RFE BZ for this one - https://bugzilla.redhat.com/1329234
It's not completely trivial to fix this in a backward compatible way - but I'm 
mostly 100% sure it's not cause your 10s delay unless.

Regards

Zdenek




More information about the linux-lvm mailing list