[linux-lvm] Strange behaviour with initramfs and read-ahead settings

Milan Broz mbroz at redhat.com
Sat Nov 28 14:31:47 UTC 2009


On 11/28/2009 11:52 AM, Michael Guntsche wrote:
> I am currently running the 2.6.32-rc8 kernel with lvm2 version 2.02.54-1
> on debian unstable.
> Since my root is on LVM as well I use an initramfs for booting. The
> setup I have consists of 5 disks in a RAID-5 with one PV on top of it.
> Now for my problem. The md device correctly sets the read-ahead to 4096.
> If I understand correctly lvm should get this value and set the
> read-ahead on the LVs accordingly. This is not working correctly for
> all my LVs.

Hi,

the logic is simple here
- if readahead is set to auto, it should inherit value from underlying device
for all LVs on that PV
- if there is explicitly set value in metadata, it should always use that
(you can switch back to auto by specifying -r auto)

(striped volumes calculate readahead differently, but it is not the case here)

There was similar issue - caused by not updated lvm in initrd
(or with different lvm.conf there) - all volumes activated
in initramdisk had different readahead value set - please check this.

Also Check default value of readahed in lvm.conf in activation section.

(See also https://bugzilla.redhat.com/show_bug.cgi?id=473273 )

If you still see that some volume is activated wrongly, please send
debug output of lvchange -a y -vvvv <LV>, blockdev --getra <PV>

> For testing purposes I took one LV (home) offline and back online again
> 
> lvchange -an;lvchange -ay
> 
> After that the readahead was set correctly to 4096. I am not sure what's
> happening here. I would understand a problem with getting the values
> automatically but right now they are saved in the metadata but are still
> set to 256. 

Check which lvm activated it first - it seems that it uses old default or
old version of lvm.

Milan
--
mbroz at redhat.com




More information about the linux-lvm mailing list