[CentOS] LVM repairing or back to regular ext3?

Thu Jun 29 08:03:39 UTC 2006
Plant, Dean <dean.plant at roke.co.uk>

Paul wrote:
> Can anyone point me in the right direction for correcting errors on
> an HD when using LVM?  I've tried e2fsck and indicates bad block. 
> I've tried with -b 8193, 16384, and 32768 and no good.
> 
> I've found some info about reiserfsck on google, but this utility
> doesn't seem to be included in Centos4.3.  I did find it on my old
> FC1 box. 
> 
> I am thinking now I really should have went with just regular 83 Linux
> ext3 partitions.  Arrgghhh.
> 
> And if I want to switch to 83 Linux instead of 8e LVM, whats the best
> way, or at least a feasible way?  I can pop another drive in if I
> need to move data around, but I don't see how, as I can't mount the
> LVM partition (hda2).
> 
As the previous poster advised, this is probably a hardware fault but
for your reference I used the same instructions from this post to fix a
corrupt filesystem within LVM.

http://dcs.nac.uci.edu/~strombrg/EXT3-filesystem-recovery-in-LVM2.html

Use a Centos rescue disk

1) Do startup network interfaces
2) Don't try to automatically mount the filesystems - not even readonly
3) lvm vgchange --ignorelockingfailure -P -a y
4) fdisk -l, and guess which partition is which based on size: the small
one was /boot, and the large one was /
5) mkdir /mnt/boot
6) mount /dev/hda1 /mnt/boot
7) Look up the device node for the root filesystem in
/mnt/boot/grub/grub.conf
8) A first tentative step, to see if things are working: fsck -n
/dev/VolGroup00/LogVol00
9) Dive in: fsck -f -y /dev/VolGroup00/LogVol00
10) Wait a while...  Be patient.  Don't interrupt it
11) Reboot


Dean.