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

Re: [linux-lvm] How to find out the location of PE's



Just for clarity:

Second sector = sector 1 (counting from 0).

For the sake of completeness:

       --labelsector sector
              By  default the PV is labelled with an LVM2 identifier in
its second sector (sector 1).  This lets you use a differ‐
              ent sector near the start of the disk (between 0 and 3
inclusive - see LABEL_SCAN_SECTORS in the source).  Use 
with
              care.

Hope you can revocer you metadata - btw, did you loose your /etc dir as
well (Was it on one of the PVs?)?

Regards

-Sven

On Fri, December 30, 2011 09:20, peter bieshaar gmail com wrote:
> Sven,
>
> thanks for this information. I will investigate the MetaData, on the
> second
> sector, as you mentioned. Now I also can more easily search the code
> (using
> the LVM2 and LABELONE strings). I tried but, it's a lot
>
> Peter
>
> 2011/12/29 Sven Eschenberg <sven whgl uni-frankfurt de>
>
>> Assuming you used standard config when creating the LVM, you'll find PV
>> metadata at the very beginning of the disk (an probably nowhere else).
>>
>> There is no such thing like per PE markers, all information is stored in
>> the LVM header. Usually though there should be files in /etc holding the
>> information of the PVs/VGs/LVs as backup - assuming the rest of the disk
>> layout is still valid (i.e. PV on partition -> partition still exists)
>>
>> The LVM Metadata is in the second sector (usually) and you should see
>> something like the string LVM2 and LABELONE (for LVM 2 metadata)
>>
>> I don't know of any detailed on disk format description (except the
>> source
>> probably).
>>
>> Regards
>>
>> -Sven
>>
>>
>> On Wed, December 28, 2011 11:03, peter bieshaar gmail com wrote:
>> > Due to a hardware mistake (dvd and hdu as IDE-master ??) I lost
>> complete
>> > disk- and therefor lvm administration on SATA disks.
>> > - In other words I cannot see the partition- or PV/VG and LV
>> > administration.
>> > - So, fdisk or (pv|vg|lv)display can't give information.
>> >
>> > lvm was initiated under ubuntu 11.04 or 10.10, a recent lvm2 version
>> was
>> > installed.
>> >
>> > On one disk I tried to create a partition (without creating a
>> filesystem
>> > of-course :) ) but no pv-information was shown, using pvdisplay. I
>> didn't
>> > dare to do this on my RAID1 (md) disks.
>> > I can read the disks with strings and dd, and saw content of scripts
>> and
>> > documents. So the content/data is still on the disks.
>> >
>> > My chosen strategy to recover the LV's, is finding the PE's, pickthem
>> > up and place them in a blob on another filesystem. So I can mount -o
>> loop
>> > that blob and restructure the disks.
>> >
>> > My problem now is how to find these information. The web gives a lot
>> of
>> > information how to setup, but almost none on technical issues like
>> this.
>> >
>> > Can someone give me a hint on how this (the PE's) technically is being
>> > organized (pointer -> pointer structures??) and where and how to
>> search
>> > these on the disk. So I can write a C-thingy to accomplish my
>> strategy.
>> If
>> > someone already has something like this, or examples,
>> >
>> > --
>> > Regards,
>> >
>> > Peter Bieshaar
>> > _______________________________________________
>> > linux-lvm mailing list
>> > linux-lvm redhat com
>> > https://www.redhat.com/mailman/listinfo/linux-lvm
>> > read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>>
>>
>> _______________________________________________
>> linux-lvm mailing list
>> linux-lvm redhat com
>> https://www.redhat.com/mailman/listinfo/linux-lvm
>> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>>
>
>
>
> --
> Regards/Met vriendelijke groet,
>
> Peter Bieshaar
> ------------------------------------------
> "FATAL ERROR" in large friendly letters
> _______________________________________________
> linux-lvm mailing list
> linux-lvm redhat com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/



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