All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-lvm] Unable to create lvm1 configurations
@ 2004-09-12  6:33 Stanley Yue
  2004-09-12 11:56 ` Alasdair G Kergon
  0 siblings, 1 reply; 6+ messages in thread
From: Stanley Yue @ 2004-09-12  6:33 UTC (permalink / raw)
  To: LVM general discussion and development

Hi all:

I have LVM2 installed, and I tried to create lvm1 configurations using
the following command:

[root@DAP-RHLNX1 tools]# vgcreate -v --metadatatype 1 vg1-lvm2
/dev/hda6 /dev/hda7
  Invalid argument 1
  Error during parsing of command line.
[root@DAP-RHLNX1 tools]# 

However, passing into "2" as the metadatatype would succeed.

[root@DAP-RHLNX1 tools]# vgcreate -v --metadatatype 2 vg1-lvm2
/dev/hda6 /dev/hda7
    Adding physical volume '/dev/hda6' to volume group 'vg1-lvm2'
    Adding physical volume '/dev/hda7' to volume group 'vg1-lvm2'
    Archiving volume group "vg1-lvm2" metadata.
    Creating volume group backup "/etc/lvm/backup/vg1-lvm2"
  Volume group "vg1-lvm2" successfully created
[root@DAP-RHLNX1 tools]# 


Does anyone what the problem is?
What is the best way to create LVM1 configurations?

Stanley

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

* Re: [linux-lvm] Unable to create lvm1 configurations
  2004-09-12  6:33 [linux-lvm] Unable to create lvm1 configurations Stanley Yue
@ 2004-09-12 11:56 ` Alasdair G Kergon
  2004-09-13  8:58   ` Stanley Yue
  0 siblings, 1 reply; 6+ messages in thread
From: Alasdair G Kergon @ 2004-09-12 11:56 UTC (permalink / raw)
  To: Stanley Yue; +Cc: LVM general discussion and development

On Sat, Sep 11, 2004 at 11:33:06PM -0700, Stanley Yue wrote:
> [root@DAP-RHLNX1 tools]# vgcreate -v --metadatatype 1 vg1-lvm2
> /dev/hda6 /dev/hda7
>   Invalid argument 1
>   Error during parsing of command line.

Works for me.

Perhaps support for 'lvm1' metadata was not compiled in, or
not loaded from lvm.conf if you configured it shared?

Alasdair
-- 
agk@redhat.com

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

* Re: [linux-lvm] Unable to create lvm1 configurations
  2004-09-12 11:56 ` Alasdair G Kergon
@ 2004-09-13  8:58   ` Stanley Yue
  2004-09-13 10:41     ` Alasdair G Kergon
  0 siblings, 1 reply; 6+ messages in thread
From: Stanley Yue @ 2004-09-13  8:58 UTC (permalink / raw)
  To: Stanley Yue, LVM general discussion and development

Thanks Alasdair, it turns out that have to explicitly enable lvm1 support by:

./configure --with-lvm1=internal

However, now, I'm seeing the following problem. 

I have installed both lvm1 and lvm2 utilities onto the same system,
with the lvm-mod and device-mapper from lvm2. I want to test out
whether lvm2 utilities can detect configurations created from lvm1
utilities.

+ pvcreate fails when I'm using the lvm1 utilities.

[root@DAP-RHLNX1 sbin]# ./vgscan  -v
vgscan -- removing "/etc/lvmtab" and "/etc/lvmtab.d"
vgscan -- creating empty "/etc/lvmtab" and "/etc/lvmtab.d"
vgscan -- reading all physical volumes (this may take a while...)
vgscan -- "/etc/lvmtab" and "/etc/lvmtab.d" successfully created
vgscan -- WARNING: This program does not do a VGDA backup of your volume group

[root@DAP-RHLNX1 sbin]# ./pvcreate /dev/hda7
pvcreate -- ERROR: VGDA in kernel and lvmtab are NOT consistent;
please run vgscan

+ However, pvcreate succeed when I'm using the lvm2's pvcreate

[root@DAP-RHLNX1 sbin]# pvcreate /dev/hda7
  Physical volume "/dev/hda7" successfully created

Is there anything wrong with my setup here? Does lvm1 utilities work
with lvm-mod from lvm2?
How can I resync the state between the VGDA in kernel and lvmtab?
Do anyone know how I can get it to work with lvm1's pvcreate?

Thanks,

Stanley



On Sun, 12 Sep 2004 12:56:53 +0100, Alasdair G Kergon <agk@redhat.com> wrote:
> On Sat, Sep 11, 2004 at 11:33:06PM -0700, Stanley Yue wrote:
> > [root@DAP-RHLNX1 tools]# vgcreate -v --metadatatype 1 vg1-lvm2
> > /dev/hda6 /dev/hda7
> >   Invalid argument 1
> >   Error during parsing of command line.
> 
> Works for me.
> 
> Perhaps support for 'lvm1' metadata was not compiled in, or
> not loaded from lvm.conf if you configured it shared?
> 
> Alasdair
> --
> agk@redhat.com
>

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

* Re: [linux-lvm] Unable to create lvm1 configurations
  2004-09-13  8:58   ` Stanley Yue
@ 2004-09-13 10:41     ` Alasdair G Kergon
  2004-09-13 20:39       ` Stanley Yue
  0 siblings, 1 reply; 6+ messages in thread
From: Alasdair G Kergon @ 2004-09-13 10:41 UTC (permalink / raw)
  To: Stanley Yue; +Cc: LVM general discussion and development

On Mon, Sep 13, 2004 at 01:58:14AM -0700, Stanley Yue wrote:
> with the lvm-mod and device-mapper from lvm2. I want to test out
> whether lvm2 utilities can detect configurations created from lvm1
> utilities.
 
> pvcreate -- ERROR: VGDA in kernel and lvmtab are NOT consistent;
> please run vgscan

Never run LVM2 utilities while you have LVs active under LVM1.
Never run LVM1 tools while you have LVs active under LVM2.

i.e. Never mix use of the two, and always vgchange -an before switching 
between LVM1 and LVM2.
Also, if switching back from LVM2 to LVM1 you must first reset the 
LVM1 driver with lvmchange -R followed by vgscan -f.

Alasdair
-- 
agk@redhat.com

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

* Re: [linux-lvm] Unable to create lvm1 configurations
  2004-09-13 10:41     ` Alasdair G Kergon
@ 2004-09-13 20:39       ` Stanley Yue
  2004-09-14 20:16         ` Alasdair G Kergon
  0 siblings, 1 reply; 6+ messages in thread
From: Stanley Yue @ 2004-09-13 20:39 UTC (permalink / raw)
  To: Stanley Yue, LVM general discussion and development

Thanks Alasdair, your suggestion work.

However, I'm encountering yet another problem....;p
Looks like device-mapper always return an error on "cmd 13" when I
tried to create a lv:

[root@DAP-RHLNX1 2.4.21]# lvcreate -v -L 32 -n syueVol vg00-lvm1
  device-mapper ioctl cmd 13 failed: Invalid argument
  device-mapper ioctl cmd 13 failed: Invalid argument
    Finding volume group "vg00-lvm1"
    Creating logical volume syueVol
    Archiving volume group "vg00-lvm1" metadata.
    Creating volume group backup "/etc/lvm/backup/vg00-lvm1"
    Found volume group "vg00-lvm1"
    Loading vg00--lvm1-syueVol
    Zeroing start of logical volume "syueVol"
    Creating volume group backup "/etc/lvm/backup/vg00-lvm1"
  Logical volume "syueVol" created
[root@DAP-RHLNX1 2.4.21]# 

Here are the version information:
=========================
LVM version 2.2.00.22
Device Mapper version 1.00.18

Does anyone know what the problem is?

Thanks,

Stanley


On Mon, 13 Sep 2004 11:41:34 +0100, Alasdair G Kergon <agk@redhat.com> wrote:
> On Mon, Sep 13, 2004 at 01:58:14AM -0700, Stanley Yue wrote:
> > with the lvm-mod and device-mapper from lvm2. I want to test out
> > whether lvm2 utilities can detect configurations created from lvm1
> > utilities.
> 
> > pvcreate -- ERROR: VGDA in kernel and lvmtab are NOT consistent;
> > please run vgscan
> 
> Never run LVM2 utilities while you have LVs active under LVM1.
> Never run LVM1 tools while you have LVs active under LVM2.
> 
> i.e. Never mix use of the two, and always vgchange -an before switching
> between LVM1 and LVM2.
> Also, if switching back from LVM2 to LVM1 you must first reset the
> LVM1 driver with lvmchange -R followed by vgscan -f.
> 
> Alasdair
> --
> agk@redhat.com
>

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

* Re: [linux-lvm] Unable to create lvm1 configurations
  2004-09-13 20:39       ` Stanley Yue
@ 2004-09-14 20:16         ` Alasdair G Kergon
  0 siblings, 0 replies; 6+ messages in thread
From: Alasdair G Kergon @ 2004-09-14 20:16 UTC (permalink / raw)
  To: Stanley Yue, LVM general discussion and development

On Mon, Sep 13, 2004 at 01:39:58PM -0700, Stanley Yue wrote:
>   device-mapper ioctl cmd 13 failed: Invalid argument

13 is DM_LIST_VERSIONS_CMD

Newer versions of device-mapper support this, but the tools
cope fine without it.

But it is an indication you're not running the latest kernel
and you ought to update it:-)

Alasdair
-- 
agk@redhat.com

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

end of thread, other threads:[~2004-09-14 20:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-12  6:33 [linux-lvm] Unable to create lvm1 configurations Stanley Yue
2004-09-12 11:56 ` Alasdair G Kergon
2004-09-13  8:58   ` Stanley Yue
2004-09-13 10:41     ` Alasdair G Kergon
2004-09-13 20:39       ` Stanley Yue
2004-09-14 20:16         ` Alasdair G Kergon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.