Saturday, October 27, 2018

storage - New hard drive: checklist before entering your workflow?

1, 2... 4+ TiB of data makes a lot of (here choose the appropriate) work/recording/stress/time-to-eg-rebuild-the-array when put on an drive of unknown health.


When getting your hands on a spinning hard drive be it new or not, what points do you check on the hard drive (aka checklist) before you start filling it up with data... or send it back for replacement? By points I do mean points (not tools which are a matter of possibilities eg. OS, and preference, thanks @Franck Michael for pointing this).


Get the physical sector size (for partition alignment, filesystem or raid/lvm setup). eg


# fdisk -l /dev/DRIVE
Disk /dev/sdc: 931,5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes «-- physical sector size
I/O size (minimum/optimal): 4096 bytes / 4096 bytes «--

Check S.M.A.R.T. values for possible defect ? eg


# smartctl -a /dev/DEVICE \
| grep -i 'ID\|reallocated\|pending\|uncorrectable'

As any bad value (eg. Val/ue > Worst) for Reallocated_Sectors, offline uncorrectable, pending sectors, and Error log, is bad news and brings the hdd to warranty. [2]


Check blocks reliability? if so on whole disk? eg


# dd if=/dev/zero of=/dev/sdb bs=[physical sector size] & pid=$!
kill -USR1 $pidnumer

Where the kill -USR1 $pidnumer shows how far the zeroing has progressed. conv and noerror can be added to ensure that every block is tried and upon error (errors are shown in terminal) the zeroing continues [2]


Do you trust S.M.A.R.T. report and if so, which ones? Or do you run additional/other test [3] before you trust the hard drive start using it?


I'd like very much to hear your options.


[2]: Thanks to @DebianJunkie at Hard drive checking by using dd and md5sum tools
[3]: like Bonnie++, Hitachi Drive Fitness Test, HDD Regenerator which I know very little about.

No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...