* Re: [linux-lvm] vgscan & CDROM Solved
@ 2005-08-29 20:05 Chris Osicki
2005-08-31 15:46 ` Alasdair G Kergon
0 siblings, 1 reply; 5+ messages in thread
From: Chris Osicki @ 2005-08-29 20:05 UTC (permalink / raw)
To: LVM general discussion and development
Hi,
My vgscan filter problem has been solved.
The lvm.conf file as distributed with Gentoo is the example.conf from
the LVM2 distribution.
In this file the accept filter
filter = [ "a/.*/" ]
appears earlier in this file as the reject examples.
I was assuming that the last match would be significant. After reading
again the lvm.conf man page I noticed this assumption was wrong.
The first match determines if the device will be accepted or ignored.
As simple as this.
Thanks to you all for your time.
Regards,
Chris
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] vgscan & CDROM Solved
2005-08-29 20:05 [linux-lvm] vgscan & CDROM Solved Chris Osicki
@ 2005-08-31 15:46 ` Alasdair G Kergon
2005-08-31 21:10 ` Chris Osicki
0 siblings, 1 reply; 5+ messages in thread
From: Alasdair G Kergon @ 2005-08-31 15:46 UTC (permalink / raw)
To: LVM general discussion and development
And only *the first* 'filter=' setting gets used - others
are ignored.
For now, I've added a warning to the example.conf comments.
We'll update the code to handle this better some day,
probably by concatenating items with identical names into
lists as we load them in.
[If anyone wants to offer a patch, it starts with _file()
in lib/config/config.c: before the parser adds each new node
to the tree, check for a duplicate identifier within the
same section and append/convert the entries as appropriate.]
Alasdair
--
agk@redhat.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] vgscan & CDROM Solved
2005-08-31 15:46 ` Alasdair G Kergon
@ 2005-08-31 21:10 ` Chris Osicki
2005-08-31 21:13 ` Alasdair G Kergon
0 siblings, 1 reply; 5+ messages in thread
From: Chris Osicki @ 2005-08-31 21:10 UTC (permalink / raw)
To: LVM general discussion and development
Thank you for your answer Alasdair.
That means my filter line should just read:
filter = [ "r|/dev/cdrom.*|", "r|/dev/cdroms.*|" ]
which means "skip (reject) all devices matching those two regexp
and scan (allow) anything else and ir works for me.
Regards,
Chris
On Wed, Aug 31, 2005 at 04:46:51PM +0100, Alasdair G Kergon wrote:
> And only *the first* 'filter=' setting gets used - others
> are ignored.
>
> For now, I've added a warning to the example.conf comments.
>
> We'll update the code to handle this better some day,
> probably by concatenating items with identical names into
> lists as we load them in.
>
> [If anyone wants to offer a patch, it starts with _file()
> in lib/config/config.c: before the parser adds each new node
> to the tree, check for a duplicate identifier within the
> same section and append/convert the entries as appropriate.]
>
> Alasdair
> --
> agk@redhat.com
>
> _______________________________________________
> 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/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] vgscan & CDROM Solved
2005-08-31 21:10 ` Chris Osicki
@ 2005-08-31 21:13 ` Alasdair G Kergon
2005-08-31 21:31 ` Chris Osicki
0 siblings, 1 reply; 5+ messages in thread
From: Alasdair G Kergon @ 2005-08-31 21:13 UTC (permalink / raw)
To: LVM general discussion and development
On Wed, Aug 31, 2005 at 11:10:44PM +0200, Chris Osicki wrote:
> filter = [ "r|/dev/cdrom.*|", "r|/dev/cdroms.*|" ]
Which is the same as:
filter = [ "r|/dev/cdrom|" ]
The trailing .* is implied unless you append $ .
Alasdair
--
agk@redhat.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] vgscan & CDROM Solved
2005-08-31 21:13 ` Alasdair G Kergon
@ 2005-08-31 21:31 ` Chris Osicki
0 siblings, 0 replies; 5+ messages in thread
From: Chris Osicki @ 2005-08-31 21:31 UTC (permalink / raw)
To: LVM general discussion and development
On Wed, Aug 31, 2005 at 10:13:41PM +0100, Alasdair G Kergon wrote:
> On Wed, Aug 31, 2005 at 11:10:44PM +0200, Chris Osicki wrote:
> > filter = [ "r|/dev/cdrom.*|", "r|/dev/cdroms.*|" ]
>
> Which is the same as:
>
> filter = [ "r|/dev/cdrom|" ]
>
> The trailing .* is implied unless you append $ .
Ooops, sure. Thanks again.
>
> Alasdair
> --
> agk@redhat.com
Regards,
Chris
>
> _______________________________________________
> 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/
--
Chris Osicki osk@osk.ch
Dipl. Informatik-Ing. HTL
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-08-31 21:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-29 20:05 [linux-lvm] vgscan & CDROM Solved Chris Osicki
2005-08-31 15:46 ` Alasdair G Kergon
2005-08-31 21:10 ` Chris Osicki
2005-08-31 21:13 ` Alasdair G Kergon
2005-08-31 21:31 ` Chris Osicki
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.