How to fix duplicated PV issue on EMC multi-path

1.1. Problem Descriptions

·        After creating PV on EMC disk, for example:

·        pvcreate /dev/emcpowerk1

·        The server start to show  error messages when running pvdisplay:

·        Found duplicate PV yyfFeZg8bUwYenONj1xXcnHkdf50U6kG: using /dev/sdv not /dev/emcpowerk1

·          Found duplicate PV yyfFeZg8bUwYenONj1xXcnHkdf50U6kG: using /dev/sdh not /dev/sdv

·          Found duplicate PV yyfFeZg8bUwYenONj1xXcnHkdf50U6kG: using /dev/sdac not /dev/sdh

·          Found duplicate PV yyfFeZg8bUwYenONj1xXcnHkdf50U6kG: using /dev/sdo not /dev/sdac

 

1.2 Filter the multi-path disks except EMC Power Disks

 

#vi /etc/lvm/lvm.conf

 

Edit the line.

 

    # By default we accept every block device:

    filter = [ "a/.*/" ]

 

comment out the above line and add the following line:

 

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

 

Save the lvm.conf file.

 

Note: The "a/sda[1-9]$/" keeps the existing disk entries, such as /dev/sda2.

The next "a/emcpower.*/" will add all the /dev/emcpower devices.

And last "r/.*/" removes all other devices.

 

Run vgscan -vvvv to clear the cache and rescan the devices.

 

[root]# vgscan -vvvv

#lvmcmdline.c:915         Processing: vgscan -vvvv

#lvmcmdline.c:918         O_DIRECT will be used

#config/config.c:950       Setting global/locking_type to 1

#locking/locking.c:223       File-based locking selected.

#config/config.c:927       Setting global/locking_dir to /var/lock/lvm

#locking/file_locking.c:164       Locking /var/lock/lvm/P_global WB

#filters/filter-persistent.c:56     Wiping cache of LVM-capable devices

#device/dev-cache.c:426         /dev/arpd: Not a block device

#device/dev-cache.c:260         /dev/cdrom: Added to device cache

 

 

[root]# pvdisplay

  --- Physical volume ---

  PV Name               /dev/sda2

  VG Name               VolGroup00

  PV Size               135.87 GB / not usable 61.25 MB

  Allocatable           yes

  PE Size (KByte)       65536

  Total PE              2173

  Free PE               1

  Allocated PE          2172

  PV UUID               eirou1-MeG0-A2gy-MkE3-J4Nr-JMwP-GQxmd5

  

  "/dev/emcpowera" is a new physical volume of "34.00 GB"

  --- NEW Physical volume ---

  PV Name               /dev/emcpowera

  VG Name              

  PV Size               34.00 GB

  Allocatable           NO

  PE Size (KByte)       0

  Total PE              0

  Free PE               0

  Allocated PE          0

  PV UUID               yyfFeZ-g8bU-wYen-ONj1-xXcn-Hkdf-50U6kG

Post a Comment

Previous Post Next Post