Skip to contentSkip to conversation

vgscan messages regarding read-only cdrom

linux-lvm Kai Weber 3 participants 5 messages Nov 30, 2003 – Dec 1, 2003

lore
Share & tools
lore

Kai Weber

author
#0 lore raw

Hi,

when starting lvm2 I get the following annoying messages from vgscan:

$ vgscan
  Reading all physical volumes.  This may take a while...
  /dev/cdrom: open failed: Read-only file system
cdrom: open failed.
cdrom: open failed.
[...]
  Found volume group "datavg" using metadata type lvm1
  Found volume group "systemvg" using metadata type lvm1

The line "cdrom: open failed." is repeated about 50 times. I believe I can ingore this message. But

* why is vgscan reading /dev/cdrom (a link to my first IDE CD-ROM /dev/hdc)?

* how can I disable this message?

Kai

Signature · 2 lines
* mail [email protected] . icq 102024972
  web http://www.glorybox.de . pgp 0x594D4132
#1 lore raw
Quoted 4 lines · Kai Weber

* why is vgscan reading /dev/cdrom (a link to my first IDE CD-ROM /dev/hdc)?

* how can I disable this message?

man lvm.conf

Signature · 6 lines
Luca Berra -- [email protected]
       Communication Media & Services S.r.l.
/"\
\ /     ASCII RIBBON CAMPAIGN
 X        AGAINST HTML MAIL
/ \
author
#2 lore raw

* Luca Berra <[email protected]>:

Quoted 6 lines
Quoted 4 lines

* why is vgscan reading /dev/cdrom (a link to my first IDE CD-ROM /dev/hdc)?

* how can I disable this message?

man lvm.conf

Done and and /etc/lvm/lvm.conf adjusted:

devices {
    dir = "/dev"
    scan = [ "/dev" ]
    filter = [ "r|cdrom|" ]
    cache = "/etc/lvm/.cache"
    write_cache_state = 1
}

vgscan still reports
"/dev/cdrom: open failed: Read-only file system"

I tried the following variants:

        filter = [ "r|/dev/cdrom" ]
        filter = [ "r|/dev/cdrom", "r|/dev/hdc" ]
        filter = [ "r|cdrom", "r|hdc" ]

Ideas? Kernel is 2.6.0-test9

LVM version:     2.00.07 (2003-09-16)
Library version: 1.00.05-ioctl-cvs (2003-09-01)
Driver version:  4.0.0

Kai

Signature · 2 lines
* mail [email protected] . icq 102024972
  web http://www.glorybox.de . pgp 0x594D4132
#3 lore raw
Quoted 8 lines · Kai Weber
devices {
    dir = "/dev"
    scan = [ "/dev" ]
    filter = [ "r|cdrom|" ]
    cache = "/etc/lvm/.cache"
    write_cache_state = 1
}

It seems you can have just one instance of the "filter" directive, where you must put every filter you want to apply for devices. For example, this is what I have in my configuration file:
filter = [ "r|hdd|", "r|cdrom|", "r|md|", "a|.*|" ]

I accept every block device under /dev, but previously exclude /dev/hdd (my CD-ROM device), /dev/cdrom al MD metadevices from the list. It works.

Greetings.

PS: the man page for lvm.conf doesn't explicitily says you can have just one "filter" directive, neither the opposite, although the sample "lvm.conf" bundled with sources and packages seemd to give a hint about the correct syntax. Would it be necessary to be more specific about that ?

Greetings.

Signature · 2 lines
Jose Luis Domingo Lopez
Linux Registered User #189436     Debian Linux Sid (Linux 2.6.0-test10-mm1)
author
#4 lore raw

* Jose Luis Domingo Lopez <[email protected]>:

Quoted 4 lines

It seems you can have just one instance of the "filter" directive, where you must put every filter you want to apply for devices. For example, this is what I have in my configuration file:
filter = [ "r|hdd|", "r|cdrom|", "r|md|", "a|.*|" ]

Thank you for your help. This filter rule works as expected. As you correctly noticed, the manpage is not clear about it.

Kai

Signature · 2 lines
* mail [email protected] . icq 102024972
  web http://www.glorybox.de . pgp 0x594D4132