Let's examine the following key filesystems and disk partitions concepts before getting into details: Intelligent/Integrated Drive Electronics (IDE), SCSI, and bit functions. Simply saying that data resides on a platter in the form of magnetic polarization of the surface greatly oversimplifies the nature of the beast. IDE and SCSIIDE is perhaps the most common drive type used by Linux, although it is slowly losing ground to SCSI in the Linux market because of the increasing popularity of large storage arrays. SCSI has not been around much longer than IDE; it was renamed around 1981/1982 from Shugart Associates System Interface (SASI) to Small Computer Systems Interface (SCSI). The IBM Mainframe 360 had the capability to speak to several devices simultaneously on any given I/O bus as early as 1960, so it could be said that SCSI started then. No matter the case, with more and more companies using storage consolidation, SCSI disk arrays are truly becoming commonplace. Bit CalculationAnother key concept is bit calculation. Regardless of SCSI, IDE, or other storage medium you choose, you should always start with the basics: the calculation of bits and bytes. The best way to depict the combinations is through a chart, as shown in Table 6-1.
Eight bits written as 00000000 or 0000 0000 defines an eight-bit address with 256 possible combinations, as listed in Table 6-2.
Each bit has a value of either "0" for off or "1" for on, instructing a virtual gate/door to allow 5 volts DC (power-conservative machines and newer technologies use 3.2 volts DC) to pass. Given that a bit only has two states (on or off) rather simplifies the importance of a single entity. The following is a list of key terms and their definitions to help you understand the data on a platter discussed later in this chapter.
Other terms, such as "binary," "octal hex/decimal," and "ASCI," are just other ways to represent the same value under different systems. Table 6-3 lists binary value "bits" converted to decimal and hexadecimal values.
Each bit has a mathematical value defined as 2X, whereby we define the base value of every bit equal to numeric value 2 multiplied by an exponent X. The combined value of the eight bits depends on the order in which they are interpreted, "left to right" or "right to left." The values of bits are calculated utilizing the Endian order, which is the direction the bits are read. Binary data is written and calculated by the majority of humans in most significant bit (MSB), LEFT, to least significant bit (LSB), RIGHT, order. Starting right to left, the bit values have exponential values beginning with zero and incrementing to seven. Although the exponent values change, the base value always remains at two. Note that the hardware platform determines the default bit order, which is referred to as "Little Endian or Big Endian." The following shows the MSB and LSB difference through od and bvi: "od -h /dev/disk_device_file | head" "dd if=/dev/disk_device of=/tmp/disk_device.out bs=512 count=1" utilize "bvi /tmp/disk_device.out". ... "0001 0e83 143f 003f 0000 4d46 0000 0000" By od -h "0100 830E 3F14 3F00 0000 464D 0000 8000" By bvi ... When reviewing binary data in Hex, we use the nibbles to perform calculations at great speed. Each nibble has a decimal value of 0 to 15 or Hex 0 to F. The following is an example of a binary value being converted into a Hex value: 1010 1001 = A9 This conversion is a two-step process. First, we need to address the left nibble. Break down the left nibble,"MSB," by doing the following: 23 22 21 20 on, off, on, off 8, 0, 2, 0, = decimal 10, or Hex A Then do the same for the right nibble, "LSB," to achieve a value of 9 in Hex, as listed in Table 6-3. |