Overprovisioning an SSD

Issues related to hardware problems
Post Reply
kbocek
Posts: 242
Joined: 2005/05/30 15:40:15
Location: Benicia CA, USA

Overprovisioning an SSD

Post by kbocek » 2017/02/07 18:21:34

I'd like to over-provision an SSD and then install CentOS 7. I am following the directions:

https://www.thomas-krenn.com/en/wiki/SS ... ing_hdparm

And am booting into SystemRescueCD to perform the hdparm steps and then booting into the CentOS installer.

It looks like CentOS disables the HPA I have setup. Does anyone have any ideas?

User avatar
avij
Retired Moderator
Posts: 3046
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: Overprovisioning an SSD

Post by avij » 2017/02/07 18:54:56

There is discussion about the ignore_hpa parameter at the end of the page you linked to. Perhaps adding the parameter to the kernel's command line would do the trick.

Note that you do not need to enable HPA to achieve your goal. It would suffice to secure erase your SSD (you would need to do that anyway, unless you're dealing with a brand new SSD) and when creating partitions, simply leave some part of the disk unpartitioned. I have a 220GB partition on my 240GB SSD, for example.

kbocek
Posts: 242
Joined: 2005/05/30 15:40:15
Location: Benicia CA, USA

Re: Overprovisioning an SSD

Post by kbocek » 2017/02/07 19:27:17

Thanks for the reply avij.

I got it to work by running through the procedure a second time. I did reboot after hdparm and then manually create a partition in SystemRescueCD. So I'm not sure what I did wrong.

Code: Select all

# hdparm -N /dev/sda

/dev/sda:
 max sectors   = 99646696/117231408, HPA is enabled
Is what you are saying is that simply not assigning all space to partitions while in the installer is enough to create the HPA?

kbocek
Posts: 242
Joined: 2005/05/30 15:40:15
Location: Benicia CA, USA

Re: Overprovisioning an SSD

Post by kbocek » 2017/02/07 19:42:58

So now I'm trying to get the filesystem configured. Lots of sources say to add "noatime, discard" to your fstab. But then the post here:

https://johnsontravis.wordpress.com/201 ... -centos-7/

says:
For the ‘discard’ method, according to mount man page, ‘noatime’ mount option is not recommended as it can prevent certain application such as mutt from functioning properly despite ‘noatime’ option being recommended by several sources for SSD optimization. The man page suggested to use ‘relatime’ mount option instead, but I’ve yet to find documentations backing this option for SSD optimization.
I've enabled fstrim.timer and removed discard but am confused about the conflicting information on noatime.

User avatar
avij
Retired Moderator
Posts: 3046
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: Overprovisioning an SSD

Post by avij » 2017/02/07 22:24:35

kbocek wrote:Is what you are saying is that simply not assigning all space to partitions while in the installer is enough to create the HPA?
It will not create the Host Protected Area, but if you know what you are doing and create the partitions without allocating some part of the disk, you have achieved your goal of giving the SSD some breathing space. Partitioning utilities will say that there is unallocated space, but you will know why that is so. HPA is only to make sure the operating system does not allocate more of the disk than it should. Some operating systems might allocate the entire disk mostly automatically, but with CentOS, you have better control of the partitioning process.

As for the mount options, I have been using 'noatime' on all my disks (SSD or not) for years without problems. YMMV. I'm not using 'discard', but instead use fstrim every now and then. 'discard' would probably work just as well.

User avatar
TrevorH
Site Admin
Posts: 33215
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Overprovisioning an SSD

Post by TrevorH » 2017/02/07 22:34:32

relatime is already the default mount option, noatime is better from POV of incurring less write activity and if your apps function with it then it's good to use it.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

kbocek
Posts: 242
Joined: 2005/05/30 15:40:15
Location: Benicia CA, USA

Re: Overprovisioning an SSD

Post by kbocek » 2017/02/08 18:24:33

avij wrote:
kbocek wrote:Is what you are saying is that simply not assigning all space to partitions while in the installer is enough to create the HPA?
As for the mount options, I have been using 'noatime' on all my disks (SSD or not) for years without problems. YMMV. I'm not using 'discard', but instead use fstrim every now and then. 'discard' would probably work just as well.
Thanks Trevorh and Avij. That's what I've ended up with: noatime but not discard. I've turned on the fstrim service as suggested.

Post Reply