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.[1] Conventional hard disk drives record data by writing non-overlapping magnetic tracks parallel to each other (perpendicular magnetic recording, PMR), while shingled recording writes new tracks that overlap part of the previously written magnetic track, leaving the previous track narrower and allowing for higher track density. Thus, the tracks partially overlap similar to roof shingles. This approach was selected because physical limitations prevent recording magnetic heads from having the same width as reading heads, leaving recording heads wider.[2][3][4]:79

Partial updating of data is difficult with SMR. Data will be written to adjacent tracks that do not need to be rewritten.

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. [4]:11 ff.[5] While SMR drives can use DRAM and Flash memory caches to improve writing performance, continuous writing of large amount of data is slower than with PMR drives.[6][7][8]

History

Seagate has been shipping device-managed SMR hard drives since September 2013, while referring to an increase in overall hard disk drive capacity of about 25%, compared to non-shingled storage.[1] In September 2014, HGST announced a 10 TB drive filled with helium that uses host-managed shingled magnetic recording,[9] although in December 2015 it followed this with a 10 TB helium-filled drive that uses conventional non-shingled perpendicular recording.[10] In November 2018, HGST introduced 14 TB and 15 TB drives.[11]

Western Digital, and Toshiba have begun selling SMR drives without labeling them as such, thus creating a large controversy, as SMR drives are much slower in some circumstances than PMR drives.[12] These practices were used in both data storage-dedicated (for servers, NASes and cold storage) and consumer-centric HDDs.

Data management

There are three different ways that data can be managed on an SMR drive:[13][14]

  • Device Managed
  • Host Managed
  • Host Aware

Device managed

A Device 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.[4]

This type of SMR drive is often not labelled by the manufacturer. Its firmware-controlled shingle translation layer operation can be compared to solid state drives, as LBA addresses do not correlate much to on-disk structure. The append-only zones are very slow for random writing, so writes are first sent to a PMR cache, and the disk moves these data to SMR parts when idle. RAID resilvering tends to overload the cache, sending SMR drives into minutes-long pauses. Faulty firmware (such as WD40EFAX) may also throw an error when asked to read an address never written to. Both behaviors tend to be interpreted as drive failure by the RAID controller.[15]

The zoned nature of SMR also means that the disk suffers from write amplification when garbage collecting,[16] although for hard drives the main problem with writes is speed instead of longevity. Some SMR hard drives support TRIM for this reason.[17]

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.[4]

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.[4]

Protocol

SMR devices are considered zoned devices, as the storage is divided into zones of usually 256 MiB size.[18] Two sets of specialized commands, ZBC (Zoned Block Commands, ANSI INCITS 536) for SCSI and ZAC (Zoned ATA Commands, ANSI INCITS 537) for SATA are available for SMR devices. They tell the host about whether each zone is PMR or SMR and allow them to address these zones directly.[19] Unless specifically mentioned, the commands are only available on host aware/managed devices. The specific commands are:[20]

  • REPORT ZONES, for information on disk layout and zone status (such as the write pointer, the last-written position in a sequential zone)
    • SMR or similar zones are sequential required on host-managed drives, but sequential preferred on host-aware ones.
  • RESET WRITE POINTER, for rewinding the write pointer so a sequential zone becomes empty
  • OPEN ZONE, for explicitly declaring access to a zone and locking the associated firmware resources
  • CLOSE ZONE, to unlock an opened zone
  • FINISH ZONE, fill a zone full and make it readable

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:[21][22][4]:14

  • Host-aware or device-managed drives are marked as normal block devices (SCSI 00h), so they can be recognized as a normal hard drive.
    • A ZONED field shows whether the drive is device-managed, host-aware, or neither. This is found in the SCSI Block Device Characteristics VPD page and the ATA capabilities log page.
  • Host-managed drives use a new device type (SCSI 14h). Only ZAC/ZBC-aware computers can detect and use them.

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.[23] A Western Digital representative proposes to retire the ZONED field in the new revision.[24]

The zoned interface is also useful for flash storage. A version is under consideration by the NVM Express organization.[25]

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.[26] Device-managed SMR disks have also been marketed as "Archive HDDs" due to this property.[27]

A number of file systems in Linux are or can be tuned for SMR drives:[28]

  • F2FS, originally designed for flash media, has a Zoned Block Device (ZBD) mode. It can be used on host-managed drives with conventional zones for metadata.
  • Btrfs ZBD support is in progress, but it already writes mostly sequentially due to the CoW nature.
  • ext4 can be experimentally tuned to write more sequentially. Ted Ts'o and Abutalib Aghayev gave a talk in 2017 on their ext4-lazy. Seagate also has a more radical "SMRFFS" extension from 2015 that makes use of the ZBC/ZAC commands.[29]
  • For other filesystems, the Linux device mapper has a dm-zoned target that maps a host-managed drive into a random-writable drive. Linux kernel since 4.10 can perform this task without dm.[30] A zonefs from 2019 exposes the zones as files for easier access.[31]

In addition to Linux, FreeBSD also has protocol-level support for host-managed SMR drives.[18] As of April 2020, neither Windows nor macOS supports the ZBC/ZAC commands required for such drives to work.

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.[32][33] Adjusting the SMR/PMR setting helps suit the drive to the current workload of "hot" and "cold" data.[16]

See also

References

  1. Anand Lal Shimpi (September 9, 2013). "Seagate to Ship 5TB HDD in 2014 using Shingled Magnetic Recording". AnandTech. Retrieved February 9, 2015.
  2. Roger Wood (October 19, 2010). "Shingled Magnetic Recording and Two-Dimensional Magnetic Recording" (PDF). ewh.ieee.org. Retrieved December 14, 2014.
  3. "What is Shingled Magnetic Recording (SMR)?". storagereview.com. January 30, 2015. Retrieved February 9, 2015.
  4. Mary Dunn; Timothy Feldman (September 22, 2014). "Shingled Magnetic Recording: Models, Standardization, and Applications" (PDF). Storage Networking Industry Association. Retrieved February 9, 2015.
  5. Jake Edge (March 26, 2014). "Support for shingled magnetic recording devices". LWN.net. Retrieved December 14, 2014.
  6. Shilov, Anton. "The Evolution of HDDs in the Near Future: Speaking with Seagate CTO, Mark Re". www.anandtech.com. Retrieved May 30, 2020.
  7. Salter, Jim (April 17, 2020). "Buyer beware—that 2TB-6TB "NAS" drive you've been eyeing might be SMR". Ars Technica. Retrieved May 30, 2020.
  8. Alcorn, Paul. "Sneaky Marketing Redux: Toshiba, Seagate Shipping Slower SMR Drives Without Disclosure, Too". Tom’s Hardware. Retrieved April 17, 2020.
  9. Geoff Gasior (September 9, 2014). "Shingled platters breathe helium inside HGST's 10TB hard drive". The Tech Report. Retrieved February 9, 2015.
  10. Sebastian Anthony (December 3, 2015). "HGST releases helium-filled 10TB hard drive; Seagate twiddles shingled fingers". Ars Technica. Retrieved December 3, 2015.
  11. "15TB and 14TB SMR Hard Drives Ultrastar DC HC620". www.hgst.com. Retrieved October 30, 2018.
  12. Salter, Jim. "Sneaky Marketing Redux: Toshiba, Seagate Shipping Slower SMR Drives Without Disclosure, Too". Ars Technica. Retrieved June 17, 2020.
  13. "Zoned Block Commands (ZBC)" (PDF). t10.org. ANSI T10 Committee. Retrieved January 22, 2018.
  14. Campello, Jorge (September 24, 2015). "SMR: The Next Generation of Storage Technology" (PDF). Retrieved January 22, 2018.
  15. Mellor, Chris (April 15, 2020). "Shingled hard drives have non-shingled zones for caching writes". Blocks and Files.
  16. Brewer, Eric; Ying, Lawrence; Greenfield, Lawrence; Cypher, Robert; T'so, Theodore (2016). "Disks for Data Centers". Proceedings of USENIX FAST 2016.
  17. "TRIM Command Support for WD External Drives". WD support.
  18. zonectl(8)  FreeBSD System Manager's Manual
  19. "SMR (Shingled Magnetic Recording) 101". Tom's IT Pro. Archived from the original on June 11, 2017. Retrieved March 3, 2018.
  20. "Introduction to Shingled Magnetic Recording". ZonedStorage.io.
  21. "Information technology - ATA Command Set - 4 (ACS-4), Draft revision 18" (PDF).
  22. Seagate. "SCSI Commands Reference Manual, Rev. J" (PDF). p. 472.
  23. T10, 2020.
  24. Weber, Ralph O (April 23, 2020). "SBC-5, ZBC-2: Obsolete the ZONED field" (PDF). www.t10.org.
  25. "NVMe Zoned Namespace". ZonedStorage.io.
  26. Magic Pocket Hardware Engineering Teams. "Extending Magic Pocket Innovation with the first petabyte scale SMR drive deployment". dropbox.tech.
  27. "Archive HDD" (PDF). Seagate. Retrieved March 3, 2018.
  28. "File Systems". ZonedStorage.io.
  29. "Seagate/SMR_FS-EXT4: an addition to the popular EXT4 to enable support for devices that use the ZBC or ZAC standards". Seagate Technology. December 10, 2019.
  30. "Device Mapper". ZonedStorage.io.
  31. Le Moal, Damien. "fs: New zonefs file system". lwn.net.
  32. Collins, Brendan (November 13, 2017). "Dynamic Hybrid SMR". Western Digital. Retrieved August 25, 2018.
  33. "Dynamic Hybrid-SMR: an OCP proposal to improve data center disk drives". blog.google. November 13, 2017. Retrieved January 22, 2018.

Specifications

This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.