[mythtv-users] LVM Problem -- Please Help

Austin Roberts mythtv at ausiv.com
Thu Sep 14 03:06:15 UTC 2006


>
> Greetings to all:
> This followup is for the benefit of those who may run into a similar
> problem in the future.  I was, at last, able to solve this problem.  I was
> right all along...the data was there.  So when I started experimenting with
> the archive files associated with LVM, I stumbled on success.  Someone
> suggested "vgcfgrestore" might work; however, I had to use trial & error
> with the -t (test) parameter in order to figure this out.  By that I mean
> reading the LVM HowTo and various man pages did not clarify much for me.  So
> here are the steps that I took:
> --------------------------------------------------------
> [root at mythserver lvm]# vgcfgrestore -tf
> /etc/lvm/archive/VolGroup00_00000.vg
>   Test mode: Metadata will NOT be updated.
>   Please specify a *single* volume group to restore.
> [root at mythserver lvm]# vgcfgrestore -tf
> /etc/lvm/archive/VolGroup00_00000.vg Vol
> Group00
>   Test mode: Metadata will NOT be updated.
>   Restored volume group VolGroup00
> [root at mythserver lvm]# vgcfgrestore -tvf
> /etc/lvm/archive/VolGroup00_00000.vg Vo
> lGroup00
>   Test mode: Metadata will NOT be updated.
>   Restored volume group VolGroup00
>     Test mode: Wiping internal cache
>     Wiping internal VG cache
> [root at mythserver lvm]# vgcfgrestore -tvvf
> /etc/lvm/archive/VolGroup00_00000.vg V
> olGroup00
>   Test mode: Metadata will NOT be updated.
>       Setting global/locking_type to  1
>       Setting global/locking_dir to /var/lock/lvm
>       File-based locking enabled.
>       Locking /var/lock/lvm/P_orphans WB
>       Locking /var/lock/lvm/V_VolGroup00 W
>       /dev/hda1: No label detected
>       /dev/hda2: No label detected
>       /dev/hda3: No label detected
>       /dev/hda5: lvm2 label detected
>       /dev/hdb: lvm2 label detected
>       /dev/hda5: lvm2 label detected
>       /dev/hdb: lvm2 label detected
>   Restored volume group VolGroup00
>       Unlocking /var/lock/lvm/V_VolGroup00
>       Unlocking /var/lock/lvm/P_orphans
>     Test mode: Wiping internal  cache
>     Wiping internal VG cache
> [root at mythserver lvm]# vgcfgrestore -vvf
> /etc/lvm/archive/VolGroup00_00000.vg Vo
> lGroup00
>       Setting global/locking_type to 1
>       Setting global/locking_dir to /var/lock/lvm
>       File-based locking enabled.
>       Locking /var/lock/lvm/P_orphans WB
>       Locking /var/lock/lvm/V_VolGroup00 W
>       /dev/hda1: No label detected
>       /dev/hda2: No label detected
>       /dev/hda3: No label detected
>       /dev/hda5: lvm2 label detected
>       /dev/hdb: lvm2 label detected
>       /dev/hda5: lvm2 label detected
>       /dev/hdb: lvm2 label detected
>   Restored volume group  VolGroup00
>       Unlocking /var/lock/lvm/V_VolGroup00
>       Unlocking /var/lock/lvm/P_orphans
> [root at mythserver lvm]# lvscan
>   inactive          '/dev/VolGroup00/LogVol00' [364.21 GB] inherit
> [root at mythserver lvm]# lvchange -tv -ay /dev/VolGroup00/LogVol00
>   Test mode: Metadata will NOT be updated.
>     Using logical volume(s) on command line
>     Activating logical volume "LogVol00"
>     Found volume group "VolGroup00"
>     Test mode: Wiping internal cache
>     Wiping internal VG cache
> [root at mythserver lvm]# lvchange -v -ay /dev/VolGroup00/LogVol00
>     Using logical volume(s) on command line
>     Activating logical volume "LogVol00"
>     Found volume group "VolGroup00"
>     Loading  VolGroup00-LogVol00
> [root at mythserver lvm]# mount -a
> ------------------------------------------------------------------------
> That did it!  We were able to copy our data off the volume and recover the
> whole system.  I hope this helps someone else down the road.
>
> -Tom-
>

Tom:
Today I did something silly that puts me in a perdicament similar to yours.


More information about the mythtv-users mailing list