Shingled magnetic recording is a hard disk recording method where multiple tracks are written in a slightly overlapping manner1. Because the write head is larger than the read head, mainly because it needs to generate a strong enough magnetic field to affect the disk, you can increase density by partially overwriting the data you are recording. If you are looking at it by height, you would get with a 50% overlap, and four tracks:
Action | A | B | C | D | D2 |
---|---|---|---|---|---|
Write A | A | A | ? | ? | ? |
Write B | A | B | B | ? | ? |
Write C | A | B | C | C | ? |
Write D | A | B | C | D | D |
You see that you can increase density nicely, but in order to update any track but D you would also need to rewrite the tracks below them to prevent data loss. Assuming that you group your tracks into groups of 8, you would roughly need 10 half tracks in height (one half track is needed for synchronization info), instead of 16 with conventional recording, but worst case your write speed is reduced by a factor of 8 when updating track A.
This is awful performance for random access data, but can be fast enough with only large files. The OS can then tell the drive which sectors have been deallocated, and the disk no longer needs to restore those tracks. This is done with a TRIM command. In addition, you want a small percentage of the disk set aside to use conventional recording, so that you can update your file meta data quickly. This seems to be rarely implemented.
Under Linux, you can use hdparm -I /dev/sda
to get detailed HDD info. fstrim
can be used to trim unused space on a partition, if the filesystem does not do this automatically. This is especially useful for a freshly reformatted disk to ensure the disk firmware treats the data as unused.
- There is a more technical overview at zonedstorage.io ⏎