So I hit something pretty interesting.
I have a lab environment where I regularly break things and fix them. Last weeks hobby was the fork bomb. After locking up my system a few times I believe I corrupted a filesystem.
Disks are managed by LVM
Upon boot I am dropped in to single user mode. RHEL complains that:
"fsck.ext4: No such file or directory while trying to open /dev/mapper/datavg-datalv
The superblock could not be read or does not describe a correct ext2 filesystem..."
The steps I have taken are such:
dumpe2fs /dev/mapper/datavg-datalv | grep -i superblock e2fsck -f -b ###### /dev/mapper/datavg-datalv
(##### = backup superblock from dumpe2fs)
The first time e2fsck ran through an enormous number of corrections. I held down enter and it flew through inode fixes. The most recent time it complains about the last umount being after the current system time.
shutdown -Fr now
Reboot puts me in the same place - fsck has a problem running on that lv.
My current work around is:
mount / -o remount,rw
I can edit /etc/fstab and comment out mounting the datavg-datalv. Once I am in the system I can manually mount that lv without a problem.
There was no data on that lv. It was just part of my experiment. I would really like to repair this lv without destroying it and remaking it. Any advice?