Diskpart 'No Usable Free Extent' Error: Fixes
In this article
The "No usable free extent could be found" error in Diskpart means the command you issued needs contiguous unallocated space on a disk, but Windows cannot find a block large enough to satisfy the request. This typically happens when trying to create or extend a partition, and the fix involves either shrinking an existing partition, deleting a partition, or using a different tool to manage the space.
What Causes the Error
Diskpart works with physical disks and the partitions on them. When you run a command like create partition primary size=50000 or extend size=20000, Diskpart looks for a single, contiguous (uninterrupted) area of unallocated space that is at least as large as the size you specified. If the free space on the disk is fragmented—split into multiple smaller pieces by existing partitions—Diskpart cannot use it, even if the total free space is more than enough.
Common scenarios that trigger the error:
- You have multiple partitions and the unallocated space is split between them.
- The space immediately after the partition you want to extend is occupied by a recovery partition or a system reserved partition.
- You are trying to create a partition larger than any single block of free space.
- The disk is a dynamic disk with a layout that Diskpart cannot handle in the way you expect.
How Diskpart Allocates Space
Diskpart operates on a master boot record (MBR) or GUID partition table (GPT) disk. When you create a partition, it needs a starting sector and a length. The "usable free extent" is the largest contiguous run of sectors that are not already assigned to a partition. The extend command specifically requires that the space immediately following the selected partition be unallocated and contiguous—it cannot jump over another partition to grab space further down the disk.
For example, if your disk layout is:
- Partition 1: 100 GB
- Unallocated: 50 GB
- Partition 2: 200 GB
- Unallocated: 30 GB
If you try to extend Partition 1 by 60 GB, Diskpart will fail because the only space directly after it is 50 GB. Even though there is 80 GB total free, the 30 GB block is not adjacent to Partition 1.
How to Fix the Error
There are several ways to resolve this, depending on your exact goal. Always back up important data before making partition changes.
Method 1: Shrink an Adjacent Partition
If you need to extend a partition, you must first ensure there is unallocated space directly after it. You can shrink the partition that follows it:
- Open Command Prompt as administrator and type
diskpart. - Type
list diskto see your disks, thenselect disk X(replace X with the disk number). - Type
list partitionto see partitions, thenselect partition Y(the one after the partition you want to extend). - Type
shrink desired=20000(or the amount in MB you need) to free up space. - Now select the partition you originally wanted to extend and type
extend.
Note that you can only shrink a partition if it has free space inside it (unused space within the partition). The shrink command will fail if the partition is full.
Method 2: Delete a Partition to Create Space
If you have a partition you no longer need (like a recovery partition or an old data partition), you can delete it to create a large contiguous block of unallocated space:
- In Diskpart, select the disk and then select the partition you want to remove.
- Type
delete partition override(the override is needed for some protected partitions). - Now you can create a new partition in that space or extend an adjacent one.
Be absolutely certain you have backed up any data on that partition—deleting it erases everything on it.
Method 3: Use Disk Management (GUI)
Windows' built-in Disk Management tool often gives a clearer visual representation. Right-click the Start button and select "Disk Management." You can see the layout of partitions and unallocated space. To extend a volume, right-click it and choose "Extend Volume..."—the wizard will only allow you to use adjacent unallocated space. If the option is greyed out, you need to free up space next to it.
Method 4: Third-Party Partition Managers
If the built-in tools cannot do what you need (e.g., you need to move a partition to consolidate free space), third-party partition managers can move and resize partitions without losing data. These tools are not free in all cases, but some offer free versions for basic operations. They can rearrange partitions so that the unallocated space becomes contiguous, which Diskpart cannot do.
Common Misconceptions
A frequent misunderstanding is that the error means the disk is full. It does not—it means the free space is not in the right place. Another misconception is that you can extend a partition with any free space on the disk. Diskpart and Disk Management both require the free space to be immediately after the partition you are extending. If it is not, you must move partitions (using third-party tools) or delete intervening partitions.
Also, the extend command without a size parameter will use all available contiguous space. If you get the error even with no size specified, it means there is no adjacent free space at all.
Preventing the Error in the Future
When you first set up a disk, plan your partition layout to avoid this problem:
- Leave some unallocated space at the end of the disk for future expansion.
- Place partitions you expect to grow (like data drives) at the end of the disk, after system partitions.
- If you use a recovery partition, keep it small and at the very end, or consider moving it to a separate disk.
Regularly check your disk layout with Disk Management to see if you have fragmented free space. If you do, address it before you need to extend a partition.
Frequently Asked Questions
Can I extend a partition with unallocated space that is not adjacent?
No, not with Diskpart or Disk Management. Both tools require the free space to be directly after the partition you want to extend. If the space is elsewhere, you need to move partitions using a third-party tool, or delete and recreate partitions.
Why does Diskpart say there is no usable free extent even though I have free space?
Because the free space is fragmented—split into multiple non-contiguous blocks. Diskpart needs a single block of unallocated space that is at least as large as the size you requested. If the largest block is smaller, you get this error.
Can I use the extend command on a system partition?
Yes, but you may need to ensure the system partition is not the one holding the boot files. If it is, you might need to use a third-party tool to move the boot files or use a different approach. In many cases, extending the C: drive works if there is adjacent unallocated space.
What does delete partition override do?
The override flag allows you to delete a partition that is normally protected, such as a system or recovery partition. Use it only when you are sure you want to remove that partition, as it can make the disk unbootable if you delete the wrong one.
Is it safe to shrink a partition to free up space?
Shrinking is generally safe, but it can only shrink if there is unused space within the partition. It will not move data; it just truncates the partition at the end. Always back up before doing this, as a power failure during the operation could cause data loss.
Can I use Diskpart to move a partition?
No, Diskpart cannot move partitions. It can only create, delete, shrink, and extend. To move a partition, you need a third-party partition manager that supports moving.