pvdisplay shows "Found duplicate PV" on multipath device

19,166 views
Skip to first unread message

James Hammer

unread,
May 3, 2010, 2:14:04 PM5/3/10
to open-...@googlegroups.com
On a linux server I connect to 5 iscsi disks hosted by a SAN. I have
multipathing setup. On each multipath device I used pvcreate to create
a physical volume with no problems. When I create the 6th disk I get
the following from pvdisplay:

# pvcreate /dev/dm-18
Physical volume "/dev/dm-18" successfully created

# pvdisplay
Found duplicate PV tU6s0t1wfQNQufnOqtN1KGux5JftKJSi: using /dev/sdr
not /dev/sdq

"/dev/dm-18" is a new physical volume of "360.00 GB"
--- NEW Physical volume ---
PV Name /dev/dm-18
VG Name
PV Size 360.00 GB
Allocatable NO
PE Size (KByte) 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID tU6s0t-1wfQ-NQuf-nOqt-N1KG-ux5J-ftKJSi

Here is the output of multipath -ll for that device:

MAILDATA (20000000000000000000b560081b99375) dm-18 CYBERNET,iSAN Vault
[size=360G][features=1 queue_if_no_path][hwhandler=0]
\_ round-robin 0 [prio=0][active]
\_ 71:0:0:0 sdq 65:0 [active][ready]
\_ 72:0:0:0 sdp 8:240 [active][ready]
\_ 73:0:0:0 sdr 65:16 [active][ready]


I have done this with 5 other iscsi multipath disks and had no
problems. When I create a 7th disk I also have no problems with that
disk. The size I use on the 6th disk doesn't seem to matter. I've
tested it with anywhere from 50GB to 360GB and get the error with all
disk sizes.

How can I resolve the "Found duplicate PV" warning/error?

--
James Hammer
jha...@callone.com
312-681-5052

--
You received this message because you are subscribed to the Google Groups "open-iscsi" group.
To post to this group, send email to open-...@googlegroups.com.
To unsubscribe from this group, send email to open-iscsi+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/open-iscsi?hl=en.

Romeo Theriault

unread,
May 3, 2010, 2:39:29 PM5/3/10
to open-...@googlegroups.com

How can I resolve the "Found duplicate PV" warning/error?


It looks like this link should be able to help you.

http://kbase.redhat.com/faq/docs/DOC-2991

Essentially you'll want to create a filter in your lvm.conf file so it only scans your multipathed disks. From your error you see it is actually choosing one of the paths:

# pvdisplay
 Found duplicate PV tU6s0t1wfQNQufnOqtN1KGux5JftKJSi: using /dev/sdr not /dev/sdq

You want it to use the multipath link. But from the linked article the error is only a warning which can be ignored if it's using the correct path, but yours is not.

 



 
--
James Hammer
jha...@callone.com
312-681-5052

--
You received this message because you are subscribed to the Google Groups "open-iscsi" group.
To post to this group, send email to open-...@googlegroups.com.
To unsubscribe from this group, send email to open-iscsi+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/open-iscsi?hl=en.




--
Romeo Theriault
System Administrator
Information Technology Services

James Hammer

unread,
May 3, 2010, 4:30:49 PM5/3/10
to open-...@googlegroups.com
On 05/03/10 13:39, Romeo Theriault wrote:


How can I resolve the "Found duplicate PV" warning/error?


It looks like this link should be able to help you.

http://kbase.redhat.com/faq/docs/DOC-2991

Essentially you'll want to create a filter in your lvm.conf file so it only scans your multipathed disks.

Wonderful!  That worked for me.  Thank you!

James Hammer

unread,
May 3, 2010, 4:45:11 PM5/3/10
to open-...@googlegroups.com
On 05/03/10 15:30, James Hammer wrote:
On 05/03/10 13:39, Romeo Theriault wrote:


How can I resolve the "Found duplicate PV" warning/error?


It looks like this link should be able to help you.

http://kbase.redhat.com/faq/docs/DOC-2991

Essentially you'll want to create a filter in your lvm.conf file so it only scans your multipathed disks.

Wonderful!  That worked for me.  Thank you!

Actually, I take that back.  The first time I ran pvdisplay after re-creating the Physical Volume, it did not display the message.  The second time it did.  So this is what I had done:

First I created this filter in lvm.conf:

  filter = [ "a|/dev/dm-*|", "a|/dev/sda*|", "a|/dev/sdb*|", "a|/dev/sdc*|", "r|.*|" ]

Then, I ran:

# vgscan
# pvscan

Then I rediscovered and logged into the iscsi target.  Following that I ran:

# pvcreate /dev/dm-18
# pvdisplay

  (No warnings/errors.)

A little later I ran pvdisplay again and get this:

  Found duplicate PV 2DUtYyu6zYefofnTuoLSm3HicemTkVmj: using /dev/sdr not /dev/sdq

Hmmm...Any more thoughts?

dave

unread,
May 3, 2010, 10:33:21 PM5/3/10
to open-iscsi
IIRC, LVM was wonky when I tried to fix something similar to this.
Assuming you only want the partitions on sda, sdb, sdc and the
multipath devices, try:

filter = [ "a|/dev/dm-*|", "a|/dev/sda[0-9]|", "a|/dev/sdb[0-9]|", "a|/
dev/sdc[0-9]|", "r|.*|" ]

--
Dave
> jham...@callone.com

dave

unread,
May 3, 2010, 11:01:04 PM5/3/10
to open-iscsi
And delete the lvm cache before the scan, if you haven't already.

--
Dave

James Hammer

unread,
May 4, 2010, 12:00:18 PM5/4/10
to open-...@googlegroups.com
On 05/03/10 22:01, dave wrote:
> And delete the lvm cache before the scan, if you haven't already.
>
> On May 3, 8:33 pm, dave<dave-goo...@dubkat.com> wrote:
>
>> IIRC, LVM was wonky when I tried to fix something similar to this.
>> Assuming you only want the partitions on sda, sdb, sdc and the
>> multipath devices, try:
>>
>> filter = [ "a|/dev/dm-*|", "a|/dev/sda[0-9]|", "a|/dev/sdb[0-9]|", "a|/
>> dev/sdc[0-9]|", "r|.*|" ]
>>

I implemented the above filter and cleared the lvm cache and haven't had
the issue since.

Thank you.

-- James

Ulrich Windl

unread,
May 18, 2010, 3:04:24 AM5/18/10
to open-...@googlegroups.com
On 3 May 2010 at 15:45, James Hammer wrote:

> On 05/03/10 15:30, James Hammer wrote:
> > On 05/03/10 13:39, Romeo Theriault wrote:
> >>
> >>
> >> How can I resolve the "Found duplicate PV" warning/error?
> >>
> >>
> >> It looks like this link should be able to help you.
> >>
> >> http://kbase.redhat.com/faq/docs/DOC-2991
> >>
> >> Essentially you'll want to create a filter in your lvm.conf file so
> >> it only scans your multipathed disks.
> >
> > Wonderful! That worked for me. Thank you!
>
> Actually, I take that back. The first time I ran pvdisplay after
> re-creating the Physical Volume, it did not display the message. The
> second time it did. So this is what I had done:
>
> First I created this filter in lvm.conf:
>
> filter = [ "a|/dev/dm-*|", "a|/dev/sda*|", "a|/dev/sdb*|",
> "a|/dev/sdc*|", "r|.*|" ]

I have this:
filter = [ "r|/dev/.*/by-path/.*|", "r|/dev/.*/by-id/.*|", "a/.*/"
]

I don't know what you are trying to do with your filter.
Reply all
Reply to author
Forward
0 new messages