[linux-lvm] accidently formatted a physical volume...

Adam McDaniel adamm at array.org
Tue Aug 20 12:56:01 UTC 2002


On Mon, Aug 19, 2002 at 03:49:46PM -0500, Kirby C. Bohling wrote:
> I'd imagine that doing a vgcfgrestore to the device, followed by 
> mounting the filesystem without fsck'ing it will get you some data. 

Unfortunatly, I don't have any data for vgcfgrestore to build upon.
Here's the current status:

/dev/loop0 is pointing to /root/lvm/hde1
/dev/loop1 is pointing to /root/lvm/hdf1
(built via 'dd if=/dev/hd?1 of=/root/lvm/hd?1')

/dev/loop0 is the good image
/dev/loop1 is the fubar'd one.

pvdisplay /dev/loop0:

---
PV Name               /dev/loop0
VG Name               data
PV Size               14.31 GB [30009357 secs] / NOT usable 1.01 MB [LVM: 135 KB]
PV#                   2
PV Status             available
Allocatable           yes (but full)
Cur LV                1
PE Size (KByte)       4096
Total PE              3663
Free PE               0
Allocated PE          3663
PV UUID               3IRYim-Lpgb-2N1Y-6TPu-C8mZ-58hy-exlmBm
---

pvdisplay /dev/loop1:

---
PV Name               /dev/loop1
VG Name               data
PV Size               9.44 GB [19792017 secs] / NOT usable 4.07 MB [LVM: 130 KB]
PV#                   1
PV Status             available
Allocatable           yes (but full)
Cur LV                1
PE Size (KByte)       4096
Total PE              2415
Free PE               0
Allocated PE          2415
PV UUID               P7xAxa-J36q-2C8i-2vKc-5KJO-2tQ6-H3eGiz
---

First I tried running pvscan:

---
pvscan -- reading all physical volumes (this may take a while...)
pvscan -- inactive PV "/dev/loop0"  is associated to unknown VG "data" (run vgscan)
pvscan -- inactive PV "/dev/loop1"  is associated to unknown VG "data" (run vgscan)
pvscan -- total: 2 [23.75 GB] / in use: 2 [23.75 GB] / in no VG: 0 [0]
---

fair enough.. so I run 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 -- scanning for all active volume group(s) first
vgscan -- reading data of volume group "data" from physical volume(s)
vgscan -- ERROR "vg_read_with_pv_and_lv(): current PV" can't get data of volume group "data" 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
---

ofcourse /etc/lvmtab and /etc/lvmtab.d/* are all blank/empty.

If anything, I'm just about at the point where the dead drive is a
writeoff (/dev/loop1).. but I would like to try to salvage the data on
/dev/loop0

Any ideas?

Thanks.

-- 
Adam McDaniel
Array Networks
Calgary, AB, Canada
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/linux-lvm/attachments/20020820/ee688d2e/attachment.sig>


More information about the linux-lvm mailing list