recovering corrupt file system

Boylan, Ross Ross.Boylan at ucsf.edu
Thu Nov 19 04:39:14 UTC 2015


I guess some of the trouble was that the virtual disk was mounted read-only at the VM level.  When I mounted read/write I was able to do fsck, which gave messages about replaying the logs and a couple messages about changing the inode counts (sorry, don't have the exact words).  Then I ran fsck -f, which didn't report any problems.  Then I mounted it, and everything seems OK.

I'm still interested in the general question about how to diagnose and recover from file system errors, since I have another virtual machine that was backed by a failing real disk.
________________________________________
From: Boylan, Ross
Sent: Wednesday, November 18, 2015 4:35 PM
To: Ext3-users at redhat.com
Subject: recovering corrupt file system

Any recommendations for tools to diagnose and recover problems on an ext4 file system?

In particular:
root at jessie01:~# mount -o ro /dev/markov02/root /mnt/markov02
mount: wrong fs type, bad option, bad superblock on /dev/mapper/markov02-root,
       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try
       dmesg | tail or so.
and e2fsck says
root at jessie01:~# e2fsck /dev/markov02/root
e2fsck 1.42.12 (29-Aug-2014)
/dev/markov02/root: recovering journal
Superblock needs_recovery flag is clear, but journal has data.

markov02/root is an LVM volume, built on partitions from 2 disks in a virtual machine.  The initial symptom was that the VM the disks were in originally would only get as far as busybox when it started.  However, I think the filesystem was OK even after that, since it was visible in busybox and in another VM.  I think virt-manager might have overwritten on of the disks because I left "allocate entire disk now" checked when I moved one of the disks between machines.

I'm making copies of the virtual disks now.
Ross Boylan




More information about the Ext3-users mailing list