Tải bản đầy đủ (.pdf) (50 trang)

Tài liệu Windows 7 Resource Kit- P14 doc

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (1.33 MB, 50 trang )

Working with Offline Files CHAPTER 15
603
If you do not configure this policy setting, the system limits the space that offline files
occupy to 25 percent of the total space on the drive where the Offline Files cache is
located. The limit for automatically cached files is 100 percent of the total disk space
limit. However, the users can change these values using the Offline Files Control Panel
tool.
If you enable this setting and specify a total size limit greater than the size of the drive
hosting the Offline Files cache and that drive is the system drive, the total size limit is
automatically adjusted downward to 75 percent of the size of the drive. If the cache
is located on a drive other than the system drive, the limit is automatically adjusted
downward to 100 percent of the size of the drive.
If you enable this setting and specify a total size limit less than the amount of space
currently used by the Offline Files cache, the total size limit is automatically adjusted
upward to the amount of space currently used by offline files. The cache is then con-
sidered full.
If you enable this setting and specify an auto-cached space limit greater than the total
size limit, the auto-cached limit is automatically adjusted downward to equal the total
size limit.
note The Limit Disk Space Used By Offline Files policy setting replaces the Default
Cache Size policy setting used by earlier versions of Windows.
n
Turn On Economical Application Of Administratively Assigned Offline Files This
policy setting allows you to turn on economical application of administratively assigned
Offline Files.
If you enable this policy setting, only new files and folders in administratively assigned
folders are synchronized at logon. Files and folders that are already available offline
are skipped and are synchronized later.
If you disable or do not configure this policy setting, all administratively assigned folders
are synchronized at logon.
ADDITIONAL OFFLINE FILES POLICY SETTINGS FOR WINDOWS 7


The following Group Policy settings for managing Offline Files are new in Windows 7:
n
Configure Background Sync This policy setting applies to any user who logs on to
the specified machine while this policy is in effect. This policy is in effect when a net-
work folder is determined by the Configure Slow-Link Mode policy to be in slow-link
mode.
For network folders in slow-link mode, a sync will be initiated in the background on a
regular basis, according to these settings, to synchronize the files in those shares/fold-
ers between the client and server. By default, network folders in slow-link mode will
be synchronized with the server every 360 minutes, with the start of the sync varying
between 0 and 60 additional minutes (as shown in Figure 15-18).
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
CHAPTER 15 Managing Users and User Data
604
FIGURE 15-18 The new Configure Background Sync policy setting in Windows 7
You can override the default sync interval and variance by setting Sync Interval and
Sync Variance values. You can also set a period of time in which background sync is
disabled by setting Blockout Start Time and Blockout Duration values. To ensure that
all the network folders on the machine are synchronized with the server on a regular
basis, you may also set the Maximum Allowed Time Without A Sync value.
You may also configure Background Sync for network shares that are in user-selected
Work Offline mode. This mode is in effect when a user selects the Work Offline option
for a specific share. When selected, all configured settings will apply to shares in user-
selected Work Offline mode as well.
n
Enable Transparent Caching Enabling this policy optimizes subsequent reads to
network files by a user or an application. This is done by caching reads to remote files
over a slow network in the Offline Files cache. Subsequent reads to the same file are
then satisfied from the client after verifying the integrity of the cached copy. This policy
not only improves user response times but also decreases bandwidth consumption over

the WAN links to the server. The cached files are temporary and are not available to the
user when offline. The cached files are not kept in sync with the version on the server,
and the most current version from the server is always available for subsequent reads.
This policy is triggered by the configured round-trip network latency value (shown in
Figure 15-19). We recommend using this policy when the network connection to the
server is slow. For example, you can configure a value of 60 milliseconds as the round-
trip latency of the network above which files should be transparently cached in the
Offline Files cache. If the round-trip latency of the network is less than 60 milliseconds,
reads to remote files will not be cached. If you do not configure this setting, remote
files will not be transparently cached on user clients.
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
Working with Offline Files CHAPTER 15
605
FIGURE 15-19 The new Enable Transparent Caching policy setting in Windows 7
n
Exclude Files From Being Cached This policy enables administrators to exclude
certain file types from being made available offline. You need to specify the file exten-
sions of the file types that should be excluded (shown in Figure 15-20). A user then will
be unable to create a file of this type in the folders that are available offline.
FIGURE 15-20 The new Exclude Files From Being Cached policy setting in Windows 7
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
CHAPTER 15 Managing Users and User Data
606
diReCt FRoM tHe SoURCe
Troubleshooting Roaming User Profile Folder Redirection,
and Client-Side Caching Issues in Windows Vista and Later
Versions
Paul D. LeBlanc, Manager
Supportability Program
T

he following lists describe some common support issues with Folder
Redirection, RUP, and CSC in Windows Vista and later versions.
Roaming User Profile Issue Troubleshooting
Symptom: Loading temporary profile error during user logon: “Windows cannot
find the local profile and is logging you on with a temporary profile. Changes you
make to this profile will be lost when you log off.”
n
Possible cause #1: SID in ProfileList structure deleted
Explanation: Microsoft does not recommend that you delete user profiles
using anything other than the Control Panel item (Computer Properties
\Advanced System Settings\User Profiles\Settings). When the folder structure
for a user profile is deleted using Windows Explorer or the command prompt,
the corresponding registry entries under the ProfileList registry key are left
behind.
Resolution: Remove the corresponding SID entry under the ProfileList
registry key:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion
\ProfileList.
n
Possible cause #2: User in Guests group
Explanation: During logon, the interactive user is checked for membership in
the local Guests group and the domain Guest group (if the user is the mem-
ber of a domain).
Resolution: If appropriate, remove the affected user from the local Guests
/Domain Guest membership (see />n
Possible cause #3: Insufficient permissions (roaming profile)
Explanation: If permissions have been altered on a working roaming profile,
the user may encounter this error.
Resolution: Correct the permissions so that the user has Full Control over her
Roaming User Profile folders. If a locked-down user profile is required, use a

mandatory user profile.
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
Working with Offline Files CHAPTER 15
607
Folder Redirection Troubleshooting
Symptom: Duplicate folders in user profile
n
Possible cause #1: Partial sync
Explanation: Users of Windows Vista and later versions can select various
folders within their user profiles to redirect to a local or remote drive. If only
some of the contents of a folder are moved, the user may see multiple folders
under a user profile, such as two folders named Documents or Music.
Resolution: Allow the session to complete data transfer before logoff.
n
Possible cause #2: Local and remote copies of files kept
Explanation: When a user’s folder is being redirected, the user will be asked
whether she wants to move all current content. If the user chooses not to
move the contents but only to copy them, duplicate folders will appear under
the user profile—one local, one remote.
Resolution: This is by design.
n
Possible cause #3: Program creating folder locally (application compatibility)
Explanation: After a user redirects a user profile folder or folders successfully,
on running an application, a local instance of the user profile folder(s) may
be created. This behavior is due to the application using only local resources
or having a fixed path for resources and not using the environment variables.
This is an application-specific issue.
Resolution: Update the application or do not redirect the affected user profile
folder(s).
Client-Side Caching Troubleshooting

Symptom: Files/folders not seen while offline
n
Possible cause #1: Sync has not completed (because it occurs during background)
Explanation: This is a fundamental change from Windows XP. In Windows
Vista and later versions, Offline Files will synchronize in the background as
user activity allows. This means that users will not have to wait for files to
synchronize before completing a logoff. However, this also means that,
depending on the volume and type of data that is to be synchronized,
synchronization may need further logon sessions to complete.
Resolution: Allow longer logon sessions for larger amounts of data to be
synchronized.
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
CHAPTER 15 Managing Users and User Data
608
n
Possible cause #2: Sync has not completed
Explanation: Another possible root cause of incomplete synchronization is
the same as in Windows XP—namely, if a file is in use, open file handles will
prevent the file from synchronizing.
Resolution: This is an unchanged behavior and is by design.
n
Possible cause #3: Offline files respond slowly over a VPN connection
Explanation: On computers running Windows Vista and later versions,
you experience slow performance after you establish a VPN connection.
Additionally, it may take several minutes to open a redirected shell folder.
This problem occurs if the following conditions are true:

Offline files are enabled on the computer.

Some offline files are cached on the local computer.


You logged on to the computer when you were offline.

The VPN connection is based on a slow connection.
This problem usually lasts several minutes and then disappears.
Resolution: See (This issue has been
fixed in SP1.)
n
Possible cause #4: Changes to an offline file are not saved to the server when files
are synchronized
Explanation: When you modify an offline file in Windows Vista and later
versions, the changes are not saved to the server when files are synchronized.
When this problem occurs, you receive the following error message: “Access
Denied.” Additionally, a .tmp file that corresponds to the file appears on the
server. You may experience this symptom even when you have Change per-
missions to the shared resource.
Resolution: See (This issue has been
fixed in SP1.)
Summary
Folder Redirection, Offline Files, and Roaming User Profiles have been enhanced in
Windows 7 to provide better support for corporate roaming scenarios and high availability
for file server scenarios. You can implement these features using the procedures outlined in
this chapter; you can manage various aspects of their behavior using Group Policy and from
the user interface.
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
Additional Resources CHAPTER 15
609
Additional Resources
These resources contain additional information and tools related to this chapter.
Related Information

n
“Folder Redirection Overview” found at
/cc732275.aspx.
n
“File Sharing and Offline Files Enhancements” found at
/en-us/library/dd637828.aspx.
n
“Windows Browse and Organize Features” found at
/en-us/library/dd744693.aspx.
n
Managing Roaming User Data Deployment Guide found at
/en-us/library/cc766489.aspx. Note that this information is for Windows Vista, so check
first to see whether this topic has been updated for Windows 7 either here or else-
where on TechNet.
On the Companion Media
n
AddLocalUserToLocalGroup.ps1
n
Change-LocalUserPassword.ps1
n
CreateLocalGroup.ps1
n
CreateLocalUser.ps1
n
Remove-LocalUserFromLocalGroup.ps1
n
Get-LocalGroupMembers.ps1
n
LocateDisabledUsers.ps1
n

Get-LocalGroups.ps1
n
Get-LocalUsers.ps1
n
LocateLockedOutLocalUsers.ps1
n
ListUserLastLogon.ps1
n
FindAdmin.ps1
n
EnableDisableUser.ps1
n
BackupFolderToServer.ps1
n
GetSystemRestoreSettings.ps1
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
611
CHAPTER 16
Managing Disks and File
Systems
n
Overview of Partitioning Disks 612
n
Working with Volumes 615
n
File System Fragmentation 622
n
Backup And Restore 624
n

Windows ReadyBoost 639
n
BitLocker Drive Encryption 641
n
Encrypting File System 662
n
Symbolic Links 664
n
Disk Quotas 670
n
Disk Tools 673
n
Summary 677
n
Additional Resources 678
T
he most important aspect of a computer is the user data. Businesses depend on the
privacy of their intellectual property to stay competitive, and government organi-
zations depend on confidentiality for national security. Thus, it’s critical that Windows
protects the availability, integrity, and privacy of the user data on client computers. The
Windows 7 operating system provides several important improvements to disk and file
management.
Windows 7 includes several improvements that both users and administrators will
appreciate. By default, backups automatically create a System Image backup of the entire
system drive. Additionally, you can store System Image backups to shared folders. System
Image backups greatly reduce the time required to restore a computer after a hard disk
failure or system corruption.
To improve data security, you can use Windows BitLocker Drive Encryption to encrypt
an entire volume, protecting the data on the disk even if the disk is physically removed
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.

CHAPTER 16 Managing Disks and File Systems
612
from the computer. BitLocker works alongside Encrypting File System (EFS): BitLocker can
encrypt system files and the page file along with any other files on the volume, whereas EFS
is intended primarily to encrypt user files. Windows 7 supports BitLocker To Go, enabling
removable flash drives to be encrypted with BitLocker. The BitLocker To Go Reader enables
earlier versions of Windows to read encrypted files from the removable flash drive if the user
has the required password.
This chapter describes these features, as well as features introduced in Windows Vista, in
more detail.
Overview of Partitioning Disks
Before you can format disks into volumes that applications can access, you must partition
them. Windows 7 provides flexible partitioning that you can change even after you have
formatted a volume. However, it’s still important to plan ahead when creating partitions for
features such as BitLocker Drive Encryption, which has very specific partitioning requirements.
note If Windows discovers a problem with a volume, it might schedule ChkDsk to
run the next time the computer starts. Large volumes, especially volumes bigger than a
terabyte, can take a very long time to check—more than an hour. During this time, the
computer will be offline. Therefore, when you plan the size of your partitions, consider the
time required for Windows to perform a ChkDsk operation at startup.
The sections that follow describe how to partition disks in Windows 7.
How to Choose Between MBR or GPT
Master Boot Record (MBR) and Globally Unique Identifier Partition Table (GPT) are two dif-
ferent disk-partitioning systems. MBR is the most common system and is supported by every
version of Windows, including Windows Vista and Windows 7. GPT is an updated and im-
proved partitioning system and is supported on Windows Vista, Windows 7, Windows Server
2008, and 64-bit versions of Windows XP and Windows Server 2003 operating systems.
GPT offers several advantages over MBR:
n
In Windows, GPT can support up to 128 partitions. MBR supports only four partitions.

n
GPT accurately describes physical disk geometry, allowing Windows to create partitions
and logical drives on cylinder boundaries. Although Windows attempts to do this for
MBR, the geometry that MBR reports has no relationship to a modern drive’s physi-
cal geometry because it has been altered to enable larger capacities. Different disk
vendors have created vendor-specific workarounds for this problem that are difficult to
manage. Therefore, partitioning is more reliable when using GPT.
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
Overview of Partitioning Disks CHAPTER 16
613
n
GPT can support larger partition sizes. In theory, a GPT disk can be up to 18 exabytes
in size (about 18,000,000 terabytes).
n
GPT uses primary and backup partition tables for redundancy and CRC32 fields for
improved partition data structure integrity. MBR does not have redundant partition
tables.
note All GPT disks start with a protective MBR partition to prevent previously released
MBR disk tools, such as Microsoft MS-DOS FDISK or Microsoft Windows NT Disk Adminis-
trator, from damaging the GPT partition because they don’t recognize the partition type.
If you mount an MBR disk in a 32-bit version of Windows XP, it will see only the protective
MBR partition.
To boot from a GPT disk, the computer must support the Extensible Firmware Interface
(EFI). Basic input/output system (BIOS)–based systems must boot from an MBR disk, although
they can use a second GPT disk as a data disk. All removable media must use MBR.
MoRe inFo For more information about GPT, read the “Windows and GPT FAQ” at
/>Converting from MBR to GPT Disks
You can convert disks only from MBR to GPT, or vice versa, if the disk does not contain parti-
tions or volumes. You can convert a disk in two ways:
n

In the Disk Management snap-in, right-click the MBR drive you want to convert to GPT
and then click Convert To GPT Disk. If the drive is not empty or contains partitions, this
option is unavailable.
n
In the DiskPart command-line tool, select the drive you want to convert and run the
command convert gpt. Similarly, to convert from GPT to MBR, run the command
convert mbr.
note When a dynamic disk is converted between MBR and GPT types, it must first be
converted to a basic disk, then converted to MBR or GPT as appropriate, and then convert-
ed back to a dynamic disk. When you use the Disk Management snap-in, the conversion to
a basic disk and then back to a dynamic disk happens automatically in the background. If
you’re using the command-line DiskPart tool, you must explicitly make the conversions.
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
CHAPTER 16 Managing Disks and File Systems
614
GPT Partitions
For EFI computers that boot from a GPT disk, the boot disk must contain at least the following
partitions:
n
EFI System Partition On EFI computers, the EFI System Partition (ESP) is about
100 megabytes (MB) and contains the Windows Boot Manager files. For more information
about startup files, read Chapter 29, “Configuring Startup and Troubleshooting Startup
Issues.” The ESP has the following partition globally unique identifier (GUID):
DEFINE_GUID (PARTITION_SYSTEM_GUID, 0xC12A7328L, 0xF81F, 0x11D2, 0xBA, 0x4B, 0x00,
0xA0, 0xC9, 0x3E, 0xC9, 0x3B)
n
Microsoft Reserved Partition The Microsoft Reserved Partition (MSR) reserves
space on each disk drive for subsequent use by operating system software. On drives
smaller than 16 gigabytes (GB), the MSR is 32 MB. On drives 16 GB or larger, the MSR is
128 MB. GPT disks do not allow hidden sectors. Software features that formerly used

hidden sectors now allocate portions of the MSR for feature-specific partitions. For
example, converting a basic disk to a dynamic disk causes the MSR on that disk to be
reduced in size, and a newly created partition holds the dynamic disk database. The
MSR has the following partition GUID:
DEFINE_GUID (PARTITION_MSFT_RESERVED_GUID, 0xE3C9E316L, 0x0B5C, 0x4DB8, 0x81,
0x7D,
0xF9, 0x2D, 0xF0, 0x02, 0x15, 0xAE)
n
Data partition This partition stores Windows 7 system files and user files. The data
partition has the following partition GUID:
DEFINE_GUID (PARTITION_BASIC_DATA_GUID, 0xEBD0A0A2L, 0xB9E5, 0x4433, 0x87, 0xC0,
0x68, 0xB6, 0xB7, 0x26, 0x99, 0xC7);
Additionally, dynamic disks can use two different GPT partitions:
n
A data container partition corresponding to the MBR partition 0x42, with the following
GUID:
DEFINE_GUID (PARTITION_LDM_DATA_GUID, 0xAF9B60A0L, 0x1431, 0x4F62, 0xBC, 0x68,
0x33, 0x11, 0x71, 0x4A, 0x69, 0xAD);
n
A partition to contain the dynamic configuration database with the following GUID:
DEFINE_GUID(PARTITION_LDM_METADATA_GUID, 0x5808C8AAL, 0x7E8F, 0x42E0, 0x85, 0xD2,
0xE1, 0xE9, 0x04, 0x34, 0xCF, 0xB3);
Data disks (non-boot disks) must have an MSR and a data partition. Standard users will
typically see only the data partitions; however, the other partitions will be visible to adminis-
trators using the Disk Management snap-in or the DiskPart tool.
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
Working with Volumes CHAPTER 16
615
Choosing Basic or Dynamic Disks
Traditional hard disks are called basic disks in Windows Vista and Windows 7, and they have

the same functionality that basic disks have always had, plus a few extras. You can create new
partitions (called simple volumes in Windows Vista and Windows 7), delete partitions, and
extend or shrink the existing partitions. The ability to extend or shrink an existing partition is
an important new feature in Windows Vista and continues to be supported in Windows 7.
Dynamic disks, first introduced in Microsoft Windows 2000, provide all of the functionality
of the basic disk, plus the ability to span a volume across multiple dynamic disks or stripe
multiple dynamic disks to create a larger (and faster) volume. Dynamic disks present difficulties,
however, because they are not accessible from operating systems other than the operating
system instance that converted the disk to dynamic. This makes dynamic disks inaccessible in
multiboot environments and makes recovering data more difficult in the event of partial hard
disk failure. You should always use basic disks unless you have a specific requirement that can
be met only by dynamic disks.
Working with Volumes
In earlier versions of Windows, your choices for resizing volumes and partitions after they
have been created are limited. If you need to add space to a volume, your only choice is
to make the disk a dynamic disk and then create a spanned volume. If you want to expand
or contract a partition, your only choice is to use third-party tools. In Windows Vista and
Windows 7, however, you can now expand and contract volumes without data loss and with-
out requiring a reboot.
How to Create a Simple Volume
In Windows Vista and Windows 7, the term simple volume has been expanded to include both
partitions on basic disks and simple volumes on dynamic disks. If your only need is a simple
volume, your best choice is a basic disk because a simple volume doesn’t use the advanced
features of a dynamic disk.
To create a simple volume, open the Disk Management snap-in and follow these steps:
1. Right-click an unallocated space on one of the disks and then click New Simple Volume.
The New Simple Volume Wizard appears.
2. Click Next. On the Specify Volume Size page, enter the size of volume you want to cre-
ate in megabytes. The default is the maximum space available on the disk. Click Next.
3. On the Assign Drive Letter Or Path page, assign a drive letter or mount point. Click Next.

4. On the Format Partition page, choose the formatting options for the volume and then
click Next.
5. Click Finish on the summary page of the wizard and the volume will be created and
formatted according to your selections.
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
CHAPTER 16 Managing Disks and File Systems
616
note The Disk Management snap-in always creates simple volumes on dynamic disks or
primary partitions on basic GPT disks. For basic MBR disks, the first three volumes created
will be primary partitions. The fourth simple volume on a basic MBR disk is created as an
extended partition and a logical drive. Further simple volumes on the basic MBR disk are
logical drives.
Creating simple volumes using the command line or a script requires that you know
whether the disk you’re creating the volume on is a dynamic or basic disk. The DiskPart tool is
not as flexible as the Disk Management snap-in, which automatically adjusts to create either a
volume or a partition depending on the disk type. With DiskPart, you must create a partition
on a basic disk and a volume on a dynamic disk.
How to Create a Spanned Volume
A spanned volume uses the free space on more than one physical hard disk to create a bigger
volume. The portions of disk used to create the volume do not need to be the same size and
can actually include more than one free space on a disk. A spanned volume provides no ad-
ditional speed benefits and increases the risk of catastrophic failure leading to data loss. The
failure of any disk involved in the spanned volume will make the entire volume unavailable.
note To achieve a speed benefit with multiple disks, you must use striping, such as that
provided by RAID 1 or RAID 5. With striping, every file on a volume is evenly distributed
between multiple physical disks. With striping, files can be read from or written to multiple
disks simultaneously, increasing throughput. Spanning simply appends one disk to the
next, so any given file is probably stored only on a single disk. The best way to add striping
is to use a computer or add-on card that supports hardware RAID.
If you still want to create a spanned volume, follow these steps:

1. Open the Disk Management snap-in.
2. Right-click a free-space segment that you want to include in the spanned volume and
then select New Spanned Volume from the shortcut menu. The New Spanned Volume
Wizard appears.
3. Click Next. On the Select Disks page, select from the available disks and then click Add
to add the disks to the spanned volume. Select each disk in the Selected column and
set the amount of space to use on that disk for the spanned volume. Click Next.
4. On the Assign Drive Letter Or Path page, the default is to assign the next available
drive letter to the new volume. You can also mount the volume on an empty NTFS
folder on an existing volume. Click Next.
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
Working with Volumes CHAPTER 16
617
5. On the Format Volume page, choose the formatting options for the new volume.
Windows Vista and Windows 7 support only NTFS formatting from the Disk Management
snap-in. To format with FAT or FAT32, you need to use the command line. Click Next.
6. Click Finish on the summary page to create the volume.
Creating a spanned volume using DiskPart is a somewhat more complicated process than
creating a simple volume. You can’t just create the spanned volume in one step; you need to
first make sure that the disks to be used are converted to dynamic. Then you create a simple
volume on the first disk of the spanned volume, extend the volume to the second disk, and
then add any additional disks involved in the span. Finally, you must assign the volume to a
drive letter or mount point.
How to Create a Striped Volume
A striped volume uses the free space on more than one physical hard disk to create a bigger
volume. Unlike a spanned volume, however, a striped volume writes across all volumes in the
stripe in small blocks, distributing the load across the disks in the volume. The portions of
disk used to create the volume need to be the same size; the size of the smallest free space
included in the striped volume will be the determinant.
A striped volume is faster than a simple volume because reads and writes happen across

multiple disks at the same time. However, this additional speed comes with an increased risk
of catastrophic failure leading to data loss when compared to a volume residing on a single
physical disk because the failure of any disk involved in the spanned volume will make the
entire volume unavailable. Therefore, it is critical to regularly back up striped volumes.
To create a striped volume, follow these steps:
1. Open the Disk Management snap-in.
2. Right-click a free-space segment that you want to include in the striped volume and
then click New Striped Volume. The New Striped Volume Wizard appears.
3. Click Next. On the Select Disks page, select from the available disks and then click Add
to add the disks to the striped volume. Set the amount of space to use on the disks for
the striped volume. Click Next.
4. On the Assign Drive Letter Or Path page, the default is to assign the next available
drive letter to the new volume. You can also mount the volume on an empty NTFS
folder on an existing volume. Click Next.
5. On the Format Volume page of the New Striped Volume Wizard, choose the format-
ting options for the new volume. Windows Vista and Windows 7 support only NTFS
formatting from the Disk Management snap-in. To format with FAT or FAT32, you need
to use the command line. Click Next.
6. Click Finish on the summary page to create the volume. If the disks are basic disks,
you’ll be warned that this operation will convert them to dynamic disks. Click Yes to
convert the disks and create the striped volume.
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
CHAPTER 16 Managing Disks and File Systems
618
How to Resize a Volume
New in Windows Vista, and also included in Windows 7, is the ability to expand and contract
simple volumes without a third-party tool. You can also expand and contract spanned vol-
umes, but striped volumes are fixed in size. To change the size of a striped volume, you need
to delete and re-create it.
note Third-party products offer additional flexibility in resizing partitions, allowing

the resizing of partitions with no available unallocated space immediately adjacent to the
partition that you want to extend and also allowing you to control the placement of the
unallocated space after shrinking the partition.
To shrink a volume, follow these steps:
1. Open the Disk Management snap-in.
2. Right-click the volume you want to shrink and then click Shrink Volume.
3. The Shrink dialog box opens and shows the maximum amount by which you can shrink
the volume in megabytes. If desired, decrease the amount to shrink the volume and
then click Shrink. The shrink process will proceed without further prompting.
You can also use DiskPart interactively from an elevated command line, using exactly the
same steps as you would use with a script. The following interactive steps show how to shrink
a volume as much as possible.
DiskPart
Microsoft DiskPart version 6.1.7100
Copyright (C) 1999-2008 Microsoft Corporation.
On computer: WIN7
DISKPART> list volume
Volume ### Ltr Label Fs Type Size Status Info

Volume 0 F New Volume NTFS Simple 20 GB Healthy
Volume 1 E New Volume NTFS Simple 40 GB Healthy
Volume 2 R DVD-ROM 0 B No Media
Volume 3 C NTFS Partition 75 GB Healthy System
Volume 4 D New Volume NTFS Partition 52 GB Healthy
DISKPART> select volume 4
Volume 4 is the selected volume.
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
Working with Volumes CHAPTER 16
619
DISKPART> shrink querymax

The maximum number of reclaimable bytes is: 26 GB
DISKPART> shrink
DiskPart successfully shrunk the volume by: 26 GB
note In the code list, the command shrink querymax queries the volume to determine
the maximum amount of shrinkage that the volume will support. The actual number will
depend on the amount of free space on the volume, the fragmentation level, and where
critical files are located on the volume.
To extend a volume, the steps are similar:
1. Open the Disk Management snap-in.
2. Right-click the volume you want to extend and then click Extend Volume. The Extend
Volume Wizard appears.
3. Click Next. The Select Disks page appears.
4. Select the disks and set the amount of space from each disk to include in the extended
volume. If you are extending a volume on a basic disk and you choose noncontiguous
unallocated space or space on a second disk, the extension will also convert any disks
involved to dynamic disks as part of the extension. Click Next.
5. On the Completing The Extend Volume Wizard page, click Finish. If the extension
requires conversion to a dynamic disk, you’ll see a warning.
How to Delete a Volume
You can delete a volume from either the Disk Management snap-in or the command line.
Deleting a volume permanently erases the data stored on the volume.
From the Disk Management snap-in, simply right-click the volume and then click Delete
Volume. From the DiskPart command-line tool at an elevated command prompt, select the
volume and then use the delete volume command, as the following code demonstrates.
DiskPart
Microsoft DiskPart version 6.1.7100
Copyright (C) 1999-2008 Microsoft Corporation.
On computer: WIN7
DISKPART> list volume
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.

CHAPTER 16 Managing Disks and File Systems
620
Volume ### Ltr Label Fs Type Size Status Info

Volume 0 F New Volume NTFS Simple 20 GB Healthy
Volume 1 E New Volume NTFS Simple 40 GB Healthy
Volume 2 R DVD-ROM 0 B No Media
Volume 3 C NTFS Partition 75 GB Healthy System
Volume 4 D New Volume NTFS Partition 52 GB Healthy
DISKPART> select volume 0
Volume 0 is the selected volume.
DISKPART> delete volume
DiskPart successfully deleted the volume.
How to Create and Use a Virtual Hard Disk
Virtual hard disks (VHDs) are a file type that acts like a hard disk. In previous versions of
Windows, VHDs were used by virtual machines, such as those created by Microsoft Virtual
Server 2005 or Microsoft Virtual PC. Additionally, Complete PC Backup in Windows Vista
created a copy of the computer’s hard disk as a VHD disk image.
Beginning with Windows 7, you can now mount VHDs exactly like a physical disk. By
mounting a VHD, you can easily copy files to and from the virtual disk. Additionally,
Windows 7 can be configured to boot from a VHD, as described in Chapter 29.
You can create a VHD from either the Disk Management snap-in or the command line.
After you create the VHD, you must attach it and then format it before you can use it, just like
a physical partition.
From the Disk Management console, following these steps:
1. Right-click Disk Management and then click Create VHD. Follow the prompts that appear.
2. Right-click the new disk and then click Initialize Disk. Click OK.
3. Right-click the new disk and then click New Simple Volume (or select a different
volume type, if available). Follow the prompts that appear.
The new virtual disk is ready to be used, just like any other disk.

From the DiskPart command-line tool at an elevated command prompt, run the create
vdisk command and specify the file (to name the file) and maximum (to set the maximum size
in megabytes) parameters. The following code demonstrates how to create a VHD file at
C:\vdisks\disk1.vdh with a maximum file size of 16 GB (or 16,000 MB).
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
Working with Volumes CHAPTER 16
621
DiskPart
Microsoft DiskPart version 6.1.7100
Copyright (C) 1999-2008 Microsoft Corporation.
On computer: WIN7

DISKPART> create vdisk file="C:\vdisks\disk1.vhd" maximum=16000

Volume ### Ltr Label Fs Type Size Status Info

Volume 0 F New Volume NTFS Simple 20 GB Healthy
Volume 1 E New Volume NTFS Simple 40 GB Healthy
Volume 2 R DVD-ROM 0 B No Media
Volume 3 C NTFS Partition 75 GB Healthy System
Volume 4 D New Volume NTFS Partition 52 GB Healthy

DISKPART> select volume 0

Volume 0 is the selected volume.

DISKPART> delete volume

DiskPart successfully deleted the volume.
For additional options, run the command help create vdisk at the DiskPart command

prompt.
After you create a VHD, you must attach it, create a partition, assign it a drive letter, and
format it before it can be used. The following script (which must be run within a DiskPart
session) demonstrates how to do this.
create vdisk file="C:\vdisks\disk1.vhd" maximum=16000
attach vdisk
create partition primary
assign letter=g
format
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
CHAPTER 16 Managing Disks and File Systems
622
File System Fragmentation
As files are created, deleted, and modified over time, their size and physical location on the
hard disk will change. If a file size needs to increase and the hard disk doesn’t have room
directly adjacent to the existing file, the file system automatically places the new portion of the
file where it can find the room and then marks the necessary structures so that the file system
can find the entire file when an application needs it. The file is now in two (or more) fragments.
Fragmentation is normal behavior and is completely transparent to both applications and
users. The problem is that over time, more and more files become fragmented and even
highly fragmented, increasing the amount of time that it takes for the hard disk controller
to locate all of the fragments. Not only does this slow down file access, but it also places
additional stress on the hard disk itself.
By default, Windows Vista and Windows 7 will defragment the hard drive at 1:00 A.M.
every Wednesday. If the computer is off at this time, defragmentation will start shortly after
the computer boots next. Ideally, defragmentation will run when the computer is not in use,
minimizing the performance impact. However, the user impact is minimal because the de-
fragmenter uses both low CPU priority and low-priority input/output (I/O).
Unlike earlier versions of Windows, Windows 7 recognizes solid-state drives (SSDs) and
disables automatic defragmentation. Defragmentation does not improve the performance of

SSDs and can decrease the lifetime of the SSD by unnecessarily reading and writing data.
HoW it WoRKS
Defragmentation Algorithm Improvements
M
any systems administrators have been captivated by the graphical defragmen-
tation displays in previous versions of Windows. You’ll notice the graphics are
gone in Windows Vista and Windows 7. Unfortunately, displaying the layout of files
and highlighting files that had even one fragmentation made many performance-
focused administrators obsessed with eliminating every single fragmented file.
Fragmentation does reduce disk performance, but having a few fragments in a large
file doesn’t make a difference—even years of reading and writing a large file with a
single fragment would never add up to a significant amount of time. For this reason,
Microsoft tweaked the defragmentation algorithm so that it does not defragment a
file if a segment is longer than 64 MB. In those circumstances, the relatively signifi-
cant effort required to rearrange files just to combine two 64-MB fragments isn’t
worth the effort, so Windows doesn’t bother.
If you run a different defragmentation tool (including the defragmenter in
Windows XP), those fragments will show up, and they’ll probably look significant
because the fragmented file is so large. (Typically, the entire file appears red if it has
even a single fragment.) Trust the algorithm, though—a few fragments don’t matter.
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
File System Fragmentation CHAPTER 16
623
To defragment a file system or configure the automatic disk defragmentation schedule
manually, follow these steps:
1. Click Start and then click Computer.
2. Right-click the drive and then click Properties.
3. Click the Tools tab and then click Defragment Now. The Disk Defragmenter appears, as
shown in Figure 16-1.
FIGURE 16-1 The Windows 7 Disk Defragmenter interface

4. In the Disk Defragmenter dialog box, click Defragment Disk to begin defragmentation.
You can continue to use the computer while defragmentation takes place, but it might be
a little slower. You can also adjust the defragmentation schedule for a single computer from
this interface.
For more complete control of defragmentation, you can use the command-line defrag-
mentation tool, Defrag.exe, from an elevated command prompt. Defrag.exe has the following
syntax, which has changed since Windows Vista.
Defrag <volume> | /C | /E <volumes> [/A | /X | /T] [/H] [/M] [/U] [/V]
The options for Defrag.exe are:
n
<volume> The drive letter or mount point of the volume to defragment.
n
/C Defragment all local volumes on the computer.
n
/E Defragment all local volumes on the computer except those specified.
n
/A Display a fragmentation analysis report for the specified volume without defrag-
menting it. Analysis reports resemble the following.
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
CHAPTER 16 Managing Disks and File Systems
624
Post Defragmentation Report:

Volume Information:
Volume size = 68.56 GB
Free space = 58.78 GB
Total fragmented space = 0%
Largest free space extent = 31.64 GB

You do not need to defragment this volume

n
/X Perform free-space consolidation. Free-space consolidation is useful if you need
to shrink a volume, and it can reduce fragmentation of future files.
n
/T Track an operation already in progress on the specified volume.
n
/H Run the operation at normal priority instead of the default low priority. Specify
this option if a computer is not otherwise in use.
n
/M Defragment multiple volumes simultaneously, in parallel. This is primarily useful
for computers that can access multiple disks simultaneously, such as those using SCSI-
or SATA-based disks rather than disks with an IDE interface.
n
/U Print the progress of the operation on the screen.
n
/V Verbose mode. Provides additional detail and statistics.
Backup And Restore
Windows 7 includes the Backup And Restore Control Panel tool, as shown in Figure 16-2,
which is an updated version of the Backup And Restore Center. The Backup And Restore
Center uses Shadow Copy to take a snapshot of your files, even allowing the backup to back
up open files completely without problems.
The Backup And Restore Center supports two kinds of backup:
n
System Image Previously known as Complete PC Backup in Windows Vista, the
System Image backup backs up an entire volume to a virtual hard disk (.vhd) disk-
image file (compacted to remove empty space), allowing you to quickly restore a com-
puter and all running applications. However, backups take up much more space and
are more time consuming. System Image backups typically need to be done only once
after a computer is initially configured. Complete PC Backup in Windows Vista could
be stored only on local media, such as a DVD or a removable hard disk, but System

Image backups in Windows 7 can also be saved to shared folders.
n
Files and folders Stores user files and documents to compressed (.zip) files. File
backups are incremental by default and thus are very quick. Additionally, file backups
do not back up system files, program files, EFS-encrypted files, temporary files, files in
the Recycle Bin, or user profile settings. File backups can back up to either local media
or a shared folder on the network.
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
Backup And Restore CHAPTER 16
625
FIGURE 16-2 The Backup And Restore Control Panel tool
note File backups are faster because they don’t back up system or application files.
However, System Image backups are surprisingly fast. Because System Image backups read
the disk block by block, the read performance is faster than reading the disk file by file,
which requires the disk to jump between different files.
Backup And Restore supports backing up data files to CD, DVD, hard disk (fixed or remov-
able), or a network share. The default settings for the first backup and for scheduled backups
perform both a System Image backup and a files and folders backup on a weekly basis.
note You cannot save backups to a universal serial bus (USB) flash drive, but you can use
an external USB hard drive or CF or SD memory cards.
How File Backups Work
Backup And Restore provides graphical tools for manually initiating backup and restore ses-
sions and for scheduling automatic backups. All client computers that store important data
should have automatic backup scheduled. For more information, read the section titled “Best
Practices for Computer Backups” later in this chapter.
After you first configure automatic file backup using Backup And Restore, Windows 7 will
regularly back up all files. The first time a backup is performed, a full backup is done, includ-
ing all important user documents. Subsequent backups are incremental, backing up only
changed files. Older backups are discarded when the disk begins to run out of space.
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.

CHAPTER 16 Managing Disks and File Systems
626
For example, if you configure a nightly scheduled backup and change a file every day, a
copy of that file will be stored in each day’s Backup Files folder (described in “File and Folder
Backup Structure” later in this chapter). By storing multiple versions of a single file, Windows 7
gives users the opportunity to choose from several older copies of a file when using the Previ-
ous Versions tool (also described later in this chapter). When you restore files, you only need
to restore from a single backup because Windows 7 automatically locates the most recent
version of each file. In previous versions of Windows, you need to first restore from the last
full backup and then restore any updates from incremental or differential backups.
Windows 7 uses Shadow Copy to back up the last saved version of a file. Therefore, if a file
is open during the backup (such as the storage file for local e-mail or an open document), the
file will be backed up. However, any changes the user makes since last saving the file are not
backed up.
Only administrators can configure scheduled backups or manually initiate a backup.
However, once configured, scheduled backups do not require a user to provide administrative
credentials. Restoring files does not require administrative privileges unless a user attempts to
restore another user’s file.
If you perform a file backup to a shared folder, the credentials used to run the backup
must have Full Control share and NTFS permissions for the destination folder (known as Co-
owner permissions in the Windows 7 Setup Wizard). To reduce security risks, set up a user ac-
count to be used only by the backup application, and configure share and NTFS permissions
to grant access only to the backup user. The backup account requires administrative privileges
to the computer being backed up, but it needs permissions only to the share and folder on
the target computer.
File and Folder Backup Structure
The Backup tool in Windows XP creates a single file with a .bkf extension when you perform
a backup. Backups in Windows Vista and Windows 7 provide a more flexible and reliable file
structure.
When a user chooses to perform a backup to an external hard disk, Windows 7 automati-

cally creates a folder in the root of the hard disk using the computer name. Within that folder,
backups are saved in this format: “Backup Set <year-month-day> <time>”. For example, if your
computer name is Computer, your backup location is E, and you backed up on January 22, 2007,
at 16:32:00, that backup would be located in “E:\Computer\Backup Set 2007-01-22 163200”.
The folder structure is created when the user first performs a backup. Automatic incremen-
tal backups that occur afterward store additional copies of changed files within subfolders.
However, the name of the Backup Set folder is never updated, so the date indicated by the
folder name will be older than the dates of the files contained within the folder. A new Backup
Set folder is created only when the user performs a full backup.
Within each Backup Set folder, Backup creates a series of Backup Files folders that are
named using the date on which the incremental backup was performed. Additionally, Backup
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
Backup And Restore CHAPTER 16
627
creates a Catalogs folder within the root Backup Set folder. Figure 16-3 shows a backup folder
structure for a computer named WIN7 that is configured to save backups to the E drive. The
File And Folder backup is stored in the WIN7 folder, whereas the System Image backup is
stored in the WIndowsImageBackup folder. File permissions on all folders and files are re-
stricted to administrators, who have full control, and to the user who configured the backup,
who has read-only permissions by default.
FIGURE 16-3 The backup folder structure includes separate folders
for each computer, backup set, backup session, and catalog.
note When restoring files, Windows 7 looks for a folder with the current computer’s name
in the root of the backup media. If you need to restore files created on a different Windows 7
computer, you can either rename the folder to the current computer’s name or perform an
Advanced Restore and select the Files From A Backup Made On A Different Computer option
on the What Do You Want To Restore page of the Restore Files (Advanced) Wizard.
Within each of the backup folders is a series of compressed (.zip) files named “Backup files
xxx.zip”, where xxx is an incremental number to make each filename unique. For example, a
backup folder might contain the following files:

n
Backup files 1.zip
n
Backup files 2.zip
n
Backup files 138.zip
note Because the .zip files used for backups are compressed and stored in fewer files,
they take up less space on the backup media. Overall, backups take about half the space
of the original files. Compression levels vary widely, though. Text and Extensible Markup
Language (XML) files are typically compressed to less than one-tenth the original space.
Backups of video, music, and picture files take up the same space as the original files be-
cause the files are already compressed.
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.

×