- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- LVM Filter Help!
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-03-2010 07:13 PM
тАО08-03-2010 07:13 PM
I have the following but there are still duplicate PVs reported:
filter = [ "a/mapper/", "a|/dev/sda2$|", "a|/dev/sdb2$|", "r/.*/" ]
And boot times are excruciatingly long.
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.
TIA!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-03-2010 11:05 PM
тАО08-03-2010 11:05 PM
Re: LVM Filter Help!
By default LVM2
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.
If you use "/dev/mapper" instead, that might solve your problem.
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-04-2010 05:19 AM
тАО08-04-2010 05:19 AM
SolutionIn that case, you should be accessing them through the RAID subsystem, whatever form it takes - not directly as /dev/sda* or /dev/sdb*.
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?
Or are you using /dev/md* devices (Linux native software RAID)? In that case, what is the output of "cat /proc/mdstat"?
I have one system that has Intel AHCI-based software/BIOS RAID.
# dmraid -r
/dev/sdb: isw, "isw_djffgiiahe", GROUP, ok, 625142446 sectors, data@ 0
/dev/sda: isw, "isw_djffgiiahe", GROUP, ok, 625142446 sectors, data@ 0
# ll /dev/mapper/
total 0
crw-rw---- 1 root root 10, 59 2010-08-01 10:47 control
brw-rw---- 1 root disk 254, 0 2010-08-01 10:47 isw_djffgiiahe_SysVol
brw-rw---- 1 root disk 254, 1 2010-08-01 10:47 isw_djffgiiahe_SysVol1
brw-rw---- 1 root disk 254, 2 2010-08-01 10:47 isw_djffgiiahe_SysVol2
brw-rw---- 1 root disk 254, 4 2010-08-02 07:51 isw_djffgiiahe_SysVol5
brw-rw---- 1 root disk 254, 5 2010-08-01 10:47 isw_djffgiiahe_SysVol6
brw-rw---- 1 root disk 254, 3 2010-08-01 10:47 vg00-lvol0
brw-rw---- 1 root disk 254, 6 2010-08-01 10:47 vg00-lvol1
brw-rw---- 1 root disk 254, 7 2010-08-01 10:47 vg00-lvol2
brw-rw---- 1 root disk 254, 8 2010-08-01 10:47 vg00-lvol3
brw-rw---- 1 root disk 254, 9 2010-08-01 10:47 vg00-lvol4
brw-rw---- 1 root disk 254, 10 2010-08-01 10:47 vg00-lvol5
("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.)
If this system had SAN disks attached, I would set up a LVM filter like this:
filter = [ "a|^/dev/mapper/isw|", "a|^/dev/mapper/mpath|", "r/.*/" ]
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-08-2010 07:48 PM
тАО08-08-2010 07:48 PM
Re: LVM Filter Help!
All the rest are HPDM device multipathed disks.
My OS Disks sda (vg00) and sdb (vgbroot) are LVM sliced on partition 2 (dba2 and sdb2).
So what will my filter be?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-09-2010 10:00 AM
тАО08-09-2010 10:00 AM
Re: LVM Filter Help!
filter = [ "a|^/dev/sda|", "a|^/dev/sdb|, "a|^/dev/mapper/mpath|", "r/.*/" ]
If you use WWIDs or custom names, you may have to modify the "/dev/mapper/mpath" part respectively.
Make sure all the other filter expressions in /etc/lvm/lvm.conf are commented out.
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):
rm /etc/lvm/cache/.cache
vgscan -vv
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-09-2010 11:10 AM
тАО08-09-2010 11:10 AM
Re: LVM Filter Help!
filter = [ "a|^/dev/sda|", "a|^/dev/sdb|, "a|^/dev/mapper/mpath|", "r/.*/" ]
Wth the above filter though -- will that also scan devices like /dev/sdab, /dev/sdby, etc..?
And How can I tell tehe filter to scan for PVs only on slice p1 on the mapper / friendly named multipaths?
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.
TIA.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-10-2010 01:46 PM
тАО08-10-2010 01:46 PM
Re: LVM Filter Help!
Yes, you're correct. Let me try again.
> And How can I tell tehe filter to scan for PVs only on slice p1 on the mapper / friendly named multipaths?
So you have a huge number of disks?
Okay...
filter = [ "a|^/dev/sda[0-9]|", "a|^/dev/sdb[0-9]|, "a|^/dev/mapper/mpath.*p1$|", "r/.*/" ]
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.
Here's a very quick Regexp 101:
The regexp syntax works a bit differently from wildcards:
. = any single character
* = the previous character or sub-expression repeated any number of times (including 0 times)
? = the previous character or sub-expression repeated 1 or more times
so there's a common construction:
.* = any number of any characters
[0-9] = any ASCII character between 0 and 9, inclusive.
[^0-9] = any character except numbers.
By default, the regexp pattern has implicit ".*" at its beginning and end. To override that, you use the anchor characters:
^ at the beginning of the search pattern = the target must contain nothing before this
$ at the end of the search pattern = the target must contain nothing after this.
These should be enough for you to figure out how the filter pattern I wrote (above) works.
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-24-2010 09:03 AM
тАО08-24-2010 09:03 AM
Re: LVM Filter Help!
filter = [ "a/mapper/.*p1$/", "a|/dev/sda[0-9]|", "a|/dev/sdb[0-9]|", "r/.*/" ]
This did not:
filter = [ "a|^/dev/sda[0-9]|", "a|^/dev/sdb[0-9]|, "a|^/dev/mapper/mpath.*p1$|", "r/.*/" ]