Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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.
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.
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.