Shingled magnetic recording
Shingled magnetic recording (SMR) is a magnetic storage data recording technology used in hard disk drives (HDDs) to increase storage density and overall per-drive storage capacity.
The overlapping-tracks architecture complicates the writing process, since writing to one track also overwrites an adjacent track. If adjacent tracks contain valid data, they must be rewritten as well. As a result, SMR drives are divided into many append-only (sequential) zones of overlapping tracks that need to be rewritten entirely when full, resembling flash blocks in solid-state drives. Device-managed SMR devices hide this complexity by managing it in the firmware, presenting an interface like any other hard disk. Other SMR devices are host-managed and depend on the operating system to know how to handle the drive, and only write sequentially to certain regions of the drive.
History
Seagate started shipping device-managed SMR hard drives in September 2013, stating an increase in overall capacity of about 25% compared to non-shingled storage.
Western Digital (WD), Toshiba, and Seagate have sold SMR drives without labeling them as such, generating a large controversy, as SMR drives behave much slower under some circumstances (such as random writes) than CMR drives.
Heavily overlapped (shingled) tracks also appeared earlier in the consumer helical scan video cassette recorders (VCRs) that were popular in the 1980s and 1990s. In Extended Play (EP or SLP) mode, both VHS and Betamax reduced the track pitch by a factor of three. The severe interference from the adjacent tracks was partially mitigated by the use of slant azimuth recording.
Data management
There are three different ways that data can be managed on an SMR drive: device-managed, host-managed and host-aware.
Device-managed
A device-managed or drive-managed drive appears to the host identically to a non-shingled drive. It is not necessary for the host to follow any special protocols. All handling of data, as it relates to the shingled nature of the storage, is managed by the device. Sequential writes are more efficient. In addition, the host is unaware that the storage is shingled.
The disk controller in a device-managed drive internally handles any re-writing required by the special characteristics of a shingled drive, similar to the way a flash memory controller in a solid-state drive internally handles re-writing required by the special characteristics of flash media.
Until backlash against Western Digital in 2020, this type of SMR drive was often not labelled by the manufacturer, except in disks labelled as "archival".
RAID resilvering tends to overload the cache,
The zoned nature of SMR also means that the disk suffers from write amplification when garbage collecting,
Host-managed
A host-managed device requires strict adherence to a special protocol by the host. Since the host manages the shingled nature of the storage, it is required to write sequentially so as to not destroy existing data. The drive will refuse to execute commands which violate this protocol.
Host-aware
Host-aware is a combination of drive-managed and host-managed. The drive is capable of managing the shingled nature of the storage and will execute any command the host gives it, regardless of if it is sequential or not. However, the host is aware that the drive is shingled, and able to query the drive for fill levels. This allows the host to optimize writes for the shingled nature, while also allowing the drive to be flexible and backwards-compatible.
Protocol
SMR devices are considered zoned devices, as the storage is divided into zones of usually 256 MiB size.
Each zone has a range of LBA addresses associated with it, and all LBA-based commands can be used as long as the sequential requirement is followed on host-managed drives.
SMR devices identify themselves per the following:
A newer version of the sibling standards, ZAC-2/ZBC-2 is under development. The new version introduces a new type of "domains and realms zoned block devices" that allow for non-contiguous LBAs.
The zoned interface is also useful for flash storage. ZNS spec has been released by the NVM Express organization.
Software and application
The higher density of SMR drives, combined with its random-read nature, fills a niche between the sequential-access tape storage and the random-access conventional hard drive storage. They are suited to storing data that are unlikely to be modified, but need to be read from any point efficiently. One example of the use case is Dropbox's Magic Storage system, which runs the on-disk extents in an append-only way.
A number of file systems in Linux are or can be tuned for SMR drives:
In addition to Linux, FreeBSD has protocol-level support for host-managed SMR drives.
Dynamic hybrid SMR
While for traditional SMR models each zone is assigned a type at manufacture time, dynamic hybrid SMR drives allow to reconfigure the zone type from shingled to conventional and back by the customer.