From: "Heinz J . Mauelshagen" <mauelshagen@sistina.com>
To: linux-lvm@sistina.com
Subject: Re: [linux-lvm] PV and disk recovery
Date: Tue May 27 06:04:02 2003 [thread overview]
Message-ID: <20030527125416.B8430@sistina.com> (raw)
In-Reply-To: <1053855014.15745.10.camel@crux>; from b.medin@telia.com on Sun, May 25, 2003 at 11:30:15AM +0200
Björn,
there's 3 options you've got (loosing all data on the gone PV in any):
o the official LVM1 way (presuming you've got metadata archives in
/etc/lvmconf/ still) is to get a replacement drive (of the same size) and
vgcfgrestore the LVM metadata to it after running pvcreate.
"vgscan;vgchange -ay" activates your VG again.
You have the option to overwrite the PV size with "pvcreate -s ..." in
recent LVM1 versions.
o use LVM2; support to activate partially available VGs has been added to it
(vgchange -P -ay Volume00"). Install device-mapper and LVM2 from
www.sistina.com if you want to follow this path.
o the hacky LVM1 one, if you still have your VG backup in /etc/lvmconf
(no need for a replacement drive but taking io errors accessing the
missing PV)
- mkdir /etc/lvmtab.d
- cp /etc/lvmconf/Volume00.conf /etc/lvmtab.d
- echo -ne "Volume00\0" > /etc/lvmtab
- vgchange -ay Volume00
Once you've got access to your VG back with either of those options,
you can check the mapping of the LVs with
"lvdisplay -v /dev/Volume00/YourLVName" to find out, which parts
(logical extents) of the logical volumes address space are still accessable
(and which ones are not, because they were on the dead drive).
FYI: you ask for trouble using filesystems in case of partially
accessable LVs because typically inmportant areas of the metadata
and data will be inaccessable.
Regards,
Heinz -- The LVM Guy --
On Sun, May 25, 2003 at 11:30:15AM +0200, Björn Medin wrote:
> Hello,
>
> I had a VG with two full disks in two PV:s (/dev/hda1 and /dev/hdb1).
> The second drive, a new IBM 120GB disk fried after some weeks and
> was totally inacessable (not even recognised by BIOS).
>
> To my understanding the first PV on /dev/hda1 is OK
>
> Can I recover and get back access to my old data that was on
> /dev/hda1? I have tried various things suggested in HOWTO:s and
> this list.
>
> If I do vgscan I get:
>
> vgscan -- reading all physical volumes (this may take a while...)
> vgscan -- ERROR "vg_read_with_pv_and_lv(): current PV" can't get data of
> volume group "Volume00" 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
>
> Any command like vgchange -a y only gets: vgchange -- no volume groups
> found
>
> I have tried create a new VG: vgcreate extra /dev/hda1
>
> but I then get:
> vgcreate -- "/dev/hda1" is not a new physical volume
> vgcreate -- physical volume "/dev/hda1" already belongs to volume group
> "Volume00"
>
> -----------
>
> Seems like I dont have any config data for Volume00 left but still I am
> not allowed to use/change Volume00 or the PV.
>
> What can I do? Is there any way to reclaim possible intact data on my
> old /dev/hda1????
>
> Thanks!
>
> /Björn
>
>
>
>
>
> _______________________________________________
> 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/
*** 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
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
prev parent reply other threads:[~2003-05-27 6:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-25 4:29 [linux-lvm] PV and disk recovery Björn Medin
2003-05-27 6:04 ` Heinz J . Mauelshagen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030527125416.B8430@sistina.com \
--to=mauelshagen@sistina.com \
--cc=linux-lvm@sistina.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox