This is an old revision of the document!
Table of Contents
Reformatting 520-Byte SAN Drives
Certain hard drives can be found cheap (too cheap) on eBay and through bulk resellers. You attach them to your PC and…no deal. Check your logs and you see Linux complaining about unsupported 520-byte sectors.
What to do?
Some drive models can be reformatted to support the traditional 512-byte sector size using the sg_utils package and/or the setblocksize utility.
Process
Drives were tested under Debian Linux 12.9. SAS drives were attached to an LSI SAS2308 (also SAS9207-8i) PCIe controller with firmware revision 20.00.06.00-IT.
Once identifying the drive with the *sg_map* and *sginfo* commands, the successful reformat command was:
sg_format –format –size=512 -v <device name e.g. /dev/sg0>
It has been reported (not tested) that certain drives (e.g. HP 3PAR/Sandisk SAS 1.92TB SSD aka DOPE1920S5xnNMRI) require the “–six” option to accommodate 6-byte MODE SENSE vs the default 10-byte):
sg_format –format –size=512 –six -v <device name e.g. /dev/sg0>
It is not known yet whether sg_utils will work on SATA drives. Since they use the ATAPI command set vs SCSI, probably not.
Tested Drives
Make | Model | Size | Interface | Test | Notes |
---|---|---|---|---|---|
HGST | HUSMM8080ASS200 | 800GB | SAS | OK | Double-height 2.5“ SSD |
Micron | MTFDDAK200MAN-2S1AA1) | 200GB | SATA | NO | AKA P400m, probably locked firmware |