Missing Logical Volume. Need Help
I have a problem with my Linux box running Redhat 5.
One morning I came, I found that my /home directory is no longer accessible. Here is how my box is setup. My disk is 500GB. There are two volume groups (VolGroup00 and VolGroup01). VolGroup00 has two logical volumes (LogVol00 and LogVol01). LogVol00 has ~250 GB and is mounted as /. LogVol01 is ~4GB and is mounted as swap. (see below for /etc/lvm/backup/VolGroup00) VolGroup01 has one only one logical volume (LogVol01), ~250GB and is mounted as /home. (see below for /etc/lvm/backup/VolGroup01) When I try reboot, I get a an error: fsck.ext3: No such file or directory while trying to open /dev/VolGroup01/LogVol00 and boots me into single user mode. When I commented in fstab to mount /dev/VolGroup01/LogVol00, I am able to boot up. Of course, /home is not mounted. See below when I ran "fdisk -l", "vgscan" and "lvdisplay". Note VolGroup00/LogVol00 is now sized as 455GB. What happen to VolGroup01? I have a lot of critical information in VolGroup01 which I would like to get back. What can I do? Please help. [root@apd lvm]# fdisk -l Disk /dev/sda: 500.1 GB, 500107862016 bytes 255 heads, 63 sectors/track, 60801 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 1 5 40131 de Dell Utility /dev/sda2 6 789 6297480 c W95 FAT32 (LBA) /dev/sda3 * 790 814 200812+ 83 Linux /dev/sda4 815 60801 481845577+ 5 Extended /dev/sda5 815 60801 481845546 8e Linux LVM Disk /dev/sdb: 8166 MB, 8166703104 bytes 224 heads, 63 sectors/track, 1130 cylinders Units = cylinders of 14112 * 512 = 7225344 bytes Device Boot Start End Blocks Id System /dev/sdb1 1 1131 7975268 c W95 FAT32 (LBA) [root@apd lvm]# vgscan Reading all physical volumes. This may take a while... Found volume group "VolGroup00" using metadata type lvm2 [root@apd lvm]# lvdisplay --- Logical volume --- LV Name /dev/VolGroup00/LogVol00 VG Name VolGroup00 LV UUID F99tdn-wOjj-U9h5-KCKd-ASUC-gWWX-bbZE5x LV Write Access read/write LV Status available # open 1 LV Size 455.59 GB Current LE 14579 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:0 --- Logical volume --- LV Name /dev/VolGroup00/LogVol01 VG Name VolGroup00 LV UUID nnsAo8-bMXm-SGij-Y6wd-0z7G-WMRL-3TdYjJ LV Write Access read/write LV Status available # open 1 LV Size 3.91 GB Current LE 125 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:1 File /etc/lvm/backup/VolGroup00 # Generated by LVM2 version 2.02.40-RHEL5 (2008-10-24): Thu Oct 21 23:40:02 2010 contents = "Text Format Volume Group" version = 1 description = "Created *after* executing 'vgdisplay --ignorelockingfailure -v VolGroup00'" creation_host = "localhost.localdomain" # Linux localhost.localdomain 2.6.18-128.el5 #1 SMP Wed Dec 17 11:41:38 EST 2008 x86_64 creation_time = 1287722402 # Thu Oct 21 23:40:02 2010 VolGroup00 { id = "BwO3JL-iZ1w-I092-hqyd-luxp-KlmA-veBrJV" seqno = 3 status = ["RESIZEABLE", "READ", "WRITE"] flags = [] extent_size = 65536 # 32 Megabytes max_lv = 0 max_pv = 0 physical_volumes { pv0 { id = "Z2FDMW-YRCf-XAtG-vAVv-cy7X-FOXt-n7aQKx" device = "/dev/sda5" # Hint only status = ["ALLOCATABLE"] flags = [] dev_size = 963691092 # 459.524 Gigabytes pe_start = 384 pe_count = 14704 # 459.5 Gigabytes } } logical_volumes { LogVol00 { id = "F99tdn-wOjj-U9h5-KCKd-ASUC-gWWX-bbZE5x" status = ["READ", "WRITE", "VISIBLE"] flags = [] segment_count = 1 segment1 { start_extent = 0 extent_count = 14579 # 455.594 Gigabytes type = "striped" stripe_count = 1 # linear stripes = [ "pv0", 0 ] } } LogVol01 { id = "nnsAo8-bMXm-SGij-Y6wd-0z7G-WMRL-3TdYjJ" status = ["READ", "WRITE", "VISIBLE"] flags = [] segment_count = 1 segment1 { start_extent = 0 extent_count = 125 # 3.90625 Gigabytes type = "striped" stripe_count = 1 # linear stripes = [ "pv0", 14579 ] } } } } File /etc/lvm/backup/VolGroup01 # Generated by LVM2 version 2.02.40-RHEL5 (2008-10-24): Fri Nov 12 16:31:40 2010 contents = "Text Format Volume Group" version = 1 description = "Created *after* executing '/usr/sbin/lvcreate -n LogVol00 -l 238467 VolGroup01'" creation_host = "b8-ac-6f-4b-97-8c.dhcp.lbl.gov" # Linux b8-ac-6f-4b-97-8c.dhcp.lbl.gov 2.6.18-128.el5 #1 SMP Wed Dec 17 11:41:38 EST 2008 x86_64 creation_time = 1289608300 # Fri Nov 12 16:31:40 2010 VolGroup01 { id = "QbXBsA-JFHq-OLKy-r0Jm-78X2-ERRH-0bM1vx" seqno = 2 status = ["RESIZEABLE", "READ", "WRITE"] flags = [] extent_size = 8192 # 4 Megabytes max_lv = 256 max_pv = 256 physical_volumes { pv0 { id = "C36bLS-J8Qq-Ks9X-4G2E-v85r-Psek-E6D7rd" device = "/dev/sdb1" # Hint only status = ["ALLOCATABLE"] flags = [] dev_size = 1953525167 # 931.513 Gigabytes pe_start = 384 pe_count = 238467 # 931.512 Gigabytes } } logical_volumes { LogVol00 { id = "vE0Lzh-9Z15-KShu-ahfb-JNBJ-VpF2-23eF1s" status = ["READ", "WRITE", "VISIBLE"] flags = [] segment_count = 1 segment1 { start_extent = 0 extent_count = 238467 # 931.512 Gigabytes type = "striped" stripe_count = 1 # linear stripes = [ "pv0", 0 ] } } } } |
Your fdisk output shows /dev/sdb1 as:
Device Boot Start End Blocks Id System /dev/sdb1 1 1131 7975268 c W95 FAT32 (LBA) But your lvm backup shows sdb1 is the PV for the second VG. It appears something changes your partition type. Did you by any chance use fdisk or parted to do that? Were you perhaps trying to do a dual boot or something? You can try changing the /dev/sdb1 partition type to 8e (Linux LVM). If you haven't already formated /dev/sdb1 for some other purpose your data may be there and you may be able go run the vgscan after changing partition type back. |
In addition from the output of the fdisk command your /dev/sdb is 8GB where as the backup script indicates your volgroup01 is 931GB. I would assume that sdb is a 8GB flash drive.
|
Quote:
|
Sorry, I just found out that I have two disks. It has been awhile since I set it up. 500GB as VolGroup00 and 1TB mounted VolGroup01. It turns out that the 1TB disk is having the problem.
I try to mount it manually but got error: [root@apd ~]# mount -t ext3 /dev/VolGroup01/LogVol00 /tempmnt mount: wrong fs type, bad option, bad superblock on /dev/VolGroup01/LogVol00, missing codepage or other error In some cases useful info is found in syslog - try dmesg | tail or so [root@apd ~]# e2fsck -f /dev/sdb1 e2fsck 1.39 (29-May-2006) e2fsck: Device or resource busy while trying to open /dev/sdb1 Filesystem mounted or opened exclusively by another program? |
I did another frisk -l. It show /dev/sdb at 1TB (I don't know why it was different in my our original post). I put in a new disk /dev/sdc, getting ready to do a "dd".
[root@apd ~]# fdisk -l Disk /dev/sda: 500.1 GB, 500107862016 bytes 255 heads, 63 sectors/track, 60801 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 1 5 40131 de Dell Utility /dev/sda2 6 789 6297480 c W95 FAT32 (LBA) /dev/sda3 * 790 814 200812+ 83 Linux /dev/sda4 815 60801 481845577+ 5 Extended /dev/sda5 815 60801 481845546 8e Linux LVM Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes 255 heads, 63 sectors/track, 121601 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdb1 1 121602 976762583+ 8e Linux LVM Disk /dev/sdc: 2000.3 GB, 2000398934016 bytes 255 heads, 63 sectors/track, 243201 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk /dev/sdc doesn't contain a valid partition table |
All times are GMT -5. The time now is 04:08 AM. |