Skip to content

Instantly share code, notes, and snippets.

@dasjoe
Created May 29, 2016 17:19
Show Gist options
  • Save dasjoe/e3c79523bff13bad3938348a63f07843 to your computer and use it in GitHub Desktop.
Save dasjoe/e3c79523bff13bad3938348a63f07843 to your computer and use it in GitHub Desktop.
Set up custom over-provisioning of 25% by setting the host-protected area
# Samsung 850 Pro 256 GB: 2 * 8 * 86 Gibit + 2 * 4 * 86 Gibit
# 541065216 - actual 512B sectors
# 500118192 - visible sectors, rest is hidden even to hdparm
# 405798912 - 25% OP, mod 8 = 0 for ashift=12
#
hdparm -Np405798912 --yes-i-know-what-i-am-doing /dev/disk/by-id/ata-Samsung_SSD_850_PRO_256GB_S251NX0H441956W
hdparm --user-master u --security-set-pass Eins /dev/disk/by-id/ata-Samsung_SSD_850_PRO_256GB_S251NX0H441956W
time hdparm --user-master u --security-erase Eins /dev/disk/by-id/ata-Samsung_SSD_850_PRO_256GB_S251NX0H441956W
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment