* [linux-lvm] Advice needed: vgscan -- ERROR "vg_read_with_pv_and_lv(): current PV" can't get data of volume group "vg0" from physical volume(s)
@ 2002-11-19 3:05 James Longworth
2002-11-19 4:38 ` Heinz J . Mauelshagen
0 siblings, 1 reply; 2+ messages in thread
From: James Longworth @ 2002-11-19 3:05 UTC (permalink / raw)
To: Linux-LVM
Hi,
I got your email address from the LVM man pages, hopefully I'm emailing
the right person.
I have an LVM device that has lost its LVM data.
The error I'm getting is vgscan -- ERROR "vg_read_with_pv_and_lv():
current PV" can't get data of volume group "vg0" from physical volume(s)
I haven't tried recreating any of the devices because I didn't want to
risk overwriting any data on the disks.
Can you point me at some documentation on rescuing an LVM partition, or
if you have time, possibly give me some advice on where to start?
It would be greatly appreciated.
James
--
James Longworth
longi@unimelb.edu.au
(03) 8344-3361
"Working for Melbourne University gives people real incentives to want
things that nobody else wants." -- Apologies to Andy Warhol.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [linux-lvm] Advice needed: vgscan -- ERROR "vg_read_with_pv_and_lv(): current PV" can't get data of volume group "vg0" from physical volume(s)
2002-11-19 3:05 [linux-lvm] Advice needed: vgscan -- ERROR "vg_read_with_pv_and_lv(): current PV" can't get data of volume group "vg0" from physical volume(s) James Longworth
@ 2002-11-19 4:38 ` Heinz J . Mauelshagen
0 siblings, 0 replies; 2+ messages in thread
From: Heinz J . Mauelshagen @ 2002-11-19 4:38 UTC (permalink / raw)
To: linux-lvm
On Tue, Nov 19, 2002 at 08:03:48PM +1100, James Longworth wrote:
> Hi,
>
> I got your email address from the LVM man pages, hopefully I'm emailing
> the right person.
>
> I have an LVM device that has lost its LVM data.
James,
how did that happen ?
Accidential overwrite or something (i.e. written an MBR) ?
>
> The error I'm getting is vgscan -- ERROR "vg_read_with_pv_and_lv():
> current PV" can't get data of volume group "vg0" from physical volume(s)
>
> I haven't tried recreating any of the devices because I didn't want to
> risk overwriting any data on the disks.
>
> Can you point me at some documentation on rescuing an LVM partition, or
> if you have time, possibly give me some advice on where to start?
Use vgcfgrestore (presuming that /etc/lvmconf/vg0.conf still exists)
to restore the metadata to the physical volume(s).
First of all, please save all the hopefully still existing rest of the
LVM metadata by "dd if=/dev/YourPV of=YourPV.vgda bs=1k count=4k" and copy
that to backup media.
Insert _all_ your physical volume device pathes (i.e. /dev/hdb1) in sequence
for "YourPV".
To list which ones that were (presumably _no_ hardware reconfiguration happend):
# vgcfgrestore -ll -n vg0 -f /etc/lvmconf/vg0.conf
Do the actual restore:
# pvcreate -ff /dev/YourPV
# vgcfgrestore -n vg0 -f /etc/lvmconf/vg0.conf /dev/YourPV
# vgscan
# vgchange -ay
No you volume group should be back to life.
If more than just the LVM metadata area at the beginning of a PV has been
overwritten, you'll loose data (filesystem or whatever is in logical volumes)
too :(
>
> It would be greatly appreciated.
>
> James
>
> --
> James Longworth
> longi@unimelb.edu.au
> (03) 8344-3361
> "Working for Melbourne University gives people real incentives to want
> things that nobody else wants." -- Apologies to Andy Warhol.
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@sistina.com
> http://lists.sistina.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
--
Regards,
Heinz -- The LVM Guy --
*** Software bugs are stupid.
Nevertheless it needs not so stupid people to solve them ***
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Heinz Mauelshagen Sistina Software Inc.
Senior Consultant/Developer Am Sonnenhang 11
56242 Marienrachdorf
Germany
Mauelshagen@Sistina.com +49 2626 141200
FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-11-19 4:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-19 3:05 [linux-lvm] Advice needed: vgscan -- ERROR "vg_read_with_pv_and_lv(): current PV" can't get data of volume group "vg0" from physical volume(s) James Longworth
2002-11-19 4:38 ` Heinz J . Mauelshagen
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).