Mount and tune2fs disagree

Luciano Miguel Ferreira Rocha strange at nsk.no-ip.org
Sun Apr 4 12:22:59 UTC 2004


On Sun, Apr 04, 2004 at 01:44:37PM +0200, shmuel siegel wrote:
> If I run 
> mount /dev/hda1 /mnt 
> I get a 32 megabyte file system using 6 meg but neither ls nor du find
> any files.
> 
> both tune2fs and e2fsck think that it is a 273 megabyte partition and
> e2fsck says that the file system is okay. In fact e2fsck says that there
> are 3 directories and 90 regular files.
> 
> We will assume that I messed up my drive somehow when I installed fc2 t2
> on a partition magic formatted drive. (I got the usual warning about the
> disk parameters). I also did other things later which probably didn't
> help and therefore it is too late to resolve the cause of the problem.
> The real questions are
> 1) why are the two methods producing different results

I suspect the partition was previously formated in a different filesystem.
Specifically, FAT.

It has happened to me, and I had to specify -t ext3 to mount. Otherwise,
the first filesystem type it tried was vfat.

> 2) how can I recover my data

It isn't lost. Just try mount /dev/hda1 /mnt -t ext3 (or -t ext2).

> 3) what information would I need in order to file a useful bug report

Well, it's not really a bug (if it is what I think it is).

You could fix this behaviour by changing /etc/filesystems to have
ext2/ext3 before any FAT one.

Or empty the first sectors of the partition, that still have a FAT
superblock. I don't know the exact empty space that a ext2 filesystem
leaves at the beginning, so I would create a backup, dd if=/dev/zero
of=/dev/hda1 bs=4M, recreate the filesystem and restore the backup.

Regards,
Luciano Rocha





More information about the fedora-test-list mailing list