Posey's Tips & Tricks

Dealing with Problems Related to Expanding a Windows Volume, Part 1

Expanding a Windows volume can reveal some unforeseen pitfalls, including file system cluster limitations.

Recently, I have accumulated quite a bit of data as a result of a video project that I have been working on, and therefore made the decision to expand a Windows volume to give myself a bit of extra space. In doing so however, I ran into an unexpected issue that caused me to completely rethink my volume expansion. As such, I wanted to take the opportunity to talk about what happened and what I did about it.

Before I talk about the problem that I encountered, I want to give you just a little bit of background on my environment. All of my file data is stored on a Hyper-V virtual machine that is configured as a Windows file server. The underlying virtualization hardware and storage hardware are all brand new, but the virtual machine has existed for quite a few years without undergoing any major configuration changes (aside from OS upgrades and patches).

The volume that I had decided to expand was just under 16 TB in size. The underlying storage hardware had plenty of extra space to accommodate a larger volume. The reason why I had initially created a roughly 15.5 TB volume had to do with the backup system that I was using at the time. I wanted to make sure that the volume would never grow to exceed the backup's capacity. Today however, I am using a larger backup system so the volume size is far less of an issue than it once was.

Normally, expanding a volume is a really simple process. The first step in the process is to open the Hyper-V Manager and then click the Edit Disk link. This causes Windows to open the Edit Virtual Hard Disk Wizard. The wizard requires you to select the virtual hard disk that you want to modify. From there, you can choose to either expand or shrink the virtual hard disk, as shown in Figure 1.

[Click on image for larger view.] Figure 1. Hyper-V lets you expand or shrink a virtual hard disk.

The next step in the process is to log into the virtual machine and use the Windows Disk Management Console to expand the volume so that it will accommodate some or all of the extra space that is now available within the virtual hard disk.

To perform the expansion, you need only to open the Disk Management Console, right click on the volume that you want to expand, and then choose the Extend Volume command from the shortcut menu. This causes Windows to open the Extend Volume Wizard. This wizard asks you how large you want to make the volume and what underlying disk space you want to use for the expansion, as shown in Figure 2. This is normally a really simple process. However, this is where my problems began.

[Click on image for larger view.] Figure 2. The Extend Volume Wizard guides you through the process of expanding the volume.

So what happened? When I clicked the Finish button to complete the expansion process, I was met with an error message stating that the volume cannot be extended because the number of clusters will exceed the maximum number of clusters supported by the file system. You can see the error message shown in Figure 3.

[Click on image for larger view.] Figure 3. This is the error message that I received when I tried to increase the volume size.

The reason why this problem occurred actually stems from a decision that I made at the time when I created the virtual machine, many years ago. When you format a Windows Volume, Windows displays a dialog box that is similar to the one that is shown in Figure 4.

[Click on image for larger view.] Figure 4. This is the dialog box used to format a volume.

Over the years, I have formatted way too many disks to count. In doing so, I don't think that I have ever changed any of the default values, aside from occasionally using a different file system. Herein lies the problem. One of the options shown in the dialog box pertains to the allocation unit size. The allocation unit size reflects the cluster size. The cluster size has a direct impact on the maximum volume size. As you can see in Figure 5, there are various options that you can choose from.

[Click on image for larger view.] Figure 5. You can choose from a number of allocation unit sizes.

Simply put, the larger the allocation unit size, the larger the maximum volume size. So why didn't Microsoft just make the maximum allocation size the default? I will answer that question and talk about the various options that exist for dealing with a problem like this in Part 2.

About the Author

Brien Posey is a 22-time Microsoft MVP with decades of IT experience. As a freelance writer, Posey has written thousands of articles and contributed to several dozen books on a wide variety of IT topics. Prior to going freelance, Posey was a CIO for a national chain of hospitals and health care facilities. He has also served as a network administrator for some of the country's largest insurance companies and for the Department of Defense at Fort Knox. In addition to his continued work in IT, Posey has spent the last several years actively training as a commercial scientist-astronaut candidate in preparation to fly on a mission to study polar mesospheric clouds from space. You can follow his spaceflight training on his Web site.

Featured

comments powered by Disqus

Subscribe on YouTube