{"id":343,"date":"2011-06-24T21:09:36","date_gmt":"2011-06-25T04:09:36","guid":{"rendered":"http:\/\/www.smallersystems.com\/blog\/?p=343"},"modified":"2011-06-24T21:09:36","modified_gmt":"2011-06-25T04:09:36","slug":"how-does-ltfs-work","status":"publish","type":"post","link":"https:\/\/michaelrichmond.net\/blog\/2011\/06\/24\/how-does-ltfs-work\/","title":{"rendered":"How does LTFS work?"},"content":{"rendered":"<p>The Linear Tape File System (LTFS) relies on support for partitioning was introduced in LTO generation 5. Partitioning a LTO5 cartridge divides the media in two separate data storage areas known as &#8220;partitions&#8221;. Each partition can be written to without impacting data stored in the other partition on the media.<\/p>\n<p>A data tape formatted for use with LTFS has two partitions, an Index Partition (IP) and a Data Partition (DP). The Index Partition has a relatively small capacity of 37.5GB. The Data Partition comprises the remaining 1.43TB of available capacity on the media.<\/p>\n<p>LTFS writes an Index that holds all the file and folder meta-data for the LTFS Volume to the Index Partition. The <a href=\"http:\/\/www.ultrium.com\/technology\/ltfs.html\">LTFS Format Specification<\/a> defines that a consistent LTFS Volume must, along with other properties, have the most-recent Index written to the end of both the IP and the DP. In the diagram below, &#8220;Index<sup>2<\/sup>&#8221; is the most-recent Index. The specification defines that an LTFS  Volume must be consistent when it is exchanged with another system. In practice, this means that any compliant implementation of the specification that operates on an LTFS Volume must ensure that the media is consistent when the media is ejected.<\/p>\n<p>At mount-time the LTFS software reads the current Index from the IP and builds an in-memory structure representing all of the folders and files stored on the media. This structure contains meta-data such as file timestamps, file permissions, file name, file size, etc. The structure also contains the location on the DP for each data extent that holds part of the file content.<\/p>\n<p>When a user or an application traverses a mounted Linear Tape File System the LTFS software can return filenames, folders, timestamps, file sizes, and other meta-data from the in-memory index structure. When the user double-clicks on a file to open it, or an application reads from a file the LTFS software causes the tape drive to seek to the start of the relevant data extents and reads the data from the tape media.<\/p>\n<p>LTO5 tape drives are able to stream data for reading and writing at 140MB\/s. This speed is about 40% higher than the best hard-drives which top out at around 100MB\/s. Of course, since LTO data tape is sequential access media there is a high seek time for data tape. Worst case seek time is moving from one end of the physical tape to the other end. An end-to-end seek will take roughly 90 seconds. So the average seek time is around 45 seconds.<\/p>\n<div id=\"attachment_347\" style=\"width: 765px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" aria-describedby=\"caption-attachment-347\" src=\"https:\/\/michaelrichmond.net\/blog\/wp-content\/uploads\/2011\/06\/LTFS-Logical-Layout.png\" alt=\"\" width=\"700\"  class=\"size-full wp-image-347\" \/><p id=\"caption-attachment-347\" class=\"wp-caption-text\">Logical layout of a LTFS Volume on LTO5 media. Beginning of Tape (BOT) at the left edge of diagram, End of Tape (EOT) at the right edge. Diagram is not to scale. BOT to EOT is 846 meters (~2775 feet) and tape width top-to-bottom is 1.27 centimeters (1\/2 inch).<\/p><\/div>\n<p>LTO5 data tape writes data in a sequence of wraps on the physical media. Each wrap consists of one track of data written in a forward direction along the length of the tape plus another track of data written in a reverse direction along the length of the tape. There are 80 such wraps on LTO5 media. To fully traverse all of the stored data on a full LTO 5 cartridge requires traversing the length of the tape one-hundred and sixty times. (Eighty times in the forward direction interleaved with eighty times in the reverse direction.)<\/p>\n<p>As a result of the wrap-based data layout a seek to the beginning of a randomly selected file is often quite fast. Typically a seek to the beginning of a file will only require a short tape movement along the length of the tape along with a lateral head movement that is perpendicular to the axis of tape movement. These lateral head moves are performed in a few seconds.<\/p>\n<p>Writes to a file stored in LTFS are performed by seeking to the end of the data and writing the file content to the media. If the file already exists in the LTFS volume then only the &#8220;over-written&#8221; areas of the file are written at the end of the DP. The extent list for such files that are modified &#8220;in-place&#8221; (on tape media) is updated to insert the new extents into the appropriate offsets in the extent list for the file.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Linear Tape File System (LTFS) relies on support for partitioning was introduced in LTO generation 5. Partitioning a LTO5 cartridge divides the media in two separate data storage areas known as &#8220;partitions&#8221;. Each partition can be written to without &hellip; <a href=\"https:\/\/michaelrichmond.net\/blog\/2011\/06\/24\/how-does-ltfs-work\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,24],"tags":[],"class_list":["post-343","post","type-post","status-publish","format-standard","hentry","category-data-storage","category-ltfs"],"_links":{"self":[{"href":"https:\/\/michaelrichmond.net\/blog\/wp-json\/wp\/v2\/posts\/343","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/michaelrichmond.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/michaelrichmond.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/michaelrichmond.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/michaelrichmond.net\/blog\/wp-json\/wp\/v2\/comments?post=343"}],"version-history":[{"count":0,"href":"https:\/\/michaelrichmond.net\/blog\/wp-json\/wp\/v2\/posts\/343\/revisions"}],"wp:attachment":[{"href":"https:\/\/michaelrichmond.net\/blog\/wp-json\/wp\/v2\/media?parent=343"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/michaelrichmond.net\/blog\/wp-json\/wp\/v2\/categories?post=343"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/michaelrichmond.net\/blog\/wp-json\/wp\/v2\/tags?post=343"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}