LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-05-2014, 11:45 AM   #1
wschoong
LQ Newbie
 
Registered: Feb 2014
Posts: 3

Rep: Reputation: Disabled
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
]
}
}
}
}
 
Old 02-05-2014, 02:00 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
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.
 
Old 02-05-2014, 02:10 PM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,681

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
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.
 
1 members found this post helpful.
Old 02-05-2014, 04:26 PM   #4
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Quote:
Originally Posted by michaelk View Post
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.
Good catch.
 
Old 02-05-2014, 05:35 PM   #5
wschoong
LQ Newbie
 
Registered: Feb 2014
Posts: 3

Original Poster
Rep: Reputation: Disabled
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?
 
Old 02-05-2014, 05:41 PM   #6
wschoong
LQ Newbie
 
Registered: Feb 2014
Posts: 3

Original Poster
Rep: Reputation: Disabled
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LVM Mount Physical Volume/Logical Volume without a working Volume Group mpivintis Linux - Newbie 10 01-11-2014 07:02 AM
Data recovery from missing LVM logical volume kta Linux - Software 2 07-20-2013 06:07 PM
Extended LVM Volume group and Logical Volume. But space not usable linuxlover.chaitanya Linux - Server 1 11-19-2012 09:37 AM
Missing Logical Volume Rameses Linux - Server 3 08-11-2010 11:32 AM
Extending logical volume LogVol01 Insufficient allocatable logical exte swap space umeshsharma Linux - Newbie 4 06-22-2009 12:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration