# LVM and udev awfully slow at boot time [FIXED]

## davidc

I have recently reinstalled my Gentoo machine and used udev instead of devfs.  When I boot, it is awfully slow at the "Setting up the Logical Volume Manager" prompt and I get a number of errors about /dev/hdc being a read only device (it's a DVD drive, so that's not surprising).

At a guess this could be anything in /etc/init.d/checkfs slowing the boot time down but once past this stage everything is as fast as it should be and access to the LVM partitions is normal.

Any ideas?Last edited by davidc on Wed Sep 15, 2004 5:26 pm; edited 1 time in total

----------

## Moloch

From the Gentoo LVM2 docs, you want to tell your lvm config to ignore CD devices.

```
echo 'devices { filter=["r/cdrom/"] }' >> /etc/lvm/lvm.conf
```

----------

## davidc

My apologies, I should have read that again when I updated.  I'll give it a go, thanks.

----------

## Moloch

NP... I always like to know when I miss something obvious in the documentation.  :Rolling Eyes: 

This is Gentoo, no RTFM crap, just help each other out.

----------

## davidc

 *Moloch wrote:*   

> From the Gentoo LVM2 docs, you want to tell your lvm config to ignore CD devices.
> 
> ```
> echo 'devices { filter=["r/cdrom/"] }' >> /etc/lvm/lvm.conf
> ```
> ...

 

Why does the HOWTO use r/cdrom/ when `man lvm.conf` shows r|cdrom|?  Seems slightly strange to me.

----------

## davidc

To fix this, I've now put the following in /etc/lvm/lvm.conf:

```
devices { filter=["a|hda3|", "r|.*|", "r|cdrom|", "r|cdroms|"] }
```

This works fine, thanks very much for the pointer.  For some reason, vgscan still scans /dev/anythingthatisadirectory/*, but that's ignorable as it now doesn't slow boot time down.  Perhaps my regex is wrong.

----------

## Moloch

I've hardly played with it. Just recently switched to LVM and added that line like the docs said and I don't have any delay on startup. I haven't really paid much attention to what's going on in the background   :Confused: 

Sorry, after much Perl programming I still never fully grasped regex's.

----------

