[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [linux-lvm] Need help with PV recovery



On Mon, Dec 31, 2001 at 12:48:24AM -0700, Andreas Dilger wrote:

> So, what you need to do (approximately) is (bPV = broken PV):
> # restore the LVM magic at the start of the PV (probably OK, but why not)
> dd if=/dev/<some other PV> bs=1 count=4 of=<bPV>
> # restore the UUID (obviously broken)
> echo -e "EffefHZmr5gMrsrUEM6CkDRRZC1ragTp\0" | dd bs=1 seek=44 count=33 of=<bPV>
> # restore the VG name (looks to be missing)
> echo -e "<vgname>\0" | dd bs=1 seek=172 count=<length of vgname + 1>

These three things are more or less what I did by hand, but it looks like I
must have fat-fingered something, because when I do it this way, it seems to
work (!).

> According to the UUID list, this _should_ be PV #2, is that correct?  Hard
> to see if the "system id" is OK, but I'm not sure if it is important.
> What about the output of "pvdata -PP <bPV>"?  I _assume_ that the PV
> location data is OK, or you wouldn't be getting anything from the PE and
> LV lists, but it is hard to tell for sure.

Yes, I think it was originally PV #2.  LVM doesn't seem to mind having it
show up as PV #0, though, as I am now able to activate the volume group and
access all of the LVs.  Since I have enough free space in the volume group
to pvmove everything off of the damaged PV, I am doing that right now, after
which I will recreate it fresh, to be safe.

Thanks very much for your help.

-- 
 - mdz



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]