{"id":920,"date":"2016-06-20T07:19:34","date_gmt":"2016-06-20T12:19:34","guid":{"rendered":"http:\/\/www.smbitjournal.com\/?p=920"},"modified":"2017-04-25T05:17:05","modified_gmt":"2017-04-25T10:17:05","slug":"what-is-drive-appearance","status":"publish","type":"post","link":"https:\/\/smbitjournal.com\/2016\/06\/what-is-drive-appearance\/","title":{"rendered":"Drive Appearance"},"content":{"rendered":"
One of the more common, yet more tricky fundamental concepts in computing today is the concept of drive appearance<\/em> or, in other words, something that appears to be a hard drive.\u00a0 This may sound simple, and mostly it is, but it can be tricky.<\/p>\n First, what is a hard drive.\u00a0 This should be simple.\u00a0 We normally mean a traditional spinning disk Winchester device such have been made for decades in standard three and a half inch as well as two and a half inch form factors.\u00a0 They contain platters that spin, a drive head that moves forward and backward and they connect using something like ATA or SCSI connectors.\u00a0 Most of us can pick up a hard drive with our hands and be certain that we have a hard drive.\u00a0 This is what we call the physical manifestation of the drive.<\/p>\n To the computer, though, it does not see the casing of the drive nor the connectors.\u00a0 The computer has to look through its electronics and “see” the drive digitally.\u00a0 This is very, very different from how humans view the physical drive.\u00a0 To the computer, a hard drive appears as an ATA, SCSI or Fibre Channel device at the most basic physical level and are generally abstracted at a higher level as a block device.\u00a0 This is what we would call a logical appearance, <\/em>rather than a physical one.\u00a0 For our purposes here, we will think of all of these drive interfaces as being block devices.\u00a0 They do differ, but only slightly and not consequentially to the discussion.\u00a0 What is important is that there is a standard interface or set of closely related interfaces that are seen by the computer as being a hard drive.<\/p>\n Another way to think of the logical drive appearance here is that anything that looks like a hard drive to the computer is something on which the computer format with a filesystem.\u00a0 <\/em>Filesystems are not drives themselves, but require a drive on which to be placed.<\/p>\n The concept of the interface<\/em> is the most important one here.\u00a0 To the computer, it is “anything that implements a hard drive interface” that is truly seen as being a hard drive.\u00a0 This is both a simple as well as a powerful concept.<\/p>\n It is because of the use of a standard interface that we were able to take flash memory, attach it to a disk controller that would present it over a standard protocol (both SATA and SAS implementations of ATA and SCSI are common for this today) and create SSDs that look and act exactly like traditional Winchester drives to the computer yet have nothing physically in common with them.\u00a0 They may or may not come in a familiar physical form factor, but they definitely lack platters and a drive head.\u00a0 Looking at the workings of a traditional hard drive and a modern SSD we would not guess that they share a purpose.<\/p>\n This concept applies to many devices.\u00a0 Obviously SD cards and USB memory sticks work in the same way.\u00a0 But importantly, this is how partitions on top of hard drives work.\u00a0 The partitioning system uses the concept of drive impression interface on one side to be able to be applied to a device, and on the other side it presents a drive impression interface to whatever wants to use it; normally a filesystem.\u00a0 This idea of something that using the drive impression interface on both sides is very important.\u00a0 By doing this, we get a uniform and universal building block system for making complex storage systems!<\/p>\n We see this concept of “drive in; drive out” in many cases.\u00a0 Probably the best know is RAID.\u00a0 A RAID system takes an array of hard drives, applies one of a number of algorithms to make the drives act as a team, and then present them as a single drive impression to the next system up the “stack.”\u00a0 This encapsulation is what gives RAID its power: systems further up the stack looking at a RAID array see literally a hard drive.\u00a0 They do not see the array of drives, they do not know what is below the RAID.\u00a0 They just see the resulting drive(s) that the RAID system present.<\/p>\n Because a RAID system takes an arbitrary number of drives and presents them as a standard drive we have the theoretical ability to layer RAID as many times as we want.\u00a0 Of course this would be extremely impractical to do to any great degree.\u00a0 But it is through this concept that nested RAID arrays are possible.\u00a0\u00a0 For example, if we had many physical hard drives split into pairs and each pair in a RAID 1 array.\u00a0 Each of those resulting arrays gets presented as a single drive.\u00a0 Each of those resulting logical drives can be combined into another RAID array, such as RAID 0.\u00a0 Doing this is how RAID 10 is built.\u00a0 Going further we could take a number of RAID 10 arrays, present them all to another RAID system that puts them in RAID 0 again and get RAID 100 and so forth indefinitely.<\/p>\n Similarly the logical volume layer uses the same kind of encapsulation as RAID to work its magic.\u00a0 Logical Volume Managers, such as LVM on Linux and Dynamic Disks on Windows, sit on top of logical disks and provide a layer where you can do powerful management such as flexibly expanding devices or enabling snapshots, and then present logical disks (aka drive impression interface) to the next layer of the stack.<\/p>\n Because of the uniform nature of drive impressions the stack can happen in any order.\u00a0 A logical volume manager can sit on top of RAID, or RAID can sit on top of a logical volume manager and of course you can skip or the other or both!<\/p>\n The concept of drive impressions or logical hard drives is powerful in its simplicity and allows us great potential for customizing storage systems however we need to make them.<\/p>\n Of course there are other uses of the logical drive concept as well.\u00a0 One of the most popular and least understood is that of a SAN.\u00a0 A SAN is nothing more than a device that takes one or more physical disks and presents them as logical drives (this presentation of a logical drive from a SAN is called a LUN) over the network.\u00a0 This is, quite literally, all that a SAN is.\u00a0 Most SANs will incorporate a RAID layer and likely a logical volume manager layer before presenting the final LUNs, or disk impressions, to the network, but that is not required to be a SAN.<\/p>\n This means, of course, that multiple SAN LUNs can be combined in a single RAID or controlled via a logical volume layer.\u00a0 And of course it means that a SAN LUN, a physical hard drive, a RAID array, a logical volume, a partition…. can all be formatted with a filesystem as they are all different means of achieving the same result.\u00a0 They all behave identically.\u00a0 They all share the drive appearance interface.<\/p>\n To give a real world example of how you would often see all of these parts come together we will examine one of the most common “storage stacks” that you will find in the enterprise space.\u00a0 Of course there are many ways to build a storage stack so do not be surprised if yours is different.\u00a0 At the bottom of the stack is nearly always physical hard drives, which could include solid state drives.\u00a0 This are located physically within a SAN.\u00a0 Before leaving the SAN the stack will likely include the actual storage layer of the drives, then a RAID layer combining those drives into a single entity.\u00a0 Then a logical volume layer to allow for features like growth and snapshots.\u00a0 Then there is the physical demarcation between the SAN and the server which is presented as the LUN.\u00a0 The LUN then has a logical volume manager applies to it on the server \/ operating system side of the demarcation point.\u00a0 Then on top of that LUN is a filesystem which is our final step as the filesystem does not continue to present a drive appearance interface but a file interface, instead.<\/p>\n Understanding drive appearance, or logical drives, and how these allows components to interface with each other to build complex storage subsystems is a critical building block to IT understanding and is widely applicable to a large number of IT activities.<\/p>\n","protected":false},"excerpt":{"rendered":" One of the more common, yet more tricky fundamental concepts in computing today is the concept of drive appearance or, in other words, something that appears to be a hard drive.\u00a0 This may sound simple, and mostly it is, but it can be tricky. First, what is a hard drive.\u00a0 This should be simple.\u00a0 We … Continue reading Drive Appearance<\/span>