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 |
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 Code:
lvm lvscan Now you can use Code:
fsck -p /dev/VolGroup00/LogVol00 If you boot from Installation media, you can mount partitions with: Code:
mount /dev/VolGroup00/LogVol?? /mnt/sysimage |
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 Now unmount LVM partitions like this: Code:
umount /mnt/sysimage/boot Code:
umount /mnt/sysimage order LVM do deactivate partitions from that volume group: Code:
lvm lvchange -a n /dev/VolGroup00/LogVol00 /dev/VolGroup00/LogVol00 Code:
lvm pvresize -v -d /dev/md3 Then activate volume groups again: Code:
lvm vgchange -ay Code:
lvm lvscan Code:
lvm vgdisplay VolGroup00 Code:
lvm lvresize -L +3GB /dev/VolGroup00/LogVol00 Code:
lvm lvresize -l +<number> /dev/VolGroup00/LogVol00 Now see what you have done with Code:
lvm lvdisplay /dev/VolGroup00/LogVol00 Code:
df -kh Code:
umount /dev/VolGroup00/LogVol00 Code:
resize2fs -p /dev/VolGroup00/LogVol00 Code:
e2fsck -f /dev/VolGroup00/LogVol00 |
Quote:
|
I have tried all the above mentioned options, but i am not finding volume group itself
|
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.
|
All times are GMT -5. The time now is 12:28 PM. |