Chapter 6: Working with File Systems

Exam Objectives

check.png Working with file systems

check.png Managing partitions and volumes

check.png Securing data with RAID

check.png Troubleshooting and management tools

Now that you have an understanding of the different drive technologies, I’ll move forward by looking into how to partition the disk and format the partition. In this chapter, you also find out about the purpose of a file system and what the different file systems are that Windows supports.

This chapter is also designed to introduce you to the concepts of RAID and how to put fault tolerance on your data using the Windows disk management tools. The chapter closes by giving you a listing of tools that you can use to troubleshoot and manage your drives.

Understanding File Systems

The file system dictates how information is organized on the disk. For ­example, the file system determines how large the allocation unit, or storage unit, of a file is. If you create a 12K file, how much space is that file really using — 12K, 16K, or 32K? Such organizational issues are what the file system deals with.

The following sections introduce the different file systems available and the OSes that support them. You also find out what features the file systems do and do not support.

The FAT file system

The File Allocation Table (FAT) file system has been the most popular file system up until the last few years. Although the FAT file system is the most common (it can be used by all OSes), it is losing the popularity contest to its successor — FAT32 — because of its age and limitations.

The FAT file system was the file system used by DOS and older versions of Windows; it is supported in all current versions of Windows including Windows 7 and Vista. FAT’s biggest strength is that it is the file system most widely understood by different OSes — but it has many shortcomings. One of the major shortcomings is that it cannot create a partition larger than 2GB. (A discussion of partitions is coming up in the “Managing Partitions and Volumes” section; for now, consider a partition simply as a discrete portion of space on the disk.) The 2GB size limit was not a major limitation until hard drive sizes exceeded a few gigabytes. For example, a problem with the FAT file system is that a 20GB drive would need to be divided into ten partitions to use all the space — an impractical and inappropriate use of space. Can you imagine being required to divide your home up into ten different rooms whether you wanted to or not? Instead of five spacious rooms, you would get ten cramped rooms! Not practical!

In the previous chapter, in the section “Disk geometry,” you can discover the characteristics of a disk, including clusters (groups of sectors; each sector taking up 512 bytes on the disk). To refresh your memory, a cluster is what a file is written to, and only one file can occupy a cluster at a time. The cluster size is determined by the partition size and the file system being used. For example, you might have a 2GB FAT partition with a 32K cluster size. The issue with clusters is that if you have a 32K cluster size and you save a 12K file, you waste 20K of hard disk space because only one file can occupy a cluster. Over time, as more files are saved, this could add up to a lot of wasted space! The solution is to use smaller partition sizes, which create smaller cluster sizes, or to use a different file system that uses smaller cluster sizes.

Bottom line, the FAT file system uses clusters inefficiently. Table 6-1 lists the cluster sizes used with different partition sizes on FAT file systems.

Table 6-1 FAT Partitions and Their Cluster Sizes

Partition Size

Cluster Size

0–127MB

2K

128–255MB

4K

256–511MB

8K

512–1023MB

16K

1024–2048MB

32K

One other limitation of the FAT file system is its lack of built-in security. For example, you might want to set permissions on a folder so that only Bob can create files in that folder. Unfortunately, you can’t set permissions on a FAT file system. In fact, if you are using a FAT file system with current versions of Windows such as Windows XP or Windows 7 (which are well respected for their security), you will lose the capability of securing the file system. The file system dictates the feature set you get when dealing with files and folders, so no matter what OS you are running, if you are using the FAT file system, you can’t secure the files.

So, besides being a file system that all OSes can run on, what is the FAT file system good for? Well, the versatility of FAT might be its only major ­benefit — most OSes can run on it, which makes it a great file system for configuring a dual-boot system. A dual-boot system has multiple OSes installed and has the capability to boot to either OS at any point in time. For example, if you were supporting an organization that was dual-booting its systems with an old version of Windows and Windows XP, you would need to use a file system common to both OSes. In this day and age, the chances of needing to dual-boot with an older operating system are very slim, so you don’t need to use FAT if you are using a current version of Windows.

The FAT32 file system

After the retail release of Windows 95, an update to the OS was created, known as Windows 95 OSR2 (OEM Service Release 2). Windows 95 OSR2 introduced an updated FAT file system called FAT32. One of the apparent benefits of FAT32 was that the maximum partition size was increased from 2GB to 2TB. Now, when you go out and buy that 20GB drive, you don’t have to divide it into ten partitions; you can keep one 20GB partition.

technicalstuff.eps Although FAT32 has the capability to have partitions of 2TB in size, Microsoft has limited the size of FAT32 partitions in the Windows XP OS to 32GB when creating partitions. The reasoning for this is that you should be using NTFS as a file system. Windows has no problem recognizing a larger FAT32 partition that was created with some other utility, such as the case when you purchase a new external hard drive that is hundreds of GB.

The other major benefit to FAT32 is that it dramatically decreases the cluster size to make better use of disk space. Table 6-2 compares the default cluster sizes of FAT partitions with the default cluster sizes of FAT32 partitions. Note that FAT32 doesn’t support partitions smaller than 512MB.

Table 6-2 Comparing Cluster Sizes

Partition Size

FAT Cluster Size

FAT32 Cluster Size

0MB–127MB

2K

Not Supported

128MB–255MB

4K

Not Supported

256MB–511MB

8K

Not Supported

512MB–1023MB

16K

4K

1GB–2GB

32K

4K

2GB–8GB

Not Supported

4K

8GB–16GB

Not Supported

8K

16GB–32GB

Not Supported

16K

Over 32GB

Not Supported

32K

Looking at Table 6-2, if you have a 2GB partition on FAT32, you have a cluster size of 4K. However, if you had created the partition and used the FAT file system, the cluster size would be 32K. If you save a 12K file on the FAT partition, you lose 20K of disk space, while the same 12K file would waste no space on a FAT32 partition because it will span three clusters of 4K each!

One of the shortfalls of FAT32 is that even with today’s OSes, no security features are built into FAT32. If you wish to leverage security features in the OS — such as file permissions, auditing file access, and Encrypting File System (EFS) — you need to use NTFS.

NTFS

Starting with Windows NT, Microsoft implemented a new file system: New Technology File System (NTFS). NTFS makes better use of the space available on a particular disk by using 512 bytes as the cluster size (the same size as a sector). This means that you waste even less space on an NTFS file system than on a FAT32 file system.

The original version of NTFS supported a number of features that made it more attractive than the FAT versions of the file systems. With NTFS, you could configure permissions that controlled who could access what files. You could also take advantage of features such as compression and auditing.

One of the biggest complaints with the original version of NTFS is that it had no way to limit how much disk space a user could use. As a result, users could waste gigabytes of hard disk space on the server, and the administrator could not stop the user unless a third-party program was purchased. Limiting disk space usage is one of the improvements that Microsoft made with newer versions of NTFS that come with Windows XP and Windows 7.

NTFS today

The newer version of NTFS that comes with today’s operating systems has features such as disk quotas. Disk quotas allow the system’s administrator to choose the amount of disk space that each user is allowed to use by placing a limit on the disk. For example, when managing the home directories, you can ensure that Bob is not allowed to use more than 500MB of disk space.

Another feature of NTFS with Windows XP, Windows 7, and Windows Vista is the Encrypting File System (EFS). EFS uses public key/private key technology to encrypt a file stored on the hard drive. When a file or folder is encrypted with EFS, only the person who created the file or the recovery agent (by default, the administrator is the recovery agent) can open the file. When using EFS, even if another user has permission to view the file, he or she will be unable to do so because the file is encrypted. The encrypting file system is a big selling point for organizations with mobile users who need to protect the privacy of the data that sits on their laptops.

To summarize, the NTFS file system offers the following features over FAT and FAT32:

diamonds.jpg Securing the resource through permissions

diamonds.jpg Securing files through encryption

diamonds.jpg Enabling auditing to monitor who accesses the files and folders

diamonds.jpg Compressing file or folder contents

remember.eps NTFS is the preferred file system for all current versions of Windows, including Windows XP, Windows 7, and Windows Vista, because NTFS has benefits such as permissions, auditing, encryption, and compression.

HPFS

Years ago, the High Performance File System (HPFS), which gained its popularity with the OS/2 operating system, was a major improvement over the FAT file system. Some of the benefits of OS/2 are that it supports long filenames, up to 254 characters (including the path). HPFS also supports partition sizes up to 2000GB and uses a cluster size of 512 bytes! When looking at the benefits of HPFS, you might wonder, “What’s the big deal? I get that with FAT32.” The big deal is that HPFS was released well before FAT32, or even before Windows became a popular operating system.

The disadvantage of HPFS is that it is not widely supported. OSes such as DOS and Windows cannot access HPFS volumes.

Managing Partitions and Volumes

For the A+ exams, you are required to know the steps to install a hard disk. After you physically connect the drive and configure the jumper settings, you need to be aware of the steps to configure the partitions on the disk. The following is the order in which you configure the partitions on the disk:

1. Create a primary partition.

2. Create an extended partition.

3. Create a logical drive in the extended partition.

4. Format the drives to create a file system.

fortheexam.eps Understanding the order of the steps for partitioning and formatting a disk is important for the A+ Certification exams. Be sure to memorize the above list to correctly answer exam questions about preparing the hard disk.

A partition is a segment of the hard disk, created by dividing the disk logically into discrete units. You create partitions for a number of reasons: say, to organize your applications and operating system on drive C while storing your data on drive D. You might also partition a disk for more technical reasons, such as to run multiple OSes on the same machine.

Whatever the reason for creating a partition, how you create and manage partitions is important for the A+ exam. This section examines different types of partitions and provides steps for creating, deleting, and formatting them.

Frequently, a partition is a means of providing better access to the information stored on a disk. For example, telling the kids that their games are on the D: drive is usually easier than describing a complex path to the folder that holds the games.

Before creating your partitions, you may need to initialize the disk in Windows Disk Management. When you initialize the disk you choose which partition table format you wish to use:

diamonds.jpg Master Boot Record (MBR): The default partition table type. This is ­limited to four partitions per disk and volumes up to two terabytes (TB) in size.

diamonds.jpg GUID Partition Table (GPT): The GPT partition table style supports up to 128 partitions and volume sizes up to 18 exabytes (EB) in size.

remember.eps You are limited to four partitions per disk when working with MBR partition tables, so be sure to plan them carefully.

Operating systems such as Windows XP and Windows 7/Vista, which use basic disks (more on that in the later section “Creating partitions and volumes in Windows”), can create two types of partitions: primary partitions and extended partitions.

Primary partition

The primary partition is the partition that the computer boots from; the OS’s boot files are loaded from here. You are allowed to have four primary partitions per disk. Because you may have multiple primary partitions (say, if you are running several OSes on the same computer), you must designate one primary partition as the active partition — the partition from which your normal operating system loads.

Extended partition

An extended partition allows you to extend beyond the four-partition barrier by being a partition that contains one or more logical drives, which are blocks of disk space assigned a drive letter. As an example on how you could use extended partitions, you could set up three primary partitions and then decide that you would like to divide the last chunk of free space into three additional parts (for a total of six partitions). If you create another primary partition from some of the free space, you will have four parts — and that is your limit, four partitions per disk. What you can do instead is create an extended partition from the remaining space after the three primary partitions have been created and then create three logical drives inside the extended partition. Logical drives are not partitions, so you are not limited to four. This will give you your six desired parts.

An extended partition is, in effect, the space that remains after the primary partitions are defined. The extended partition does not have an actual drive letter assigned to it; it’s simply a container that holds all the logical drives that you build. A logical drive is a logical division of the hard disk that the computer treats as if it were a separate disk drive; it is the actual area of the extended partition to which documents are saved.

As an example, suppose you are partitioning a 6GB hard drive using the FAT file system. FAT cannot define partitions larger than 2GB, so you have to divide this drive into at least three different partitions: The first partition you define is the primary partition — a 2GB partition that also becomes the active partition (drive C). What’s left is a 4GB extended partition that can store two logical drives (D and E), each of which can be no larger than 2GB. Figure 6-1 shows this partition configuration.

Figure 6-1: Partitioning a hard disk.

9781118237038-fg020601.eps

Note that the extended partition itself has no drive letter assigned to it. The extended partition is just a container to hold the logical drives — and they take the drive letters. Users of the system will be able to store data on drive C, drive D, or drive E.

remember.eps A hard disk can contain no more than four partitions, only one of which can be the extended partition. This means you could have three primary partitions and one extended partition to hold any logical drives. Having three primary partitions also shows why you have to set the active partition. A primary partition is a bootable partition. But if you have three primary partitions, which one do you boot from? The answer is simple — the one defined as the active partition. Note that when you create the partition during the installation of Windows, the partition is automatically marked as being the active partition.

Creating partitions and volumes in Windows

To create partitions in Windows, you can use a GUI partitioning tool known as the Disk Management snap-in, or you can use the diskpart command-line tool. You can open the Disk Management snap-in in Windows XP by choosing Start⇒Control Panel, clicking Performance and Maintenance, clicking Administrative Tools, and double-clicking Computer Management. Then, in the Computer Management window, select Disk Management. Figure 6-2 shows the Disk Management snap-in in Windows.

Figure 6-2: Disk Manage­ment snap-in found within Windows.

9781118237038-fg020602.tif

The Disk Management tool is the same for Windows 7 and Vista, but to launch it, click the Start button, right-click Computer, and then choose Manage. From the Computer Management console, choose Disk Management in the Storage category.

tip.eps When managing a disk in Windows, be aware that there are two types of disks: basic and dynamic.

Basic disks

Basic disk is the term Microsoft uses to describe a disk that supports partitions and all the limitations of partitions. If you can create partitions on a disk in Disk Management, you are working with a basic disk. A basic disk has the following characteristics:

diamonds.jpg The disk is divided into partitions.

diamonds.jpg You are limited to four partitions per disk.

diamonds.jpg You are limited to one extended partition per disk.

diamonds.jpg You create primary partitions, extended partitions, and logical drives.

diamonds.jpg A basic disk is the default disk type in Windows.

IT professionals have become accustomed to these characteristics when preparing disks for a system. With Windows, you still have these limitations when working with a basic disk, but you may convert the basic disk into a dynamic disk. The benefit of converting to a dynamic disk in newer versions of Windows is that you no longer work with partitions, so there are no partition limitations. I talk more about dynamic disks in the next section, but first you need to see how to create partitions on basic disks.

tip.eps The following steps demonstrate how to create a partition on a basic disk within Windows XP. The steps are similar in Windows 7 and Vista:

1. Click Start, right-click My Computer, and choose Manage.

2. From the Computer Management console, select Disk Management from the left of the screen.

On the right side, on the bottom half of the screen, notice that the disk type for Disk 1 is Basic Disk.

3. Right-click the unallocated space and choose New Partition, as shown in Figure 6-3.

The New Partition Wizard starts and displays a welcome screen.

Figure 6-3: Creating a partition within Windows.

9781118237038-fg020603.tif

4. Click Next.

The wizard asks what type of partition you will be creating, as shown in Figure 6-4.

5. Select Primary Partition and then click Next.

Figure 6-4: Choose a partition type within the New Partition Wizard.

9781118237038-fg020604.tif

6. Type the desired size of the primary partition (MB) and then click Next.

7. Choose the drive letter you want to associate with this partition and then click Next.

8. Choose the file system you want to format the partition as (shown in Figure 6-5) and then click Next.

9. Click Finish.

The drive starts to format in the background, and it indicates the percent complete in the Disk Management utility.

10. When Disk Management is finished formatting the drive, close the Computer Management utility.

Figure 6-5: Choose the file system within the New Partition Wizard.

9781118237038-fg020605.tif

Dynamic disks

A dynamic disk doesn’t use partitions but rather volumes as discrete units of space. Because you are creating volumes instead of partitions, you do not have the four-partition limitation of basic disks. With dynamic disks, you can create as many volumes as you wish.

When creating a volume on a dynamic disk, you can create a number of different volume types:

diamonds.jpg Simple volume: A block of space that is similar in concept to a partition.

diamonds.jpg Striped volume: A volume made up of equal space across multiple hard disks. With striped volumes, when you save a file to the volume, the file is saved across both disks at the same time. The benefit of a striped volume is a performance benefit because multiple disks are working at the same time to save the file.

diamonds.jpg Spanned volume: A volume made up of unequal amounts of space that span multiple disks. The benefit of spanned volumes is that you can join multiple areas of free space to create a single volume that users can access through a single drive letter.

diamonds.jpg Mirrored volume: A volume made up of two disks. Data that is written to the volume is stored on both disks, each with a full copy of the data. If one disk fails, the other disk has a copy of the data.

remember.eps Mirrored volumes, also known as RAID 1, are supported on all server versions and some client editions of Windows OSes. For example, you can create a mirrored volume on a Windows 7 system.

diamonds.jpg RAID 5 Volume: A RAID 5 volume uses between 3 and 32 disks. Data saved to the volume is spread across all disks in the volume, along with parity data. The parity data is used to calculate data that is unreadable due to a failed disk in the volume.

remember.eps RAID 5 volumes are available only on server versions of the Windows operating system, so you won’t be able to create one on Windows XP. Read more about RAID in the later section, “Securing Data with RAID.” Creating a volume on a dynamic disk in Windows requires you to first upgrade the basic disk to a dynamic disk. After you upgrade the disk to a dynamic disk, note that the create partition command changes to a create volume command in the Disk Management console. To upgrade the basic disk to a dynamic disk, follow these steps:

1. Click Start, right-click My Computer, and choose Manage.

2. From the Computer Management console, select Disk Management on the left of the screen.

On the right side, in the bottom half of the screen, notice that the disk type for Disk 1 is Basic Disk.

3. Right-click the disk and choose Convert to Dynamic Disk, as shown in Figure 6-6.

Figure 6-6: Converting a basic disk to a dynamic disk.

9781118237038-fg020606.tif

4. In the Convert to Dynamic Disk dialog box that appears, ensure that the disk number you wish to convert is selected; click OK.

5. Click the Convert button on the Disks to Convert screen, as shown in Figure 6-7.

You get a warning message that you will be unable to start older OSes from the disk after it is converted.

Figure 6-7: Confirming the disk to convert to a dynamic disk.

9781118237038-fg020607.tif

6. Click Yes in the Warning dialog box.

7. Click Yes to dismount any file systems being converted.

After the drive is converted, note that the legend changes to include a simple volume. You will also notice that the disk is now a dynamic disk.

After you convert a basic disk to a dynamic disk, you are ready to create a volume. Creating a volume is similar to creating a partition. To create a volume, follow these steps:

1. In the Disk Management console, right-click Unallocated Space and then choose New Volume, as shown in Figure 6-8.

Figure 6-8: Create a new volume on a dynamic disk.

9781118237038-fg020608.tif

2. In the New Volume Wizard that appears, click Next.

You see a list of volume types you can create (see Figure 6-9).

3. Choose the volume type you wish to create and then click Next.

Figure 6-9: Select a volume type when creating a new volume.

9781118237038-fg020609.tif

4. Type the amount of space (MB) to use for the volume and then click Next.

5. Select a drive letter for the volume and then click Next.

6. Specify a file system to use and choose to perform a quick format. Then click Next.

7. Click Finish to create the volume.

Formatting partitions and volumes

After you create the partitions or volumes, your next step is to format these partitions or volumes so that you may start storing data on them. When you format the partitions or volumes, which now show as drive letters in the My Computer (Computer; Windows 7 and Vista) icon, you choose which file system to format them with. Before you format the partitions, you should review the different types of file systems and the advantages and disadvantages of each (see the section “Understanding File Systems,” earlier in this chapter).

Formatting a drive prepares the drive for storing information. The format command creates a root directory on the disk as well as two tables used to store file information and to aid in file retrieval.

The first table is the Directory Entry Table (DET), which lists all the files stored on the drive, along with the date that each file was last modified. It also stores the starting cluster for each file stored on the drive. The DET is used when the system goes to open a file; the system looks in the DET for the file. When an entry is found for the file being opened, the starting cluster for the file is determined and then the system goes to that cluster to retrieve the file contents.

The second table is the File Allocation Table (FAT), which lists each cluster, showing you which clusters are used and which are free. The FAT also indicates any clusters marked as bad clusters, which are unusable. When a file spans multiple clusters, the FAT shows that the first cluster is linked to the next cluster by indicating the next cluster value as part of the FAT entry. The last cluster that is used to store the data for the file is marked with an end of file (EOF) marker — and this is how the system knows it has reached the last cluster for the file. Figure 6-10 shows a formatted drive along with the DET and FAT.

Figure 6-10: The Directory Entry Table (DET) and the File Allocation Table (FAT).

9781118237038-fg020610.eps

In Figure 6-10, a file named first.txt is listed in the DET with the beginning cluster location of 5. When a user requests the file, the OS looks for the file in the DET. In this example, the DET states that the first cluster containing data for the file is cluster number 5. Then the system looks at cluster 5 in the FAT and sees that cluster 5 is being used and that it continues on to cluster 6 and on to cluster 8. The system knows that cluster 8 is the last cluster containing data for the file because of the EOF marker.

To format a partition or volume in Windows, open My Computer (Computer; Windows 7 and Vista), right-click the drive letter that is assigned to the partition or volume, and then choose Format.

With Windows, you may also format the partition or volume from within the Disk Management snap-in, which is where you created the partition or volume to begin with. To format a partition/volume in Windows using Disk Management, perform the following steps:

1. In Windows XP: Click Start, right-click My Computer, and choose Manage.

In Windows 7 and Vista: Click Start, right-click Computer, and choose Manage.

2. From the Computer Management console, select Disk Management from the left of the screen.

3. From the bottom-right side of the screen, right-click the partition you want to format and choose Format, as shown in Figure 6-11.

Figure 6-11: Choosing the Format command in Disk Manage­ment.

9781118237038-fg020611.tif

4. When the Format dialog box appears, you may choose from a number of settings (shown in Figure 6-12) on how you wish to perform the format.

Volume Label: Specify a label for the partition. For example, I usually have a drive labeled Data where I store all my data. This label is just a friendly name used to identify what you might be using the drive for.

File System: Specify whether you want to use FAT, FAT32, or NTFS as the file system.

Allocation Unit Size: Select the cluster size for the partition or drive.

Perform a Quick Format check box: The benefit of a quick format is that it does not perform a surface scan on the disk to check for errors so the format occurs a lot quicker — recommended if you are pressed for time and do not have any hard drive problems.

Enable File and Folder Compression check box: Implement compression on the drive, which allows you to save disk space by using less space on the disk for the data stored there. The compression feature shrinks the file upon saving and decompresses it upon file opening.

5. Click OK.

Figure 6-12: Windows format options when formatting a drive.

9781118237038-fg020612.tif

tip.eps You may also use the command line version of the format command by going to a command prompt and typing format. For example, to perform a quick format of drive D and then apply a volume label of Pictures, the command is

format d: /q /v:Pictures

ontheweb.eps Labs 6-1, 6-2, and 6-3 give you the opportunity to practice creating partitions and volumes in Windows XP. These labs can be found on the companion website at www.dummies.com/go/aplusaio.

Extending and splitting partitions

In current versions of Windows, you are able to extend a volume, which means that if you did not make the partition or volume large enough and you have unallocated space on the drive, you can make that volume bigger. This is a huge benefit because years ago, you had to repartition the entire disk to change the size of the volume.

Just as you can extend a volume, you can also shrink a volume. If you find that you built a partition or volume that uses the entire disk space and then you decide that you should have created multiple partitions, you can now shrink a volume in Windows! Again, this has huge value because you used to need to repartition the entire disk to make changes.

To extend or shrink a volume in Windows you use either

diamonds.jpg The diskpart command-line tool

diamonds.jpg The disk-management GUI tool

With the disk-management tool, right-click the partition or volume and choose either

diamonds.jpg Extend Volume: Use the Extend Volume command to increase the size of the partition or volume.

In this example, you need unallocated space available on the drive.

diamonds.jpg Shrink Volume: Use the Shrink Volume command to shrink the partition or volume. This prompts you for the total size of the volume after shrinking the volume.

Assigning drive letters and mount points

Drive letters are automatically assigned to any partitions you format, but you can change the drive letter of your partitions or CD/DVD devices at any time. You do this by launching the Disk Management tool and then right-clicking the partition (or DVD) and choosing Change Drive Letter and Paths. You can choose any drive letter (A–Z) that is not already being used.

The disk management tool in Windows allows you to create a mount point, which is an empty folder on one partition that points to another partition. The purpose of the mount point is to make it easy for the user to navigate from one drive to another and access files — and this is transparent to the user. For example, you could have an empty folder on the C: drive called Data that references your second drive, the D: drive. This allows someone on the C: drive to double-click the data folder and see the contents of the D: drive.

To configure mount points in Windows, follow these steps:

1. Create an empty folder on the C: drive called Data.

2. Click Start, right-click My Computer, choose Manage, and then choose the Disk Management snap-in.

3. Right-click the D: drive and choose Change Drive Letters and Paths, as shown in Figure 6-13.

4. Click Add to add a drive path as the mount point.

Figure 6-13: To create a mount point, you must add a drive path to the partition.

9781118237038-fg020613.eps

5. Click the Browse button and choose the c:data folder as the mount point for this drive; then choose OK (see Figure 6-14).

Figure 6-14: Adding a mount point path.

9781118237038-fg020614.eps

6. Close Computer Management.

7. Go to drive C: through My Computer (or Computer in Windows 7 and Vista) and double-click the c:data folder.

You are redirected to the D: drive.

Understanding drive status

When you install a drive in the system and then navigate to the Disk Management snap-in (in the Computer Management console), you can see that each drive has a status (usually Online) and that each partition or volume has a status (hopefully, all Healthy). This section defines for you what the different statuses mean.

The following are statuses assigned to the physical disk in Disk Management:

diamonds.jpg Foreign: The disk that was added to the system is not originally from this system. To access the disk, you must import the disk into the system by right-clicking the disk and choosing Import Foreign Disk.

diamonds.jpg Online: The disk is available, with no issues.

diamonds.jpg Online (errors): The disk is available but has I/O problems with areas on the disk. If the issue is temporary, use the Reactivate command by right-clicking on the disk to put the disk back online.

diamonds.jpg Offline: The disk is unavailable.

diamonds.jpg Audio CD: This shows the status on a CD-ROM drive when it has an audio CD.

diamonds.jpg Basic: You are using a basic disk and can create partitions on the disk.

diamonds.jpg Dynamic: You are using a dynamic disk and can create volumes on the disk.

The following outlines the status of partitions or volumes in Disk Management:

diamonds.jpg Healthy: The volume is online and accessible.

diamonds.jpg Formatting: You are in the process of formatting the partition or volume.

diamonds.jpg Active: The partition is active.

remember.eps (An active partition is the primary partition that you will boot off of.)

diamonds.jpg Unallocated: This status shows for areas of the disk that have not been partitioned and is unusable until you create a partition or volume from the unallocated space.

diamonds.jpg Failed: The partition or volume cannot be accessed because the disk is unavailable or damaged, or the file system has become corrupt.

Securing Data with RAID

Windows servers and some Windows client editions have a built-in software implementation of RAID (Redundant Array of Inexpensive Disks) that you can take advantage of. RAID is a method of implementing redundancy — duplicated information — on your hard drives. If one disk fails, the other disk(s) can provide the missing information. RAID is a method to implement fault tolerance: the idea that in case of a hardware failure in the system (say, a hard drive fails), the system can continue to operate as normal. There are many different levels of RAID, but the only RAID levels that provide redundancy in Windows Servers are RAID 1 and RAID 5.

technicalstuff.eps Windows servers and some client editions also support RAID 0, called disk striping or striped volumes. No redundant information is stored on striped volumes, which is why striped volumes are classified as RAID 0. (Think of it as a zero level of redundancy.)

RAID 0

RAID level 0 is known as disk striping, which actually has no data redundancy (I remember this as the 0 level of redundancy). RAID level 0 is the technical term for a striped volume where the data is split across multiple drives in the volume. The benefit of the striped volume is performance because both disks are written to at the same time.

Mirroring/duplexing (RAID 1)

The type of hard drives typically found in servers are SCSI drives, which means that a SCSI adapter (controller) connects the drives to the systems. Disk mirroring is the use of two disks on a single controller to create full redundancy — whatever is placed on one disk is copied to the second disk. When creating a disk mirror, you must use two disks so that if one disk fails, you can rely on the copy of the data stored on the other disk.

When the mirror is established, you have a new drive letter accessible from the My Computer (Computer; Windows 7 and Vista) icon. This drive actually shows the data stored on both disks; if you save a file to this drive, it is written to both disks that make up the mirror; you don’t see two representations within the My Computer icon. But if you use the Disk Management console, you see that the two disks are part of the mirrored volume.

Disk duplexing is the same idea as disk mirroring but requires the installation of an additional SCSI controller. Disk mirroring is fault tolerant if a drive fails (because the other drive is available), but there is no fault tolerance if the controller fails (because there is only one). If you add an additional controller and place one drive on one controller and the other drive on the other controller, you have a more fault-tolerant solution. If one drive fails, you have the other; if a controller fails, you have the other drive running off the other controller. Figure 6-15 shows the difference between a mirror and a duplex.

Figure 6-15: Comparing disk mirroring with disk duplexing.

9781118237038-fg020615.eps

To create a mirrored volume in Windows, you first need to ensure that you converted both disks that you want to use as mirrors to dynamic disks. See the previous section, “Dynamic disks,” to find out how to do this.

After you converted both of the disks to dynamic disks, you can create a mirrored volume by following these steps:

1. Click Start, right-click My Computer, and choose Manage.

2. In the Disk Management console, right-click the unallocated space and choose New Volume.

3. When the welcome screen to the New Volume Wizard appears, click Next.

4. When asked what type of volume you wish to create, choose Mirrored and then click Next (as shown in Figure 6-16).

Figure 6-16: Selecting a mirrored volume type when creating a new volume.

9781118237038-fg020616.tif

5. From the available disks on the left side of the next wizard page, choose the disk you wish to have the mirrored content stored on and then click Add.

The original disk that you right-clicked to create the volume is already selected on the right side. In Figure 6-17, I selected Disk 1 and Disk 2 to participate in the Mirrored Volume.

Figure 6-17: Selecting the disks for the mirrored volume and setting the volume size.

9781118237038-fg020617.tif

6. Specify how much space to use for the volume in the Select the Amount of Space in MB text box; then click Next.

In Figure 6-18, I use 1000MB but you can use any value up to the amount of unallocated space on the drive.

7. Choose a drive letter for the volume and then click Next.

8. Select NTFS as the file system and type the volume label MirroredData. Also select to perform a quick format (as shown in Figure 6-18) and then click Next.

Figure 6-18: Assigning a volume label to the mirrored volume.

9781118237038-fg020618.tif

9. Click Finish.

You created a mirrored volume, so anything that is stored on the drive will get stored on both disks. If one disk fails, you have a copy of the data on the other disk. Notice in Figure 6-19 that the mirrored volume takes the same drive letter (E: in this case) for both disks. Therefore, if you store something on that drive, it is written to both disks.

Figure 6-19: Viewing the mirrored volume in disk manage­ment.

9781118237038-fg020619.tif

RAID 5 Volume (RAID 5)

The problem with RAID 1 is that you essentially waste half the money you spend on hard drives because under normal conditions, you use only one disk. A RAID solution where you get more disk space for your dollar is RAID 5, or a RAID 5 volume.

Microsoft’s software implementation of RAID 5 volumes uses a minimum of three disks and can use up to 32 disks, and it is supported only in the Windows Server product family. When data is saved to the RAID 5 volume, the information is written across all disks in the array.

A RAID 5 volume also stores parity information on a different disk for each write operation. This parity information is an “answer” that is generated after the data being written is run through an algorithm. The answer is then stored on one of the disks for that write operation. If a disk fails and a piece of data cannot be retrieved, the data is recalculated based on the answer (parity data) stored in the array.

Sound confusing? Here’s a simple example: What is the value of x in the following formula?

4 + x = 9

You probably had no problem coming up with the answer x = 5. You simply subtracted the known data from the given answer to calculate what is missing. RAID 5 volumes do the same thing with the parity data (the “answer”) when there is a disk failure. When one disk fails, the fault-tolerant disk driver simply subtracts the known data (from the existing disks) from the parity data to generate the missing data on the fly.

A popular question I get is this: “Will RAID 5 volumes be able to recover from multiple disk failures?” To answer that, look at a simple algebra equation. What is the value of x in the following formula?

y + x = 9

You cannot say for sure what the value of x is because two variables are involved. The software implementation of RAID that is built into the OS can calculate the missing data only when there is but one failed drive.

Now take a look at how to create a RAID 5 volume in Windows Server. Remember that a RAID 5 volume must use at least three disks — so be sure to have three disks with unallocated space. Then follow these directions:

1. In the Disk Management console, right-click Unallocated Space and choose New Volume.

2. On the welcome screen of the New Volume Wizard, click Next.

You are asked what type of volume you wish to create.

3. When asked what type of volume you wish to create, select RAID 5 (as shown in Figure 6-20) and then click Next.

4. Choose at least two additional disks to be members of the RAID 5 volume by highlighting each disk on the left side of the screen and clicking Add.

In my example, I chose Disk 0, Disk 1, and Disk 2.

Figure 6-20: Choosing to create a RAID 5 volume.

9781118237038-fg020620.tif

5. Specify how much space to use on each disk in the Select the Amount of Space in MB text box; then click Next.

I used 90MB on each disk, and my total space for the volume is 180MB (see Figure 6-21). But wait a second . . . that doesn’t make sense. There are three disks in the RAID 5 volume, and if each disk uses 90MB, the volume size should be 270MB, shouldn’t it? No, the volume size is only 180MB because one-third of the space is used for parity data.

Figure 6-21: Select the disks to be members of the RAID 5 volume and specify the size of the volume.

9781118237038-fg020621.tif

6. Choose a drive letter for the volume and then click Next.

7. Select NTFS as the file system and type a volume label of RAID5Data. Select to perform a quick format and then click Next.

8. Click Finish.

Figure 6-22 displays the volume as it appears in Disk Management.

Figure 6-22: Viewing the RAID 5 volume in disk manage­ment.

9781118237038-fg020622.tif

RAID 10

RAID 10 comes from RAID level 1 combined with RAID level 0.

tip.eps Remember that RAID level 1 is disk mirroring while RAID level 0 is disk striping, so RAID level 10 is the striping of a mirrored volume.

This allows fault tolerance while getting the performance of a RAID 0. RAID 10 requires at least four drives and can handle multiple drive failures as long as not all drives in a single mirror fail.

Troubleshooting and Management Tools

The sad thing about hard drives is they are mechanical devices that will fail at some point (be sure to do backups!). A number of problems can occur with drives that will be the cause of many headaches for you! The following are some common issues related to hard drives that you should be familiar with for the A+ Certification exams:

diamonds.jpg Read/write failure: The read/write head is responsible for reading and writing data and is connected to the actuator arm. If a problem exists with the read/write head, you may not be able to read the data off the drive, or even worse, you could damage the disk.

diamonds.jpg Slow performance: If you notice that the system is performing slowly, it may be due to the data on the drive becoming fragmented. Be sure to do a defrag on the drive to speed things up.

diamonds.jpg Loud clicking noise: If you hear a loud clicking sound, be sure to back up your files right away as your drive is about to fail on you! The actual clicking noise is generated by failed movements of the actuator arm in the drive.

diamonds.jpg Failure to boot: You find a number of reasons why you cannot boot a system off a drive. It could be because no active partition exists, the hard drive is not a boot device, or the boot files are missing.

diamonds.jpg Drive not recognized: If the drive is not recognized, you may need to go into the CMOS and detect the drive. Also, check the physical connections to ensure that the drive is connected properly.

diamonds.jpg OS not found: If the OS is not found when the system starts, that could be due to a physical disk problem, but it could also be a problem with the partition table or the OS loader code.

diamonds.jpg RAID not found: If you get a RAID not found error, check your BIOS settings and ensure that the SATA mode is set to either AHCI or RAID (if that is an option) so that the RAID functionality is supported.

diamonds.jpg RAID stops working: If the RAID array stops working, verify that all the drives in the RAID array are still functioning. You may need to replace a bad drive and recover the RAID array.

diamonds.jpg BSOD: If you are having trouble with corrupt drives in the system, you may experience the blue screen of death (BSOD). You may need to boot to Safe Mode and then update the drivers to fix the problem.

You can use a number of tools to help troubleshoot problems with hard drives. The following hardware and software tools can be used to help troubleshoot failed or misconfigured drives:

diamonds.jpg Screwdriver: To remove the drives from the system, you will need to have a set of screwdrivers available.

diamonds.jpg External enclosures: A great tool to have is an external drive enclosure connected to a recovery system so that if you need to troubleshoot a drive, you can place it in the enclosure and try to recover the data off the drive from your recovery system (which is already connected to the enclosure).

diamonds.jpg Chkdsk: Check disk (chkdsk) is a Windows command that tests the drive and fixes any errors with the drive.

diamonds.jpg Format: Format is a Windows command that allows you to erase the data from the drive.

diamonds.jpg Fdisk: Fdisk is an old partitioning tool in Windows and has been replaced by diskpart nowadays.

diamonds.jpg File recovery software: If you find that you are troubleshooting a lot of drives, you may want to look at purchasing some file recovery software, which can attempt to retrieve data from a failed drive.

After partitioning the disk and formatting the drive, some maintenance still needs to be done on a regular basis. Drive maintenance helps you address two areas of concern that have an impact on a user’s data:

diamonds.jpg File system optimization: Getting the best performance from your file system. If opening files takes much longer than it did two months ago, your system needs optimizing.

diamonds.jpg Data integrity: Having files that are uncorrupted so the data is intact and accessible. Sometimes a file cannot be opened because the file system has lost parts of the file or portions of the disk are bad — in which case you are not concerned with performance but with being able to open the file.

The following sections describe some OS tools that can help you accomplish these two goals as you maintain your system.

Defragmentation utility

After a drive is formatted and you start storing information on it, the information is written to one cluster at a time. This means that on a freshly formatted drive, the contents of a file are written to clusters on the disk that are side by side. This ensures optimal performance when opening a file because the read/write heads don’t have to jump from one end of the disk to another to open a single file. Unfortunately, the disk won’t stay in this state because as you add to and delete files, the contents of these files are scattered throughout the disk. The minitable in Figure 6-23 shows a fragmented disk.

Figure 6-23: Viewing fragmented data.

9781118237038-fg020623.eps

In this example, you can see that blocks 2, 5, and 7 belong to the same file but are scattered throughout the disk. This causes a performance decrease when accessing the file because the read/write heads need to locate the contents of the file that are spread throughout the disk. Disk defragmenting applications clean this up by taking all the data of a single file and placing it in clusters that reside side by side. You can see in Figure 6-24 what the disk would look like after a Windows defragmentation.

Figure 6-24: Visualizing data after running a disk defrag tool.

9781118237038-fg020624.eps

Windows has a Disk Defragmenter utility in the Computer Management console. This great little tool has an analyzer that you can run first to check the selected disk and then report where the used and free space is. This assessment tells you whether you need to defragment. Figure 6-25 shows the Disk Defragmenter utility in Windows after analyzing drive C:.

Figure 6-25: Defrag­menting a disk in Windows.

9781118237038-fg020625.tif

After the hard drive is analyzed, you can also view a report that shows you detailed information about the analysis. Launch the defrag by clicking the Defragment button. Figure 6-26 shows the report generated by the analysis of drive C:.

Figure 6-26: The analyzer’s report in Windows.

9781118237038-fg020626.tif

Check Disk utility

When a drive is formatted, two FAT tables are created — the DET and the FAT table. (Read about DET earlier in this chapter.) The FAT table links all the clusters that make up a file. What if that link is lost, or points to the wrong location? If the file system loses the link that joins two clusters together, the file becomes unreadable and has lost its data integrity. ScanDisk is a Windows utility in older Microsoft OSes that has been replaced by the Check Disk option in newer Windows OSes (Windows XP, Windows 7, and Vista). The Check Disk option not only looks for lost links but also scans the disk surface for bad blocks (clusters that cannot be written to), marking them as bad so they are not used. To perform an integrity check on a drive in Windows, follow these steps:

1. Open the My Computer (Computer in Windows 7 and Vista) icon and select the drive you want to check.

2. Right-click the drive and choose Properties.

3. On the Tools tab, click the Check Now button.

Figure 6-27 shows the dialog box that appears.

You may automatically fix any file system errors and also specify whether you want Windows to scan the surface of the disk and attempt to fix any problems with sectors.

4. Select the options you want and then click Start.

The scan may take a few minutes, and when completed, will display summary information.

Figure 6-27: The Check Now option in Windows.

9781118237038-fg020627.eps

Disk Cleanup

Another important tool in Windows XP, Windows 7, and Vista is Disk Cleanup, which scans a disk for files that can be safely removed from your system to free disk space. The Disk Cleanup utility can remove a number of different file types to help free disk space: temporary Internet files, Windows temporary files, applications no longer used, and all but the last System Restore point.

To perform a disk cleanup, follow these steps:

1. Choose StartAll ProgramsAccessoriesSystem ToolsDisk Cleanup.

2. Select the drive you wish to clean up, as shown in Figure 6-28.

Figure 6-28: Select the disk to clean up.

9781118237038-fg020628.tif

3. Click OK.

4. Select which files should be deleted to reclaim disk space, as shown in Figure 6-29.

Figure 6-29: Choose which types of files to remove with Disk Cleanup.

9781118237038-fg020629.tif

5. Click OK and then click Yes in the confirmation window.

The unneeded files are removed from your system to reclaim the space.

Using diskpart

Before leaving the topic of hard drives, I just wanted to mention that you can manage your hard drives through the diskpart command line utility. diskpart is supported by Windows XP, Server 2003/2008, Windows 7, and Vista.

With diskpart, you can perform most disk management functions, such as

diamonds.jpg Create and delete partitions or volumes

diamonds.jpg Shrink and extend disk partitions or volumes

diamonds.jpg View details on disks, volumes, and partitions

diamonds.jpg Make a partition active

diamonds.jpg Format a partition and assign a drive letter or mount point

You can pretty much perform all your disk administration from a command line with diskpart. From the diskpart prompt, you can type as many diskpart commands as you need (see Figure 6-30).

Figure 6-30: Using diskpart to manage partitions from a command line.

9781118237038-fg020630.tif

Getting an A+

This chapter illustrates the importance of hard disk management and the utilities used to perform that management. The following are some key points to remember when managing hard disks:

diamonds.jpg A cluster is the allocation unit for a file.

diamonds.jpg The cluster size for a partition is based on the file system used and the size of the partition.

diamonds.jpg The FAT file system is limited to a maximum partition size of 2GB. FAT32 increased the maximum allowable partition size to 2000GB.

diamonds.jpg Windows has its own file system called NTFS. NTFS has a number of benefits, some of which are security, auditing, and compression. Windows offers file and drive encryption when using the NTFS file system.

diamonds.jpg To optimize your drive, run the defragmentation tool often.

diamonds.jpg To verify the integrity of the drive, run Check Disk in Windows often.

diamonds.jpg A primary partition is the bootable partition for the system and must be set active. An extended partition holds logical drives for storing ­information.

diamonds.jpg You can remove temporary files with the Disk Cleanup utility in Windows.

Prep Test

1 Which of the following tools will help optimize the file system?

A checkbox.jpg Backup

B checkbox.jpg Defragment

C checkbox.jpg ScanDisk

D checkbox.jpg Format

2 What is the maximum capacity for a partition using the FAT file system?

A checkbox.jpg 2MB

B checkbox.jpg 2GB

C checkbox.jpg 16GB

D checkbox.jpg 2000GB

3 What type of partition is used to boot the computer?

A checkbox.jpg Extended

B checkbox.jpg Primary

C checkbox.jpg Mirror

D checkbox.jpg Stripe set with parity

4 What is the allocation unit for the storage of a file?

A checkbox.jpg Sector

B checkbox.jpg Track

C checkbox.jpg Partition

D checkbox.jpg Cluster

5 Which file system includes the encrypting file system?

A checkbox.jpg HPFS

B checkbox.jpg FAT

C checkbox.jpg NTFS

D checkbox.jpg FAT32

6 What utility manages partitions in Windows XP?

A checkbox.jpg Disk Administrator

B checkbox.jpg Disk Management

C checkbox.jpg Backup

D checkbox.jpg fdisk

7 What type of partition must be flagged as being active?

A checkbox.jpg Extended

B checkbox.jpg Logical

C checkbox.jpg Primary

D checkbox.jpg All partitions

8 What types of volumes are available on a dynamic disk? (Select all that apply.)

A checkbox.jpg Primary

B checkbox.jpg Simple

C checkbox.jpg Extended

D checkbox.jpg Spanned

9 You don’t seem to be able to create a simple volume on Windows XP; why not?

A checkbox.jpg You are not using NTFS as the file system.

B checkbox.jpg You need to format the drive.

C checkbox.jpg You must have an extended partition before you can create a simple volume.

D checkbox.jpg You need to convert the basic disk to a dynamic disk.

Answers

1 B. A defragmentation will optimize the file system. It will reorganize the clusters on the disk so that all the data that makes up a file is in the same area so the read/write heads will not have to jump around from one end of the disk to the other. See “Defragmentation utility.”

2 B. FAT file systems can access only 2GB partitions. This has seen a big improvement with FAT32, which can access 2000GB partitions. Review “The FAT file system.”

3 B. A primary partition is the type of partition that is bootable. Extended partitions are used to hold logical drives. Stripe set with parity is used as a RAID solution on servers. Check out “Managing Partitions and Volumes.”

4 D. Files are written to clusters on the disk. Only one file can occupy a cluster, regardless of whether the file fills the entire cluster. Peruse “Clusters.”

5 C. NTFS supported on the current versions of Windows has a feature called Encrypting File System (EFS) that can encrypt files on the disk. Take a look at “NTFS Today.”

6 B. The Disk Management utility in Windows allows you to manage partitions and volumes. Peek at “Managing Partitions and Volumes.”

7 C. Primary partitions are the type of partitions that are flagged as being active. If you have two or three primary partitions on your drive, the primary partition that is flagged as being active will be the partition the system boots from. Look over “Managing Partitions and Volumes.”

8 B, D. Of the choices provided, Simple and Spanned are the only volume types available on a dynamic disk. Primary and Extended are partition types and are only available on basic disks. Study “Dynamic disks.”

9 D. To create a volume, you must ensure that you have converted the basic disk to a dynamic disk. After you have converted to a dynamic disk, you can create any of the different types of volumes. Refer to “Dynamic disks.”

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset