[mythtv-users] LVM Problem -- Please Help
Tom+Dale
tdmyth at yahoo.com
Tue Sep 12 01:31:08 EDT 2006
Tom+Dale <tdmyth at yahoo.com> wrote: "gLaNDix (Jesse Kaufman)" <glandix at lloydnet.org> wrote: Tom+Dale wrote:
> Now I didn't know what else to try so I guessed at a few commands
> without any succes. I'm floundering here...can anyone suggest anything
> else to try? Did I somehow lose the data? It seems to me that I should
> be able to access it still. I feel like I just need to tell the system
> how to find the logical volume LogVol00. It doesn't show up under /dev,
> but I don't know if that matters.
it looks like most of what i'm seeing is vg* and pv* commands ... have
you tried any of the lv* commands? for instance, lvdiskscan, lvscan,
lvdisplay, or lvchange? for details on them, read the man pages, since
i just quickly ran through a few that looked like they might be related
to figuring more info out
-g-
Thanks for the response. I guess I should have mentioned the results from lv* commands I tried (lvdiskscan appears not to be a Fedora command). I'm afraid to do anything with lvcreate because I don't want to step on what's there--unless I am misunderstanding how things work. It looks to me like the volume group is there, but the system can't find or doesn't know the label. I wonder how to tell it that the label was LogVol00.
Here are some results:
[root at mythserver ~]# lvchange -vvvay /dev/VolGroup00/LogVol00
Processing: lvchange -vvvay /dev/VolGroup00/LogVol00
O_DIRECT will be used
Setting global/locking_type to 1
Setting global/locking_dir to /var/lock/lvm
File-based locking enabled.
Using logical volume(s) on command line
Locking /var/lock/lvm/V_VolGroup00 WB
Opened /dev/sda RW
/dev/sda: block size is 4096 bytes
/dev/sda: No label detected
Opened /dev/hda1 RW
/dev/hda1: block size is 1024 bytes
/dev/hda1: No label detected
Opened /dev/hda2 RW
/dev/hda2: block size is 4096 bytes
/dev/hda2: No label detected
Opened /dev/hda3 RW
/dev/hda3: block size is 4096 bytes
/dev/hda3: No label detected
Opened /dev/hda5 RW
/dev/hda5: block size is 512 bytes
/dev/hda5: lvm2 label detected
lvmcache: /dev/hda5 now orphaned
lvmcache: /dev/hda5 now in VG VolGroup00
Opened /dev/hdb RW
/dev/hdb: block size is 4096 bytes
/dev/hdb: lvm2 label detected
lvmcache: /dev/hdb now orphaned
lvmcache: /dev/hdb now in VG VolGroup00
/dev/hda5: lvm2 label detected
/dev/hdb: lvm2 label detected
/dev/hda5: lvm2 label detected
/dev/hdb: lvm2 label detected
Read VolGroup00 metadata (11) from /dev/hda5 at 18944 size 720
/dev/hda5: lvm2 label detected
/dev/hdb: lvm2 label detected
Read VolGroup00 metadata (11) from /dev/hdb at 16896 size 720
One or more specified logical volume(s) not found.
Unlocking /var/lock/lvm/V_VolGroup00
Closed /dev/sda
Closed /dev/hda1
Closed /dev/hda2
Closed /dev/hda3
Closed /dev/hda5
Closed /dev/hdb
[root at mythserver ~]# lvscan -vvv
Processing: lvscan -vvv
O_DIRECT will be used
Setting global/locking_type to 1
Setting global/locking_dir to /var/lock/lvm
File-based locking enabled.
Finding all logical volumes
Opened /dev/sda RO
/dev/sda: block size is 4096 bytes
/dev/sda: No label detected
Closed /dev/sda
Opened /dev/hda1 RO
/dev/hda1: block size is 1024 bytes
/dev/hda1: No label detected
Closed /dev/hda1
Opened /dev/hda2 RO
/dev/hda2: block size is 4096 bytes
/dev/hda2: No label detected
Closed /dev/hda2
Opened /dev/hda3 RO
/dev/hda3: block size is 4096 bytes
/dev/hda3: No label detected
Closed /dev/hda3
Opened /dev/hda5 RO
/dev/hda5: block size is 512 bytes
/dev/hda5: lvm2 label detected
Closed /dev/hda5
lvmcache: /dev/hda5 now orphaned
Opened /dev/hda5 RO
/dev/hda5: block size is 512 bytes
Closed /dev/hda5
lvmcache: /dev/hda5 now in VG VolGroup00
Opened /dev/hdb RO
/dev/hdb: block size is 4096 bytes
/dev/hdb: lvm2 label detected
Closed /dev/hdb
lvmcache: /dev/hdb now orphaned
Opened /dev/hdb RO
/dev/hdb: block size is 4096 bytes
Closed /dev/hdb
lvmcache: /dev/hdb now in VG VolGroup00
Locking /var/lock/lvm/V_VolGroup00 RB
Opened /dev/hda5 RO
/dev/hda5: block size is 512 bytes
/dev/hda5: lvm2 label detected
Opened /dev/hdb RO
/dev/hdb: block size is 4096 bytes
/dev/hdb: lvm2 label detected
/dev/hda5: lvm2 label detected
/dev/hdb: lvm2 label detected
Read VolGroup00 metadata (11) from /dev/hda5 at 18944 size 720
/dev/hda5: lvm2 label detected
/dev/hdb: lvm2 label detected
Read VolGroup00 metadata (11) from /dev/hdb at 16896 size 720
Unlocking /var/lock/lvm/V_VolGroup00
Closed /dev/hda5
Closed /dev/hdb
[root at mythserver ~]# lvdisplay -vvv
Processing: lvdisplay -vvv
O_DIRECT will be used
Setting global/locking_type to 1
Setting global/locking_dir to /var/lock/lvm
File-based locking enabled.
Finding all logical volumes
Opened /dev/sda RO
/dev/sda: block size is 4096 bytes
/dev/sda: No label detected
Closed /dev/sda
Opened /dev/hda1 RO
/dev/hda1: block size is 1024 bytes
/dev/hda1: No label detected
Closed /dev/hda1
Opened /dev/hda2 RO
/dev/hda2: block size is 4096 bytes
/dev/hda2: No label detected
Closed /dev/hda2
Opened /dev/hda3 RO
/dev/hda3: block size is 4096 bytes
/dev/hda3: No label detected
Closed /dev/hda3
Opened /dev/hda5 RO
/dev/hda5: block size is 512 bytes
/dev/hda5: lvm2 label detected
Closed /dev/hda5
lvmcache: /dev/hda5 now orphaned
Opened /dev/hda5 RO
/dev/hda5: block size is 512 bytes
Closed /dev/hda5
lvmcache: /dev/hda5 now in VG VolGroup00
Opened /dev/hdb RO
/dev/hdb: block size is 4096 bytes
/dev/hdb: lvm2 label detected
Closed /dev/hdb
lvmcache: /dev/hdb now orphaned
Opened /dev/hdb RO
/dev/hdb: block size is 4096 bytes
Closed /dev/hdb
lvmcache: /dev/hdb now in VG VolGroup00
Locking /var/lock/lvm/V_VolGroup00 RB
Opened /dev/hda5 RO
/dev/hda5: block size is 512 bytes
/dev/hda5: lvm2 label detected
Opened /dev/hdb RO
/dev/hdb: block size is 4096 bytes
/dev/hdb: lvm2 label detected
/dev/hda5: lvm2 label detected
/dev/hdb: lvm2 label detected
Read VolGroup00 metadata (11) from /dev/hda5 at 18944 size 720
/dev/hda5: lvm2 label detected
/dev/hdb: lvm2 label detected
Read VolGroup00 metadata (11) from /dev/hdb at 16896 size 720
Unlocking /var/lock/lvm/V_VolGroup00
Closed /dev/hda5
Closed /dev/hdb
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-
---------------------------------
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mythtv.org/pipermail/mythtv-users/attachments/20060911/3581e76b/attachment.htm
More information about the mythtv-users
mailing list