Wednesday, June 3, 2015

Maximum NTFS Volume Expansion

A peer recently had an issue when working on a client system: After adding a second shelf of SAS-attached drives to a physical Windows Storage Server and doubling the available capacity of the environment from ~20TB to ~40TB, he was unable to extend the existing NTFS volume after extending the SAS array group.

The error was "The volume cannot be extended because the number of clusters will exceed the maximum number of clusters supported by the filesystem."
The original volume was reportedly formatted "using the defaults," which under most circumstances would mean it was using 4K clusters. Why wouldn't it allow extending the volume?

Because NTFS (as currently implemented) has a cluster limit of 232-1 clusters per volume.

When you "do the math," that cluster limit does impose some hard limits on the maximum size of the NTFS volume, irrespective of the actual drive space that is available for the volume. And trying to use tricks like dynamic disks and software RAID won't help: those tricks modify the underlying disk structure, not the NTFS filesystem that "rides" on top of it.

Max NTFS Volume by Cluster Size
cluster
size (B)
Bytes KB MB GB TB
512 2,199,023,255,040 2,147,483,648 2,097,152 2,048 2
1024 4,398,046,510,080 4,294,967,295 4,194,304 4,096 4
2048 8,796,093,020,160 8,589,934,590 8,388,608 8,192 8
4096 17,592,186,040,320 17,179,869,180 16,777,216 16,384 16
8192 35,184,372,080,640 34,359,738,360 33,554,432 32,768 32
16384 70,368,744,161,280 68,719,476,720 67,108,864 65,536 64
32768 140,737,488,322,560 137,438,953,440 134,217,728 131,072 128
65536 281,474,976,645,120 274,877,906,880 268,435,456 262,144 256

We knew that we had a functioning 20TB volume, so we verified my theory that the volume was actually formatted with 8K clusters (the smallest size that would support 20TB) using DISKPART's FILESYSTEM command. Sure enough: 8192 was the cluster size.

We gave the client several options for addressing the issue, including the purchase of software that could "live adjust" the cluster sizing. In the end, the client chose the "migrate->reformat->migrate" option, and while it took a long time to perform (20TB is a lot of data!), it was successful.

5 comments:

  1. Thanks for the post this was very useful. we had formatted it to 512B and could not extend beyond the 2 TB limit.

    ReplyDelete
  2. Thanks for the excellent info. This was very helpful when I ran into this error going from a 5x 8TB RAID5 to 6x 8TB RAID5 and tried to expand the volume to the new array size. I thought I blew something up. I'm going the live adjust method using Acronis Drive Director, so far I estimate it's going to take about 4 or 5 hours to complete. Hopefully everything goes smoothly.

    ReplyDelete
  3. Great info. For a disk using the default 4k cluster size 16,777,215 (1mb less) was the most we could select

    ReplyDelete