Robinson Maureira Castillo
2003-Jun-10 19:44 UTC
mke2fs incorrectly detects partition size
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi all, 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. 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? Thanks in advance, PS: please CC me the responses, since I'm not on this list, thank you. - -- Robinson Maureira Castillo Gerencia de Sistemas y Tecnologias INACAP - -- "Unix is simple and coherent, but it takes a genius (or a programmer at any rate) to understand and appreciate it's simplicity" - Dennis Ritchie -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE+5jUXHaH/ruUfNtURAn1gAJ9qReWBocYX7jmHisckr7Bh1WKDhQCgiTo+ 2NVRfwYKOSWDC7fNMJw4VyA=TI9+ -----END PGP SIGNATURE-----
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