Re: [OT?] LVM questions - I have seriously screwed my system
Craig Hagerman <craighagerman@gmail.com> writes:
> But sdb1 had ALREADY been set up. Actually I had formatted it with
> ext3, then followed the howto (pvcreate, vgcreate, lvcreate, mount) to
> set up LVM and then copied all my old data over. So I then set the
> partition type to LVM on a disc that already was set up with a VG, LV.
Changing the partition type does not touch the partition itself. It
just sets a flag in the partition table.
>
> ...now vgdisplay gives me
>
> $ vgdisplay
> Couldn't find device with uuid 'ZHl4Ak-mGS4-wFlF-4neF-G1Ed-GxWB-C4Smj6'.
> Couldn't find all physical volumes for volume group media_vg.
> Couldn't find device with uuid 'ZHl4Ak-mGS4-wFlF-4neF-G1Ed-GxWB-C4Smj6'.
> Couldn't find all physical volumes for volume group media_vg.
> Volume group "media_vg" doesn't exist
>
> ...but pvdisplay gives me encouraging news. I just don't know what to
> do with this information to try to recover.
>
> $ pvdisplay
> Couldn't find device with uuid 'ZHl4Ak-mGS4-wFlF-4neF-G1Ed-GxWB-C4Smj6'.
> --- Physical volume ---
> PV Name /dev/sdb1
> VG Name media_vg
> PV Size 233.75 GB / not usable 0
> Allocatable yes
> PE Size (KByte) 4096
> Total PE 59841
> Free PE 193
> Allocated PE 59648
> PV UUID rlnV4y-B4eJ-Pyc0-RLJm-2Zbv-t04C-dxzU1A
sdb1 is OK.
>
> --- Physical volume ---
> PV Name unknown device
> VG Name media_vg
> PV Size 186.30 GB / not usable 0
> Allocatable yes
> PE Size (KByte) 4096
> Total PE 47694
> Free PE 47694
> Allocated PE 0
> PV UUID ZHl4Ak-mGS4-wFlF-4neF-G1Ed-GxWB-C4Smj6
LVM does not find sda2. What does pvdisplay /dev/sda2 say?
I guess LVM only scans devices that have its type set to LVM. So it
might be enough to just do that for sda2.
Matthias
Reply to: