Before we start the test, it is essential to put the disk into a clean, factory-fresh state so that its performance and behaviour is not impacted by any previous history. To achieve this, we will secure-erase it: this wipes any data and resets the flash all at once. On our Linux system the commands are:
# hdparm --user-master u --security-set-pass abcd /dev/sdb ... # hdparm --user-master u --security-erase abcd /dev/sdb ...
This takes around 20 seconds and puts everything back to new. We will then label and partition the disk. For this first stage of testing, we will leave approximately 9% of the SSD unallocated, which will enable the controller to use it for over-provisioning. This is towards the upper end of the recommended 7-10% range, and will assist with house-keeping functions such as wear-levelling, as well as providing spare capacity for when blocks eventually start to fail. So the output from 'parted' is:
# parted /dev/sdb ... (parted) p Model: ATA Samsung SSD 850 (scsi) Disk /dev/sdb: 1024GB Sector size (logical/physical): 512B/512B Partition Table: gpt Number Start End Size File system Name Flags 1 1049kB 934GB 934GB xfs data
Finally, we will format the partition with XFS and mount it to '/data’:
# mkfs -t xfs -l size=96m -i maxpct=1 -f /dev/sdb1 ...
We're all set to start!