hdparm hpa gone bad

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

azev

Well-Known Member
Jan 18, 2013
768
251
63
So I've decided to play around with setting up HPA to overprovision ssd this morning, but unfortunately I think I screwed something up.

I used a core duo pc running centos7 to setup the HPA and was using Thomas Kern Guide.
First of all I did make a typo on the number of block for the HPA setup and realized that after the command was ran my SSD size srunk down to 8gb (Vertex4 120gb) and HPA is showing disabled.

I tried using any HD tools I know off to try and restore with no luck and curious if any of you guys know of any trick ??

Thanks
 

azev

Well-Known Member
Jan 18, 2013
768
251
63

mstone

Active Member
Mar 11, 2015
505
118
43
46
In my case HPA is not recognized and the drive only shows maximum size of 8Gb.
My goal was to overprovision the ssd from 120Gb to 80Gb, but I missed a 0 when punching in the commands :(
At this point I have opened a ticket with OCZ and I suppose worse case I am going to push for an RMA.
An RMA because you entered the wrong command?
 

Stanza

Active Member
Jan 11, 2014
205
41
28
In my case HPA is not recognized and the drive only shows maximum size of 8Gb.
My goal was to overprovision the ssd from 120Gb to 80Gb, but I missed a 0 when punching in the commands :(
At this point I have opened a ticket with OCZ and I suppose worse case I am going to push for an RMA.
try on a different machine 1st,

Some controllers have issues with HPA (from memory) either completely ignoring it... or not reading it correctly.

As you have found out HDPARM is a very powerful... but also dangerous tool...

.
 

azev

Well-Known Member
Jan 18, 2013
768
251
63
I tried different machine, different OS, Ubuntu, (did the command on a centos) with no luck.
For some reason when the command was entered in completely screwed up the drive.


root@ubuntu:~$ sudo hdparm -N /dev/sda

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


root@ubuntu:~$ sudo hdparm -N p250069680 /dev/sda

/dev/sda:
setting max visible sectors to 250069680 (permanent)
SET_MAX_ADDRESS failed: Input/output error
max sectors = 15041804/15041804, HPA is disabled

I guess I learn my lesson that setting up HPA with HDPARM could be a permanent thing, so you better not have a typo.