Re: Setting readahead for Logical Volumes via udev

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey Peter,

Thanks for the response. I've previously tried the "change" action, and adding the specifier for the DM_ACTIVATION environment variable had no effect. I'm also aware of the capability to set the readahead on a per-volume basis, but I'm looking for a solution which handles setting these values at boot time and/or volume creation time.

Dave


On Tue, May 20, 2014 at 2:03 AM, Peter Rajnoha <prajnoha@redhat.com> wrote:
On 05/19/2014 05:58 PM, David Wittman wrote:
> Hey all,
>
> I'm having an issue tuning the readahead value for my Logical Volumes
> via udev. In short, I'm trying to create a rule that sets the readahead
> attribute for each of my Logical Volumes at boot time or upon the
> creation of a new volume. udev seems like the perfect place to do this,
> but for some reason or another LVM seems to be overriding these settings.
>
> Here's the udev rule I'm using, followed by an example:
>
> ```
> # cat /etc/udev/rules.d/83-readahead.rules
> # Set the readahead on non-spinning disks to 8kb (16 512b sectors)
> ACTION="" KERNEL=="dm-*", ATTR{queue/rotational}=="0",
> ATTR{bdi/read_ahead_kb}="8"
>

Try ACTION="" KERNEL=="dm-*", ENV{DM_ACTIVATION}=="1", ATTR ....

Anyway, there's direct way to set the readahead value using LVM tools with:
  lvcreate/lvchange -r/--readahead (see man lvcreate and lvchange for more info).

--
Peter

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

[Index of Archives]     [Gluster Users]     [Kernel Development]     [Linux Clusters]     [Device Mapper]     [Security]     [Bugtraq]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]

  Powered by Linux