1

So, I got a new SSD. I decided to use GPT instead of MBR on it, so I'm a bit lost. It ended up getting corrupted. I'm not for sure if the GPT just didn't take the host protected area into account, or if my SSD actually lost some data. So, I'm trying to just get it to mount right now. The problem is I get this error from gparted that the partition is too big:

Problem: The secondary header's self-pointer indicates that it doesn't reside at the end of the disk. If you've added a disk to a RAID array, use the 'e' option on the experts' menu to adjust the secondary header's and partition table's locations.

Problem: Disk is too small to hold all the data! (Disk size is 390717734 sectors, needs to be 488397168 sectors.) The 'e' option on the experts' menu may fix this problem.

Problem: GPT claims the disk is larger than it is! (Claimed last usable sector is 488397134, but backup header is at 488397167 and disk size is 390717734 sectors. The 'e' option on the experts' menu will probably fix this problem

Problem: partition 1 is too big for the disk.

Identified 4 problems!

(there was also a CRC error, but I restored the GPT from the backup structures and that went away)

I've tried doing the e option in experts mode, but only the CRC error went away, not these problems.

How can I fix this to attempt to repair the FS and get it to mount? I have backups, but it'd mean I'd lose some work since I last did a backup.

Also, does this sound like data corruption or like something that could spawn from it not taking the HPA into account?

1 Answer 1

2

First, a minor point: The problem messages you quoted come from GPT fdisk (gdisk, sgdisk, or cgdisk), not from GParted. I just want to clarify that in case somebody gets confused over it in the future.

The Host Protected Area (HPA) is a mess, since some OSes seem to ignore it, which can result in the sort of error you're seeing. If you're using an HPA, consider disabling that feature. If this is the source of the problem, you'll almost certainly need to do this in order to recover your data, since the messages you quoted clearly indicate that your disk has a partition that's greatly in excess of the available space. This could happen if you partitioned the disk with an HPA-ignorant OS or if you partitioned before setting an HPA and if you subsequently moved to an HPA-honoring OS or set an HPA.

Since your tags indicate you're using Linux, you can check for the disk's HPA status with hdparm:

$ sudo hdparm -N /dev/sda

/dev/sda:
 max sectors   = 976773168/976773168, HPA is disabled

This shows a disk with HPA disabled; it would show something else with HPA enabled.

It's also possible that your SSD is malfunctioning. If this is the case, you'll have to back up as much of the data as you can and send the disk back for repair or replacement.

3
  • That's the odd thing. I enabled HPA manually with hdparm before formatting and partitioning. I also ensured that the usable sectors was what I expected before hand.. then one reboot later and now the size seems to have changed. I can't remember what the size was, so I don't know for sure if it changed or anything
    – Earlz
    Mar 4, 2013 at 20:38
  • Ah, looking at hdparm -N, it's now showing max sectors as that exact number needed... I know I partitioned with HPA enabled, but somehow it didn't take it into effect or something
    – Earlz
    Mar 4, 2013 at 20:40
  • Thank you Rod Smith (@rod-smith), I had similar error messages from gdisk and disabling HPA worked for me. Maybe gdisk could suggest HPA being the problem in cases like this?
    – ile
    Jul 10, 2019 at 1:16

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.