Disk Management
How Windows 10 manages storage
How Windows 10 manages storage
Every Windows 10 device, without exception, has a primary storage device that contains Windows
system files and is the default location for programs and data files.
Depending on the hardware design, you can attach other storage devices—internal, external, or
virtual—to expand your storage capacity and perform backups. You manage all these storage devices
by using the Disk Management console and other tools.
The word disk, of course, is a throwback to a bygone era, when every bit of storage ended up on a
spinning disk of some sort. Hard disks are still alive and well, although floppy drives have nearly
disappeared. CD and DVD drives (writeable and otherwise) are an endangered species. Most modern
storage media are disk-free devices that use fast and quiet flash memory: SSDs and portable USB
drives, for example, as well as flash-based memory cards (including those that use the MicroSD format
that you frequently find in tablets and smartphones). Devices such as phones and portable music
players can appear as storage devices when connected to a Windows 10 PC via USB.
In Windows 10, a disk is typically divided into volumes (a term sometimes used interchangeably with
partitions). On most desktop and portable PCs, you’ll use simple volumes on basic disks. (With Disk
Management, you can turn basic disks into dynamic disks and combine physical disks into spanned,
striped, mirrored or RAID-5 volumes. If you don’t know what that last sentence meant, you probably
don’t need any of those features.)
Although some Windows 10 features try to hide drive letters (File Explorer libraries, for example),
they’re never far away. As for file systems, there are very good reasons why your system drive and
secondary data drives (internal or external), should use NTFS. For smaller removable storage devices,
there are occasionally reasons to use the FAT32 or ExFAT standards, instead
Disk Management.
Disk Management
The star of this chapter is yet another essential tool designed as a snap-in for the Microsoft
Management Console. Figure 6-1 shows the layout of a laptop with a 480 GB SSD configured as the
system drive and two removable storage devices: a 32 GB card in a MicroSD slot and a 4 TB external
drive attached using a USB 3.0 port.

Figure 6-1: The graphical view in Disk Management, shown in the bottom pane here, displays details for each
attached storage device, with disk details on the left, volumes (not shown to scale) on the right
Why do storage capacities in Windows 10 always appear smaller than advertised?
If you compare the capacities listed in the previous paragraph to the actual values shown in the
graphical pane in Figure 6-1, you’ll probably notice that the actual values are smaller than the
advertised capacities. You can see the same disparity if you right-click a volume in Disk
Management or in File Explorer and then choose Properties. Why has the 480 GB SSD shown
here shrunk to a mere 436 GB?

Some of the missing space is actually in use. As you can see in the details in the screenshot that
follows, Disk Management shows the drive’s full capacity as 447.01 GB, with 10.75 GB used for two
Windows 10 recovery partitions, an EFI System partition, and the OEM-supplied recovery partition

The remainder of the disparity is simply a difference in arithmetic. Advertised storage capacities are
almost always calculated with a GB equaling 1 billion bytes. Inside Windows 10, however, a GB is
actually 1024 MB, each of which in turn is 1024 KB, with each KB made up of 1024 bytes. Multiply
447.01 GB (the amount shown in Disk Management) by 1024, then by 1024 again, and then by 1024
one more time, and you end up with nearly exactly 480 billion bytes.
The default layout of Disk Management has two panes, with a list of volumes at the top and a
graphical view showing the layout of volumes on a disk below it.
Use the choices on the View menu (see Figure 6-2) to change this arrangement of information. Here,
I’ve moved the volume list to the bottom pane and changed the top pane to show the graphic view

Figure 6-2: Use these options on the View menu to change the Disk Management layout, including hiding the
bottom pane, if you prefer.
You can use the choices on the Top menu to specify whether you want to see the Disk List, Volume
List, or Graphical View when you open Disk Management. The same choices are available for the
Bottom menu, along with a fourth option: Specify Hidden for the bottom pane and you can work with
a single view in the top pane only.
You can right-click just about any object on this screen to get information about it or to manage its
configuration. After connecting a new, never-before-formatted disk, for example, you might be
prompted to initialize it. If you skip that option, you can return to it by right-clicking the entry for a
disk (on the left side of the graphical view).
You can right-click a volume or a block of unallocated space to create a new volume, delete an
existing volume, shrink or extend an existing volume, or change drive letters. Figure 6-3 shows these
options for a data volume on a large conventional hard drive.
Note Don’t choose the Format option unless your goal is to erase all of the data on the selected
volume.)

Diskpart
Diskpart Almost everything that you can do in the Disk Management console you can also accomplish from an elevated Command Prompt window, using the DiskPart tool. DiskPart is slightly different from most other command-line tools in Windows 10, in that it doesn’t operate by executing with switches. Instead, running the diskpart command starts a new environment with its own prompt. From the DISKPART> prompt, type help to see a full list of available commands. Type help to get instructions for the use of that command. Figure 6-4 shows this help text for the Clean command.

Figure 6-4: A DiskPart session has its own custom prompt and a peculiar syntax. Use the Help command to get
instructions for a particular command.
The way DiskPart works can be a bit confusing. To clean a disk, for example, you first must select the
disk by number. After creating one or more partitions, you need to select a partition, again by
number, to use the format command. After every selection and action, DiskPart gives you a
confirmation message.
Figure 6-5 shows the string of commands I needed to type to erase an 8 GB USB drive, create a new
primary partition, format it as FAT32 (so that it will boot on a UEFI-based system), and then make the
volume active so that it will start. Note that the sequence begins with the list disk command; this way
I can identify the number of the disk that I need to select.

Figure 6-5: Every command in this sequence is followed by a confirmation message from DiskPart. Be very
careful to select the correct drive number before using the Clean and Format commands to wipe it.
Eagle-eyed readers will note that I abbreviated some commands in that sequence. DiskPart will
recognize a command as long as you type at least three characters, so cre par pri and create part pri
have the same effect as create primary partition.
To end the DiskPart session, use the exit command.
Other useful storage-related tools
There are plenty of tools that help you to perform specific tasks on storage devices in Windows 10.
One option that will be vaguely familiar to longtime Windows users is the Microsoft Drive Optimizer
(dfrgui.exe), which appears under Administrative Tools as Defragment And Optimize Drives.
Once upon a time, defragmenting a hard disk was a time-consuming but thoroughly necessary
maintenance task. Solid-state drives, which store data using a completely different set of technologies
from conventional hard disks, don’t need regular “defragging” but do occasionally need to shuffle
large files and mark the pages of memory used by deleted files for cleanup.
Figure 6-6 shows the Drive Optimizer in action. Note that volumes located on a solid-state drive are
properly identified under the Media Type heading. If you select the OS volume and click Optimize,
you’ll see a series of progress messages as the operation takes place (very quickly) under the Current
Status heading: “73% trimmed,” for example

Figure 6-6: The Microsoft Drive Optimizer tool can distinguish between hard disks, which need defragmenting,
and SSDs, which just need to run the Trim command.
Another fascinating tool is Storage Spaces. You can use this feature to combine multiple drives into a
single virtual volume, managed by Windows 10. This capability is most useful on server hardware, on
which you can easily add multiple drives and combine them to create a massive amount of storage.
You’ll find a more detailed discussion of Storage Spaces in Windows 10 Inside Out.
Common Disk Management tasks
As I mentioned earlier, to get information about a disk or a volume, right-click its listing in Disk
Management and then, on the shortcut menu that opens, choose Properties. The resulting dialog box
shows free space and used space, in the exact same format you would see if you had checked the disk
properties from This PC in File Explorer. That properties dialog box contains a big button that runs the
Disk Cleanup tool, with more buttons on a separate Tools tab for other tasks.
This section contains a rapid-fire list of other things you can do from within Disk Management.
Change a drive letter
Unless you performed actual magic spells at setup time (and if so, I tip my hat to your wizardry), your
system drive is assigned the letter C. I do not recommend changing that drive letter. For all other
drives, including secondary data drives and removable media drives, Windows 10 automatically
assigns drive letters starting with D and going all the way up to Z.
You might prefer to change the drive letter assigned to a particular device. Maybe you regularly
switch between two desktop systems and want to avoid confusion by assigning the same letter to
the DVD drive and external File History drives on each one. Or maybe you just like seeing X: in File
Explorer. Whatever the reason, you need only to right-click the volume from Disk Management and
then, on the shortcut menu, choose Change Drive Letters And Paths

Figure 6-7: Click Change to display a list of available letters to use in place of the current drive letter. To free a
drive letter for use on another device, click Remove.
Click Change to choose from a list of unassigned drive letters. (If you want to assign a drive letter that
is already in use, you need to right-click the volume currently using that letter and then choose
Remove to make the drive letter available.)
Map a new disk to a folder
Using one little-known trick, you can add a new volume (formatted as NTFS) to a system and then
assign its storage to an existing folder. Maybe the system drive on your desktop PC is getting full, and
you’ve added a new, larger hard disk to the system. You’ve created a new, empty subfolder in your
user profile called Archive, and you’d like anything you place in that folder to be stored on the newly
added drive. Easy.
In Disk Management, right-click the empty space on the disk you just added and then, on the shortcut
menu, choose New Simple Volume. Follow the wizard’s steps and, after specifying the size of the
volume, you should see the page shown in Figure 6-8. Choose Mount In The Following Empty NTFS
Folder, click the Browse button to specify the folder that you want to map to this location, and then
finish the wizard.

Figure 6-8: Instead of (or in addition to) assigning a drive letter, you can mount a new volume so that its contents
appear in a folder on an existing drive.
If you’ve already created the volume, this same option is available: right-click, choose Change Drive
Letters And Paths, and then click Add
Shrink a volume
Why would you want to remove storage space from a perfectly good drive? I can think of several
good reasons. You have only one physical disk, but you want to install a second copy of Windows (or
another operating system) in a dual-boot configuration. Or you’ve upgraded your primary system
drive to a gigantic multi-terabyte hard drive and you want to create a separate logical drive for
keeping your data separate from the operating system. (That makes image backups easier and also
makes it possible to reset Windows 10 without worrying about loss of data.)
In either case, assuming that you have sufficient unused space on the physical disk, you should be
able to shrink the current volume and then create a new volume on the newly freed empty space.
To begin, right-click the existing volume in Disk Management and then choose Shrink Volume. That
opens a dialog box like the one shown in Figure 6-9. In this example, Disk Management told me that I
had more than 190 GB of free space to use for shrinking, but for this example I really only need a 64
GB drive, so I clicked Enter The Amount Of Space To Shrink In MB and changed the value to 64000

Figure 6-9: If you have sufficient free space, you can shrink an existing volume, creating unallocated space that
you can turn into a separate volume with its own drive letter.
Click Shrink to begin the process of consolidating the existing data and adding empty space to the
right of the existing volume.
Now, this all might seem pretty ho-hum. But if you ever tried using this feature in earlier versions of
Windows, you probably remember being frustrated to discover that you could actually use only a
small fraction of the free space on a volume, thanks to unmovable system files. That limitation appears
to be gone as of Windows 10, and you can use the entire free space if you want,
From that unallocated space, you can right-click to create a new simple volume, or start from
Windows installation media and specify the freshly freed-up space as the destination for the new
installation. If your second installation is also running Windows 10, the installer automatically creates
a nifty boot menu on which you can choose which copy you want to run
Create a virtual hard disk and attach it as a drive
You can use one genuinely obscure but useful feature in Disk Management to create a Virtual Hard
Disk (VHD) file and double-click to mount it as if it were a separate physical drive, with its own drive
letter. One good use of this feature is to create an instant data drive that you can move between
virtual machines in Hyper-V (see Chapter 10 for more details on setting up and using Hyper-V).
You can stuff a VHD with as many files as it will hold and move it between physical PCs, as well. So, if
you have a collection of downloaded software, document templates, corporate resources, or anything
that you frequently want to move between devices, consider a VHD.
To create one, from Disk Management, click Action, Create VHD. That opens a dialog box like the
one shown in Figure 6-10, where you can specify the format of your VHD. The choices are pretty
straightforward: Specify where you want the VHD file to be saved, and give the file a descriptive name;
specify a virtual hard disk format (VHD if you need compatibility with Windows 7, VHDX if you’ll only
ever need to mount it on a physical or virtual PC running Windows 10, Windows 8.1, or Windows
Server 2012 or later).

In general, I recommend choosing the Dynamically Expanding option, which allows the VHD file to be
only as large as the data you’ve stored on it, making it easy to move between PCs. After the VHD is
created, Disk Management automatically adds it, assigning the next available drive letter. You can
detach the VHD by selecting it in Disk Management and using the corresponding option on the
Action menu.
Wipe a drive clean
One task that Disk Management does not do particularly well is wiping a drive clean when you’re
getting ready to give away, sell, or transfer a PC. Formatting a drive leaves behind data that thirdparty disk utility software can recover in whole or in part. The solution is to open an elevated
Command Prompt window and use the Cipher tool with the /W (for Wipe) switch. That erases all
blank space on the drive, replacing it with zeroes and making the drive’s contents unrecoverable
BitLocker Drive Encryption
One of the most important storage capabilities in Windows 10 is its support for enterprise-grade data
security using the BitLocker Drive Encryption technology. This feature is available in Windows 10 Pro,
Enterprise, and Education editions and should be a must on any device that you take outside of your
home or locked office when you travel.
BitLocker Drive Encryption uses AES 256-bit encryption that renders the contents of your system drive
(and other drives if you so choose) unreadable except to someone who can successfully sign in with
your credentials. If you’ve chosen a sufficiently strong password, that’s excellent protection against
someone stealing your portable device, booting from removable media, and then using disk tools to
rummage through your secrets. If your organization uses smartcards, BitLocker can require that you
unlock the drive with a smart card and a PIN, making it impossible for a thief to gain access even if he
has your password.
To use BitLocker to encrypt your system drive, your PC must have a Trusted Platform Module (TPM)
chip, which is standard these days on most portable PCs sold for business use. (It’s possible to use
Group Policy to turn on BitLocker without a TPM, but I recommend against it.) You can use BitLocker
on nonsystem drives and removable drives even without a TPM.
To use any of these forms of encryption, sign in with an administrator account, type encryption in the
taskbar search box, and then click the Manage BitLocker shortcut. That opens a dialog box like the
one shown in Figure 6-11

Assuming that you have the proper hardware support for BitLocker Drive Encryption, the wizard is
straightforward enough, and I don’t need to walk you through its fine points. However, here are a few
details worth noting:
You’ll be prompted to save your recovery key. By default, this key is saved to either your Microsoft
account or to a domain account (as shown in the illustration that follows), if you have one. As an
alternative, you can choose to save this key to a local file or to a USB flash drive (protect it well!)
or you can print it. Regardless of the option you choose, this step is a must; I have seen routine
system updates that have configured BitLocker encryption so that it won’t unlock with user
credentials, because the sy mistakenly determined that the drive had been compromised.
Without access to this recovery key, your data will be gone forever in that event. Seriously,
forever

You can speed up the encryption process by choosing to encrypt only used space on a drive.
Choose this option if you’re setting up a new PC and you are certain that none of your business or
personal data is in the erased space on the drive.
Windows 10 version 1511 introduced a new, tougher encryption mode (XTS-AES). Use this option
if you are certain that the encrypted drive will only be used on a device running the latest version
of Windows 10. For removable drives that might need to be read on an older device, choose the
Compatible Mode option.
Encrypting a removable drive, such as a USB flash drive, is a bit easier. The data on the drive is
encrypted with a password or smart card, and you can set the drive so that it unlocks automatically
when you sign in with your user account. That precaution prevents you from data loss if you leave a
USB flash drive behind when leaving a trade show but makes the process of reading data from that
drive easy when you’re signed in properly
Other useful storage-related tools
Common Disk Management tasks.
Change a drive letter.
Map a new disk to a folder
Shrink a volume
Create a virtual hard disk and attach it as a drive…
BitLocker Drive Encryption
Published @ May 4, 2022 4:26 am