LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 01-28-2010, 01:33 AM   #1
vknemannavar
LQ Newbie
 
Registered: Jan 2010
Posts: 3

Rep: Reputation: 0
Unable to boot RHEL 5.2 and Unable to mount root file system in rescue mode


Environment:
A 32-bit kernel RHEL5.3 system running on a virtual machine. The root(/) filesystem is on an LV.

Issue:
Unable to resize the FS after extending the root LV since it is mounted. After extending the LV, online resizing of the FS was not supported and the root filesystem could not be unmounted while it was in use. On rebooting, I got a kernel panic error. In runlevel 1, I couldn't run chroot, couldn't find the /etc/fstab, root FS could not be mounted, fsck did not run (tried block 31 for second copy of superblock using dd count=1 bs=4k skip=31 seek=1 if=/dev/sda2 of=/dev/sda2), couldn't find any rpm on installation media to install unix-utils rpm. On running commands in runlevel 1, I got the following output. Please advise.

chroot /mnt/sysimage/
chroot:cannot run command '/bash/sh': No such file or directory

fdisk -l
Disk /dev/sda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 1305 10377990 8e Linux LVM

fsck -p /dev/sda2
fsck 1.39 (29-May-2006)
WARNING: couldn't open /etc/fstab: No such file or directory
e2fck 1.39 (29-May-2006)
Couldn't find ext2 superblock, trying backup blocks...
fsck.ext2: Bad magic nimber in super-block while trying to open /dev/sda2
 
Old 01-28-2010, 05:14 AM   #2
DrLove73
Senior Member
 
Registered: Sep 2009
Location: Srbobran, Serbia
Distribution: CentOS 5.5 i386 & x86_64
Posts: 1,118
Blog Entries: 1

Rep: Reputation: 129Reputation: 129
Hi, welcome to the LQ forums.

Your problem is that when you boot like that your lvm volumes are not recognized and mounted. You need to mount them first with:

Code:
lvm pvscanv
Code:
lvm vgscan
Code:
lvm vgchange VolGroup00 -a y
(If your Volume Group has that name, or change it to match the output of the previous command
Code:
lvm lvscan
If lvm does not work, you need to boot from Installation media with "linux rescue". DVD or what ever. LVM volumes should be mounted automatically when rescue searches for existing installations.

Now you can use
Code:
fsck -p /dev/VolGroup00/LogVol00
or what ever partition you need to check.

If you boot from Installation media, you can mount partitions with:
Code:
mount /dev/VolGroup00/LogVol?? /mnt/sysimage
, etc

Last edited by DrLove73; 01-28-2010 at 05:36 AM.
 
Old 01-28-2010, 05:35 AM   #3
DrLove73
Senior Member
 
Registered: Sep 2009
Location: Srbobran, Serbia
Distribution: CentOS 5.5 i386 & x86_64
Posts: 1,118
Blog Entries: 1

Rep: Reputation: 129Reputation: 129
The way I resize(d) LVM partition is following:

Boot from Installation media, let it find and mount partitions (or avoid searching for them and use above post until mounting segment).
then
Code:
lvm vgdisplay VolGroup00
to see LVM related data.
Now unmount LVM partitions like this:
Code:
umount /mnt/sysimage/boot
and
Code:
umount /mnt/sysimage
,
order LVM do deactivate partitions from that volume group:
Code:
lvm lvchange -a n /dev/VolGroup00/LogVol00 /dev/VolGroup00/LogVol00
(add more at the end if you have more inside that volume group), then resize phisical volume is necesary. I used following syntax for single drive (on the RAID):
Code:
lvm pvresize -v -d /dev/md3
, you use your correct disk instead of "/dev/md3".

Then activate volume groups again:
Code:
lvm vgchange -ay
and activate LV's with
Code:
lvm lvscan
Then read volume group to see the Free PE size:
Code:
lvm vgdisplay VolGroup00
, and resize the LV you want (in this case for another 3GB):
Code:
lvm lvresize -L +3GB /dev/VolGroup00/LogVol00
OR to use number of entities use
Code:
lvm lvresize -l +<number> /dev/VolGroup00/LogVol00
this last syntax I have not tested!.

Now see what you have done with
Code:
lvm lvdisplay /dev/VolGroup00/LogVol00
and
Code:
df -kh
, then fix partition with
Code:
umount /dev/VolGroup00/LogVol00
Code:
resize2fs -p /dev/VolGroup00/LogVol00
THIS MAY BE REDUNANT:
Code:
e2fsck -f /dev/VolGroup00/LogVol00
That should be it.

Last edited by DrLove73; 01-28-2010 at 05:54 AM.
 
Old 01-28-2010, 11:33 PM   #4
vknemannavar
LQ Newbie
 
Registered: Jan 2010
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by DrLove73 View Post
The way I resize(d) LVM partition is following:

Boot from Installation media, let it find and mount partitions (or avoid searching for them and use above post until mounting segment).
then
Code:
lvm vgdisplay VolGroup00
to see LVM related data.
Now unmount LVM partitions like this:
Code:
umount /mnt/sysimage/boot
and
Code:
umount /mnt/sysimage
,
order LVM do deactivate partitions from that volume group:
Code:
lvm lvchange -a n /dev/VolGroup00/LogVol00 /dev/VolGroup00/LogVol00
(add more at the end if you have more inside that volume group), then resize phisical volume is necesary. I used following syntax for single drive (on the RAID):
Code:
lvm pvresize -v -d /dev/md3
, you use your correct disk instead of "/dev/md3".

Then activate volume groups again:
Code:
lvm vgchange -ay
and activate LV's with
Code:
lvm lvscan
Then read volume group to see the Free PE size:
Code:
lvm vgdisplay VolGroup00
, and resize the LV you want (in this case for another 3GB):
Code:
lvm lvresize -L +3GB /dev/VolGroup00/LogVol00
OR to use number of entities use
Code:
lvm lvresize -l +<number> /dev/VolGroup00/LogVol00
this last syntax I have not tested!.

Now see what you have done with
Code:
lvm lvdisplay /dev/VolGroup00/LogVol00
and
Code:
df -kh
, then fix partition with
Code:
umount /dev/VolGroup00/LogVol00
Code:
resize2fs -p /dev/VolGroup00/LogVol00
THIS MAY BE REDUNANT:
Code:
e2fsck -f /dev/VolGroup00/LogVol00
That should be it.
I have tried all the option, I am not finding the Volume group itself
 
Old 01-28-2010, 11:39 PM   #5
vknemannavar
LQ Newbie
 
Registered: Jan 2010
Posts: 3

Original Poster
Rep: Reputation: 0
I have tried all the above mentioned options, but i am not finding volume group itself
 
Old 01-29-2010, 09:05 AM   #6
DrLove73
Senior Member
 
Registered: Sep 2009
Location: Srbobran, Serbia
Distribution: CentOS 5.5 i386 & x86_64
Posts: 1,118
Blog Entries: 1

Rep: Reputation: 129Reputation: 129
If you can not find any volume group (VolGroup00 is just a default name), then it seams you have messed up your LVM partition. I have never had this problem, so somone else will have to step in.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Kernel Panic - Not Syncing VFS: unable to mount root file system bianchi77 Linux - Kernel 2 07-17-2009 03:56 AM
Unable to mount root File system C-Sniper Slackware 19 12-10-2007 02:37 PM
Kernel panic-not syncing unable to mount the root file system on unknown block(0,0) cybersrin Linux - Hardware 2 08-14-2007 12:00 AM
Kernel Panic - Not Syncing VFS: unable to mount root file system push Slackware 8 08-28-2006 07:17 AM
HELP !! Unable to mount root fs (from RESCUE DISK) vi595 Linux - Newbie 10 07-11-2005 02:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 04:26 AM.

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