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

[linux-lvm] Lost logical volume?



Greetings.
 
I am hoping that some LVM experts can help me out.  I have a partial volume group that spans two drives and I would like to recover the logical volume that was on it so that the data is accessible.  The group (VolGroup00) was originally set up spanning part of one drive and all of the other drive (both IDE).  The group was entirely applied to a single logical volume (LogVol00) to be mounted as /video.  This was working until I tried to make some changes and I fear that I may have lost the data.  I cannot seem to resolve this problem anywhere else.  I have spent almost two weeks searching for clues and asking for help in other forums, but I do not yet have a solution.  I hope to provide all of the useful information below.
 
 
History
I am relatively new to linux, having built my own PVR using Fedora and MythTV during the last year.  I have relied heavily upon HowTos and guides written by other users.  One of the guides that I followed instructed me to set up XFS using LVM which would allow me to span multiple hard disks.  Recently, I added a new SATA drive to my MythTV system. The new drive was designated as /dev/sda.  It appeared to add into the existing volume group without any problem, though I did not get it to the point where the space was accessible. I planned to further research that problem; however, the new hard drive failed before I got that far.  Here’s what things looked like after removing the drive:
 
[root[at]mythserver ~]# pvdisplay
Couldn't find device with uuid 'fxlccO-4li0-nmyD-9avZ-Vc60-GGWX-jUhqOv'.
Couldn't find device with uuid 'fxlccO-4li0-nmyD-9avZ-Vc60-GGWX-jUhqOv'.
--- Physical volume ---
PV Name /dev/hda5
VG Name VolGroup00
PV Size 66.12 GB / not usable 0
Allocatable yes (but full)
PE Size (KByte) 4096
Total PE 16926
Free PE 0
Allocated PE 16926
PV UUID 317l2C-oay1-TWFG-5NTX-XJS3-vLal-Xh5bBL

--- Physical volume ---
PV Name /dev/hdb
VG Name VolGroup00
PV Size 298.09 GB / not usable 0
Allocatable yes (but full)
PE Size (KByte) 4096
Total PE 76311
Free PE 0
Allocated PE 76311
PV UUID nfLxS1-0u3t-5Zr9-57iu-1oZe-Bkkd-75SERQ

--- Physical volume ---
PV Name unknown device
VG Name VolGroup00
PV Size 232.88 GB / not usable 0
Allocatable yes
PE Size (KByte) 4096
Total PE 59617
Free PE 225
Allocated PE 59392
PV UUID fxlccO-4li0-nmyD-9avZ-Vc60-GGWX-jUhqOv

[root[at]mythserver ~]# vgdisplay
Couldn't find device with uuid 'fxlccO-4li0-nmyD-9avZ-Vc60-GGWX-jUhqOv'.
Couldn't find all physical volumes for volume group VolGroup00.
Couldn't find device with uuid 'fxlccO-4li0-nmyD-9avZ-Vc60-GGWX-jUhqOv'.
Couldn't find all physical volumes for volume group VolGroup00.
Couldn't find device with uuid 'fxlccO-4li0-nmyD-9avZ-Vc60-GGWX-jUhqOv'.
Couldn't find all physical volumes for volume group VolGroup00.
Couldn't find device with uuid 'fxlccO-4li0-nmyD-9avZ-Vc60-GGWX-jUhqOv'.
Couldn't find all physical volumes for volume group VolGroup00.
Volume group "VolGroup00" doesn't exist

[root[at]mythserver ~]# pvcreate -u fxlccO-4li0-nmyD-9avZ-Vc60-GGWX-jUhqOv /dev/sda
Device /dev/sda not found.

[root[at]mythserver ~]# vgcfgrestore -tnVolGroup00 /dev/VolGroup00
Test mode: Metadata will NOT be updated.
Couldn't find device with uuid 'fxlccO-4li0-nmyD-9avZ-Vc60-GGWX-jUhqOv'.
Couldn't find all physical volumes for volume group VolGroup00.
Restore failed.
 
Current Status
Based on suggestions made elsewhere, I tried to recover the logical volume which was originally on the two functioning drives.  Since the new drive failed before I had made the space available to the group, I believed that all data should be recoverable if the LVM structure could be put back to the way it was prior to the addition of the SATA drive.  First, I tried "vgreduce --removemissing VolGroup00" which seemed to work. Then, I tried "vgchange -ay --partial VolGroup00" which also appeared to complete successfully.  It seems like I was partly successful but I cannot get the logical volume to be recognized.  I tried a few other things shown below, and I have done nothing since.  I’m afraid to try to experiment commands that I don’t fully understand, and some things don’t seem to be working the way I would expect based upon the LVM HowTo.  Please let me know if you can assist me.  Thanks in advance for any help you can provide!
 
[root[at]mythserver ~]# mount -a
mount: special device /dev/VolGroup00/LogVol00 does not exist
 
[root[at]mythserver ~]# vgchange -a y VolGroup00
0 logical volume(s) in volume group "VolGroup00" now active

[root[at]mythserver ~]# pvdisplay
--- Physical volume ---
PV Name /dev/hda5
VG Name VolGroup00
PV Size 66.12 GB / not usable 0
Allocatable yes
PE Size (KByte) 4096
Total PE 16926
Free PE 16926
Allocated PE 0
PV UUID 317l2C-oay1-TWFG-5NTX-XJS3-vLal-Xh5bBL

--- Physical volume ---
PV Name /dev/hdb
VG Name VolGroup00
PV Size 298.09 GB / not usable 0
Allocatable yes
PE Size (KByte) 4096
Total PE 76311
Free PE 76311
Allocated PE 0
PV UUID nfLxS1-0u3t-5Zr9-57iu-1oZe-Bkkd-75SERQ

[root[at]mythserver ~]# vgscan
Reading all physical volumes. This may take a while...
Found volume group "VolGroup00" using metadata type lvm2

[root[at]mythserver ~]# vgck -vv VolGroup00
Setting global/locking_type to 1
Setting global/locking_dir to /var/lock/lvm
File-based locking enabled.
Using volume group(s) on command line
Locking /var/lock/lvm/V_VolGroup00 RB
Finding volume group "VolGroup00"
/dev/sda: No label detected
/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
/dev/hda5: lvm2 label detected
/dev/hdb: lvm2 label detected
/dev/hda5: lvm2 label detected
/dev/hdb: lvm2 label detected
Unlocking /var/lock/lvm/V_VolGroup00
 
[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
 
 
P.S. A full history of my posts on the MythTV mailing list can be viewed here:
http://www.gossamer-threads.com/lists/mythtv/users/218118
 
Thank you, again. :-)
-Tom-


All-new Yahoo! Mail - Fire up a more powerful email and get things done faster.
[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]