Hard Disk Geometry


"Rectangular, with rounded corners."

Sorry, that's not the geometry we mean. Disk geometry generally refers to the layout of the disks internally. If you open the case of a hard drive you'll find a stack of round disks, commonly called platters. They're covered with a layer of magnetic material that extends from the middle of the disk to the outer edge. When the disk drive is on, these disks spin at thousands of revolutions per minute (rpm). (This is the rpm count you'll see on the box and in advertising, and has a great deal to do with the performance of an individual disk.)

You will also see a head on each side of each platter. The head moves between the center of the disk and the edge so it can read data from the hard drive beneath it. A fairly typical new hard drive has 16 heads. That's enough for 8 platters, with a head on each side. So, we can read from 16 different locations on the platters simultaneously, so long as the data you want happens to be on different sides of different platters. Every head has a unique number, starting with 0.

Each platter has a number of circular tracks, or tracks, arranged much like the growth rings in a tree. These tracks hold data as a string of 0s and 1s. A head moves over a particular track at a certain distance from the center of the disk and reads this data as the platter spins by beneath it. When you request data from a different track, the head shifts its position and lets that track rotate past beneath it.

If you stack the particular tracks from all the platters on top of one another, you have a cylinder. For example, the innermost track of each platter forms one cylinder, numbered 0. The next-innermost forms cylinder 1. The 3,022nd track of each platter forms cylinder number 3021. Many operating systems expect to find that MBR partitions encompass complete cylinders and get quite upset if they don't.

Each track is broken up into segments, called sectors, which can each hold 512 bytes of data. Each sector within a track has a unique number, starting with 1. What's more, every sector on a hard drive has a unique number. If a particular hard drive has 39,179,952 sectors, you can expect to find each with a number 0 through 39,179,951. Many tools expect to address hard disks by sector numbers. When part of a disk goes bad, smart disks mark the affected sectors and don't use them.

So, sectors combine into tracks, which are arranged in rings on each platter. Tracks can be stacked into cylinders, and they all combine to make up the hard drive. This all seems simple enough, and it would be, if you could reliably use this information.

Over the years, various limitations have been hit in both hard disk and operating system design. We touched upon the 504MB and 8GB limits in Chapter 2. These limits could only be avoided by tricking the system BIOS and/or operating system. If the most popular operating system can only accept 63 sectors per track, but the hard drives your company manufactures have 126 sectors per track, you have a problem — unless, of course, you teach your hard drive to lie. If you claim you have half as many sectors per track, but you have twice as many platters, you can make the problem go away. Everything still adds up to the same number of sectors, after all, and all the tools can still find a unique sector-by-sector number. By the time hard drive information reaches the operating system, it has quite possibly been through one or more of these translations.

When you have only one operating system on a hard drive, this works fine. If your operating system receives or performs a slightly different translation on the disk, however, the translated geometry will not precisely match. The individual sector numbers will still match, but cylinder boundaries may not be the same within the translated geometry. Because many operating systems expect their MBR partitions to begin and end on a cylinder boundary, this is a problem. This is why we use only an operating system's native tools to create MBR partitions for that OS.

Now that you understand the hardware and the translations it undergoes, let's look at how to manage these partitions.




Absolute Openbsd(c) Unix for the Practical Paranoid
Absolute OpenBSD: Unix for the Practical Paranoid
ISBN: 1886411999
EAN: 2147483647
Year: 2005
Pages: 298

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net