On Wed, Feb 18, 2015 at 9:47 AM, Richard W.M. Jones
<rjones@redhat.com> wrote:
On Wed, Feb 18, 2015 at 09:41:52AM -0500, Leonard Basuino wrote:
> On Wed, Feb 18, 2015 at 6:52 AM, Richard W.M. Jones <rjones@redhat.com>
> wrote:
>
> > On Tue, Feb 17, 2015 at 01:37:55PM -0500, Leonard Basuino wrote:
> > > I get the following debug info:
> > >
> > > mount -o /dev/sda1 /
> > > [ <time> ] EXT4-fs (sda1): mounting ext2 file system using the ext4
> > > subsystem
> > > [ <time> ] EXT4-fs (sda1): bad geometry: block count 104388 exceeds size
> > of
> > > device (103408 blocks)
> > > mount: wrong fs type, bad option, bad superblock on /dev/sda1
> >
> > It looks as if the image is properly corrupt. My suggestion
> > is to try 'virt-rescue' on it.
> >
> > virt-rescue --suggest -a <image>
>
> Inspecting the virtual machine or disk image ...
>
> This disk contains one or more filesystems, but we don't recognize any
> operating system. You can use these mount commands in virt-rescue (at the
> ><rescue> prompt) to mount these filesystems.
>
> # /dev/sda1 has type 'ext2'
> mount /dev/sda1 /sysroot
>
> So I tried ...
>
> ><rescue> mount /dev/sda1 /sysroot
> [<time>] EXT4-fs (sda1): mounting ext2 filesystem using the ext4 subsystem
> [<time>] EXT4-fs (sda1): bad geometry: block count 104388 exceeds size of
> device (103408 blocks)
> mount: wrong fs type, bad option, bad superblock on /dev/sda1,
> missing codepage or helper program, or other error
>
> In some cases useful info is found in syslog - try
> dmesg | tail
>
> I don't think the image is corrupt because a colleague is able to mount it
> with guestfish on a RHEL 6 box.
This is pretty strange, and may, I suppose, indicate a kernel bug of
some kind. I imagine it's possible that (a) the ext4 driver doesn't
understand some very obscure ext2 feature, and (b) since hardly anyone
uses ext2, this bug has never been discovered before. Or it may be as
Pino says that the filesystem is really truncated and ext4.ko is
correctly moaning about that, but ext2.ko in RHEL 6 ignored it.
Does running `e2fsck -n /dev/sda1' under virt-rescue show up any
errors?
><rescue> e2fsck -n /dev/sda1
e2fsck 1.42.9 (28-Dec-2013)
The filesystem size (according to the superblock) is 104388 blocks
The physical size of the device is 103408 blocks
Either the superblock or the partition table is likely to be corrupt!
Abort? no
/boot contains a file system with errors, check forced.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/boot: 36/26104 files (2.8% non contiguous), 12201/104388 blocks
Anything interesting in the output of `tune2fs -l /dev/sda1'?
I'm not retyping all of the output ... interesting?
Filesystem state: not clean
Block count: 104388
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html