Linux LVM users
 help / color / mirror / Atom feed
* [linux-lvm] device filter in lvm.conf
@ 2008-11-12 17:58 Tuncel.Mutlu
  2008-11-12 18:12 ` Bryn M. Reeves
  0 siblings, 1 reply; 4+ messages in thread
From: Tuncel.Mutlu @ 2008-11-12 17:58 UTC (permalink / raw)
  To: linux-lvm

Hi,

RedHat 5.2 - Kernel 2.6.18-92.el5 - x86_64 box - LVM2 lvm2-2.02.32-4.el5

I assume that this may be a trivial question but I haven't find the solution
anywhere, so I decided to ask you.

I have HDS USP-V disk and HDLM (Hitachi Dynamic Link Manager - HDS's
load-balancing and failover software). I have shown 1 disk over 4 paths to
the Linux and have created the HDLM device /dev/sddlmaa (the multipath and
failover device). This device's 4 paths are actually disk devices in Linux -
sdb, sdc, sdd and sde, but I don't want LVM to sees them, so I have changes
the lvm.conf to mask them, but to allow sda - where rootvg is.

Filter row is been changed to:

filter = [ "a/sda[1-9]$/" "a/sddlm*/" "r/.*/" ]

and types row has been added

types = [ "sddlmfdrv", 16 ]

This has been known to work on another Linux box, but not here. How must I
alter the filter so the LVM should accept sda and sddlm devices but reject
all others ?

Regards,

Tuncel

Bu e-posta ve muhtemel eklerinde verilen bilgiler ki�iye �zel ve gizli olup, yaln�zca mesajda belirlenen al�c� ile ilgilidir.Size yanl��l�kla ula�m��sa l�tfen g�ndericiye bilgi veriniz, mesaj� siliniz ve i�eri�ini ba�ka bir ki�iye a��klamay�n�z, herhangi bir ortama kopyalamay�n�z. Bu mesaj aksi s�zle�me ile belirtilmedik�e herhangi bir finansal i�lem teklifi, al�m�, sat�m� veya herhangi bir havalenin teyidi gibi bankac�l�k i�lemi yap�lmas� amac�n� ta��mamaktad�r.Verilen t�m bilgilerin do�rulu�u ve b�t�nl���n�n garantisi verilmemekte olup, �nceden bildirilmeksizin de�i�tirilebilecektir.Bu mesaj�n i�eri�i Bankam�z�n resmi g�r��lerini yans�tmayabilece�inden Akbank T.A.�. hi�bir hukuki sorumlulu�u kabul etmez.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [linux-lvm] device filter in lvm.conf
  2008-11-12 17:58 [linux-lvm] device filter in lvm.conf Tuncel.Mutlu
@ 2008-11-12 18:12 ` Bryn M. Reeves
  2008-11-12 18:29   ` Tuncel.Mutlu
  0 siblings, 1 reply; 4+ messages in thread
From: Bryn M. Reeves @ 2008-11-12 18:12 UTC (permalink / raw)
  To: LVM general discussion and development

Tuncel.Mutlu@akbank.com wrote:
> filter = [ "a/sda[1-9]$/" "a/sddlm*/" "r/.*/" ]
> 
> and types row has been added
> 
> types = [ "sddlmfdrv", 16 ]
> 
> This has been known to work on another Linux box, but not here. How must I
> alter the filter so the LVM should accept sda and sddlm devices but reject
> all others ?

When you say it doesn't work on this box, what actually happens? Do you 
fail to filter out the individual paths, or do you fail to include the 
multipath device that you want to use?

You may find that removing the cache (/etc/lvm/cache/.cache) after 
editing the filters straightens things out (this should be automatic but 
I've found that on some releases I've needed to manually remove it).

Also, is the filter really what you wanted?

 > filter = [ "a/sda[1-9]$/" "a/sddlm*/" "r/.*/" ]
                              ^^^^^^^^

This says to accept devices that have a string "sddl" followed by any 
zero or more "m" characters. I don't know the naming scheme for HDLM, 
but your example implies that they'd follow a pattern of 
sddlm[a-z][a-z], or something.

Perhaps "a/sddlm.*/" would work better (sddlm followed by any number of 
any character), since you're unlikely to have other device nodes with a 
prefix of sddlm. You could tighten that up further as: "a|/dev/sddlm.*|" 
if you liked (lvm filter expressions work like sed - you can uniformly 
replace the '//' delimiters with other chars - I like pipes as it means 
you need less \/ escaping when using paths).

Regards,
Bryn.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [linux-lvm] device filter in lvm.conf
  2008-11-12 18:12 ` Bryn M. Reeves
@ 2008-11-12 18:29   ` Tuncel.Mutlu
  2008-11-12 19:06     ` Bryn M. Reeves
  0 siblings, 1 reply; 4+ messages in thread
From: Tuncel.Mutlu @ 2008-11-12 18:29 UTC (permalink / raw)
  To: linux-lvm

Hi,

Removing /etc/lvm/cache/.cache seems to be working:)

Thanks a lot,

Tuncel

PS: By the way are you sure about sddlm* been the "sddl + 0 or more m". The
LVM has been accepting my filter now.

  --- Physical volumes ---
  PV Name               /dev/sddlmaa1
  PV UUID               ywH3QL-bVpp-wgZE-kNR8-KnOz-TGET-qQaJwW
  PV Status             allocatable
  Total PE / Free PE    2435 / 0

  PV Name               /dev/sddlmab1
  PV UUID               HSw0sJ-BNUx-Xxod-xm3o-dszW-oK9G-UXwGkn
  PV Status             allocatable
  Total PE / Free PE    275 / 230



-----Original Message-----
From: linux-lvm-bounces@redhat.com [mailto:linux-lvm-bounces@redhat.com] On
Behalf Of Bryn M. Reeves
Sent: Wednesday, November 12, 2008 8:13 PM
To: LVM general discussion and development
Subject: Re: [linux-lvm] device filter in lvm.conf

Tuncel.Mutlu@akbank.com wrote:
> filter = [ "a/sda[1-9]$/" "a/sddlm*/" "r/.*/" ]
>
> and types row has been added
>
> types = [ "sddlmfdrv", 16 ]
>
> This has been known to work on another Linux box, but not here. How must I
> alter the filter so the LVM should accept sda and sddlm devices but reject
> all others ?

When you say it doesn't work on this box, what actually happens? Do you
fail to filter out the individual paths, or do you fail to include the
multipath device that you want to use?

You may find that removing the cache (/etc/lvm/cache/.cache) after
editing the filters straightens things out (this should be automatic but
I've found that on some releases I've needed to manually remove it).

Also, is the filter really what you wanted?

 > filter = [ "a/sda[1-9]$/" "a/sddlm*/" "r/.*/" ]
                              ^^^^^^^^

This says to accept devices that have a string "sddl" followed by any
zero or more "m" characters. I don't know the naming scheme for HDLM,
but your example implies that they'd follow a pattern of
sddlm[a-z][a-z], or something.

Perhaps "a/sddlm.*/" would work better (sddlm followed by any number of
any character), since you're unlikely to have other device nodes with a
prefix of sddlm. You could tighten that up further as: "a|/dev/sddlm.*|"
if you liked (lvm filter expressions work like sed - you can uniformly
replace the '//' delimiters with other chars - I like pipes as it means
you need less \/ escaping when using paths).

Regards,
Bryn.

_______________________________________________
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/

Bu e-posta ve muhtemel eklerinde verilen bilgiler ki�iye �zel ve gizli olup, yaln�zca mesajda belirlenen al�c� ile ilgilidir.Size yanl��l�kla ula�m��sa l�tfen g�ndericiye bilgi veriniz, mesaj� siliniz ve i�eri�ini ba�ka bir ki�iye a��klamay�n�z, herhangi bir ortama kopyalamay�n�z. Bu mesaj aksi s�zle�me ile belirtilmedik�e herhangi bir finansal i�lem teklifi, al�m�, sat�m� veya herhangi bir havalenin teyidi gibi bankac�l�k i�lemi yap�lmas� amac�n� ta��mamaktad�r.Verilen t�m bilgilerin do�rulu�u ve b�t�nl���n�n garantisi verilmemekte olup, �nceden bildirilmeksizin de�i�tirilebilecektir.Bu mesaj�n i�eri�i Bankam�z�n resmi g�r��lerini yans�tmayabilece�inden Akbank T.A.�. hi�bir hukuki sorumlulu�u kabul etmez.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [linux-lvm] device filter in lvm.conf
  2008-11-12 18:29   ` Tuncel.Mutlu
@ 2008-11-12 19:06     ` Bryn M. Reeves
  0 siblings, 0 replies; 4+ messages in thread
From: Bryn M. Reeves @ 2008-11-12 19:06 UTC (permalink / raw)
  To: LVM general discussion and development

Tuncel.Mutlu@akbank.com wrote:
> Thanks a lot,

Great! Glad it's working for you now.

> 
> PS: By the way are you sure about sddlm* been the "sddl + 0 or more m". The
> LVM has been accepting my filter now.

Sorry, that was my mistake - this is true for regexes, but since LVM2 
filter regexes have an implicit ".*" at beginning/end (unless you use 
anchors - see the comments in the default lvm.conf) and the '*' will 
match 0 or more occurrences of the preceding character, it actually 
behaves as though there is no '*' there at all.

E.g. "/sdlm*/" would match sdl$ANYTHING, since "m*" is matched by zero 
occurrences of 'm' and the remaining string is consumed by the implicit 
".*" at the end.

Regards,
Bryn.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-11-12 19:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-12 17:58 [linux-lvm] device filter in lvm.conf Tuncel.Mutlu
2008-11-12 18:12 ` Bryn M. Reeves
2008-11-12 18:29   ` Tuncel.Mutlu
2008-11-12 19:06     ` Bryn M. Reeves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox