From RAID and FAT to FDISK and Disk Administrator, here’s everything you need to know about hard disks and partitioning.

Ready, Set, Drive!

From RAID and FAT to FDISK and Disk Administrator, here’s everything you need to know about hard disks and partitioning.

The evolution of hard disks goes from punch cards (we’ve all heard the story about the guy who dropped his punch cards and as of last week is still trying to get them in the correct order) to the fast-forwarding and rewinding of tape drives and then—finally—to fixed drives.

As you may know, a fixed drive (or hard disk) is made up of several flimsy disks called platters. These platters spin around a rod called a spindle. The platters make thousands of rotations per minute as a read/write head can make changes to the data based on the magnetic positions of the disk. This contraption is safely stored inside a hard disk case where your operating system, bank software, and love letters are converted to ones and zeros.

The platters are divided up like a pie into areas called sectors. The pie-shaped sectors are divided into strips called tracks. Tracks are numbered from the outside of the sector to the center of the sector starting with zero. A disk sector is a specific piece of the track on a specific sector.

Generally speaking, we’ve got two kinds of pies, er, disks: IDE Disk Systems and SCSI. In the olden days, drive sizes were increasing faster than the technology available to use them. Your exit strategy was to invest in SCSI (Small Computer System Interface)—and I do mean invest. These SCSI drives weren’t cheap. Compaq and Western Digital put their heads together and, after saying, "Ouch!" created a less expensive drive that had a controller integrated on the disk—thus the Integrated Drive Electronics (IDE) drive.

IDE drives topped out at an amazing 528M disk size. From that opportunity evolved Enhanced IDE drives, which can support drives of several gigabytes and that, incidentally, have average disk speeds greater than 10 Mbps.

As SCSI prices lower and SCSI speed increases, these drives are becoming an easy choice for servers and perhaps even workstations. The other advantage of SCSI is that you can connect eight devices to one shared cable—including the SCSI controller card.

Under the Hood

I don’t know how many times I’ve heard some wise-guy tech respond to any computer problem, "Just FDISK the drive." (OK, I haven’t been counting, but I’d guess I’ve heard it somewhere between 87 and 234 times.) FDISK is a standard tool you use to prepare your drives to work with MS-DOS, Windows 95, and Windows 98. You can also use FDISK to prepare a drive to install Windows NT.

If we were starting from scratch with just a blank disk in your computer, we’d boot off a DOS floppy containing the FDISK and Format utilities. First, we’d fire up FDISK and choose to create a DOS partition. FDISK would ask if we’d like a primary partition, an extended partition, or a logical partition. For starters, we’d want to create a primary partition. This is a partition that can be marked as active so you can boot off of that hard drive.

After creating the primary partition and marking it as active, you can then create some additional partitions through FDISK. If you have additional space on your drive, you’d then want to create an extended drive. This is the same idea as adding a new wing to your mansion. You’d add this large addition and then set up smaller rooms within the new addition. An extended drive is the addition, and the logical drives would fit into the extended drive as smaller partitions.

A typical drive may have a primary C: partition (around 400M) where we’ll only install our operating system. The extended partition could be around 800M, and inside of this we’ll create two logical drives, D and E. D will store all of our applications and is around 300M. E, which is around 500M, will give us plenty of room for our data.

I Don’t Feel FAT

After creating the partitions for our drive, we then use the format utility to format our partitions so we can start saving data to the drive. The C: drive, our active partition, will also need to be "sysed." Easy enough; you just use the syntax:

format C: /s

"Sys-ing" the drive formats it and then copies the operating system files from your boot floppy to your hard disk so you can boot off the hard disk in lieu of your bootable floppy.

When you format your drive, you’re getting that drive ready to accept and track data. The file system you’ll be using with DOS, Windows 95, and possibly Windows 98 and NT is FAT—the File Allocation Table.

FAT is a reliable file system that’s been in use for years. Windows 95 OSR2 and Windows 98 have seen the advent of a leaner version of FAT (exactly what we’re all looking for, right?) called FAT32. Partitions formatted with FAT32 use drive space more efficiently than FAT partitions, so less disk space is wasted. As it stands, FAT32 can only be seen by Windows 95 OSR2 and Windows 98.

You might be asking yourself, "Is it time for lunch?" Or you could be asking yourself, "Why the heck don’t I just create one big C: drive? Why partition at all?" On a workstation, there’s nothing wrong with that idea. The one advantage to partitioning your drive is that you can put all of your data on one drive and your backup program will only have to back up the partition with the data. Another reason is because of the size of partitions. Under Windows 95 and Windows 98, FAT partitions are limited to 2G. FAT32 partitions are limited to 2T.

Drive over Here

Partitions have many roles on an NT Server: security, ease of use, and organization. When installing Windows NT Server, you’re given the opportunity to hop out from the install program and delete or create partitions. With FDISK you could, if your BIOS allows it, boot from the Windows NT Server CD, delete, create, and format partitions all on the road to NT. Sounds like fun.

A typical drive on an NT server could look like this: The C: partition is approximately 100M, has DOS installed on the drive, and is formatted with FAT. The only NT-related files on this partition are the low-level files that ignite the launch of NT. Partition D: could be approximately a gigabyte and stores the WINNT directory and applications. Finally, partition E: could house home folders and user data.

In this scenario, the C: drive is the system partition because it has the system-specific files needed to boot NT. The D: drive on this server is called the boot partition because it has all the NT operating system files needed to boot into NT. Specifically, it has the WINNT directory and its contents.

Put It on Cruise Control

After you’ve installed NT (and, of course, added all the appropriate service packs), you decide to add a couple of hard disks to your computer. Just like you would with DOS, Windows 95, and Windows 98, you need to partition and format the drives. The big difference between those OSs and NT is that in NT you’ll work through the Disk Administrator utility.

NT’s Disk Administrator is FDISK all grown up. You can still create primary, extended, and logical drives, but you can also do so much more. As a bonus, everything is color-coded and very easy to work with.

In NT, you’re allowed to have four primary partitions on one drive. Now I know you’re excited about that. What this means is that we can now have four different partitions that we can mark as active one at a time—which means we can have four different OSs that may require their own primary, active partition to boot up. We could also have three primary partitions, or one extended partition in which we would create some logical drives—just like before with good old FDISK.

Honest, Officer, It’s Not My Fault

NT Server also offers some fault tolerance for drives. You may also have heard this as RAID (Redundant Arrays of Inexpensive Disks—inexpensive is only relative to whose money is paying for the disks). The idea of RAID is that my data is safe if a hard disk should fail. Sure, we all know backups are the best way to keep our data (and jobs) safe, but what about the data in use between last night’s backup and this afternoon’s disk failure? That’s where RAID comes into the picture.

Windows NT Server supports two levels of fault tolerance: RAID 1 and RAID 5. RAID 1 is a mirror set. To create a mirror set, I need two drives and an NT Server. When I create a mirror set through Disk Administrator’s Fault Tolerance menu, any data that I write to the original partition is mirrored to the duplicated partition on the second drive. I can mirror partitions or the entire drive. If Disk 0 fails, I can still access my data off of Disk 1.

Mirror sets should be mandatory in smaller networks with only one NT Server. Here’s why: If you have only one domain controller, all your eggs are in one basket. If that drive fails in a major way, your data is gone and your little domain is in peril. That means lots of work: Recover the data (we hope from backup), restore the registry, and print out fresh copies of your resume. Meanwhile users aren’t getting any data off the server because it’s down, so they’re playing FreeCell while the boss watches you rebuild the server.

If, however, you had a mirror set on that system, you could boot into NT from an NT boot disk (for more on this, see "Creating an NT Boot Disk"), use the second drive where your data is safe and sound, and replace the broken drive with a new one that evening. You’d be a hero.

The second type of fault tolerance NT Server supports is RAID 5, stripe sets with parity. Parity is when you make a farce out of a classical piece of literature, or an establishment, in a story or theatrical format. Wait a minute, that’s parody. Parity is information that, when compared against data on the remaining drives, can reconstruct the data for any member of the stripe set that may fail.

Stripe sets with parity write data in 64K chunks across the drives in a stripe. The parity information is written for each stripe of data to each drive in rotation. NT stripe sets with parity can have anywhere from three to 32 drives (see Figure 1).

Alt text here
Figure 1. Stripe sets with parity write data in 64K chunks across the drives in a stripe. The parity information is written for each data to each drive in rotation.

The catch in NT Server, however, is that you can’t stripe your system or boot partition. That’s why mirror sets are a good idea for any server.

Creating an NT Boot Disk
Creating an NT boot disk is so easy that you should make one even if you don’t think you’ll ever need it. To create an NT boot disk:
  1. Format the floppy on an NT computer.
  2. Copy these files to the floppy:
    Intel RISC
    - Ntldr - Osloader.exe
    - Ntdetect.com - Hal.dll
    - Ntbootdd.sys (for SCSI drives with SCSI BIOS disabled)
    - Boot.ini
  3. Unless you really trust the reliability of floppies, make another NT boot disk and keep it someplace safe—like with your mother’s secret recipe for key lime pie.
  4. After creating your boot disk, always test things out. The day you need to use the boot disk, you don’t want to discover you didn’t copy all the files.
  5. If you’re creating the boot disk to recover from a failed mirror set, don’t forget to edit the disk value (SCSI) or the rdisk value (multi) before booting off the floppy. You have to tell the boot.ini to look on the mirrored drive.

Drive Twice as Far

Besides creating fault tolerance, Disk Administrator also helps you manage multiple drives. Let’s say that for some odd reason you end up with 120M of unformatted space on Disk 0 and 345M of free space on Disk 1. It’d sure be great if we could somehow merge these two areas of free space into one neat partition. We can. Through the partition menu in Disk Administrator you can create a volume set out of these two hard drives or up to 32 hard drives.

A volume set lets you create a single partition over multiple drives. In Windows Explorer it looks just like another partition. But the data actually writes to the first member of the volume set and then spills over to the second member, fills that drive up, waterfalls over to the next member, and so on.

What if you add another drive and end up with several hundred megabytes that aren’t part of a partition? You can extended your volume set to include this new free space—if the volume set is using NTFS. If the drive is using the old standby of FAT instead of NTFS, you have two choices: create a new partition out of the free space, or convert your volume set to NTFS and then extend the volume set to include the free space.

That’s right, convert, not format. To convert a FAT partition to NTFS, hop out to a command prompt and use this syntax:

convert <driveletter>: /fs:ntfs

When you reboot, your drive will be "automagically" converted to NTFS. Your data is safe and sound, and now you can take advantage of NTFS.

[To read more about taking advantage of NTFS, see Michael Chacon’s "NT Insider" column this month.—Ed.]

Sometimes You’re the Bug

As fun as it is, Disk Administrator can also ruin your day. Besides the obvious danger of wiping out partitions, you can also stop NT from booting properly.

I mentioned earlier that NT could have four primary partitions or three primary partitions and one extended partition. If you have a primary partition and an extended partition, any new partitions you create on the drive will be primary partitions. Sounds logical, right?

The problem is that pesky boot.ini file. The boot.ini file is where that list of operating systems and countdown timer comes from when you boot up an NT machine. Boot.ini will sit out on your active partition. It’s used during boot-up to point NTLDR to the partition where the Windows NT operating system files are stored. The beef here is that the boot.ini doesn’t address our partitions in the same friendly way we do. The boot.ini uses ARC (Advanced RISC Computing) naming conventions to identify drives and partitions. Here’s a typical boot.ini file:

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(2)\WINNT
[operating systems]
multi(0)disk(0)rdisk(0)partition(2)\WINNT="Windows NT Server version 4.0"
multi(0)disk(0)rdisk(0)partition(2)\WINNT="Windows NT Server version 4.0 [VGA mode]"/basevideo /SOS
C:\="MS-DOS"

Here’s a translation. The timeout value represents how the boot process waits for you to choose an operating system before it automatically loads according to the default line. You can edit the countdown timer and the default operating system through the boot.ini, but you’d be better off working through the System Applet on the StartUp | Shutdown tab.

Multi means either that the disk isn’t SCSI or that it is SCSI but it’s accessed through a SCSI BIOS. If the SCSI BIOS were disabled, you’d see SCSI here instead of multi. The zero that follows multi is the ordinal number of the hardware adapter. Disk is the SCSI bus number. If it’s multi then this value is always 0. Rdisk is the ordinal number of the disk. This value is simply ignored for SCSI controllers because they manage their own drives. Remember, drives are numbered starting with 0.

Partition is the ordinal number of the partition. In this case, we’re looking for the partition D, or partition number two. Here’s where all the fun starts.

Primary partitions are numbered first, then logical partitions. If we have the primary C: partition and one extended partition with the logical D: and E: drives in this extended partition, we’d see C: as partition number 1, D: as partition number 2, and E: as partition number 3. So, if the WINNT directory is on the D: partition, our boot.ini looks just like the boot.ini listed earlier.

Once again: If we create a new partition in Disk Administrator, this new partition must be a primary partition because we already have our limit of one extended partition. This new primary partition can really screw things up. Now our logical drives D and E change from ARC number 2 and ARC number 3 to ARC number 3 and ARC number 4. Disk Administrator is kind enough to remind you of this and to remind you to edit the boot.ini. If you shrug this message off and reboot—gasp!—you won’t be able to boot into NT! NTLDR is looking for the WINNT directory on partition 2; there isn’t a WINNT directory on this partition because the WINNT directory is hiding out on the newly renumbered partition 3 (the old number two). See Figures 2 and 3 for more detail.

Figure 2. Be careful when you create a new partition in Disk Administrator to edit the boot.ini file accordingly. Here the WINNT directory is located on partition 2.

 

Figure 3. After adding a new primary partition, however, all the partition numbers have been changed. The boot.ini file may point to the wrong partition number to find the WINNT directory.

So now what? You somehow need to edit that boot.ini file on your C: drive. You can do this by booting to DOS and using attrib –shr commands and then editing the file through DOS Editor to point to partition 3. Or... I’d recommend having a trusty NT bootable floppy where you could edit the boot.ini, boot off the floppy to get into NT, edit the boot.ini, and then act like you meant to do that screw-up all along. Indeed, hard drives can almost be fun, and they can certainly get you into trouble.

comments powered by Disqus
Most   Popular

Upcoming Training Events

0 AM
Live! 360 Orlando
November 17-22, 2024
TechMentor @ Microsoft HQ
August 11-15, 2025