Corrupted journal in a Linux LVM How to recover


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Corrupted journal in a Linux LVM How to recover
# 1  
Old 01-23-2009
Corrupted journal in a Linux LVM How to recover

Not real Linux expert but here is the problem.

Shutdown this machine and then it would not reboot.

From everything I can tell it looks like the journal file in the logical volume is corrupted. I have tried everything I can think of to get the volume mounted.

Anybody have any ideas on how to recover this, of course there is no backup of the filesystem but that is another story.

Here is what I think is all of the pertinent.

Booting 'Red Hat Enterprise Linux ES (2.6.9-42.ELsmp)'

root (hd0,0)
Filesystem type is ext2fs partion type 0x83
kernel /vmlinux-2.6.9-42-ELsmp ro root=/dev/VolGroup00/LogVol00 rhgb quiet
[Linux-bz Image,setup=0x1400, size=0x15f464]
initrd /initrd-2.6.42.ELsmp,img
[linux-initrd@0x37ecc0000,0x123cce bytes]

Uncompressing Linux ... OK, booting the kernel.
Red Hat nash version 4.2.1.8 starting
Reading all physical volumes. This may take awhile ...
Found volume group "VolGroup00" using metadata type lvm2
2 logical volume(s) in volume group "VolGroup00" now active

EXT3-fs error (device dm-0) ext3_check_descriptor: Block bitmap for
group 0 not in group (block 41471)
EXT3-fs group descriptors corrupted
mount: error 22 mounting ext3
mount: error 2 mounting none
switchroot: /initrd/dev failed: 2
Kernel panic not syncing: Attempt to kill init

Booted from SystemRescueCD

found nothing in /dev/mapper

Performed the following steps

root@sysresccd% dmsetup mknodes
root@sysresccd% vgmknodes
root@sysresccd% vgscan
Reading all physical volumes. This may take awhile ...
Found volume group "VolGroup00" using metadata type lvm2
root@sysresccd% vgchange -ay
2 logical volume(s) in volume group "VolGroup00" now active

Now I could see the logical volumes,

/dev/VolGroup00/LogVol01 is swap
/dev/VolGroup00/LogVol00 should be /

Performed:

root@sysresccd% mkdir /mnt/mydir
root@sysresccd% mount -t ext3 /dev/VolGroup00/LogVol00 /mnt/mydir
mount: wrong fs type, bad option, bad superblock on /dev/mapper/VolGroup00/LogVol00
missing codepage or helper program, or other errors
In some cases useful info is found in syslog - try
dmesg | tail or so.

Then performed:

root@sysresccd% fsck /dev/VolGroup00/LogVol00

fsck 1.41.3 (12-oct-2008)
e2fsck 1.41.3 (12-Oct-2008)
fsck.ext3: Group descriptors look bad.. trying backup blocks
fsck.ext3: Invalid argument while checking ext3 journal for /dev/VolGroup00/LogVol00

Then ran mk2fs -n /dev/VolGroup/LogVol00 to get alternate superblocks

Tried running fsck again using alternate superblocks but still get the same errors.

When trying to mount with -o noload get these errors in syslog

EXT3-fs error (device dm-0) ext3_check_descriptor: Block bitmap for group 0 not in group (block 41471)
EXT3-fs group descriptors corrupted!

root@sysresccd /mnt/nsips % vgdisplay -v
Finding all volume groups
Finding volume group "VolGroup00"
Fixing up missing size (68.26 GB) for PV /dev/sdb2
Fixing up missing size (68.36 GB) for PV /dev/sdc1
Fixing up missing size (68.26 GB) for PV /dev/sdb2
Fixing up missing size (68.36 GB) for PV /dev/sdc1

--- Volume group ---
VG Name VolGroup00
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 3
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 0
Max PV 0
Cur PV 2
Act PV 2
VG Size 136.59 GB
PE Size 32.00 MB
Total PE 4371
Alloc PE / Size 4369 / 136.53 GB
Free PE / Size 2 / 64.00 MB
VG UUID JINuth-kuv3-NG9k-3q34-wIHJ-wkQR-4fk1tW

--- Logical volume ---
LV Name /dev/VolGroup00/LogVol00
VG Name VolGroup00
LV UUID fOHDQv-ekvG-dZQU-xus0-Tlbt-0kok-OgmmwT
LV Write Access read/write
LV Status available
# open 0
LV Size 134.59 GB
Current LE 4307
Segments 2
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 LavZiq-3mE3-Awhj-Oyfz-zlXW-kBEG-01j00w
LV Write Access read/write
LV Status available
# open 0
LV Size 1.94 GB
Current LE 62
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:1

--- Physical volumes ---
PV Name /dev/sdb2
PV UUID udJZJb-kkzA-RBxr-rWoI-3qaf-3xtb-gFtgUO
PV Status allocatable
Total PE / Free PE 2184 / 2

PV Name /dev/sdc1
PV UUID Wwu9xr-HARk-knlw-cqfT-pRQo-5zb9-UqrwZn
PV Status allocatable
Total PE / Free PE 2187 / 0

root@sysresccd /mnt/nsips % pvscan -v
Wiping cache of LVM-capable devices
Wiping internal VG cache
Walking through all physical volumes
Fixing up missing size (68.26 GB) for PV /dev/sdb2
Fixing up missing size (68.36 GB) for PV /dev/sdc1
Fixing up missing size (68.26 GB) for PV /dev/sdb2
Fixing up missing size (68.36 GB) for PV /dev/sdc1
PV /dev/sdb2 VG VolGroup00 lvm2 [68.25 GB / 64.00 MB free]
PV /dev/sdc1 VG VolGroup00 lvm2 [68.34 GB / 0 free]
Total: 2 [136.59 GB] / in use: 2 [136.59 GB] / in no VG: 0 [0 ]

root@sysresccd /mnt/nsips % dumpe2fs /dev/VolGroup00/LogVol00
dumpe2fs 1.41.3 (12-Oct-2008)
dumpe2fs: Invalid argument while reading journal inode
Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem UUID: 04f9f61a-fdb8-4205-88ff-172cf08e89f5
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: has_journal ext_attr resize_inode dir_index filetype sparse_super large_file
Default mount options: (none)
Filesystem state: clean with errors
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 17645568
Block count: 35282944
Reserved block count: 1764147
Free blocks: 4365169
Free inodes: 15808913
First block: 0
Block size: 4096
Fragment size: 4096
Reserved GDT blocks: 1024
Blocks per group: 32768
Fragments per group: 32768
Inodes per group: 16384
Inode blocks per group: 512
Filesystem created: Fri Nov 28 17:09:50 2008
Last mount time: Fri Dec 19 17:26:17 2008
Last write time: Wed Jan 14 12:24:04 2009
Mount count: 8
Maximum mount count: -1
Last checked: Fri Nov 28 17:09:50 2008
Check interval: 0 (<none>)
Reserved blocks uid: 0 (user root)
Reserved blocks gid: 0 (group root)
First inode: 11
Inode size: 128
Journal inode: 8
First orphan inode: 17416274
Default directory hash: tea
Directory Hash Seed: 189832ed-6e78-40b6-8cac-a95d8a2bb09d
Journal backup: inode blocks
dumpe2fs: Invalid argument while reading journal inode

root@sysresccd /mnt/nsips % tune2fs -O ^has_journal /dev/VolGroup00/LogVol00
tune2fs 1.41.3 (12-Oct-2008)
tune2fs: Invalid argument while reading journal inode

root@sysresccd /mnt/nsips % debugfs /dev/VolGroup00/LogVol00
debugfs 1.41.3 (12-Oct-2008)
/dev/VolGroup00/LogVol00: Can't read an inode bitmap while reading inode bitmap
debugfs:
# 2  
Old 01-27-2009
You can mount ext3 filesystems as ext2 filesystems.
# 3  
Old 01-28-2009
Tried mounting as an ext2 file:

mount -t ext2 /dev/VolGroup00/LogVol00 /ramdisk/mydir

This fails with wrong fs type, bad option, bad superblock on /dev/VolGroup00/LogVol00,
missing codepage or other error.
# 4  
Old 01-28-2009
Why didnt you use vgcfgrestore command?
# 5  
Old 01-28-2009
Quote:
Originally Posted by ccj4467
Tried mounting as an ext2 file:

mount -t ext2 /dev/VolGroup00/LogVol00 /ramdisk/mydir

This fails with wrong fs type, bad option, bad superblock on /dev/VolGroup00/LogVol00,
missing codepage or other error.
What happens when you run e2fsck against the filesystem?

Edit: I see you tried running e2fsck already......
# 6  
Old 01-28-2009
Quote:
Originally Posted by vbe
Why didnt you use vgcfgrestore command?
More than likely he did not make a backup with vgcfgbackup

Quote:
vgcfgrestore allows you to restore the metadata of VolumeGroupName from a text backup file produced by vgcfgbackup. You can specify a backup file with --file. If no backup file is specified, the most recent one is used. Use --list for a list of the available backup and archive files of VolumeGroupName.
# 7  
Old 01-28-2009
Neo,

Correct.
Login or Register to Ask a Question

Previous Thread | Next Thread

5 More Discussions You Might Find Interesting

1. Linux

Recovering corrupted LVM data: No readable superblocks

Hi all. Not sure where to post this, so figured I'd start here. I have a LVM2 partition that has become unreadable. I've scoured dozens of threads about the topic and have hit a wall, so any advice is appreciated. Below is what I think shows what my major problem is: First, a simple mount... (3 Replies)
Discussion started by: dargason
3 Replies

2. UNIX for Advanced & Expert Users

How to recover the deleted file in Linux?

hi, i deleted one file from linux please let me know, if we can recover it ? if yes, pls let me know the steps to do.. (3 Replies)
Discussion started by: raghur77
3 Replies

3. Slackware

Linux on LVM

Dear all, I found, in Slackware, without using physical/raw partition Linux can be booted & OS will be in LVM but in general people use /boot from physical/raw partition to boot the RedHat linux System & root and other file systems would be in LVM. My doubt is how a system will be booted without... (5 Replies)
Discussion started by: Tlogine
5 Replies

4. Solaris

recover a corrupted solaris10 system /usr/lib

did something very dump under /usr/lib, eg: overwite a bunch of files from a similar system's /usr/lib, while the system is live.. I have no backup on this..it crashed...and came up with a bunch of device driver load errors and hung... This is Solaris10 update 7 .. I wonder if I could do a... (0 Replies)
Discussion started by: ppchu99
0 Replies

5. Linux

LVM for linux OS?

Hi, What do you means to create so OS Linux directories under LVM? So, I've installed my machine : df Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda3 97943628 524316 92443984 1% / udev 4023852 168 4023684 1% /dev... (1 Reply)
Discussion started by: hiddenshadow
1 Replies
Login or Register to Ask a Question