1

After a crash and a reboot I noticed I'm suddenly unable to mount one of my hard drives and got this error message instead block count 488378134 exceeds size of device (488377869 blocks). I got two hard drives of this model so I compared the sector count of the affected one with the one working normally by running fdisk -l.

The one that can't be mounted anymore reads 2000397852160 bytes, 3907027055 sectors while the normal one reads 2000398934016 bytes, 3907029168 sectors. It seems that I lost 2113 sectors. Does this mean these sectors have gone bad? Why weren't they replaced?

What perplexes me is that the affected hard drive only is about a year old, wasn't mounted during the crash and has perfect SMART values (0 Offline_Uncorrectable, 0 Reallocated_Sector_Ct, 0 Current_Pending_Sector, etc).

5
  • What does hdparm -N /dev/sda report?
    – user1686
    Jan 4, 2018 at 12:57
  • It says max sectors = 3907027055/3907029168, HPA is enabled.
    – Sesshu
    Jan 4, 2018 at 13:00
  • “Why weren't they replaced?” Replaced by what exactly, the number of sectors on a HDD are finite, and you likely had more then just those sectors go bad. A HDD that os an identical model and size won’t have the same number of sectors though.
    – Ramhound
    Jan 4, 2018 at 13:03
  • 2
    HPA is enabled is the clue. Investigate it. Another question is: why is it enabled? Jan 4, 2018 at 13:33
  • I set the sector count to 3907029168 with hdparm -N and now it works again. HPA was probably enabled by my Gigabyte motherboard.
    – Sesshu
    Jan 4, 2018 at 20:30

1 Answer 1

1

Answering my own question.

Thanks to the comments by grawity and Kamil Maciorowski I was able to solve it:

What does hdparm -N /dev/sda report?

It says max sectors = 3907027055/3907029168, HPA is enabled.

HPA is enabled is the clue. Investigate it. Another question is: why is it enabled?

No sectors had gone bad. The cause was that my Gigabyte motherboard enabled HPA (host protected area) on the disk to backup its BIOS. This was probably done after I accidentally tried to boot from the disk.

To disable HPA again I used hdparm -N p3907029168 /dev/sdc which permanently sets the maximum amount of sectors of /dev/sdc to 3907029168 (physical maximum in my case).

I'm able to access the partition like normal now. Only that 1 MB of my data was erased due to the BIOS backup. I was able to find more information on HPA under this link.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.