LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Enterprise (https://www.linuxquestions.org/questions/linux-enterprise-47/)
-   -   lvm preferred_names not working (https://www.linuxquestions.org/questions/linux-enterprise-47/lvm-preferred_names-not-working-4175482512/)

thaddeusq 10-28-2013 03:42 PM

lvm preferred_names not working
 
I am running RHEL 6.4 with EMC PowerPath.

The preferred_names line in my lvm.conf looks like
Code:

preferred_names = [ "^/dev/emcpower*", "^/dev/mpath/", "^/dev/mapper/mpath", "^/dev/sd" ]
My filter line in lvm.conf looks like:
Code:

filter = [ "a|/dev/emcpower.*|" "a|/dev/sd.*|" "a|/dev/cciss.*|" "a|/dev/mpath|" "r|.*|" ]
My root filesystem is on /dev/sda2 which is a local disk.

The pvs command reports:
Code:

# pvs
  Found duplicate PV 5MJOqv3uBda0vw1SPlr0SQmWOVGeZnxX: using /dev/sdc not /dev/emcpowerb
  Found duplicate PV EyhvDhjfh0M30sfIp1eRTzLqzOJ1J0hj: using /dev/sdd not /dev/emcpowera
  Found duplicate PV 5MJOqv3uBda0vw1SPlr0SQmWOVGeZnxX: using /dev/sdf not /dev/sdc
  Found duplicate PV EyhvDhjfh0M30sfIp1eRTzLqzOJ1J0hj: using /dev/sdg not /dev/sdd
  PV        VG    Fmt  Attr PSize  PFree
  /dev/sda2  rootvg lvm2 a--  277.97g 19.97g
  /dev/sdf  sanvg  lvm2 a--  100.00g    0
  /dev/sdg  sanvg  lvm2 a--  50.00g    0

Instead of /dev/sdf and /dev/sdg for sanvg, I want it to report /dev/emcpowera and /dev/emcpowerb. I was under the impression that setting up the filter line and the preferred_names line the way that I have would do this. Any help?

GazL 10-29-2013 08:35 AM

preferred_names = [ "^/dev/emcpower.*", "^/dev/mpath/", "^/dev/mapper/mpath", "^/dev/sd" ]

You're missing a '.'

thaddeusq 10-29-2013 09:50 AM

I changed the preferred_names line to look like:

Code:

preferred_names = [ "^/dev/emcpower.*", "^/dev/mpath/", "^/dev/mapper/mpath" ]
Still not working.

GazL 10-29-2013 11:19 AM

My guess would be that lvm has no way to know that emcpowera, sdd and sdg are all the same device, and that the preferred_names processing isn't even coming into play.

I don't know enough about how the emc drivers work to be able to be more specific that that.

voleg 10-30-2013 11:46 AM

Preferred names did not worked for me also. Jus narrow your filter line.

BTW, I've switched from PowerPath to native Linux multipath.
I've always has a problem with kernel update while booting from PP device.
As from my experience, the only "added value" of PP is $1k/CPU.
Even that value added to EMC, not to you.


See this HOWTO LUNs on Linux using native tools.
Although, it built on NetApp example, I use same logic working with EMC devices.
You can check here: Boot from SAN RedHat 5.


All times are GMT -5. The time now is 06:13 AM.