linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] why can create the volumn group by vgcreate ?
@ 2006-07-09  7:24 zhihang wang
  2006-07-09 13:33 ` [linux-lvm] Fwd: " zhihang wang
  0 siblings, 1 reply; 5+ messages in thread
From: zhihang wang @ 2006-07-09  7:24 UTC (permalink / raw)
  To: linux-lvm

[-- Attachment #1: Type: text/plain, Size: 1488 bytes --]

The partition of my hard disk is as follows:
Disk /dev/hda: 60.0 GB, 60011642880 bytes
255 heads, 63 sectors/track, 7296 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1        3825    30724281    c  W95 FAT32 (LBA)
/dev/hda2            3826        6938    25005172+  8e  Linux LVM
/dev/hda3            7210        7296      698827+   5  Extended
/dev/hda4            6939        7209     2176807+  83  Linux
/dev/hda5            7210        7296      698796   82  Linux swap / Solaris

Partition table entries are not in disk order


I use the pvcreate /dev/hda2 command to create a phyisical volumn
and use pvdisplay /dev/hda2 to display the physical volumn information

sudo pvdisplay /dev/hda2
  --- NEW Physical volume ---
  PV Name               /dev/evms/hda2
  VG Name
  PV Size               23.85 GB
  Allocatable           NO
  PE Size (KByte)       0
  Total PE              0
  Free PE               0
  Allocated PE          0
  PV UUID               kQba0Y-02Lk-VLB8-XhhV-GY1Z-RXEg-J8OXR9


But when I use the *sudo vgcreate test /dev/hda2* command to create a
volumn group, an error occure.
the error message is:
 No physical volume label read from /dev/hda2
  /dev/hda2 not identified as an existing physical volume
  Unable to add physical volume '/dev/hda2' to volume group 'test'.


Why can't find physical volume label from /dev/hda2?


-- 
Best Regards
zhihang wang

[-- Attachment #2: Type: text/html, Size: 2916 bytes --]

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

* [linux-lvm] Fwd: why can create the volumn group by vgcreate ?
  2006-07-09  7:24 [linux-lvm] why can create the volumn group by vgcreate ? zhihang wang
@ 2006-07-09 13:33 ` zhihang wang
  2006-07-09 15:21   ` Luca Berra
  2006-07-09 21:58   ` [linux-lvm] vgscan -- ERROR "pv_read_pe(): PV size invalid" Simon Klaiber
  0 siblings, 2 replies; 5+ messages in thread
From: zhihang wang @ 2006-07-09 13:33 UTC (permalink / raw)
  To: linux-lvm

[-- Attachment #1: Type: text/plain, Size: 1712 bytes --]

---------- Forwarded message ----------
From: zhihang wang <zhihang.wang@gmail.com>
Date: Jul 9, 2006 3:24 PM
Subject: why can create the volumn group by vgcreate ?
To: linux-lvm@redhat.com

The partition of my hard disk is as follows:
Disk /dev/hda: 60.0 GB, 60011642880 bytes
255 heads, 63 sectors/track, 7296 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1        3825    30724281    c  W95 FAT32 (LBA)
/dev/hda2            3826        6938    25005172+  8e  Linux LVM
/dev/hda3            7210        7296      698827+   5  Extended
/dev/hda4            6939        7209     2176807+  83  Linux
/dev/hda5            7210        7296      698796   82  Linux swap / Solaris

Partition table entries are not in disk order


I use the pvcreate /dev/hda2 command to create a phyisical volumn
and use pvdisplay /dev/hda2 to display the physical volumn information

sudo pvdisplay /dev/hda2
  --- NEW Physical volume ---
  PV Name               /dev/evms/hda2
  VG Name
  PV Size               23.85 GB
  Allocatable           NO
  PE Size (KByte)       0
  Total PE              0
  Free PE               0
  Allocated PE          0
  PV UUID               kQba0Y-02Lk-VLB8-XhhV-GY1Z-RXEg-J8OXR9


But when I use the *sudo vgcreate test /dev/hda2* command to create a
volumn group, an error occure.
the error message is:
 No physical volume label read from /dev/hda2
  /dev/hda2 not identified as an existing physical volume
  Unable to add physical volume '/dev/hda2' to volume group 'test'.


Why can't find physical volume label from /dev/hda2?


-- 
Best Regards

zhihang wang


-- 
Best Regards
zhihang wang

[-- Attachment #2: Type: text/html, Size: 3408 bytes --]

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

* Re: [linux-lvm] Fwd: why can create the volumn group by vgcreate ?
  2006-07-09 13:33 ` [linux-lvm] Fwd: " zhihang wang
@ 2006-07-09 15:21   ` Luca Berra
  2006-07-09 21:58   ` [linux-lvm] vgscan -- ERROR "pv_read_pe(): PV size invalid" Simon Klaiber
  1 sibling, 0 replies; 5+ messages in thread
From: Luca Berra @ 2006-07-09 15:21 UTC (permalink / raw)
  To: linux-lvm

On Sun, Jul 09, 2006 at 09:33:14PM +0800, zhihang wang wrote:
>sudo pvdisplay /dev/hda2
>  --- NEW Physical volume ---
>  PV Name               /dev/evms/hda2
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

>
>Why can't find physical volume label from /dev/hda2?

Because you are using evms.
try using /dev/evms/hda2 as a device name instead.

L.

-- 
Luca Berra -- bluca@comedia.it
        Communication Media & Services S.r.l.
 /"\
 \ /     ASCII RIBBON CAMPAIGN
  X        AGAINST HTML MAIL
 / \

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

* [linux-lvm] vgscan -- ERROR "pv_read_pe(): PV size invalid"  ...
  2006-07-09 13:33 ` [linux-lvm] Fwd: " zhihang wang
  2006-07-09 15:21   ` Luca Berra
@ 2006-07-09 21:58   ` Simon Klaiber
  2006-07-13  8:42     ` Simon Klaiber
  1 sibling, 1 reply; 5+ messages in thread
From: Simon Klaiber @ 2006-07-09 21:58 UTC (permalink / raw)
  To: LVM general discussion and development

I have following problem:

I'm running  lvm on a Linux 2.4.20 Kernel since 2 Years now without
problems

There is only one PV a Software RAID5 (/dev/md0) consiting out of 6 Disks

No I had to exchage the motherboard due to a hw failure.

After this exchage the Software Raid found 5 of the 6 Disks and
started without redudancy.
At this point the lvm was still working correct.

I hot added the missing Drive to the RAID again which worked fine.

After that i reebootet the system for other reasons.

The result:

The Raid still work fine but vgscan Fails with following error:

----------------
vgscan -- reading all physical volumes (this may take a while...)
vgscan -- ERROR "pv_read_pe(): PV size invalid" can't get data of
volume group "fileserver" from physical volume(s)
vgscan -- "/etc/lvmtab" and "/etc/lvmtab.d" successfully created
vgscan -- WARNING: This program does not do a VGDA backup of your
volume group
----------------

Does anyone knows how I can recover from this error and save my data.

Thanks and greetings from Germany
Simon

Additional Information:

1) --------- Version of LVM ------------
Logical Volume Manager 1.0.6(mp-v6)
Heinz Mauelshagen, Sistina Software  25/10/2002 (IOP 10)

2) --------- possibility of update  ------------
I cannot do any updates that include Kernel updates since the hdd
controlor runs only with this kernel version

3) --------- Result of pvscan  ------------
pvscan -- reading all physical volumes (this may take a while...)
pvscan -- inactive PV "/dev/md0"  is associated to unknown VG
"fileserver" (run vgscan)
pvscan -- total: 1 [8.02 GB] / in use: 1 [8.02 GB] / in no VG: 0 [0]


4) --------- Result of pvdisplay /dev/md0  ------------
--- Physical volume ---
PV Name               /dev/md0
VG Name               fileserver
PV Size               931.55 GB [1953606400 secs] / NOT usable 32.25
MB [LVM: 244 KB]
PV#                   1
PV Status             available
Allocatable           yes
Cur LV                10
PE Size (KByte)       32768
Total PE              29808
Free PE               2256
Allocated PE          27552
PV UUID               5fK20C-BzqI-6PIc-nj8b-3DTD-TJ3p-0uJpn4


5) --------- Result of pvdata /dev/md0  ------------
--- Physical volume ---
PV Name               /dev/md0
VG Name               fileserver
PV Size               931.55 GB [1953606400 secs] / NOT usable 32.25
MB [LVM: 244 KB]
PV#                   1
PV Status             available
Allocatable           yes
Cur LV                10
PE Size (KByte)       32768
Total PE              29808
Free PE               2256
Allocated PE          27552
PV UUID               5fK20C-BzqI-6PIc-nj8b-3DTD-TJ3p-0uJpn4

--- Volume group ---
VG Name
VG Access             read/write
VG Status             NOT available/resizable
VG #                  0
MAX LV                256
Cur LV                10
Open LV               0
MAX LV Size           2 TB
Max PV                256
Cur PV                1
Act PV                1
VG Size               931.50 GB
PE Size               32 MB
Total PE              29808
Alloc PE / Size       27552 / 861 GB
Free  PE / Size       2256 / 70.50 GB
VG UUID               mDIV2I-dJd3-0oJW-XJt3-nHI7-sAjv-8bs8pj

--- List of logical volumes ---

pvdata -- logical volume "/dev/fileserver/db" at offset   0
pvdata -- logical volume "/dev/fileserver/docs" at offset   1
pvdata -- logical volume "/dev/fileserver/code" at offset   2
pvdata -- logical volume "/dev/fileserver/pics" at offset   3
pvdata -- logical volume "/dev/fileserver/mp3" at offset   4
pvdata -- logical volume "/dev/fileserver/arch" at offset   5
pvdata -- logical volume "/dev/fileserver/pg" at offset   6
pvdata -- logical volume "/dev/fileserver/pt" at offset   7
pvdata -- logical volume "/dev/fileserver/bak" at offset   8
pvdata -- logical volume struct at offset   9 is empty
pvdata -- logical volume "/dev/fileserver/films" at offset  10
pvdata -- logical volume struct at offset  11 is empty
pvdata -- logical volume struct at offset  12 is empty
pvdata -- logical volume struct at offset  13 is empty
[..... empty volums structs cut out ...]
pvdata -- logical volume struct at offset 254 is empty
pvdata -- logical volume struct at offset 255 is empty
--- List of physical volume UUIDs ---

001: 5fK20C-BzqI-6PIc-nj8b-3DTD-TJ3p-0uJpn4



6) --------- Result vgscan -d (DEBUG MODE)  ------------
<1> lvm_get_iop_version -- CALLED
<22> lvm_check_special -- CALLED
<22> lvm_check_special -- LEAVING
[... a lot lines cut out ...]
<333> vg_check_name -- CALLED with VG: fileserver
<4444> lvm_check_chars -- CALLED with name: "fileserver"
<4444> lvm_check_chars -- LEAVING with ret: 0
<333> vg_check_name -- LEAVING with ret: 0
<333> pv_read_all_pv_of_vg -- CALLED with vg_name: "fileserver"
<4444> vg_check_name -- CALLED with VG: fileserver
<55555> lvm_check_chars -- CALLED with name: "fileserver"
<55555> lvm_check_chars -- LEAVING with ret: 0
<4444> vg_check_name -- LEAVING with ret: 0
<333> pv_read_all_pv_of_vg -- LEAVING with ret: 0
<22> pv_read_all_pe_of_vg -- pv_count: 1
<333> pv_read_pe -- CALLED with /dev/md0 and 4024434688
<333> pv_read_pe -- LEAVING with ret: -277
<22> pv_read_all_pe_of_vg -- LEAVING with ret: -277
<1> vg_read_with_pv_and_lv -- LEAVING with ret: -277
<1> lvm_error -- CALLED with: -277
<1> lvm_error -- LEAVING with: "pv_read_pe(): PV size invalid"
vgscan -- ERROR "pv_read_pe(): PV size invalid" can't get data of
volume group "fileserver" from physical volume(s)
<1> vg_free -- CALLED
<1> vg_free -- LEAVING with ret: -99
<1> lvm_interrupt -- CALLED
<1> lvm_interrupt -- LEAVING
<1> lvm_unlock -- CALLED
<1> lvm_unlock -- LEAVING with ret: 0
<1> lvm_unlock -- CALLED
<1> lvm_unlock -- LEAVING with ret: -104
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

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

* Re: [linux-lvm] vgscan -- ERROR "pv_read_pe(): PV size invalid" ...
  2006-07-09 21:58   ` [linux-lvm] vgscan -- ERROR "pv_read_pe(): PV size invalid" Simon Klaiber
@ 2006-07-13  8:42     ` Simon Klaiber
  0 siblings, 0 replies; 5+ messages in thread
From: Simon Klaiber @ 2006-07-13  8:42 UTC (permalink / raw)
  To: LVM general discussion and development

After many tries I still have found no solution for my problem.
I'm getting real desperate beacuse there is some important data on the
vg and for some newer stuff i don't have a backup.
I don't care if i can't bring back the vg to fully functional but I need
at least a solution that allows me to copy the files to other disks.

I'm pretty sure that all data is still there also the data i can see
with pvdisplay/pvdata looks good.

I have valid lvmconf files for the fileserver vg and can play them in
using vgcfgrestore

I just don't have an recent backup of lvmtab and lvmtab.d (i think the
most recent one was before the last chage of the LVs.
Can I destroy somethin when I try to activate the VG using these old files?

What is a bit strange to me is the
<333> pv_read_pe -- CALLED with /dev/md0 and 4024434688
Part of the debug information since I don't understand what this (IMHO
to big number means)

It is produce by this source code

debug_enter ( "pv_read_pe -- CALLED with %s and %lu\n",
                 pv != NULL ? pv->pv_name : "NULL",
                 pv != NULL ? pv->pe_total : 0);

and i just cant bring together this number with what i see in pvdisplay

The second thing I don't understand is the exact cause of the error:

The error number is defined as:

#define
LVM_EPV_READ_PE_SIZE                                                277

and the point where it is thrown looks like this:

size = pv->pe_total * sizeof ( pe_disk_t);
   if ( size + pv->pe_on_disk.base > LVM_VGDA_SIZE ( pv)) {
      ret = -LVM_EPV_READ_PE_SIZE;
      goto pv_read_pe_end;
   }

where is defined as
#define    LVM_VGDA_SIZE(pv) ((pv)->pe_on_disk.base + (pv)->pe_on_disk.size)

This means that  pe_on_disk_size is smaller than size

I coud not find out what sizeof ( pe_disk_t) stnds for but it still let
me assume that pv->pe_total is to big

What could have caused this problem?

I would be very happy about any kind of help!

Thanks Simon





Simon Klaiber wrote:

>I have following problem:
>
>I'm running  lvm on a Linux 2.4.20 Kernel since 2 Years now without
>problems
>
>There is only one PV a Software RAID5 (/dev/md0) consiting out of 6 Disks
>
>No I had to exchage the motherboard due to a hw failure.
>
>After this exchage the Software Raid found 5 of the 6 Disks and
>started without redudancy.
>At this point the lvm was still working correct.
>
>I hot added the missing Drive to the RAID again which worked fine.
>
>After that i reebootet the system for other reasons.
>
>The result:
>
>The Raid still work fine but vgscan Fails with following error:
>
>----------------
>vgscan -- reading all physical volumes (this may take a while...)
>vgscan -- ERROR "pv_read_pe(): PV size invalid" can't get data of
>volume group "fileserver" from physical volume(s)
>vgscan -- "/etc/lvmtab" and "/etc/lvmtab.d" successfully created
>vgscan -- WARNING: This program does not do a VGDA backup of your
>volume group
>----------------
>
>Does anyone knows how I can recover from this error and save my data.
>
>Thanks and greetings from Germany
>Simon
>
>Additional Information:
>
>1) --------- Version of LVM ------------
>Logical Volume Manager 1.0.6(mp-v6)
>Heinz Mauelshagen, Sistina Software  25/10/2002 (IOP 10)
>
>2) --------- possibility of update  ------------
>I cannot do any updates that include Kernel updates since the hdd
>controlor runs only with this kernel version
>
>3) --------- Result of pvscan  ------------
>pvscan -- reading all physical volumes (this may take a while...)
>pvscan -- inactive PV "/dev/md0"  is associated to unknown VG
>"fileserver" (run vgscan)
>pvscan -- total: 1 [8.02 GB] / in use: 1 [8.02 GB] / in no VG: 0 [0]
>
>
>4) --------- Result of pvdisplay /dev/md0  ------------
>--- Physical volume ---
>PV Name               /dev/md0
>VG Name               fileserver
>PV Size               931.55 GB [1953606400 secs] / NOT usable 32.25
>MB [LVM: 244 KB]
>PV#                   1
>PV Status             available
>Allocatable           yes
>Cur LV                10
>PE Size (KByte)       32768
>Total PE              29808
>Free PE               2256
>Allocated PE          27552
>PV UUID               5fK20C-BzqI-6PIc-nj8b-3DTD-TJ3p-0uJpn4
>
>
>5) --------- Result of pvdata /dev/md0  ------------
>--- Physical volume ---
>PV Name               /dev/md0
>VG Name               fileserver
>PV Size               931.55 GB [1953606400 secs] / NOT usable 32.25
>MB [LVM: 244 KB]
>PV#                   1
>PV Status             available
>Allocatable           yes
>Cur LV                10
>PE Size (KByte)       32768
>Total PE              29808
>Free PE               2256
>Allocated PE          27552
>PV UUID               5fK20C-BzqI-6PIc-nj8b-3DTD-TJ3p-0uJpn4
>
>--- Volume group ---
>VG Name
>VG Access             read/write
>VG Status             NOT available/resizable
>VG #                  0
>MAX LV                256
>Cur LV                10
>Open LV               0
>MAX LV Size           2 TB
>Max PV                256
>Cur PV                1
>Act PV                1
>VG Size               931.50 GB
>PE Size               32 MB
>Total PE              29808
>Alloc PE / Size       27552 / 861 GB
>Free  PE / Size       2256 / 70.50 GB
>VG UUID               mDIV2I-dJd3-0oJW-XJt3-nHI7-sAjv-8bs8pj
>
>--- List of logical volumes ---
>
>pvdata -- logical volume "/dev/fileserver/db" at offset   0
>pvdata -- logical volume "/dev/fileserver/docs" at offset   1
>pvdata -- logical volume "/dev/fileserver/code" at offset   2
>pvdata -- logical volume "/dev/fileserver/pics" at offset   3
>pvdata -- logical volume "/dev/fileserver/mp3" at offset   4
>pvdata -- logical volume "/dev/fileserver/arch" at offset   5
>pvdata -- logical volume "/dev/fileserver/pg" at offset   6
>pvdata -- logical volume "/dev/fileserver/pt" at offset   7
>pvdata -- logical volume "/dev/fileserver/bak" at offset   8
>pvdata -- logical volume struct at offset   9 is empty
>pvdata -- logical volume "/dev/fileserver/films" at offset  10
>pvdata -- logical volume struct at offset  11 is empty
>pvdata -- logical volume struct at offset  12 is empty
>pvdata -- logical volume struct at offset  13 is empty
>[..... empty volums structs cut out ...]
>pvdata -- logical volume struct at offset 254 is empty
>pvdata -- logical volume struct at offset 255 is empty
>--- List of physical volume UUIDs ---
>
>001: 5fK20C-BzqI-6PIc-nj8b-3DTD-TJ3p-0uJpn4
>
>
>
>6) --------- Result vgscan -d (DEBUG MODE)  ------------
><1> lvm_get_iop_version -- CALLED
><22> lvm_check_special -- CALLED
><22> lvm_check_special -- LEAVING
>[... a lot lines cut out ...]
><333> vg_check_name -- CALLED with VG: fileserver
><4444> lvm_check_chars -- CALLED with name: "fileserver"
><4444> lvm_check_chars -- LEAVING with ret: 0
><333> vg_check_name -- LEAVING with ret: 0
><333> pv_read_all_pv_of_vg -- CALLED with vg_name: "fileserver"
><4444> vg_check_name -- CALLED with VG: fileserver
><55555> lvm_check_chars -- CALLED with name: "fileserver"
><55555> lvm_check_chars -- LEAVING with ret: 0
><4444> vg_check_name -- LEAVING with ret: 0
><333> pv_read_all_pv_of_vg -- LEAVING with ret: 0
><22> pv_read_all_pe_of_vg -- pv_count: 1
><333> pv_read_pe -- CALLED with /dev/md0 and 4024434688
><333> pv_read_pe -- LEAVING with ret: -277
><22> pv_read_all_pe_of_vg -- LEAVING with ret: -277
><1> vg_read_with_pv_and_lv -- LEAVING with ret: -277
><1> lvm_error -- CALLED with: -277
><1> lvm_error -- LEAVING with: "pv_read_pe(): PV size invalid"
>vgscan -- ERROR "pv_read_pe(): PV size invalid" can't get data of
>volume group "fileserver" from physical volume(s)
><1> vg_free -- CALLED
><1> vg_free -- LEAVING with ret: -99
><1> lvm_interrupt -- CALLED
><1> lvm_interrupt -- LEAVING
><1> lvm_unlock -- CALLED
><1> lvm_unlock -- LEAVING with ret: 0
><1> lvm_unlock -- CALLED
><1> lvm_unlock -- LEAVING with ret: -104
>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
>
>
>_______________________________________________
>linux-lvm mailing list
>linux-lvm@redhat.com
>https://www.redhat.com/mailman/listinfo/linux-lvm
>read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>
>  
>

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

end of thread, other threads:[~2006-07-13  8:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-09  7:24 [linux-lvm] why can create the volumn group by vgcreate ? zhihang wang
2006-07-09 13:33 ` [linux-lvm] Fwd: " zhihang wang
2006-07-09 15:21   ` Luca Berra
2006-07-09 21:58   ` [linux-lvm] vgscan -- ERROR "pv_read_pe(): PV size invalid" Simon Klaiber
2006-07-13  8:42     ` Simon Klaiber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).