Our hard disks store our programs and, most important, our precious data, so they have a special place in the computing firmament. The new solid-state drives have no moving parts, so they’re extremely reliable, but the older mechanical drives ought to be pampered and coddled to ensure a long and trouble-free existence, but that’s rarely the case, unfortunately. Just consider everything that a mechanical hard disk has to put up with:
General wear and tear—If your computer is running right now, its hard disk is spinning away at somewhere around 7,200 revolutions per minute. That’s right, even though you’re not doing anything, the hard disk is hard at work. Because of this constant activity, many hard disks simply wear out after a few years.
The old bump-and-grind—Your hard disk includes read/write heads that are used to read data from and write data to the disk. These heads float on a cushion of air just above the spinning hard disk platters. A bump or jolt of sufficient intensity can send them crashing onto the surface of the disk, which could easily result in trashed data. If the heads happen to hit a particularly sensitive area, the entire hard disk could crash. Notebook computers, being portable, are particularly prone to this problem.
I should say that your hard disk is probably spinning away as I speak. Windows 10 is actually configured out of the box to put your hard disk to sleep after 20 minutes of inactivity, so your hard disk may be resting. If you want to change the hard disk sleep interval (personally, I turn it off on my machines to improve performance), click in the taskbar’s Search box, type power, and then select Power Options in the search results. Select the power plan you want to use, click Change Plan Settings, click Change Advanced Power Settings, open the Hard Disk branch, and then open the Turn Off Hard Disk After branch. If you’re using a desktop PC, click Setting and then specify the interval you want to use. If you’re using a notebook or tablet, click both On Battery and Plugged In to set the intervals you prefer.
Power surges—The current supplied to your PC is, under normal conditions, relatively constant. It’s possible, however, for massive power surges to assail your computer (for example, during a lightning storm). These surges can wreak havoc on a carefully arranged hard disk.
So, what can you do about this? In versions of Windows prior to Windows 7, you had basically two choices:
Wait until Windows recognized a disk error (for example, when you tried to open a corrupted file). In this case, Windows would run a program called Error Checking (actually, its command-line equivalent called chkdsk) that scanned your hard disk for problems and could repair them automatically.
Run the Error Checking program yourself on a regular schedule (say, once a month or so) or when you suspected a hard disk error.
In both cases, Windows would not be able to run Error Checking right away on the Windows volume (usually drive C) because it had files in use. Instead, Windows would schedule Error Checking to run during the next boot. (Windows would be able to run Error Checking immediately on any other volume.)
The major downside to all this was that Error Checking would have to take the Windows volume offline to scan and repair it. That wasn’t a big deal for a small hard disk, but with drive capacities getting into the hundreds and then thousands of gigabytes, these disk scans were taking forever. And the more full the volume was (technically, the more files it stored), the longer the check would take, sometimes several hours for extremely large disks with tons of files. Windows 7 improved things a bit by making Error Checking itself faster, but Microsoft realized it was facing a losing battle, and that hard disk size would easily outpace any performance improvements that could be squeezed out of Error Checking.
Note
Although most hard disks consist of a single storage area, you’ll see later in this chapter that you can split a hard disk into multiple storage areas, and these areas are called volumes (see “Dividing Your Hard Drive into Two Volumes”). A volume is also known as a logical drive, so we’ll often refer to a volume as a hard drive in this chapter and throughout the book.
The solution to this dilemma is a feature of Windows 10’s NTFS file system called self-healing, where certain disk errors can be fixed on-the-fly without having to take the entire volume offline. This feature was introduced in Windows Vista, where it applied to only a few relatively rare errors, but since Windows 8 Microsoft has significantly increased the number of problems that can be self-healed. This means that many drive errors will get fixed behind the scenes without your even knowing an error occurred (and, more importantly, without having to take the Windows volume offline).
From a hard drive point of view, the main difference between Windows 8 and later and their predecessors is that Windows 8 and later maintain a running assessment of the current health of the drive. Specifically, Windows 8/8.1 and Windows 10 always see your hard drive as currently in one of the five following states:
Healthy—This state means that your hard drive is online and currently has no errors or corruption. When you open Control Panel’s Security and Maintenance icon and then view the Maintenance section (in the Search box, type maintenance, and then select Security and Maintenance), the Drive Status value shows “All drives are working properly,” as you can see in Figure 25.1.
Self-healing—This state means that Windows has detected an error and is in the process of repairing it using NTFS self-healing. This transient state lasts a very short time and you see no indication either on the desktop or in the Security and Maintenance pane.
Error verification—This state means that Windows has detected a possible hard drive error that it can’t self-heal. We say “possible” because some problems that appear to be hard drive corruption are actually intermittent memory errors. Rather than just escalating the health status to the next level, Windows runs a feature called the spot verification service, which attempts to verify that the error is a drive-related one. This is also a transient state that lasts a very short time.
Scan required—This state means that the spot verification service has confirmed the hard drive error and the system now needs to scan the hard drive. That scan is scheduled to run during the next automatic maintenance window. However, as you can see in Figure 25.2, Security and Maintenance shows a “Scan drive for errors” message, and you can run the scan immediately by clicking the Run Scan button. The drive remains online and you can work normally while the scan runs. During the scan, Windows logs the error, determines the precise fix required, and escalates the health status to the next level.
To learn about the automatic maintenance window, see “Setting the Automatic Maintenance Schedule,” p. 632.
Restart required—This state occurs after the drive scan has logged the error and determined the repair that’s required, which Windows calls a spot fix. The notification area displays a “Restart to repair drive errors” message, and the same message appears in Security and Maintenance, as shown in Figure 25.3. You can click Restart to begin the spot fix process. Because the full hard drive has already been scanned and the needed fix has already been determined, repairing the hard drive adds only a few seconds to the restart. Note that the restart is required to repair the system volume (which must go offline to effect the repairs), but is actually optional for nonsystem volumes. Windows displays the restart message for all volumes so that users don’t have to take any direct action to repair the drive. However, for nonsystem volumes, advanced users can initiate the repair manually without a restart, as we describe in the next section.
On a multivolume system, when Windows 10 is ready to spot fix a drive and it alerts you that a restart is required, it is unfortunately vague as to which drive requires the repair. If you would rather not restart at this time, you can check the drives yourself and, if the repair is required on a nonsystem drive, you can run the repair manually to avoid the restart. Follow these steps:
1. Open File Explorer and then select This PC.
2. Right-click the first hard drive (this is usually drive C, which is almost always the system volume; look for the Windows logo on the drive icon) and then click Properties. The drive’s Properties dialog box appears.
3. Display the Tools tab.
4. Click the Check button. One of two things will happen:
You see the message “You don’t need to scan this drive.” This means the drive is in the Healthy state, so no repair is necessary. Repeat steps 2 to 4 to check the next drive.
You see the message “Repair this drive,” as shown in Figure 25.4. If this is the system volume, you need to restart your computer to repair the drive. Otherwise, continue with step 5.
5. Click Repair Drive. Windows 10 repairs the nonsystem volume and returns its status to Healthy.
Hard disks with capacities measured in the hundreds of gigabytes are standard even in low-end systems nowadays, and multi-terabyte hard disks are now commonplace. This means that disk space is much less of a problem than it used to be. Still, you need to keep track of how much free space you have on your disk drives, particularly the %SystemDrive%
(usually drive C:), which usually stores the virtual memory page file.
One way to error check free space is to view the This PC folder using either Tiles view, Content view (which includes the free space and total disk space with each drive icon), or Details view (which includes columns for Total Size and Free Space).
Alternatively, use Windows 10’s new Storage Sense feature, which not only shows you a disk’s total capacity and its current used and free space, but also how the used space is allocated between system files, apps, media files, documents, and more. In the Search box, type storage and then click Storage. This opens the Storage settings, and you then click the drive you want to check out. Windows 10 displays the disk’s storage allocation, as you can see in Figure 25.5.
Listing 25.1 presents a VBScript procedure that displays the status and free space for each drive on your system.
To learn how to run scripts, see “Windows Script Host,” p. 704.
Option Explicit
Dim objFSO, colDiskDrives, objDiskDrive, strMessage
' Create the File System Object
Set objFSO = CreateObject("Scripting.FileSystemObject")
' Get the collection of disk drives
Set colDiskDrives = objFSO.Drives
' Run through the collection
strMessage = "Disk Drive Status Report" & vbCrLf & vbCrLf
For Each objDiskDrive in colDiskDrives
' Add the drive letter to the message
strMessage = strMessage & "Drive: " & objDiskDrive.DriveLetter & vbCrLf
' Check the drive status
If objDiskDrive.IsReady = True Then
' If it's ready, add the status and the free space to the message
strMessage = strMessage & "Status: Ready" & vbCrLf
strMessage = strMessage & "Free space: " & objDiskDrive.FreeSpace
strMessage = strMessage & vbCrLf & vbCrLf
Else
' Otherwise, just add the status to the message
strMessage = strMessage & "Status: Not Ready" & vbCrLf & vbCrLf
End If
Next
' Display the message
Wscript.Echo strMessage
This script creates a FileSystemObject
and then uses its Drives
property to return the system’s collection of disk drives. Then a For Each...Next
loop runs through the collection, gathering the drive letter, the status, and, if the disk is ready, the free space. It then displays the drive data.
If you find that a hard disk volume is getting low on free space, you should delete any unneeded files and programs. Windows 10 comes with a Disk Cleanup utility that enables you to remove certain types of files quickly and easily. Before discussing this utility, let’s look at a few methods you can use to perform a spring cleaning on your hard disk by hand:
Uninstall programs you don’t use—It’s easy to download new software for a trial run. Unfortunately, that also means it’s easy to have unused programs cluttering your hard disk. Uninstall these and other rejected applications.
Delete downloaded program archives—Your hard disk is also probably littered with ZIP files or other downloaded archives. For those programs you use, you should consider moving the archive files to a removable medium for storage. For programs you don’t use, you should delete the archive files.
Move documents you don’t need very often—Our hard drives are stuffed with ancient documents that we use only rarely, if at all: old projects, business records from days gone by, photos and videos from occasions held long ago, and so on. You probably don’t want to delete any of this, but you can free up hard disk space by moving those old documents to removable media such as an external hard drive or a flash drive.
After you’ve performed these tasks, you should next run the Disk Cleanup utility, which can automatically remove some of the preceding file categories, as well as several other types of files, including downloaded programs, Internet Explorer cache files, the hibernation files, Recycle Bin deletions, temporary files, file system thumbnails, and offline files. Here’s how it works:
1. Open File Explorer and then select This PC.
2. Right-click the drive you want to clean up and then click Properties. The drive’s Properties dialog box appears.
3. Click Disk Cleanup. Disk Cleanup scans the drive to see which files can be deleted. Disk Cleanup displays a list of file types it can delete, as shown in Figure 25.6.
4. Click Clean Up System Files.
5. In the Files to Delete list, check the box beside each category of file you want to remove. If you’re not sure what an item represents, select it and read the text in the Description box. Note, too, that for most of these items you can click View Files to see what you’ll be deleting.
6. Click OK. Disk Cleanup asks whether you’re sure that you want to delete the files.
7. Click Delete Files. Disk Cleanup deletes the selected files.
Tip
Windows 10 also offers a faster route to the Disk Cleanup window. In the Run dialog box (select Windows Logo+R), type cleanmgr /ddrive, where drive is the letter of the drive you want to work with (for example, cleanmgr /dc
), and then press Enter.
Windows 10 comes with a utility called Optimize Drives that’s an essential tool for tuning your hard disk. The job of Optimize Drives is to rid your hard disk of file fragmentation. (Note that this only applies to mechanical hard disks. Solid state drives don’t benefit from defragmentation.)
File fragmentation is one of those terms that sounds scarier than it actually is. It simply means that a file is stored on your hard disk in scattered, noncontiguous areas. This is a performance drag because it means that when Windows 10 tries to open such a file, the disk drive’s read/write heads must make several stops to collect the various pieces. If a lot of files are fragmented, it can slow even the fastest hard disk to a crawl.
Why doesn’t Windows 10 just store files contiguously? Recall that Windows 10 stores files on disk in clusters and that these clusters have a fixed size, depending on the disk’s capacity. Recall, too, that Windows 10 uses a file directory to keep track of each file’s whereabouts. When you delete a file, Windows 10 doesn’t actually clean out the clusters associated with the file. Instead, it just marks the deleted file’s clusters as unused.
To see how fragmentation occurs, let’s look at an example. Suppose that three files—FIRST.TXT
, SECOND.TXT
, and THIRD.TXT
—are stored on a disk and that they use up four, three, and five clusters, respectively. Figure 25.7 shows how they might look on the disk.
If you now delete SECOND.TXT
, clusters 5, 6, and 7 become available. But suppose that the next file you save—call it FOURTH.TXT
—takes up five clusters. What happens? Well, Windows 10 looks for the first available clusters. It finds that 5, 6, and 7 are free, so it uses them for the first three clusters of FOURTH.TXT
. Windows continues and finds that clusters 13 and 14 are free, so it uses them for the final two clusters of FOURTH.TXT
. Figure 25.8 shows how things look now.
As you can see, FOURTH.TXT
is stored noncontiguously; in other words, it’s fragmented. Although a file fragmented in two pieces isn’t that bad, it’s possible for large files to split into dozens of blocks.
The good news with Windows 10 is that it configures Optimize Drives to run automatically. The default schedule is once a week during the maintenance window. This means you should never need to defragment your system manually. However, you might want to run a defragment before loading a particularly large software program.
Before using Optimize Drives, you should perform a couple of housekeeping chores:
Delete any files from your hard disk that you don’t need, as described in the “Deleting Unnecessary Files” section earlier in this chapter. Defragmenting junk files only slows down the whole process.
Open Security and Maintenance and check your hard drive’s status as described earlier in this chapter (refer to “Dealing with Hard Disk Errors”). Run a scan or repair if the drive status is anything but Healthy.
Follow these steps to use Optimize Drives:
1. In the taskbar’s Search box, type defrag, and then click Defragment and Optimize Drives in the search results. Alternatively, in File Explorer, open the This PC folder, right-click the drive you want to defragment, click Properties, display the Tools tab in the dialog box that appears, and then click the Optimize button. Either way, the Optimize Drives window appears, as shown in Figure 25.9.
2. Click the disk you want to defragment.
3. Click Optimize. Windows 10 defragments your hard drives.
4. When the defragment is complete, click Close.
Tip
In some cases, you can defragment a drive even further by running Optimize Drives on the drive twice in a row. (That is, optimize a drive once, and when it’s done, immediately do it again.)
If you want to run Optimize Drives on a different day, at a different time, more often or less often, follow these steps to change the default schedule:
1. In the taskbar’s Search box, type defrag, and then click Defragment and Optimize Your Drives in the search results.
2. Click Change Settings to display the Optimize Drives: Optimization Schedule dialog box, shown in Figure 25.10.
3. Make sure that the Run on a Schedule box is checked.
4. Use the Frequency list to select the defragment frequency: Daily, Weekly, or Monthly.
5. It’s probably best to leave the Notify Me If Three Consecutive Scheduled Runs Are Missed box checked. This lets you know if Windows 10 has not been able to optimize your drives in a while because your computer has not been idle during the maintenance window.
6. Click OK to return to the Optimize Drives window.
7. Click Close.
Optimize Drives also has a feature that enables you to select which disks get worked on when the program performs its weekly (or whatever) defragment. This feature is useful if you have many hard drives or volumes on your system and you would like to restrict the ones that Optimize Drives works on to speed things up.
Follow these steps to specify which disks get defragmented:
1. In the taskbar’s Search box, type defrag, and then click Defragment and Optimize Your Drives in the search results.
2. Click Change Settings to display the Optimize Drives: Optimization Schedule dialog box.
3. Click Choose to display the Optimize Drives dialog box, shown in Figure 25.11.
4. Uncheck the box beside any disk you don’t want defragmented.
5. If you want Optimize Drives to stop adding new disks to the defragment list, uncheck the Automatically Optimize New Drives box.
6. Click OK to return to the second Optimize Drives dialog box.
7. Click OK to return to the first Optimize Drives dialog box.
8. Click Close.
Multiple-terabyte (TB) hard drives are becoming routine sights. However, if anything, our data is expanding at an even faster rate as we download and rip music, TV shows, movies, and other massive media files. Nowadays, media collections that take up 10 or 20TB are not at all unusual.
In Windows 7 and earlier versions, the only simple way to store 10TB of data was to purchase five 2TB hard drives and split the data across the drives. This is not a great solution because it’s difficult both to allocate storage efficiently and to find the file you need. Unfortunately, higher-end solutions such as Redundant Array of Inexpensive Disks (RAID) are complex to implement.
Windows 8 and later solved this problem by offering a feature called storage spaces. This feature enables you to combine two or more USB, SATA, or SAS drives into a single storage pool and then create a storage space—that is, a virtualized hard drive—from that pool. You can then use that space just as you would a regular hard drive.
There are two other key characteristics of storage spaces:
Resiliency—This means that the storage space protects your data should a hard drive in the storage pool fail. Mirroring is usually the best choice here, and you can select either two-way (which creates a second copy of each file and requires at least two drives) or three-way (which creates three copies and requires at least three drives). You can also use parity resiliency, where Windows stores information about the data within the storage space that enables the lost data to be reconstructed in the event of a failure. Because of the overhead of maintaining this extra information, parity resiliency is best suited for spaces that mostly consist of large files that aren’t updated very often (such as digital movies and recorded TV shows).
Logical size—You can specify a logical storage space size that is larger than the current physical capacity. For example, if you have five 2TB drives, you can still create a storage space with a logical size of, say, 20TB. Windows will then alert you when you need to add more drives to the storage space.
Follow these steps to create a storage pool:
1. Connect the USB, SATA, or SAS drives you want to use.
2. In the taskbar’s Search box, type storage, and then click Storage Spaces in the search results. The Storage Spaces window appears.
3. Click Create a New Pool and Storage Space, and when User Account Control asks you to confirm, click Yes or enter administrative credentials. Windows 10 displays a list of drives you can use to create the storage pool, as shown in Figure 25.12.
4. Click the check box beside each drive you want to use, and then click Create Pool.
5. Type a name for the storage pool and select a drive letter.
6. Select a resiliency type.
7. Type the logical size you want for the storage pool.
8. Click Create Storage Space. Windows 10 pools the hard drives and creates the storage space.
To add a drive to the storage space, follow steps 1 to 4, click Add Drives, check the new drive’s box, and then click Add Drives.
You’ve seen so far that Windows 10 takes a number of steps to relieve you of the burden of managing your hard disks and other drives:
Windows 10 monitors your hard disk for errors, automatically repairs corruption that can be self-healed, scans other errors automatically during the maintenance window, and prompts you to restart your PC to conduct spot fix repairs.
Windows 10 optimizes your drives automatically once a week (or whatever schedule you choose).
Storage spaces enable you to easily combine multiple drives into a single storage area of any size where data can span the drives and is protected by resiliency.
We all want to use Windows for productive, creative, or playful pursuits, so anything that relieves us of the burden of routine maintenance is welcome in our books. Still, many disk-related chores are not covered by this list and are not automated in any way, so they require you to “lift up the hood” and work on your disks yourself.
Your interface for these tasks is the Disk Management snap-in, which you can get onto the desktop using any of the following techniques:
In the Run dialog box (Windows Logo+R), type diskmgmt.msc and press Enter.
In the taskbar’s Search box, type disk, and then click Create and Format Hard Disk Partitions.
Press Windows Logo+X or right-click the Start button, and then click Disk Management.
You end up at the Disk Management window, which looks similar to the one shown in Figure 25.13. The top half of the window presents a list of volumes on your system and provides data about each volume, including its name, file system, status, capacity, and free space (actual and percentage). The bottom half of the window offers a graphic display of the volumes.
The next few sections take you through some of the more useful tasks you can perform with the Disk Management snap-in.
Windows 10 assigns letters to all your PC drives. For example, the system volume is usually set up as drive C. If you also have an optical drive it might be drive D, your PC’s memory card slots would be assigned letters beginning with E, and so on.
You won’t have to change these drive letters very often, but we’ve found that it comes up every now and then, so you should know how it’s done. For example, some older programs require a floppy disk drive for certain actions, and it’s a rare PC that comes with a floppy drive these days. In most cases you can fool the program into thinking your system has a floppy drive by assigning the letter A to a flash drive or memory card slot.
Follow these steps to assign a different letter to a drive:
1. In the Disk Management window, right-click the drive you want to work with and then click Change Drive Letter and Paths. (Note that you can right-click the drive either in the Volume list or in the graphical display.) The Change Drive Letter and Paths dialog box appears.
Caution
Don’t try to change the drive letter assigned to your Windows 10 system volume, which is usually drive C. This drive is vital to the operation of your system, and changing its drive letter would render your PC unusable.
2. Click Change. The Change Drive Letter or Path dialog box appears, as shown in Figure 25.14.
3. Click the down arrow to select the drive letter you want to use and then click OK. Windows 10 asks you to confirm.
4. Click Yes. Windows 10 assigns the new drive letter to the disk drive.
Tip
If the list of available drive letters doesn’t include drive A, Windows 10 most likely believes (mistakenly, of course) that your PC has a floppy drive. You solve this problem by disabling this phantom floppy drive. Press Windows Logo+X or right-click the Start button, and then click Device Manager. Open the Floppy Disk Drives branch, click Floppy Disk Drive, select Action, Disable, and then click Yes when Device Manager asks you to confirm.
As we mentioned earlier, most hard disks consist of just a single volume that takes up the entire disk, and that volume is almost always drive C. However, it’s possible to divide a single hard disk into two (or more) volumes and assign a different drive letter to each—say, C and D.
Why would you want to do such a thing? Lots of reasons, but two are by far the most common:
You want to install a second operating system on your computer and dual-boot between them. In this case, you need to create a second volume and install the other operating system to that volume.
For information on dual-booting, see “Dual- (and Multi-) Booting Windows 10,” p. 43.
You want to separate your data from Windows. In this case, you need to create a second volume and move your data to that volume. This is a good idea because if you ever have to reinstall Windows from scratch, you can wipe drive C: without having to worry about your data.
Creating multiple volumes on a single hard disk is sometimes called partitioning, because a partition is roughly equivalent to (but not quite the same as) a volume.
In Windows versions prior to Vista, partitioning a hard drive required third-party software such as Disk Director (www.acronis.com) or Partition Master (www.partition-tool.com). Windows Vista changed that by offering the welcome ability to manage volumes without extra software, and that Disk Management feature continues in Windows 10. You can reduce the size of a volume, enlarge a volume, create a new volume, and delete an existing volume, all without losing any data.
In this section, you learn how to divide a hard drive into two volumes. You do that by first shrinking the existing volume and then creating the new volume in the freed-up disk space. Here are the steps to follow:
1. In the Disk Management window, right-click the drive you want to partition and then click Shrink Volume. Disk Management displays the Shrink D: dialog box (where D is the drive letter of the volume).
2. Use the Enter the Amount of Space to Shrink in MB text box to type the amount by which you want the volume size reduced, as shown in Figure 25.15. Keep in mind that this will be the approximate size of the new volume that you create a bit later.
Note
You can’t enter a shrink size that’s larger than the shrink space you have at your disposal, which is given by the Size of Available Shrink Space value. If you’re shrinking drive C, the available shrink space will be quite a bit less than the available free space because Windows reserves quite a bit of space on drive C for the paging file and other system files that may grow over time.
3. Click Shrink. Windows 10 shrinks the volume and displays the freed space as Unallocated, as you can see in Figure 25.16.
4. Right-click the Unallocated space and then click New Simple Volume. The New Simple Volume Wizard appears.
5. Click Next. The Specify Volume Size Wizard appears.
6. Make sure that the Simple Volume Size in MB text box is set to the maximum value, and then click Next. The Assign Drive Letter or Path dialog box appears.
7. Select the Assign the Following Drive Letter option, use the list to select the drive letter you want to assign to the new volume, and then click Next.
8. Select the Format This Volume with the Following Settings option, leave the settings as is (you might want to change the Volume Label, however), and click Next.
9. Click Finish. Windows 10 formats the volume and assigns the drive letter.
Earlier you learned about storage spaces, the Windows 10 feature that creates a single storage pool out of multiple hard disks. This is one of the best features in Windows 10, and there’s no reason that we can think of not to use it. Still, for the sake of giving you a complete look at Disk Management, the next couple of sections show you the Disk Management tools that mimic storage spaces.
We begin with the spanned volume. It is a kind of virtual drive that combines two or more physical hard drives into a single storage area with two main characteristics:
The new volume is dynamic because if you install more drives on the server, you can add those drives to the volume to instantly increase the storage area without losing any existing data.
The new volume is spanned because data is seamlessly stored on all the physical hard drives without your having to worry about where the data is stored. If one of the hard drives fills up, Windows 10 will automatically write new data to one of the other drives in the volume.
Is there a downside to using spanned volumes? Yes, unfortunately, there is a disadvantage, and it’s a big one: If one of the hard drives dies, you lose all the data stored in the spanned volume, even data that resides on the remaining functional drives.
In other words, if you go this route, we strongly recommend that you back up the spanned volume to prevent data loss.
To get started, your first chore is to take the hard drives that you want to use for the spanned volume and convert them to dynamic disks:
1. In the lower half of the Disk Management pane, right-click one of the drives you want to convert to a dynamic volume. Be sure to right-click on the left side of the drive display (where you see the disk designations, such as Disk 0, Disk 1, Disk 2, and so on).
2. Click Convert to Dynamic Disk. Disk Management displays the Convert to Dynamic Disk dialog box.
3. Make sure the box beside the disk is checked, as shown in Figure 25.17, and then click OK. Disk Management displays the Disks to Convert dialog box.
4. Click Convert. Disk Management asks you to confirm.
5. Click Yes. Disk Management converts the drive to a dynamic disk.
6. Repeat steps 1 to 5 to convert any other drives you want to include in the spanned volume.
With your dynamic disks converted, you can now combine them into a spanned volume by following these steps:
1. In the list of hard drives in the lower half of the Disk Management pane, right-click one of the drives you want to include in the spanned volume. Be sure to right-click on the left side of the drive display (where you see the disk designations, such as Disk 0, Disk 1, Disk 2, and so on).
2. Click New Spanned Volume. Disk Management runs the New Spanned Volume Wizard.
3. Click Next. The Select Disks dialog box appears.
4. In the Available list, click a dynamic disk you want to include in the volume and then click Add.
5. Repeat step 4 to add any other drives you want to include in the volume. Figure 25.18 shows a spanned volume with two dynamic disks added.
Note
You don’t have to include the entire dynamic disk in the spanned volume. For example, you might want to set aside a portion of the dynamic disk for other storage uses. In that case, click the disk in the Selected list and then use the Select the Amount of Space in MB spin box to set the amount of space you want to assign to the spanned volume.
6. Click Next. The Assign Drive Letter or Path dialog box appears.
7. Choose a drive letter (the default will probably be D, which is fine) and then click Next. The Format Volume dialog box appears.
8. Assign a Volume Label, if needed, leave the other options as is, and then click Next. The last wizard dialog box appears.
9. Click Finish. Disk Management creates the spanned volume.
Figure 25.19 shows how the new spanned volume (drive E, in this case) appears in Disk Management (the top window) and in the This PC folder (bottom window).
If you add a new hard drive to your computer, you can add that drive to the spanned volume. Open the Disk Management snap-in and convert the new drive to a dynamic disk, as we described earlier. Now follow these steps to add the new dynamic disk to the spanned volume:
1. In the list of hard drives in the lower half of the Disk Management pane, right-click one of the disks in your current spanned volume. Be sure to right-click on the right of the drive display (where you see the spanned volume drive letter).
2. Click Extend Volume. Disk Management runs the Extend Volume Wizard.
3. Click Next. The Select Disks dialog box appears.
4. In the Available list, click the new dynamic disk and then click Add.
5. Click Next. The last wizard dialog box appears.
6. Click Finish. Disk Management adds the dynamic disk to the spanned volume.
A spanned volume provides an easy way to set up a dynamic storage pool using multiple drives, which is great if you don’t want your data needs being cramped by a single hard drive. However, what if your concerns are more about data resiliency? That is, if you want to minimize system downtime, then the best way to do that is to have a redundant set of data on another hard drive. That way, if the original hard drive goes down for the count, you can still keep the computer running off the redundant data on the other drives.
You can establish this data redundancy by setting up another volume as a mirror of the original. Windows 10 maintains exact copies of the data on the mirror drive, and if the original drive dies, the system will continue to function by using the mirrored data.
You can go about this a couple of ways:
If you have a single hard drive and plan on leaving your system files and data on that drive, you can add a second hard drive of the same size (or larger) and use this new hard drive as a mirror for your original data.
If you’ve added a second hard drive and are using it to store important data (such as ripped movies or recorded TV shows), you can add a third drive of the same size (or larger) and use this new drive as a mirror of the data drive.
Of course, there’s nothing stopping you from combining both techniques, depending on your data needs (and your hard drive budget!).
Here are the steps to follow to mirror a volume:
1. In Disk Management, make sure the disk you want to use for the mirror has no current volumes. If it does have volumes, then for each one, right-click the volume and click Delete Volume.
2. In the list of volumes in the lower half of the Disk Management window, right-click the volume you want to mirror and then click Add Mirror. The Add Mirror dialog box appears.
3. Click the disk you want to use for the mirror and then click Add Mirror. Disk Management warns you that the disk to be mirrored must be converted to a dynamic disk and asks you to confirm this conversion.
4. Click Yes. Disk Management converts the disk to dynamic and then starts mirroring the volume to the other hard drive.
5. Repeat steps 2 to 4 for any other volumes you also want to mirror. Figure 25.20 shows the Disk Management snap-in with Disk 1’s drive E being mirrored to the same-sized volume on Disk 2. The original sync might take as little as a few minutes or as much as tens of hours, depending on how much data is to be mirrored.
So far you’ve seen that you can mimic an expandable storage pool by creating a spanned volume that stores data in a single storage area that encompasses two or more hard drives (see “Creating a Spanned Volume”). Similarly, you saw that you can add resiliency by creating mirrored volumes that store each file and folder on two or more hard drives (see “Creating Mirrored Volumes”). These easy-to-implement techniques can be really useful, depending on your data and safety needs.
However, we want to show you a third technique that combines spanning and mirroring, and also includes a bit of load balancing (writing to a second hard drive if one hard drive is busy). This is called RAID 5, and it has the following characteristics:
Three drive minimum—To implement a RAID 5 volume, you require at least three empty physical drives.
Expandable storage pool—A RAID volume is expandable, so you can add more drives to increase the size of the storage pool. In a three-drive RAID setup, the total available storage space in the volume will be twice the size of the smallest drive; in a four-drive setup, it will be three times the smallest drive; and so on. Therefore, it’s best to use drives that are the same size to maximize the available storage area.
Data protection—One of the RAID drives is used as a so-called parity volume, which monitors data integrity to prevent data corruption.
Data redundancy—The other RAID drives are used to store data, with each file and folder being stored multiple times. This means that if one of the data drives fails, you don’t lose any data.
Load balancing—RAID monitors drive activity, and if one of the data drives is busy reading or writing data, RAID uses the other drive to perform the current read or write operation.
Fault tolerance—In a RAID setup, if any hard drive goes down, the entire array remains operational and you don’t lose any data. However, it’s always best to replace the faulty drive as soon as possible, because if a second drive goes down, you lose everything.
Are there negatives to consider? Yes, as usual:
Slow—The type of RAID we’re talking about here is called software RAID because the entire array is maintained and utilized by a software program. Software is inherently slower than hardware, so you might see quite a performance drop when you use a RAID volume, particularly for streaming media files and similar tasks.
Expensive—Because RAID 5 requires a minimum of three hard drives, it can get quite expensive.
Tip
What’s the solution to slow software RAID? Speedy hardware RAID! This means that you add a RAID-dedicated hardware device to your computer, and that device manages the array. Because the device works directly with the drives (bypassing the CPU), hardware RAID is many times faster than software RAID. Although several types of hardware RAID are available, the most common solution is to insert a RAID controller card inside your computer. These cards usually come with multiple SATA ports (usually two, four, or eight) and you attach your hard drives directly to these controller card ports instead of the motherboard SATA ports. When you start your computer, you see an option to invoke the controller card setup routine, which enables you to choose the disks you want in the array and what type of RAID level you prefer.
With all that in mind, if you want to implement a RAID 5 volume on your computer, follow these steps to set it up:
1. In the list of hard drives in the lower half of the Disk Management pane, right-click one of the drives you want to include in the RAID 5 volume and then click New RAID-5 Volume. Disk Management runs the New RAID-5 Volume Wizard.
2. Click Next. The Select Disks dialog box appears.
3. In the Available list, click a disk you want to include in the volume and then click Add.
4. Repeat step 3 to add any other drives you want to include in the volume. Figure 25.21 shows a RAID 5 volume with three disks added (the minimum).
5. Click Next. The Assign Drive Letter or Path dialog box appears.
6. Choose a drive letter and then click Next. The Format Volume dialog box appears.
7. Assign a volume label, if needed, leave the other options as is, and then click Next. The last wizard dialog box appears.
8. Click Finish. Disk Management warns you that it must convert the disks to dynamic disks and asks you to confirm.
9. Click Yes. Disk Management creates the RAID 5 volume.
Figure 25.22 shows how the new RAID 5 volume (drive R, in this case, combining Disk 1, Disk 2, and Disk 3) appears in Disk Management.
Recent versions of Windows have implemented a few other new storage features that should have all power users leaping with joy. The ability to implement Storage Spaces (described earlier) is one; another is the ability to work directly with disk files such as disc images and virtual hard disks. The rest of this chapter takes you through these features.
Working with optical (CD or DVD) data discs is a bit of a hassle because you have to insert the disc and then wait for Windows 10 to recognize and mount the disc. An optical disc drive is also much slower than your hard drive, so working with disc files can be time-consuming.
You can work around all of these problems by using a disc image instead of an actual CD or DVD. A disc image is a precise copy of the contents of an optical disc, including the disc’s file system. A disc image is an International Organization for Standardization (ISO) file that uses the .iso
file extension.
ISO files are becoming increasingly common. For example, some backup applications use ISO files as their archival format, and plenty of programs are now distributed in the ISO format. When you buy a downloadable application online, you might download it as an ISO file.
In Windows 7 and earlier versions of Windows, you needed a third-party program to view an ISO file or work with its contents. Most of these programs would just burn the ISO file to an optical disc, which just brings us back to the original problems inherent in using discs. Windows 8 changed all that by incorporating support for ISO files right into File Explorer. This means that you no longer need a third-party program to view and work with the contents of an ISO file. Instead, you can use File Explorer to directly mount the ISO as a virtual optical drive.
Note
Unfortunately, File Explorer doesn’t come with a feature that enables you to convert optical discs to the ISO format. However, third-party utilities are available to do this. Our favorite example is Free ISO Creator, which you can download from www.freeisocreator.com.
One consequence of this built-in ISO support is that you don’t need to keep copies of your optical discs lying around. Instead, you can convert those discs to ISO files and then store them on your hard drive for easier and faster access.
Follow these steps to mount an ISO file:
1. In File Explorer, open the folder that contains the ISO file you want to mount.
2. Select the ISO file.
3. In the Manage tab, click Mount. Windows 10 creates a virtual disc drive for the ISO and displays the contents of the disc image, as shown in Figure 25.23.
In the same way that an ISO disk image file is an exact replica of an optical disc, a virtual hard disk (VHD) is a disk image that is an exact replica of a physical hard disk, including the file system and the hard disk’s volumes, folders, and files. A virtual hard disk is stored as a VHD file that uses the .vhd
file extension.
Why would you need such a thing? The most common use by far for VHDs is the hard disk for a virtual machine, especially one created using Microsoft’s Hyper-V virtual machine manager.
Windows 10 bakes support for VHD files right into File Explorer, so you can easily view the contents of and copy data from a VHD file without third-party software. File Explorer accomplishes this by enabling you to mount a VHD as a virtual hard disk on your PC.
Follow these steps to mount a virtual hard disk:
1. In File Explorer, open the folder that contains the VHD file you want to mount.
2. Select the VHD file.
3. Click the Manage tab and then click Mount. Windows 10 creates a virtual hard disk for the VHD and displays the contents of the virtual hard disk, as shown in Figure 25.24.
You might find that you have a need for another hard disk on your PC. For example, you might need a second drive to install another operating system and dual-boot between Windows 10 and the other OS. Or you just might want the drive to store personal files. However, what happens if your PC has no open ports for an external hard disk, and you don’t have the expertise or a free drive bay to install an internal hard disk? What if you simply don’t want to shell out the bucks for a new hard disk?
In all these cases, you can bypass the need for a physical hard disk by creating a virtual hard disk instead. Windows 10 treats the VHD exactly like a physical hard disk, so whatever operations you can perform on a physical disk, you can do with a virtual one. You can also encrypt a VHD using BitLocker, so a VHD is a great way to store private or sensitive files.
To learn about BitLocker, see “Encrypting a Disk with BitLocker,” p. 766.
Follow these steps to create a virtual hard disk:
1. In the Disk Management snap-in, select Action, Create VHD. Disk Management displays the Create and Attach Virtual Hard Disk dialog box.
2. Click Browse. The Browse Virtual Disk Files dialog box appears.
3. Choose the folder you want to use to store the VHD, type a name for the VHD, and then click Save.
4. Specify the size of the VHD (in MB, GB, or TB).
5. Select the Virtual Hard Disk Format you want to use:
VHD—This format is supported by earlier versions of Windows, but can only create disks up to 2TB.
VHDX—This format is supported only by Windows 8 and later, but it can create disks up to 16TB and is less prone to file corruption in the event of a power failure.
6. Choose Fixed Size.
7. Click OK. Disk Management creates the virtual hard disk.
Your VHD is now created, but you can’t use it yet because it hasn’t been configured to store files. This means that you now need to initialize the VHD and add a new simple volume to the disk. To do this, first locate the new VHD in the bottom section of the Disk Management window, right-click the VHD on the left side of the window, and then select Initialize Disk. Check the MBR option and select OK. Now follow the instructions given earlier in this chapter to create a new simple volume on the VHD (see “Dividing Your Hard Drive into Two Volumes”).
18.117.233.160