Skip to contentSkip to conversation

duplicate pv.

linux-lvm johon Doe 3 participants 8 messages Dec 11, 2004 – Dec 13, 2004

lore
Share & tools
lore

johon Doe

author
#0 lore raw

Hi, I have a 2.6.9 kernel and I have problems to
create an vg device over a raid1 array.
Look:

sole:/usr/src/linux# cat /proc/mdstat 
Personalities : [raid1] 
md7 : active raid1 sdb2[1] sda2[0]
      244147712 blocks [2/2] [UU]

md1 : active raid1 sdb6[0] sda6[1]

      1951744 blocks [2/2] [UU]

md2 : active raid1 sdb7[0] sda7[1]

      1951744 blocks [2/2] [UU]

md3 : active raid1 sdb8[0] sda8[1]

      979840 blocks [2/2] [UU]

md4 : active raid1 sdb9[0] sda9[1]

      9767424 blocks [2/2] [UU]

md5 : active raid1 sdb10[0] sda10[1]

      9767424 blocks [2/2] [UU]

md6 : active raid1 sdb11[0] sda11[1]

      7815488 blocks [2/2] [UU]

md0 : active raid1 sdb5[0] sda5[1]

      96256 blocks [2/2] [UU]

unused devices: <none>

sole:/usr/src/linux# pvcreate /dev/md7
  Physical volume "/dev/md7" successfully created
sole:/usr/src/linux# pvdisplay 
  Found duplicate PV lvryBmVRK5xL8QmQRmqnXI707cYMc2z1:
using /dev/sdb2 not /dev/sda2
  Found duplicate PV lvryBmVRK5xL8QmQRmqnXI707cYMc2z1:
using /dev/sdb2 not /dev/sda2
  --- NEW Physical volume ---
  PV Name               /dev/sda2
  VG Name               
  PV Size               232,84 GB
  Allocatable           NO
  PE Size (KByte)       0
  Total PE              0
  Free PE               0
  Allocated PE          0
  PV UUID              
lvryBm-VRK5-xL8Q-mQRm-qnXI-707c-YMc2z1
sole:/usr/src/linux# vgcreate vg00 /dev/md7
  Found duplicate PV lvryBmVRK5xL8QmQRmqnXI707cYMc2z1:
using /dev/sdb2 not /dev/sda2
  Found duplicate PV lvryBmVRK5xL8QmQRmqnXI707cYMc2z1:
using /dev/sdb2 not /dev/sda2
  Found duplicate PV lvryBmVRK5xL8QmQRmqnXI707cYMc2z1:
using /dev/sdb2 not /dev/sda2
  Volume group "vg00" successfully created
sole:/usr/src/linux# lvcreate -L 240000M -n lv00 vg00
  Found duplicate PV lvryBmVRK5xL8QmQRmqnXI707cYMc2z1:
using /dev/sdb2 not /dev/sda2
  Found duplicate PV lvryBmVRK5xL8QmQRmqnXI707cYMc2z1:
using /dev/sdb2 not /dev/sda2
  Volume group "vg00" doesn't exist
sole:/usr/src/linux# 

thx for any help
Luigi.

__________________________________
Do you Yahoo!?
Send a seasonal email greeting and help others. Do good.
http://celebrity.mail.yahoo.com

#1 lore raw

On 2004-12-11 03:42:13 -0800, johon Doe <[email protected]> wrote in <[email protected]>:

Quoted 2 lines

Hi, I have a 2.6.9 kernel and I have problems to
create an vg device over a raid1 array.

look t your /etc/lvm/lvm.conf, have you set md_component_detection = 1?

i wonder why this isn't set by default, who needs to use md compnents as singel pv?

AVE!
phils...

Signature · 4 lines
   {phils}--->---(mail: [email protected])-->--(ircnet: phils)--,
    wenn w eine   aube ist dn      man au dran dre en                   |
         o     Schr        an muss     hc         h   (Kurt Schwitters) |
:wq!    <--(phone: +49-179-6737439)--<--(jabber: [email protected])--'
#2 lore raw
Quoted 3 lines · Philipp Schmidt

look t your /etc/lvm/lvm.conf, have you set md_component_detection = 1? i wonder why this isn't set by default, who needs to use md compnents as singel pv?

It *is* set to 1 by default i.e. if you don't specify a different value for it in the conf file.

Alasdair

Signature · 1 line
[email protected]
#3 lore raw
Quoted 6 lines · Alasdair G Kergon
Quoted 3 lines · Philipp Schmidt

look t your /etc/lvm/lvm.conf, have you set md_component_detection = 1? i wonder why this isn't set by default, who needs to use md compnents as singel pv?

It *is* set to 1 by default i.e. if you don't specify a different value for it in the conf file.

I believe the Debian distribution may have set it to 0 at one point because of problems in certain configurations: these cases should be fixed by 2.00.29.

Another cause of problems could be if people created a whole-disk PV on a device that actually held a partition table - i.e. they ignored the partition table, even though the kernel would still be using it.

From 2.00.29, lvm2 tries to detect partitioned devices and stop you using them directly as PVs unless you remove the partition table first. (i.e. if it's partitioned, only the partitions can be PVs, not the whole disk device)

Alasdair

Signature · 1 line
[email protected]
#4 lore raw

On 2004-12-12 17:12:30 +0000, Alasdair G Kergon <[email protected]> wrote in <[email protected]>:

Quoted 10 lines · Alasdair G Kergon
Quoted 6 lines · Philipp Schmidt
Quoted 3 lines

look t your /etc/lvm/lvm.conf, have you set md_component_detection = 1? i wonder why this isn't set by default, who needs to use md compnents as singel pv?

It *is* set to 1 by default i.e. if you don't specify a different value for it in the conf file.

I believe the Debian distribution may have set it to 0 at one point because of problems in certain configurations: these cases should be fixed by 2.00.29.

ok, i use debian here and it had cost me one day to find this bad default config...

AVE!
phils...

Signature · 4 lines
   {phils}--->---(mail: [email protected])-->--(ircnet: phils)--,
    wenn w eine   aube ist dn      man au dran dre en                   |
         o     Schr        an muss     hc         h   (Kurt Schwitters) |
:wq!    <--(phone: +49-179-6737439)--<--(jabber: [email protected])--'
author
#5 lore raw
Quoted 17 lines · --- Philipp Schmidt

On 2004-12-12 17:12:30 +0000, Alasdair G Kergon
<[email protected]>
wrote in
<[email protected]>:

Quoted 1 line

On Sat, Dec 11, 2004 at 10:38:56PM +0000, Alasdair

Quoted 1 line · G Kergon
Quoted 1 line

On Sat, Dec 11, 2004 at 02:18:29PM +0100,

Quoted 1 line · Philipp Schmidt
Quoted 1 line
Quoted 1 line

look t your /etc/lvm/lvm.conf, have you set

md_component_detection = 1?

Quoted 1 line
Quoted 1 line
Quoted 1 line

i wonder why this isn't set by default, who

needs to use md compnents as

Quoted 2 lines
Quoted 2 lines
Quoted 1 line

singel pv?

It *is* set to 1 by default i.e. if you don't

specify

Quoted 2 lines
Quoted 1 line

a different value for it in the conf file.

Quoted 9 lines
Quoted 1 line

I believe the Debian distribution may have set it

to 0 at one point because

Quoted 1 line

of problems in certain configurations: these cases

should be fixed by 2.00.29.

ok, i use debian here and it had cost me one day to find this bad default
config...

hi Phils,
I have Debian and I changed the value from 0 to 1 and viceversa, but I have the same problem.
Any other ideas ?
thx :)

__________________________________
Do you Yahoo!?
The all-new My Yahoo! - What will yours do?
http://my.yahoo.com

#6 lore raw

On 2004-12-13 00:49:35 -0800, johon Doe <[email protected]> wrote in <[email protected]>:

Quoted 4 lines

hi Phils,
I have Debian and I changed the value from 0 to 1 and viceversa, but I have the same problem.
Any other ideas ?

set remove all md components from your lv, set md_component_detection = 1, do a pvcreate on this device, run pvscan and then add them to yor vg, doubleck twice (by using lvdisplay -v) the md-device has been added and not its components.

Worked for me

AVE!
phils...

Signature · 4 lines
   {phils}--->---(mail: [email protected])-->--(ircnet: phils)--,
    wenn w eine   aube ist dn      man au dran dre en                   |
         o     Schr        an muss     hc         h   (Kurt Schwitters) |
:wq!    <--(phone: +49-179-6737439)--<--(jabber: [email protected])--'
#7 lore raw
In reply to johon Doe
Quoted 2 lines · johon Doe

Hi, I have a 2.6.9 kernel and I have problems to
create an vg device over a raid1 array.

What LVM2 version?
Please try with 2.00.29 or .30.
Make sure md_component_detection is *not* set to 0 in lvm.conf.

Alasdair

Signature · 1 line
[email protected]