* [linux-lvm] How to recover data from a second disk in LVM.
@ 2010-11-02 22:00 Oreste
2010-11-05 15:44 ` Zdenek Kabelac
0 siblings, 1 reply; 2+ messages in thread
From: Oreste @ 2010-11-02 22:00 UTC (permalink / raw)
To: linux-lvm
[-- Attachment #1: Type: text/plain, Size: 230 bytes --]
Hi:
I has a LVM with 2 disk, first: a small SCSI and a second one,
IDE and bigger; now the first disk, the SCSI, is not functioning ...
How can I recover all the data present in the second disk???
Oreste.
[-- Attachment #2: Type: text/html, Size: 1291 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [linux-lvm] How to recover data from a second disk in LVM.
2010-11-02 22:00 [linux-lvm] How to recover data from a second disk in LVM Oreste
@ 2010-11-05 15:44 ` Zdenek Kabelac
0 siblings, 0 replies; 2+ messages in thread
From: Zdenek Kabelac @ 2010-11-05 15:44 UTC (permalink / raw)
To: linux-lvm
Dne 2.11.2010 23:00, Oreste napsal(a):
> Hi:
>
> I has a LVM with 2 disk, first: a small SCSI and a second one,
> IDE and bigger; now the first disk, the SCSI, is not functioning ...
>
> How can I recover all the data present in the second disk???
Usually depends on the layout of your LVs and filesystem used and proportion
of your lost filesystem fragments.
If shouldn't be a big problem to recover your lost PV - as your second disk
contains the whole description also of the first PV, the bigger problem is,
trying to recover filesystem - fsck when first part of it is missing isn't
trivial - but you should be able to handle that via googling - lot's of
manuals out there.
If you don't any backup of your lost metadata - you will need to retrieve them
from the beginning of your second disk - where they are stored by default.
Read first MB (dd) - and try to find text block with the largest 'version =
XXX' Save this recovered text block to file mda.txt.
Get another disk as a replacement of your lost 1st drive - initialize it with
lost PVID (pv0 { id = "aaa..aaa" } in your recovered mda.txt file)
'pvcreate -u aaa..aaa /dev/yyy'
Good idea is to 'zero' this device (dd if=/dev/zero of=/dev/yyy bs=1M) so you
will not confuse fsck repair more then necessary with unknown data.
Now just 'vgcfgrestore -f mda.txt' and active LVs 'vgchange -ay' - and you
should be able to see missing lost volumes.
Now hardest part - to recover filesystem - obviously LVs located only on
your lost pv0 are simply lost. Those spread also over pv1 could be partially
recovered - of course with major damage on files physically located on pv0.
Zdenek
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-11-05 15:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-02 22:00 [linux-lvm] How to recover data from a second disk in LVM Oreste
2010-11-05 15:44 ` Zdenek Kabelac
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).