<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: LVM Filter Help! in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/lvm-filter-help/m-p/4669899#M41776</link>
    <description>Hi Alzhy,&lt;BR /&gt;&lt;BR /&gt;By default LVM2 &lt;BR /&gt;filter regexes have an implicit ".*" at beginning/end so in your first "add" filter,  it would check for everything under / and append "mapper" to it.&lt;BR /&gt;&lt;BR /&gt;If you use "/dev/mapper" instead, that might solve your problem.&lt;BR /&gt;&lt;BR /&gt;Cheers</description>
    <pubDate>Wed, 04 Aug 2010 06:05:46 GMT</pubDate>
    <dc:creator>FLQ</dc:creator>
    <dc:date>2010-08-04T06:05:46Z</dc:date>
    <item>
      <title>LVM Filter Help!</title>
      <link>https://community.hpe.com/t5/operating-system-linux/lvm-filter-help/m-p/4669898#M41775</link>
      <description>What should be my filter so LVM only scans/deals with all mapper devices's p1 (partition 1)   AND partition2's of sda and sdb?&lt;BR /&gt;&lt;BR /&gt;I have the following but there are still duplicate PVs reported:&lt;BR /&gt;&lt;BR /&gt;filter = [ "a/mapper/", "a|/dev/sda2$|",  "a|/dev/sdb2$|", "r/.*/" ]&lt;BR /&gt;&lt;BR /&gt;And boot times are excruciatingly long.&lt;BR /&gt;&lt;BR /&gt;Our servers have a local RAIDED SCSIS sda and sdb as primary and 2ndary LVM based boot disks (partiion 1 bein g.boot and partition 2 - sda2/sdb2 as the PV for vg00 and vgbroot).  Our storage SAN are a mix of HP EVA and XP12K and all are multipathed.&lt;BR /&gt;&lt;BR /&gt;TIA!&lt;BR /&gt;</description>
      <pubDate>Wed, 04 Aug 2010 02:13:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/lvm-filter-help/m-p/4669898#M41775</guid>
      <dc:creator>Alzhy</dc:creator>
      <dc:date>2010-08-04T02:13:19Z</dc:date>
    </item>
    <item>
      <title>Re: LVM Filter Help!</title>
      <link>https://community.hpe.com/t5/operating-system-linux/lvm-filter-help/m-p/4669899#M41776</link>
      <description>Hi Alzhy,&lt;BR /&gt;&lt;BR /&gt;By default LVM2 &lt;BR /&gt;filter regexes have an implicit ".*" at beginning/end so in your first "add" filter,  it would check for everything under / and append "mapper" to it.&lt;BR /&gt;&lt;BR /&gt;If you use "/dev/mapper" instead, that might solve your problem.&lt;BR /&gt;&lt;BR /&gt;Cheers</description>
      <pubDate>Wed, 04 Aug 2010 06:05:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/lvm-filter-help/m-p/4669899#M41776</guid>
      <dc:creator>FLQ</dc:creator>
      <dc:date>2010-08-04T06:05:46Z</dc:date>
    </item>
    <item>
      <title>Re: LVM Filter Help!</title>
      <link>https://community.hpe.com/t5/operating-system-linux/lvm-filter-help/m-p/4669900#M41777</link>
      <description>Are /dev/sda and /dev/sdb parts of a RAID 1 set?&lt;BR /&gt;&lt;BR /&gt;In that case, you should be accessing them through the RAID subsystem, whatever form it takes - not directly as /dev/sda* or /dev/sdb*.&lt;BR /&gt;&lt;BR /&gt;I guess you have a software RAID of some sort. Are you using "dmraid" in Linux? What does "dmraid -r" listing look like in that system in that case? &lt;BR /&gt;&lt;BR /&gt;Or are you using /dev/md* devices (Linux native software RAID)? In that case, what is the output of "cat /proc/mdstat"?&lt;BR /&gt;&lt;BR /&gt;I have one system that has Intel AHCI-based software/BIOS RAID.&lt;BR /&gt;&lt;BR /&gt;# dmraid -r&lt;BR /&gt;/dev/sdb: isw, "isw_djffgiiahe", GROUP, ok, 625142446 sectors, data@ 0&lt;BR /&gt;/dev/sda: isw, "isw_djffgiiahe", GROUP, ok, 625142446 sectors, data@ 0&lt;BR /&gt;&lt;BR /&gt;# ll /dev/mapper/&lt;BR /&gt;total 0&lt;BR /&gt;crw-rw---- 1 root root  10, 59 2010-08-01 10:47 control&lt;BR /&gt;brw-rw---- 1 root disk 254,  0 2010-08-01 10:47 isw_djffgiiahe_SysVol&lt;BR /&gt;brw-rw---- 1 root disk 254,  1 2010-08-01 10:47 isw_djffgiiahe_SysVol1&lt;BR /&gt;brw-rw---- 1 root disk 254,  2 2010-08-01 10:47 isw_djffgiiahe_SysVol2&lt;BR /&gt;brw-rw---- 1 root disk 254,  4 2010-08-02 07:51 isw_djffgiiahe_SysVol5&lt;BR /&gt;brw-rw---- 1 root disk 254,  5 2010-08-01 10:47 isw_djffgiiahe_SysVol6&lt;BR /&gt;brw-rw---- 1 root disk 254,  3 2010-08-01 10:47 vg00-lvol0&lt;BR /&gt;brw-rw---- 1 root disk 254,  6 2010-08-01 10:47 vg00-lvol1&lt;BR /&gt;brw-rw---- 1 root disk 254,  7 2010-08-01 10:47 vg00-lvol2&lt;BR /&gt;brw-rw---- 1 root disk 254,  8 2010-08-01 10:47 vg00-lvol3&lt;BR /&gt;brw-rw---- 1 root disk 254,  9 2010-08-01 10:47 vg00-lvol4&lt;BR /&gt;brw-rw---- 1 root disk 254, 10 2010-08-01 10:47 vg00-lvol5&lt;BR /&gt;&lt;BR /&gt;("isw" is dmraid's identifier for Intel Software RAID. "djffgiiahe" is the RAID set identifier, which may change if one of the disks fails and the RAID set must be rebuilt to another disk. "SysVol" is the name given to the RAID set when setting it up.)&lt;BR /&gt;&lt;BR /&gt;If this system had SAN disks attached, I would set up a LVM filter like this:&lt;BR /&gt;&lt;BR /&gt;filter = [ "a|^/dev/mapper/isw|", "a|^/dev/mapper/mpath|", "r/.*/" ]&lt;BR /&gt;&lt;BR /&gt;MK</description>
      <pubDate>Wed, 04 Aug 2010 12:19:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/lvm-filter-help/m-p/4669900#M41777</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2010-08-04T12:19:11Z</dc:date>
    </item>
    <item>
      <title>Re: LVM Filter Help!</title>
      <link>https://community.hpe.com/t5/operating-system-linux/lvm-filter-help/m-p/4669901#M41778</link>
      <description>sda and sdb are HW raided (the box's Internal SAS RAID Controller).&lt;BR /&gt;&lt;BR /&gt;All the rest are HPDM device multipathed disks.&lt;BR /&gt;&lt;BR /&gt;My OS Disks sda (vg00) and sdb (vgbroot) are LVM sliced on partition 2 (dba2 and sdb2).&lt;BR /&gt;&lt;BR /&gt;So what will my filter be?&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 09 Aug 2010 02:48:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/lvm-filter-help/m-p/4669901#M41778</guid>
      <dc:creator>Alzhy</dc:creator>
      <dc:date>2010-08-09T02:48:11Z</dc:date>
    </item>
    <item>
      <title>Re: LVM Filter Help!</title>
      <link>https://community.hpe.com/t5/operating-system-linux/lvm-filter-help/m-p/4669902#M41779</link>
      <description>If you use "friendly names" for multipath devices (i.e. /dev/mapper/mpath0 and the like), then this filter should be correct for you:&lt;BR /&gt;&lt;BR /&gt;filter = [ "a|^/dev/sda|", "a|^/dev/sdb|, "a|^/dev/mapper/mpath|", "r/.*/" ]&lt;BR /&gt;&lt;BR /&gt;If you use WWIDs or custom names, you may have to modify the "/dev/mapper/mpath" part respectively.&lt;BR /&gt;&lt;BR /&gt;Make sure all the other filter expressions in /etc/lvm/lvm.conf are commented out.&lt;BR /&gt;&lt;BR /&gt;After changing the filter, delete the LVM cache file /etc/lvm/cache/.cache and run vgscan (using verbose mode so you can verify all the correct devices are scanned):&lt;BR /&gt;&lt;BR /&gt;rm /etc/lvm/cache/.cache&lt;BR /&gt;vgscan -vv&lt;BR /&gt;&lt;BR /&gt;MK</description>
      <pubDate>Mon, 09 Aug 2010 17:00:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/lvm-filter-help/m-p/4669902#M41779</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2010-08-09T17:00:18Z</dc:date>
    </item>
    <item>
      <title>Re: LVM Filter Help!</title>
      <link>https://community.hpe.com/t5/operating-system-linux/lvm-filter-help/m-p/4669903#M41780</link>
      <description>Matti -- thanks so far sir.&lt;BR /&gt;&lt;BR /&gt;filter = [ "a|^/dev/sda|", "a|^/dev/sdb|, "a|^/dev/mapper/mpath|", "r/.*/" ]&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Wth the above filter though -- will that also scan devices like /dev/sdab, /dev/sdby, etc..? &lt;BR /&gt;&lt;BR /&gt;And How can I tell tehe filter to scan for PVs only on slice p1 on the mapper / friendly named multipaths?&lt;BR /&gt;&lt;BR /&gt;The "a/mapper/"  filter BTW is from an HP document for LVM and Storageworks. We have lots of disks on our servers -- so It would be kool if we can tell LVM to scan only for p1's -- we partition our disks - whole disk size on p1 to be "compliant" with best practice of partitioning disks -- even if the whole disk space is to be used for LVM.&lt;BR /&gt;&lt;BR /&gt;TIA.&lt;BR /&gt;</description>
      <pubDate>Mon, 09 Aug 2010 18:10:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/lvm-filter-help/m-p/4669903#M41780</guid>
      <dc:creator>Alzhy</dc:creator>
      <dc:date>2010-08-09T18:10:36Z</dc:date>
    </item>
    <item>
      <title>Re: LVM Filter Help!</title>
      <link>https://community.hpe.com/t5/operating-system-linux/lvm-filter-help/m-p/4669904#M41781</link>
      <description>&amp;gt; Wth the above filter though -- will that also scan devices like /dev/sdab, /dev/sdby, etc..?&lt;BR /&gt;&lt;BR /&gt;Yes, you're correct. Let me try again.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; And How can I tell tehe filter to scan for PVs only on slice p1 on the mapper / friendly named multipaths?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;So you have a huge number of disks?&lt;BR /&gt;&lt;BR /&gt;Okay...&lt;BR /&gt;&lt;BR /&gt;filter = [ "a|^/dev/sda[0-9]|", "a|^/dev/sdb[0-9]|, "a|^/dev/mapper/mpath.*p1$|", "r/.*/" ]&lt;BR /&gt;&lt;BR /&gt;The filter syntax uses Regular Expressions (regexps). These are used by many other tools, like grep, sed and perl for example. Learning the basics of regular expressions might be very useful for you.&lt;BR /&gt;&lt;BR /&gt;Here's a very quick Regexp 101:&lt;BR /&gt;&lt;BR /&gt;The regexp syntax works a bit differently from wildcards:&lt;BR /&gt;&lt;BR /&gt;. = any single character&lt;BR /&gt;* = the previous character or sub-expression repeated any number of times (including 0 times)&lt;BR /&gt;? = the previous character or sub-expression repeated 1 or more times&lt;BR /&gt;&lt;BR /&gt;so there's a common construction:&lt;BR /&gt;&lt;BR /&gt;.* = any number of any characters&lt;BR /&gt;&lt;BR /&gt;[0-9] = any ASCII character between 0 and 9, inclusive.&lt;BR /&gt;[^0-9] = any character except numbers.&lt;BR /&gt;&lt;BR /&gt;By default, the regexp pattern has implicit ".*" at its beginning and end. To override that, you use the anchor characters:&lt;BR /&gt;&lt;BR /&gt;^ at the beginning of the search pattern = the target must contain nothing before this&lt;BR /&gt;&lt;BR /&gt;$ at the end of the search pattern = the target must contain nothing after this.&lt;BR /&gt;&lt;BR /&gt;These should be enough for you to figure out how the filter pattern I wrote (above) works.&lt;BR /&gt;&lt;BR /&gt;MK</description>
      <pubDate>Tue, 10 Aug 2010 20:46:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/lvm-filter-help/m-p/4669904#M41781</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2010-08-10T20:46:02Z</dc:date>
    </item>
    <item>
      <title>Re: LVM Filter Help!</title>
      <link>https://community.hpe.com/t5/operating-system-linux/lvm-filter-help/m-p/4669905#M41782</link>
      <description>This worked:&lt;BR /&gt;&lt;BR /&gt;filter = [ "a/mapper/.*p1$/", "a|/dev/sda[0-9]|",  "a|/dev/sdb[0-9]|", "r/.*/" ]&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;This did not:&lt;BR /&gt;&lt;BR /&gt;filter = [ "a|^/dev/sda[0-9]|", "a|^/dev/sdb[0-9]|, "a|^/dev/mapper/mpath.*p1$|", "r/.*/" ]&lt;BR /&gt;</description>
      <pubDate>Tue, 24 Aug 2010 16:03:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/lvm-filter-help/m-p/4669905#M41782</guid>
      <dc:creator>Alzhy</dc:creator>
      <dc:date>2010-08-24T16:03:22Z</dc:date>
    </item>
  </channel>
</rss>

