0% found this document useful (0 votes)
63 views24 pages

Disks File Systems-V10-18

Disks must be formatted with a file system and can be divided into multiple volumes using partitioning. There are two main partitioning schemes: MBR, which limits disks to 4 primary partitions and 2TB maximum size; and GPT, which supports over 128 partitions and disk sizes over 2TB. Manufacturers often include a hidden recovery partition to restore systems if the main partition is corrupted.

Uploaded by

onlyfanspolina
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views24 pages

Disks File Systems-V10-18

Disks must be formatted with a file system and can be divided into multiple volumes using partitioning. There are two main partitioning schemes: MBR, which limits disks to 4 primary partitions and 2TB maximum size; and GPT, which supports over 128 partitions and disk sizes over 2TB. Manufacturers often include a hidden recovery partition to restore systems if the main partition is corrupted.

Uploaded by

onlyfanspolina
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

CHAPTER 1 6

Understanding Disks and File


Systems

W hen working with any operating system, it’s important to understand how disks and
file systems are used. Disks must be formatted using a specific file system, and the file
system you choose can impact its performance and security. Windows operating systems
include several different tools used to manage disks, and if you know how to use these
tools, you can overcome most problems with any disk.

543

You can divide, or partition, a physical disk into multiple volumes. Each volume is identified
by a letter such as C, D, and so on. The operating system uses these letters as identifiers when
accessing data on the different volumes.

Note Partitions and volumes are the same


Years ago, the terms partitions and volumes were used for different types of disks.
However, these terms have merged and are interchangeable today. When you divide a disk,
it’s usually referred to as partitioning a disk, but when you use these partitions within the
operating system, they are often called volumes. Don’t be surprised if you see these terms
mixed in different documentation, but the important thing to remember is that they are
the same.
A volume is any area of disk space that has been given a drive letter (for example C:) or a name
Figure 16-1 shows two ways you can partition a single hard drive, but there are more. In
the first example, the disk is divided into four volumes. In the second example, a single disk is
used to create a single volume.

\ <-- the backslash symbol indicates the root folder


C:\

D:\
One One
physical disk physical disk C:\
E:\
Multiple volumes Single volume
from one disk from one disk
F:\

Figure 16-1 Partitioning a hard drive.

A logical question to ask is, “Why would you want multiple partitions?” It’s not neces-
sary, but some people like to have different partitions to organize their data. For example,
the operating system is on the C drive, and they create a second partition to store their data.
Then again, they could leave it as a single partition and create a folder named Data for their
files. It’s just a matter of preference.

MBR Partitions
The most common type of disk partitioning system in use is the Master Boot Record (MBR)
_______________
Key partitioning scheme. You can divide an MBR disk into two types of partitions:
Terms
■■ Primary partition. A primary partition is used for a single volume, such as the C vol-
ume or D volume. One of the primary partitions is marked as active, indicating that it
is bootable. During the startup process, the computer locates the active partition and
attempts to boot from it. You can have as many as four primary partitions on a disk.

Understanding Disks, Partitions and Volumes CHAPTER 16 545


■■ Extended partition. An extended partition allows you to add multiple logical drives.
For example, you can have one extended partition with three logical drives identified
as G, H, and I. You can have only one extended partition on a disk. It isn’t common to
use extended partitions. The only reason you’d use one is to have more than four drive
letters for a hard disk drive.
MBR disks have two limitations worth noting:
■■ The maximum size of a partition is 2 TB.
■■ You are limited to a total of four partitions for any disk. You can have four primary
partitions, or you can have three primary partitions and one extended partition.
While these haven’t been significant limitations in the past, larger hard drives are available,
and a maximum disk size of 2 TB does pose problems for some users today.

GPT Partitions <-- for disks larger than 2 TB use GPT


The Globally Unique Identifier (GUID) Partition Table (GPT) overcomes the limitations of MBR
Key disks and is specifically recommended for disks larger than 2 TB. The GPT partitioning scheme
Terms is supported in many current operating systems, such as Windows 7 and Linux. Key points to
know about GPT disks include the following:
■■ Larger volumes. GPT has a theoretical limit of 9.4 zettabytes (ZB), and Windows-
based systems support GPT disks as large as 256 TB. For context, a ZB is about a billion
TB, but there aren’t any disks of that size available—at least not yet.
■■ More partitions. Windows-based systems support as many as 128 primary GPT parti-
tions on a single disk. Extended partitions are not needed or used with GPT disks.
Only fixed disks can be configured as GPT disks. Removable disks, such as flash drives, all
use the MBR partitioning scheme.
Linux-based systems can use and boot from a GPT disk. Windows-based systems from
Windows XP to Windows 7 can use a GPT disk. However, only 64-bit versions of Windows 7
can boot to a GPT disk and only if the computer is an Extensible Firmware Interface (EFI)-
based system.

More Info Chapter 2


Chapter 2 mentioned the UEFI, and as a reminder, UEFI is replacing or enhancing BIOS in
many computers. Windows 7 can boot to GPT disks on UEFI-based systems but not on
systems that only have a traditional BIOS.

Another benefit of GPT disks is that they are backward-compatible for applications that
are expecting an MBR disk. A GPT disk includes a table called a protective MBR that simulates
the MBR. Without this, older applications and disk utilities wouldn’t be able to read the disk
and might prompt the user to reformat it.

546 CHAPTER 16 Understanding Disks and File Systems


You can tell whether your system is using an MBR or GPT disk through the Disk
Management tool by using the following steps on Windows 7:

1. Click Start, right-click Computer, and select Manage.

2. Select Disk Management.

3. Right-click a disk and select Properties. Select the Volumes tab and look at the
Partition style as shown in the following graphic. The disk in the figure is an MBR disk.

You can convert an unpartitioned hard disk from MBR to GPT or from GPT to MBR from
within the Disk Management console. For example, if it is an MBR disk, you can right-click
the disk and select Convert To GPT. If it is a GPT disk, the option changes to Convert To MBR.
These options are dimmed if the disk has any partitions on it.

Recovery Partition
Many computer manufacturers and resellers include a recovery partition with systems they
_____________________________________________________
Key sell. This is another partition on the hard drive that a user can access, often by pressing a
Terms specific key when the system starts.
If the primary partition develops a problem, the recovery partition can be used to restore
the system to the exact state it was in when it was shipped. Users won’t have access to any
data or applications they added to their primary partition, but they will have a working sys-
tem again.

A recovery partition is often invisible to the system. It isn’t assigned a drive letter and <--
usually isn’t accessible with any applications other than the vendor’s recovery application.
If the primary partition is corrupted, such as from a virus, you can often use the recovery
partition to restore the system to its original condition. Many vendors don’t include media
to restore a system, so if the recovery partition is modified or deleted, users won’t be able
to recover it.

Understanding Disks, Partitions and Volumes CHAPTER 16 547


Basic Disks vs. Dynamic Disks <--
Windows-based systems since Windows 2000 have supported two types of disks: basic disks
Key and dynamic disks. Basic disks are used most often and are the simplest to use, but dynamic
Terms disks provide some additional capabilities. Both basic and dynamic disks can use either the
MBR or the GPT partitioning scheme.

Important Best practice is to leave disks as basic


If you convert one disk to dynamic in a computer, you will not be able to use the system as
a dual-boot system.

Unless you have a specific reason to do so, you should leave disks as basic instead of
dynamic. Of course, that prompts the question, “What’s a reason to upgrade a disk to
dynamic?”
Dynamic disks provide several benefits, such as the ability to create as many as 2,000 vol-
umes on a single disk. This is useful for users who want to get beyond the four-partition limit
of a basic MBR disk. You can also create striped, mirrored, and spanned volumes on dynamic
disks, which are discussed in the following sections.

Dynamic Disks and RAID <--


One of the benefits of using dynamic disks is the ability to use a redundant array of inexpen-
Key sive disks (RAID). Different RAID configurations provide different benefits. A primary benefit
Terms of RAID is fault tolerance. A drive can develop a fault and fail, but the system can tolerate it
and continue to operate.
However, you’ll find that dynamic disks do not support all the different RAID configura-
tions on all operating systems. Common RAID configurations are presented in Chapter 4, and
as a reminder, they are listed in Table 16-1.

Table 16-1 RAID Configurations <--


RAID Number of Disks Fault Tolerance Dynamic Disk Support

RAID-0 At least two No Yes


Striped

RAID-1 Only two Yes Windows 7 (not Windows XP and Vista)


Mirrored

RAID-5 At least three Yes Only servers

RAID-10 At least four Yes No

If you convert the disk on any Windows-based system to dynamic disks, you can use
­R AID­- 0, but that is the only configuration that is universally supported. Only Windows 7

548 CHAPTER 16 Understanding Disks and File Systems


supports mirrored disks, and you can use RAID-5 (also called striping with parity) only on
servers. Dynamic disks do not support RAID-10.

These limitations apply only to dynamic disks. Any system can support an external array
of disks. For example, you can buy external disk enclosures configured as RAID-0, RAID-1,
RAID-5, or RAID-10 and connect them with a USB, FireWire, or eSATA interface as described
in Chapter 4. Windows views the external array as a single physical disk that can be parti-
tioned as desired.

Striped Volumes (RAID-0)


You can create a striped volume (RAID-0) on any Windows-based system that supports
dynamic disks. It includes space on more than one physical disk, but it appears to the operat-
ing system as a single physical volume. Dynamic disk striped volumes include at least two and
up to 32 disks in the volume.
Each disk in the volume must be the same size, and data is stored in stripes on the differ-
ent disks. For example, a two-disk striped volume would hold half of a file in one disk and the
other half of the file in the other disk. The system can read both halves from the two disks at
the same time, improving read performance. Additionally, the system can write both halves of
a file to the two drives at the same time, improving write performance.

Mirrored Volumes (RAID-1)


Windows 7 supports mirrored volumes on dynamic disks. A mirrored volume includes two
disks, and data written to one disk is also written to the other disk. If one of the disks fails, the
system can continue to operate. Both disks must include partitions of exactly the same size.

You can create mirrored volumes (RAID-1) on Windows 7–based systems, but this configu-
ration is not supported on Windows XP or Windows Vista. Windows XP and Windows Vista
do support dynamic disks using RAID-0 and spanned volumes, but not RAID-1.

Spanned Volumes
A spanned volume includes space on more than one physical disk, but it appears to the oper-
Key ating system as a single physical volume. For example, if you have a D volume used for data
Terms but it’s running out of space, you can add another physical disk and span the D volume to the
new disk. The D volume will now have the additional space available.
You cannot span a boot or system volume, but you can span other volumes, such as one
used for data. Chapter 11 describes the system and boot partitions in more depth. As a
reminder, the system partition is where the system boot files are located (typically C:\), and

Understanding Disks, Partitions and Volumes CHAPTER 16 549


the boot partition is the location where the Windows-based system files are located (typically
C:\Windows).
Spanned volumes don’t provide any performance gains or fault tolerance benefits. Worse,
if any physical drive in the spanned volume fails, the entire volume fails and all the data is lost.
A better option is to use a mounted volume (described later in this chapter), which can be
created on a basic disk.

Spanned volumes can be created only on dynamic disks. You can create a spanned volume
with the Disk Management graphical user interface (GUI) tool covered later in this chapter.

Quick Check
1. What type of disk is limited to only four partitions?

2. What type of disk provides fault tolerance on Windows 7?

Quick Check Answers


1. Basic disk using MBR.

2. Dynamic disk using RAID-1.

File Systems <--

A file system is used to organize files and folders so that the operating system can access
the files. Files are commonly organized in folders (sometimes called directories), and the file
system allows users to browse through them to locate their files.
When you partition a hard drive, you are often prompted to choose a file system and
Key format it. The format process organizes the partition based on which file system you choose.
Terms It also deletes existing data, so you don’t want to reformat a disk unless you’re willing to lose
the data.
Several different file systems are available to format the hard drive with different charac-
teristics. It’s important to understand the differences between these file systems so that you
can choose the best one.
NTFS is the recommended file system for most situations. However, there are other
choices. The following sections describe the common file systems with a short discussion on
disk clusters.

550 CHAPTER 16 Understanding Disks and File Systems


Understanding Clusters
You might recall that a hard drive has multiple platters and that each platter is divided using
tracks, sectors, and clusters. These concepts are presented in Chapter 4, but as a reminder, the
following bullets describe them and they’re also shown in Figure 16-2.
■■ Track. A track is a complete circle around the hard drive. A drive will have many more
tracks than the figure shows.
■■ Sector. The hard drive is logically divided into separate areas, similarly to how you’d
cut a pie into separate slices, and a single portion of a track within a slice is a sector.
■■ Cluster. Multiple sectors are grouped together to form clusters. Clusters are also
known as allocation units, and each cluster is identified with a unique number.

Track

Cluster
(group of sectors)

Sector

Figure 16-2 Tracks, sectors, and clusters.

File systems use a table to identify the location of files on a disk drive based on the clus-
ters. For example, a file named A+Notes.docx stored on a hard drive might start in a cluster
identified as 0x1357 and end at cluster 0x53A9. The operating system uses this information to
locate and retrieve the file from the disk.

File Systems CHAPTER 16 551


More Info Chapter 1, “Introduction to Computers”
Hexadecimal is covered in Chapter 1. As a reminder, the 0x prefix indicates that a number
is hexadecimal, and each hexadecimal character represents four bits.

Cluster sizes vary between file systems, but the size of a cluster is commonly 4,096 bytes
(or 4 KB). There aren’t many files that are only 4 KB in size, so files are stored in multiple
clusters.

Fragmentation <--
It’s best if the files are stored in contiguous clusters so that the hard drive can start reading
in one cluster and then continue reading until the entire file has been retrieved. For example,
a 10-MB file would ideally start in one cluster on the hard drive and use each of the clusters
after it until the entire file is stored on the drive. However, as a hard drive fills up, there isn’t
always enough space to store a file in contiguous clusters.
Instead, the file system divides or fragments a file and stores these fragments in different
locations on a hard drive. A 10-MB file might have 5 MB written in one area, 3 MB in another
area, and the last 2 MB in another area. When the file is read, the operating system retrieves
each of these fragments and puts the file back together.
Some fragmentation is common on a disk. However, when a disk is used more and more
often, fragmentation can become excessive. Instead of a file being divided into three frag-
ments, it could be divided into dozens of fragments. The system has to work harder and
harder to retrieve these fragments and put them back together.
Symptoms of a fragmented hard drive are as follows:
■■ Disk thrashing. The LED for the disk drive is constantly blinking, indicating heavy
activity. Additionally, you can hear the drive working as the read/write head is con-
stantly moving around the disk retrieving the different file fragments.
■■ Slow performance. The overall performance of the system slows down.
If you suspect a drive is highly fragmented, the best solution is to check it and defragment
it. You can do so with the Disk Defragmenter GUI or the defrag command-line tool, both
described later in this chapter.

If a system is slow and the hard drive LED shows constant activity, check for fragmentation.
You can often optimize the overall performance of a computer and increase its efficiency
by ensuring that disk drives are defragmented. You can use the defrag command or the
Disk Defragmenter GUI to defrag a volume. If you have these symptoms but the drive is
not defragmented, the system might need more physical memory.

552 CHAPTER 16 Understanding Disks and File Systems


Bad Sectors
Disk drives often have small areas that are faulty. As long as these areas are marked, they
won’t be used and they won’t cause any problems. If you do a full format of a disk (described
later in this chapter), it will check all the sectors on the disk and mark faulty areas as bad. You
can also use the chkdsk command (also covered later in this chapter) to look for and mark
bad sectors.

FAT16 and FAT32 <--


The File Allocation Table (FAT) file system is native to Microsoft operating systems and widely
Key supported by other operating systems, such as Linux. The two common versions of FAT are
Terms FAT16 and FAT32.
Each of the FAT versions uses a table to identify the location of files on a disk drive based
on the clusters. FAT16 (commonly called just FAT) uses 16 bits, and FAT32 uses 32 bits to
address these clusters. With more bits, the file system can address more clusters and support
larger disks. Table 16-2 shows the different sizes of partitions and files supported by these FAT
versions.

Table 16-2 FAT Versions

FAT16 FAT32

Maximum partition size you can create 4 GB 32 GB

Maximum file size 2 GB 4 GB

If you ever try to copy or download a file larger than 4 GB to a FAT32 disk, you’ll get an
error that indicates you don’t have enough space. You could have a brand new, empty 16-GB
USB flash drive, but you’ll still get this error. The reason isn’t because you don’t have enough
space but because FAT32 can’t handle files greater than 4 GB. Convert the drive to NTFS, and
you won’t have this problem.

When creating FAT32 partitions from within Windows, you are limited to a maximum size
of 32 GB. It is possible to create larger FAT32 partitions by using other utilities or on other
operating systems, and Windows-based systems can recognize and use them.

You can format disks as FAT, FAT32, or NTFS from Windows-based systems such as
Windows 7. However, you can format disks as FAT only if they are smaller than 4 GB. If the disk
size is larger than 4 GB, you can select only FAT32 or NTFS.
Windows-based systems support exFAT (or FAT64), but this format isn’t widely supported
on non-Windows-based systems. If you’re formatting a disk larger than 32 GB, you’ll also see
exFAT as an option.

File Systems CHAPTER 16 553


Real World FAT32 file sizes limited to 4 GB <-- know this!
A friend of mine was trying to copy a large file (about 5 GB) from a computer to his USB
flash drive a while ago. He had just purchased a brand new 8-GB flash drive, and it was
apparently working fine. However, when he tried to copy the file, he received an error
indicating there was no room on the drive. A well-meaning coworker told him that the USB
flash drive was faulty and that he should return it. He almost did.
However, we got together to watch a game, and he mentioned the problem he was hav-
ing. Luckily, I remembered that most USB flash drives are formatted as FAT32 and that the
maximum file size you can copy to a FAT32 drive is 4 GB. If you try to copy larger files, it
gives the same error he was seeing. The drive wasn’t faulty. He was just trying to exceed
the capacity of the file system. He converted the drive to NTFS and was saved the hassle of
returning it. A little bit of knowledge can save a lot of wasted time.

NTFS <--
New Technology File System (NTFS) is a secure file system, and when using Windows-based
Key systems, it is by far the best choice compared to any of the FAT versions. Microsoft recom-
Terms mends the use of NTFS with Windows operating systems, and newer operating systems
such as Windows 7 must be installed on NTFS. The install program won’t allow you to install
Windows 7 on a FAT volume.
NTFS provides better security, improved performance, and more features than any of the
FAT versions. Some of the features and capabilities include the following:
■■ File and folder permissions. You can assign permissions to control access to any files
and folders. Permissions are covered in more depth in Chapter 25.
■■ Encryption. Files and folders can be encrypted with the Encrypting File System (EFS)
to prevent unauthorized users from viewing the file contents.
■■ Compression. Files can be compressed so that they take up less space on a disk drive.
■■ Larger volumes. NTFS volumes can be as large as 2 TB on MBR disks or as large as
256 TB on GPT disks.
■■ Efficient. NTFS uses clusters within a hard drive more efficiently than any of the FAT
file systems.
■■ Built-in fault tolerance. NTFS can detect and recover from some disk-related errors
without any user intervention.

554 CHAPTER 16 Understanding Disks and File Systems


Note Encryption or compression
You can encrypt data on an NTFS drive or compress it. However, you cannot do both.

CDFS <--
The compact disc file system (CDFS) is the standard used to access files on optical discs. It is
Key formally defined in ISO 9660 and widely supported by different operating systems, including
Terms Windows, Linux and Unix systems, and the Mac OS.

Quick Check
1. What’s the maximum size of a FAT32 partition you can create on Windows?

2. What file system provides the best security?

Quick Check Answers


1. 32 GB.

2. NTFS.

UDF is Universal Disk Format.


UDF is used on all DVD drives and is backward compatible with CDFS.
Disk Management Tools
Windows provides several different tools that you can use to manage disks. Some of these
tools, such as Disk Management and Disk Defragmenter, are available as GUI tools. Other
tools, such as chkdsk and diskpart, are available from the command prompt.

Disk Management <--


Disk Management is a GUI available in all current Windows operating systems. It is included
Key as a snap-in the Computer Management console, but you can also access it directly. You can
Terms start Disk Management by taking any of the following actions:
■■ Click Start, right-click Computer, and select Manage. Select Disk Management in the
Computer Management console.
■■ On Windows Vista and Windows 7: Click Start, type diskmgmt.msc in the Search text
box and press Enter.
■■ On Windows XP: Click Start and select Run. Type diskmgmt.msc in the text box and
press Enter.

Disk Management Tools CHAPTER 16 555


Figure 16-3 shows the Disk Management console within Windows 7. Following are descrip-
tions of the three numbered areas in the figure:

1. This section lists the volumes and provides information about them, such as the type of
disk, the file system, the volumes‘ health, how big they are, and how much free space
they have.

2. Disk 0 is a basic disk, and this shows that it has a system-reserved partition, a C vol-
ume, and unallocated space. New partitions can be created from unallocated space.

3. Disk 1 is a dynamic disk, and it has one volume labeled as E and unallocated space that
can be used to create new volumes.

Figure 16-3 Disk Management.

Note Identify system and boot partitions


Notice that you can identify the system and boot partitions in the Disk Management
console. This Windows 7–based system is using a special 100-MB System Reserved system
partition on Disk 0. This is common on Windows Vista and Windows 7–based systems and
is reserved so that users can enable BitLocker Drive Encryption if desired. It also holds
some key boot files, so it should not be deleted.

Identifying Disk Status


The status column of the Disk Management console provides important information about
the drive. Ideally, it will display Healthy, indicating that everything is fine. However, you also
might see one of the following indicators:

556 CHAPTER 16 Understanding Disks and File Systems


■■ Unreadable. This often indicates a hardware failure.
■■ Foreign. When you move a dynamic disk from one system to another, the target
­system identifies it as a foreign disk. You can right-click the disk and select Import
Foreign Disk so that the target system recognizes it.
■■ Online. Online disks are available for read/write access.
■■ Online (Errors). If input/output errors are detected on a dynamic volume, the status
column will display this. You can right-click the disk and select Reactivate to return it to
Online status. This error is a hint that the disk might be failing, so ensure that you have
a good backup and then run some disk checks.
■■ Offline. The operating system might take a volume offline if it has detected a prob-
lem. The disk needs to be brought online to use it, and you can do so by right-clicking
the disk and selecting Reactivate. If this doesn’t work, there could be a hardware
problem.
■■ Missing. This is displayed if one of the disks for a volume is not accessible. For
example, this would appear if one of the disks in a mirrored or striped volume was not
accessible. You might be able to reactivate the disk to get it to recognize the missing
disk, but a missing disk often indicates a hardware problem.
■■ Failed. This indicates a hardware problem or that the file system is corrupted. You
might be able to reformat it to still use the disk, or you can use chkdsk to repair the
disk.
You have a variety of different commands from the context menus in these three areas.
You can right-click a volume in the top pane or a volume within one of the disks to accom-
plish different tasks or view the volume‘s properties. The choices vary between different
operating systems.

Disk Management on All Windows-Based Systems


Different operating systems provide different capabilities. The following list identifies what
you can do on Windows XP, Windows Vista, and Windows 7.
■■ Create partition/volume. If the drive has unallocated space, you can right-click it
and select New Partition (Windows XP) or New Simple Volume (Windows Vista and
Windows 7).
■■ Format. You can right-click any volume and select Format. You’ll be prompted to
select the file system, such as NTFS or one of the FAT versions.
■■ Delete. Deleting a partition or volume changes the space to unallocated. If you delete
an existing partition/volume, all data is lost.
■■ Mount a volume. You can mount a volume to an empty folder on a drive. Instead
of the drive appearing as a separate letter, the space will be available in the mounted
folder.

Disk Management Tools CHAPTER 16 557


Note Data remnants

You lose access to all data after formatting a volume. However, data remnants remain on
the disk, so formatting isn’t a reliable way to ensure that data is removed. If the drive has
sensitive data, other tools should be used to remove the data.

When formatting a volume, you are often given two choices:


■■ Full format. In addition to preparing the drive, a full format scans a disk for bad sec-
tors and marks them. A system will not write data to bad sectors.
■■ Quick format. A quick format does not scan a disk for bad sectors. It is quicker but
not recommended for a regularly used system because the system might attempt to
write data to bad sectors, resulting in corrupted files.

Key A full format checks for bad sectors and marks them. If you perform a quick format origi-
Terms
nally but later want to check the sectors on a disk, you can use the chkdsk /r command to
check for and mark bad sectors.

You can format a disk from the command prompt with the format command or with the
Disk Management GUI. The basic command from the command prompt is:
format volume /fs:file-system

For example, to format the P drive with NTFS, use the following command:
format p: /fs:ntfs

The following steps show how to create and format a volume in Disk Management on a
Windows 7–based system:

1. Right-click the unallocated space and select New Simple Volume. Click Next.

2. The maximum size of the volume is automatically entered as the size of the new simple
volume. You can change this size or accept the default. Click Next.

3. On the Assign Drive Letter or Path page, you can assign a specific drive letter or accept
the default drive letter. Click Next.

4. On the Format Partition page, you can accept the default file system of NTFS or
change it to one of the FAT versions based on the size of the volume. If you want to
check the disk for bad sectors, deselect Perform A Quick Format. Your display will look
similar to the following graphic. Click Next.

Disk Management Tools CHAPTER 16 559


5. Click Finish. The operating system will format the drive.

Shrink a Volume
You can use these steps to shrink a volume in Windows Vista and Windows 7 by using Disk
Management:

1. Right-click the C drive (or another drive if desired) and select Shrink Volume.

2. The system will identify the maximum amount of space in MB that you can shrink the
drive to. You can accept the default or shrink it to a different size.

3. Click Shrink. When this is done, the amount of space you shrunk the drive by is identi-
fied as Unallocated space.

Extend a Volume
If you want to grow a disk by reclaiming unallocated space, you can do so by extending
the volume. The following steps show how to extend a volume on Windows 7 by using Disk
Management:

1. Right-click a volume and select Extend Volume. Click Next.

2. This will automatically select all of the unallocated space on the disk. You can change
this to a smaller size and leave some unallocated space if desired. Click Next.

3. Click Finished. The volume you created in the previous step will be extended to take
the additional space you specified.

560 CHAPTER 16 Understanding Disks and File Systems


Mount a Volume
An alternative to a spanned volume is a mounted volume. A mounted volume creates a
mount-point folder path to a new disk rather than assigning a letter to the new disk. That is, it
provides a logical pointer to the new disk.
Mounted volumes can be created on basic disks, eliminating the drawbacks of dynamic
disks. The only requirements are that the existing disk must use NTFS and the mount-point
folder must be empty.

Mounted volumes can be mounted only on empty NTFS folders.

You can use the following steps on a Windows 7 computer to create a mount point by
using Disk Management:

1. Right-click the unallocated space of a disk and select New Simple Volume. Click Next.

2. This will automatically select all of the unallocated space on the disk. You can change
this to a smaller size and leave some unallocated space if desired. Click Next.

3. Select Mount in the Following Empty NTFS Folder.

4. Click Browse. Browse to the location of an empty folder. You can also select an existing
drive such as C and click New Folder and name your new folder. Click OK, and then
click Next.

5. Select the formatting options you want and click Next. Click Finish.
Disk Management doesn’t show that the new volume is a mount point. However, you
can see it if you launch Windows Explorer. Click Start, select Computer, and select the C
drive. Your display will look similar to Figure 16-4. In the figure, I named the mounted folder
MountPoint. You can also see that instead of a folder icon it has a shortcut icon with an arrow.

Figure 16-4 A mount point on a disk.

Disk Management Tools CHAPTER 16 561


You can also identify mount points from the command prompt. If you enter the dir com-
mand, you’ll see that the mounted folder appears as <JUNCTION> instead of as <DIR>.

Converting to Dynamic <--


You can use the following steps to convert a basic disk to a dynamic disk on a
Windows 7­– ­based system by using Disk Management. However, consider the following two
important points before you do this:
■■ If any disk is dynamic, the system cannot be used as a dual-boot system.
■■ This is a one-way action. You shouldn’t lose data converting to dynamic, but if you
want to convert it back, you’ll have to reformat the drive. All data will be lost if you
convert a dynamic disk back to basic.

Important Converting a disk to a dynamic disk can be risky


Ensure that you have backed up all data on the disk before continuing. Also, you cannot
convert a dynamic disk back to a basic disk without first deleting all the volumes on the
disk. When you delete the volumes, it deletes all the data on the volumes.

1. Right-click the disk in Disk Management, and select Convert to Dynamic Disk.

2. A dialog box will appear with the disk selected. Ensure that this is the disk you want to
convert and click OK.

3. Click Convert on the Disks To Convert dialog box.

4. Review the warning from Disk Management indicating that you will no longer be able
to use this system as a dual-boot system. Click Yes. After a moment, the disk will be
listed as a dynamic disk.

Dynamic Disk Actions


If you created a dynamic disk, you have extra capabilities as described earlier. You can create
a spanned volume, a mirrored volume, or a striped volume.
You can use the following steps to create a mirrored volume on Windows 7 by using Disk
Management:

1. Right-click the unallocated space on a disk and select New Mirrored Volume.
Click Next.

2. The disk you clicked will be selected. Select a second disk from the list of available
disks and click Add.

3. The size will default to the maximum amount of space from either disk. You can
change the size if desired. Click Next.

4. Click Next to accept the default drive letter.

562 CHAPTER 16 Understanding Disks and File Systems


5. Select the desired format options and click Next. Click Finish.

6. If the disks are basic disks, you will be prompted to convert them to dynamic. Click Yes.
The system will create the mirrored volume.
You can use the following steps to create a striped volume on Windows 7 by using Disk
Management:

1. Right-click the unallocated space on a disk and select New Striped Volume. Click Next.

2. The disk you clicked will be selected. Select a second disk from the list of available
disks and click Add.

3. The size will default to the maximum amount of space from either disk. You can
change the size if desired. Click Next.

4. Click Next to accept the default drive letter.

5. Select the desired format options and click Next. Click Finish.
Figure 16-5 shows Disk Management with three physical disks. Parts of disks 1 and 2 have
been created as a mirrored volume, and other parts have been made into a striped volume.
You would normally create either a single mirrored volume or a single striped volume using
two physical disks. However, the figure shows what each looks like when they are created.

Figure 16-5 Mirrored and striped volumes in disk management.

You can see that only the mirrored volume (named My Mirror) provides fault tolerance. It
shows 50% overhead because only half of the drive space is available. In contrast, the striped
volume (named MyStripedVolume) includes two 750-MB disks and has about 1.43 GB of disk
space available.

Disk Management Tools CHAPTER 16 563


Chkdsk and Check Disk <--

The chkdsk command is a valuable command that you can use to identify and resolve prob-
Key lems with disks and RAID arrays. If you run it without using any switches, it will run a check on
Terms the current disk and report the results back. However, it does not attempt any repairs unless
one of the switches is used.
Two of the common switches used with the chkdsk command are listed in Table 16-3,
along with the sample command.

Table 16-3 Common chkdsk Switches

Switch Comments

/f Fixes errors on the disk.


chkdsk /f

/r Locates nd recovers readable information. This implies /f, so it also fixes errors on the
chkdsk /r disk.

If Windows Vista or Windows 7 detects a problem with a volume, it will often schedule
chkdsk to run the next time the system reboots.

If you attempt to run chkdsk or Check Disk to check a volume that is in use (such as the
C drive), Windows will indicate that it can’t check it while it is in use. You’ll be prompted to
schedule the disk check the next time the computer is booted. If you select Schedule disk, the
system will run the check when it reboots.
You can also check a disk from Windows Explorer with the following steps:

1. With Windows Explorer open, browse to the hard drive you want to check.

2. Right-click the drive, and select Properties.

3. Click the Tools tab, and click Check Now. You’ll see a display similar to the following
graphic.

Disk Management Tools CHAPTER 16 565


4. The two options in the Check Disk Data dialog box work the same as the /f and /r
switches do with chkdsk. The first option works like the /f switch to fix errors, and the
second option recovers information like the /r switch.

Key Both the chkdsk command-line tool and the Check Disk GUI will verify the integrity of the
Terms
physical disk and file system integrity. The chkdsk tool is also available from the command
prompt in safe mode and via the System Recovery tool in Windows Vista and Windows 7.

Convert <--
Whenever possible, it’s best to use NTFS instead of one of the versions of FAT. However,
Key you’re sure to come across some FAT volumes. If you want to convert a volume from FAT to
Terms NTFS, you can do so with the convert command. Converting a volume does not reformat it, so
it doesn’t result in the loss of data.
The basic syntax of the command is as follows:
convert volume /fs:ntfs

You specify the volume letter followed by a colon. For example, if you want to convert the
E drive from FAT32 to NTFS, you could use the following command:
convert e: /fs:ntfs

The convert utility allows you to convert a FAT file system to NTFS without losing any data.
However, if you want to revert an NTFS volume to FAT, you must reformat the volume, and
you’ll lose all the data on the drive.

566 CHAPTER 16 Understanding Disks and File Systems


Disk Defragmenter and Defrag <--
The Disk Defragmenter is a tool that allows you to easily determine whether a disk is frag-
Key mented. It is available within Computer Management in Windows XP and as a separate
Terms GUI in Windows Vista and Windows 7. Figure 16-6 shows the disk defragmenter tool within
Windows XP. In the figure, the drive has been analyzed, but there is very little fragmentation
on this drive.

Figure 16-6 Using the Disk Defragmenter.

Windows Vista and Windows 7 both include schedules to automatically check a drive for
fragmentation once a week. The schedule is included in the Windows Defrag menu within
the Task Scheduler’s Library of scheduled tasks. Unless these schedules have been disabled
through Task Scheduler, you don’t need to worry about defragmenting volumes on these
systems.
Another way to defragment a hard drive is with the defrag command from the command
prompt. The basic syntax is as follows:
defrag volume

For example, if you want to defrag the E drive, use the following command:
defrag e:

Table 16-4 shows two common switches you could use with the defrag command, along
with sample usage.

Disk Management Tools CHAPTER 16 567


Table 16-4 Common defrag Switches

Switch Comments

/a Perform analysis of the drive. This provides a report but does not defrag the volume.
defrag e: /a

/c Defragment all drives on the system.


Defrag /c

Disk Cleanup <--


If you are running low on disk space on your system, you can use the Disk Cleanup utility
Key to remove files that aren’t needed. This includes temporary files such as those cached from
Terms browsing the Internet, files you’ve deleted but that remain in the Recycle Bin, and some sys-
tem files that are no longer needed.
You can access the Disk Cleanup utility from within Windows Explorer by right-clicking
any drive and selecting Properties. Ensure the General tab is selected, and click on the Disk
Cleanup button. Figure 16-7 shows the Disk Cleanup utility within Windows 7.

Figure 16-7 Using Disk Cleanup utility.

The system will calculate how much space can be saved by cleaning up the disk and allow
you to choose which files to delete. If you click OK, it will delete the selected files. If you want
to remove unneeded system files, you can click the Clean Up System Files button, and the
system will calculate how much space you can save, including unneeded system files.

568 CHAPTER 16 Understanding Disks and File Systems


Administrative Shares
Operating systems automatically create several shares, known as administrative shares. These
are available to administrators but often aren’t known by other users.
Administrative shares end in a dollar sign ($), and any share that ends in a dollar sign is
hidden. Anyone knowing the name of the share can access it. However, these shares are not
visible to users browsing the network.
Table 16-5 lists some common administrative shares available on Windows-based systems.

Table 16-5 Administrative Shares

Share name Resource

C$, D$, E$, and so on This is created for each hard drive (C, D, E, and so on) on a system.

Print$ Location of printer drivers.

Admin$ Location of Windows folder.

The UNC path for administrative shares is the same as other systems. For example, if a
computer is named after a user named Sally, the administrator can connect to Sally’s C drive
with the following UNC path: \\Sally\C$.

By default, administrative shares include a $ symbol to hide them. It’s also possible to add a
$ symbol to any share to hide it.

Local Shares
You can also share any folder on a disk by creating a share for it. The easiest way to do so is
from within the Computer Management console.
Figure 16-8 shows the Computer Management console opened to the Shared Folders,
Shares display on a Windows 7–based computer. It shows all the shares on this computer,
including one named APlusStudy, which is sharing the C:\data\A+Study folder.

Figure 16-8 Viewing shares in Computer Management console.

You can create a share for any folder by right-clicking Shares and following the wizard to share it. <--
570 CHAPTER 16 Understanding Disks and File Systems

You might also like