Re: mke2fs incorrectly detects partition size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 10, 2003 at 03:44:19PM -0400, Robinson Maureira Castillo wrote:
> 
> I don't know if this is the right list, but here goes what happened 
> recently to me.
> 
> I have an IDE disk (hda: QUANTUM FIREBALLP AS20, ATA DISK drive / hda: 
> 39851760 sectors (20404 MB) w/1902KiB Cache, CHS=2480/255/63, UDMA(100)) 
> connected to 00:1f.1 IDE interface: Intel Corp. 82801BA IDE U100 (rev 12)
> 
> I've decided to make a partition, so I've fired up fdisk and make a new 
> one (hda7) of 4GB, as you can see in this line:
> 
> /dev/hda7          1170      1679   4096543+  83  Linux
> 
> Then I've run mke2fs -j /dev/hda7, mounted it, copied data to it, umount 
> it. I've not rebooted.

That was your problem.  If you had a partition in /dev/hda mounted,
the kernel doesn't reread the partition table.  Normally fdisk warns
you that the partition table wasn't reread, and that you need to
reboot in order for the partition table changes in order to take
effect.

> Now I'm trying to mount it back, after a reboot, and mount refuses to 
> mount it, kernel gives me this message:
> 
> VFS: Can't find ext2 filesystem on dev ide0(3,7).
> 
> Remembering what happened, I noted that the partition got formated like if 
> it was just 1GB. All this was done using kernel 2.4.18-27.7.x under RedHat 
> 7.3
> 
> Any idea of what caused this? And hopefully how can I get my data back?

If you remember the partition table layout before you changed things,
you can reset the partition table, and then you should be able to see
your filesystem again.  (Basically, it was created in whatever the
original /dev/hda7 was located, because the partition table change
didn't take effect when you ran mke2fs and mounted the filesystem.)

						- Ted


_______________________________________________

Ext3-users@redhat.com
https://www.redhat.com/mailman/listinfo/ext3-users

[Index of Archives]         [Linux RAID]     [Kernel Development]     [Red Hat Install]     [Video 4 Linux]     [Postgresql]     [Fedora]     [Gimp]     [Yosemite News]

  Powered by Linux