Linux LVM users
 help / color / mirror / Atom feed
* [linux-lvm] duplicate pv.
@ 2004-12-11 11:42 johon Doe
  2004-12-11 13:18 ` Philipp Schmidt
  2004-12-11 22:36 ` Alasdair G Kergon
  0 siblings, 2 replies; 9+ messages in thread
From: johon Doe @ 2004-12-11 11:42 UTC (permalink / raw)
  To: linux-lvm

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [linux-lvm] duplicate pv.
  2004-12-11 11:42 [linux-lvm] duplicate pv johon Doe
@ 2004-12-11 13:18 ` Philipp Schmidt
  2004-12-11 22:38   ` Alasdair G Kergon
  2004-12-11 22:36 ` Alasdair G Kergon
  1 sibling, 1 reply; 9+ messages in thread
From: Philipp Schmidt @ 2004-12-11 13:18 UTC (permalink / raw)
  To: LVM general discussion and development

On 2004-12-11 03:42:13 -0800, johon Doe <johond@yahoo.com>
wrote in <20041211114213.76916.qmail@web52508.mail.yahoo.com>:
> 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...

-- 
   {phils}--->---(mail: philipp@ppc.in-berlin.de)-->--(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: phils@jabber.ccc.de)--'

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [linux-lvm] duplicate pv.
  2004-12-11 11:42 [linux-lvm] duplicate pv johon Doe
  2004-12-11 13:18 ` Philipp Schmidt
@ 2004-12-11 22:36 ` Alasdair G Kergon
  1 sibling, 0 replies; 9+ messages in thread
From: Alasdair G Kergon @ 2004-12-11 22:36 UTC (permalink / raw)
  To: LVM general discussion and development

On Sat, Dec 11, 2004 at 03:42:13AM -0800, johon Doe wrote:
> 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
-- 
agk@redhat.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [linux-lvm] duplicate pv.
  2004-12-11 13:18 ` Philipp Schmidt
@ 2004-12-11 22:38   ` Alasdair G Kergon
  2004-12-12 17:12     ` Alasdair G Kergon
  0 siblings, 1 reply; 9+ messages in thread
From: Alasdair G Kergon @ 2004-12-11 22:38 UTC (permalink / raw)
  To: LVM general discussion and development

On Sat, Dec 11, 2004 at 02:18:29PM +0100, Philipp Schmidt wrote:
> 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
-- 
agk@redhat.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [linux-lvm] duplicate pv.
  2004-12-11 22:38   ` Alasdair G Kergon
@ 2004-12-12 17:12     ` Alasdair G Kergon
  2004-12-12 17:35       ` Philipp Schmidt
  0 siblings, 1 reply; 9+ messages in thread
From: Alasdair G Kergon @ 2004-12-12 17:12 UTC (permalink / raw)
  To: LVM general discussion and development

On Sat, Dec 11, 2004 at 10:38:56PM +0000, Alasdair G Kergon wrote:
> On Sat, Dec 11, 2004 at 02:18:29PM +0100, Philipp Schmidt wrote:
> > 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
-- 
agk@redhat.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [linux-lvm] duplicate pv.
  2004-12-12 17:12     ` Alasdair G Kergon
@ 2004-12-12 17:35       ` Philipp Schmidt
  2004-12-13  8:49         ` johon Doe
  0 siblings, 1 reply; 9+ messages in thread
From: Philipp Schmidt @ 2004-12-12 17:35 UTC (permalink / raw)
  To: LVM general discussion and development

On 2004-12-12 17:12:30 +0000, Alasdair G Kergon <agk@redhat.com>
wrote in <20041212171230.GL11338@agk.surrey.redhat.com>:
> On Sat, Dec 11, 2004 at 10:38:56PM +0000, Alasdair G Kergon wrote:
> > On Sat, Dec 11, 2004 at 02:18:29PM +0100, Philipp Schmidt wrote:
> > > 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...

-- 
   {phils}--->---(mail: philipp@ppc.in-berlin.de)-->--(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: phils@jabber.ccc.de)--'

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [linux-lvm] duplicate pv.
  2004-12-12 17:35       ` Philipp Schmidt
@ 2004-12-13  8:49         ` johon Doe
  2004-12-13 15:24           ` Philipp Schmidt
  0 siblings, 1 reply; 9+ messages in thread
From: johon Doe @ 2004-12-13  8:49 UTC (permalink / raw)
  To: LVM general discussion and development


--- Philipp Schmidt <philipp@ppc.in-berlin.de> wrote:

> On 2004-12-12 17:12:30 +0000, Alasdair G Kergon
> <agk@redhat.com>
> wrote in
> <20041212171230.GL11338@agk.surrey.redhat.com>:
> > On Sat, Dec 11, 2004 at 10:38:56PM +0000, Alasdair
> G Kergon wrote:
> > > On Sat, Dec 11, 2004 at 02:18:29PM +0100,
> Philipp Schmidt wrote:
> > > > 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... 
> 

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 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [linux-lvm] duplicate pv.
  2004-12-13  8:49         ` johon Doe
@ 2004-12-13 15:24           ` Philipp Schmidt
  0 siblings, 0 replies; 9+ messages in thread
From: Philipp Schmidt @ 2004-12-13 15:24 UTC (permalink / raw)
  To: LVM general discussion and development

On 2004-12-13 00:49:35 -0800, johon Doe <johond@yahoo.com>
wrote in <20041213084935.61935.qmail@web52503.mail.yahoo.com>:
> 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...

-- 
   {phils}--->---(mail: philipp@ppc.in-berlin.de)-->--(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: phils@jabber.ccc.de)--'

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [linux-lvm] duplicate PV
  2005-05-24 18:30 [linux-lvm] "pvchange --uuid" failed when PV is in use Page, Jennifer (RBC Dain)
@ 2006-07-19 16:35 ` Tommaso Cecchi
  0 siblings, 0 replies; 9+ messages in thread
From: Tommaso Cecchi @ 2006-07-19 16:35 UTC (permalink / raw)
  To: LVM general discussion and development

Hello everyone,
I have the following problem: I want to use a snapshot mechanism external to
LVM2 (i.e. snapshot from the storage server) so it happens that I access from a
linux box two identical LUNs with the same PVID. It is not a matter of
multipathing, they just are completely different devices with the same content
(and with the same PVID of course).

What I would like to do is to use and mount the second device on a different
mount point. So:

/dev/sdd1 is the primary PV
/dev/sdf1 is the snapshot of the primary PV

The result of pvscan before the discovery is:

drdb2:~ # pvscan
   PV /dev/sde1   VG drrg2_vg      lvm2 [200.00 GB / 0    free]
   PV /dev/sdd1   VG test_vg       lvm2 [200.00 GB / 0    free]
   PV /dev/sdb1   VG oracledb_vg   lvm2 [220.00 GB / 0    free]
   PV /dev/sdc1   VG oracledb_vg   lvm2 [20.00 GB / 0    free]
   PV /dev/sda3   VG root_vg       lvm2 [59.75 GB / 47.26 GB free]
   Total: 5 [699.73 GB] / in use: 5 [699.73 GB] / in no VG: 0 [0   ]

after the discovery of the new device is:

drdb2:~ # pvscan
   Found duplicate PV PnvnzL7YFft76Ky0EaPbOh519SQD5Uxc: using /dev/sdf1 not
/dev/sdd1
   PV /dev/sde1   VG drrg2_vg      lvm2 [200.00 GB / 0    free]
   PV /dev/sdd1   VG test_vg       lvm2 [200.00 GB / 0    free]
   PV /dev/sdb1   VG oracledb_vg   lvm2 [220.00 GB / 0    free]
   PV /dev/sdc1   VG oracledb_vg   lvm2 [20.00 GB / 0    free]
   PV /dev/sda3   VG root_vg       lvm2 [59.75 GB / 47.26 GB free]
   Total: 5 [699.73 GB] / in use: 5 [699.73 GB] / in no VG: 0 [0   ]

I guess this problem is the same I'd have if I copy any single byte from a 
device to another the last one resulting in having the same LVM label.

What I tried is to:

1) vgreduce:

drdb2:~ # vgreduce test_vg /dev/sdf1
   Found duplicate PV PnvnzL7YFft76Ky0EaPbOh519SQD5Uxc: using /dev/sdf1 not
/dev/sdd1
   Physical Volume "/dev/sdf1" not found in Volume Group "test_vg"

sdf1 does not belong to test_vg

2) pvchange --uuid:

drdb2:~ # pvchange --uuid /dev/sdf1
   Found duplicate PV PnvnzL7YFft76Ky0EaPbOh519SQD5Uxc: using /dev/sdd1 not
/dev/sdf1
   Volume group containing /dev/sdf1 has active logical volumes
   0 physical volumes changed / 1 physical volume not changed

My idea was to modify the PVID so to let LVM understand they are completely 
different devices.
How can I manage this?

Thanks for any help you may give me.
Tommaso

-- 
================================================================
|     Tommaso Cecchi                          CINECA
| System Management Group              Via Magnanelli 6/3 40033
| e-mail: t.cecchi@cineca.it             Casalecchio di Reno
| Tel: 051/6171411                         Bologna - ITALY
| Fax 051/6132198                       http://www.cineca.it
================================================================

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2006-07-19 16:36 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-11 11:42 [linux-lvm] duplicate pv johon Doe
2004-12-11 13:18 ` Philipp Schmidt
2004-12-11 22:38   ` Alasdair G Kergon
2004-12-12 17:12     ` Alasdair G Kergon
2004-12-12 17:35       ` Philipp Schmidt
2004-12-13  8:49         ` johon Doe
2004-12-13 15:24           ` Philipp Schmidt
2004-12-11 22:36 ` Alasdair G Kergon
  -- strict thread matches above, loose matches on Subject: below --
2005-05-24 18:30 [linux-lvm] "pvchange --uuid" failed when PV is in use Page, Jennifer (RBC Dain)
2006-07-19 16:35 ` [linux-lvm] duplicate PV Tommaso Cecchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox