LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Cannot mount hard disk: block count exceeds size of device --- bad partition table (https://www.linuxquestions.org/questions/linux-general-1/cannot-mount-hard-disk-block-count-exceeds-size-of-device-bad-partition-table-880149/)

SUD_Piwi 06-01-2014 03:58 PM

Quote:

Originally Posted by R00ts (Post 4427361)
PROBLEM SOLVED

I was suggested to do the following:

Code:


$ sudo fsck.ext4 /dev/sda
e2fsck 1.41.14 (22-Dec-2010)
The filesystem size (according to the superblock) is 122096646 blocks
The physical size of the device is 122096381 blocks
Either the superblock or the partition table is likely to be corrupt!
Abort<y>? no

Backup 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
Backup: 223131/30531584 files (0.1% non-contiguous), 44383187/122096646 blocks

$ sudo mkdir /mnt/backup

$ sudo mount -t ext4 /dev/sda /mnt/backup
mount: wrong fs type, bad option, bad superblock on /dev/sda,
      missing codepage or helper program, or other error
      In some cases useful info is found in syslog - try
      dmesg | tail  or so

Looks familiar. And looking at dmesg | tail:

Code:

$ dmesg | tail
[359222.668707] EXT4-fs (sda): bad geometry: block count 122096646 exceeds size of device (122096381 blocks)

Also seen that before. I did some searching and thought that maybe using resize2fs (resize filesystem) was a command that could help. I asked if they thought this was correct and whether there was anything else I should try. They suggested I also try:

Code:

$ sudo mount -t ext4 -o ro /dev/sda /mnt/backup
Which failed the same way as the earlier mount attempt. Then I took a deep breath and resized the filesystem as he suggested:

Code:

$ sudo resize2fs /dev/sda 465G
resize2fs 1.41.14 (22-Dec-2010)
Resizing the filesystem on /dev/sda to 121896960 (4k) blocks.
The filesystem on /dev/sda is now 121896960 blocks long.

And after that, mounting my drive was successful and I can access all my data again! :D :D :D



Thank you all to have offered their advice and help throughout this ordeal. Its kind of a face palm moment when you realize that all this reading and researching and asking questions and worrying was solved by running a single, simple command-line application. But its bee n a learning experience!

Man! Thanks for all of this research and effort! I have been wondering around internet since last month as I had the same problem as yours, however, the root of my problem was different.

The drive that I had issues with comes from a WiFi router (D-link model DIR-685). It has a HDD bay to plug in a standard 2.5 SATA, since the beginig this router was very hard to configured to have it as a storage server, once it was working, few days later when I was uploading some files I noticed that the date was wrong (it was 2013 and the date was Dec 2012) so when I tried to change it in the router console, it didn't let me put anything higher that Dec 31 2012!!! I looked for any firmware upgrade but there was none, in the support page the model was not listed. After those issues came up I started having issues trying to access my data up to a point in which I was no longar able to even see the drive.

I'm writing all my description just in case someone else is having the same problem.
And thanks again everyone!!!


All times are GMT -5. The time now is 06:30 AM.