Extend Partition to Non Contiguous Space
This guide shows you how to extend a partition into free space that is not directly adjacent to it on the disk. Normally, Windows’ built-in Disk Management only allows extending a volume into contiguous unallocated space immediately to its right. When that space is elsewhere, you need a third-party tool or a workaround using diskpart. We’ll cover the safe, practical methods for both Windows and Linux, with a focus on avoiding data loss.
What You’ll Need
- Administrator access to your computer.
- A backup of important data on the partition you plan to modify (strongly recommended).
- For the Windows GUI method: a third-party partition manager (e.g., AOMEI Partition Assistant, MiniTool Partition Wizard, EaseUS Partition Master). Free versions are sufficient for basic moves/resizes.
- For the Windows command-line method: the built-in
diskparttool (no extra download needed). - For Linux:
gparted(usually installable via your package manager) or the command-line toolspartedandresize2fs.
Step-by-Step
Method 1: Using a Third-Party Partition Manager (Windows, GUI)
- Back up your data. Before any partition operation, create a full backup of the partition you’re extending and ideally the entire disk. Partition operations carry a small risk of data loss.
- Open the partition manager. Install and launch your chosen tool. You’ll see a graphical map of your disk drives and partitions at the top, and a list of volumes below.
- Identify the unallocated space. Look for a block labeled “Unallocated” that is not directly to the right of the partition you want to extend. Note its location (e.g., left of another partition, or at the end of the disk with other partitions in between).
- Move the intervening partitions. To make the unallocated space contiguous with your target partition, you need to shift the partitions that sit between them. Right-click on the partition that is between the unallocated space and your target, and choose “Move/Resize” (or similar). Drag the partition to the left or right so that the unallocated space moves closer to your target. Apply this operation. This step may take a long time and requires a reboot if the partition is the system drive.
- Repeat moving partitions as needed. Continue moving partitions until the unallocated space is immediately to the right of the partition you want to extend. For example, if you have [C:][Unallocated][D:], you would move D: to the right so it becomes [C:][Unallocated][D: moved right].
- Extend the target partition. Right-click on the partition you want to enlarge, select “Resize/Move” (or “Extend”), and drag the right edge to include all the now-adjacent unallocated space. Confirm the new size.
- Apply all pending operations. Click “Apply” or “Commit” in the toolbar. The tool will execute the operations in sequence. If the system partition is involved, it will schedule the operations and reboot automatically. Let it finish; do not interrupt.
- Verify the result. After the reboot, open Disk Management (right-click Start > Disk Management) to confirm your partition now shows the increased size.
Method 2: Using diskpart (Windows, Command Line, No Extra Tools)
This method works only if the unallocated space is already adjacent to the partition you want to extend. If it’s not, you cannot use diskpart alone; you must first move other partitions with a third-party tool. However, here’s the diskpart process for the adjacent case:
- Open Command Prompt as Administrator. Type
cmdin the Start menu, right-click it, and choose “Run as administrator”. - Launch diskpart. Type
diskpartand press Enter. - List disks. Type
list diskand note the disk number (e.g., Disk 0). - Select the disk. Type
select disk 0(replace 0 with your disk number). - List volumes. Type
list volumeand note the volume number of the partition you want to extend (e.g., Volume 2). - Select the volume. Type
select volume 2. - Extend the volume. Type
extendto use all available adjacent unallocated space, orextend size=10240to add 10 GB (in MB). Press Enter. - Exit. Type
exitand close the Command Prompt.
Method 3: Using GParted (Linux, GUI)
- Back up your data. As with Windows, backup is essential.
- Install GParted. On Ubuntu/Debian:
sudo apt install gparted. On Fedora:sudo dnf install gparted. On Arch:sudo pacman -S gparted. - Launch GParted. Run
sudo gpartedfrom the terminal. You’ll see a graphical representation of your disks. - Select the correct disk. Use the drop-down menu in the top-right to choose the disk that contains the partition you want to extend.
- Move intervening partitions. Right-click on a partition that sits between the unallocated space and your target, and select “Resize/Move”. In the dialog, you can drag the partition left/right or enter exact values. Move it so that the unallocated space becomes adjacent to your target. Click “Resize/Move” to queue the operation.
- Repeat for other partitions. Continue moving partitions until the unallocated space is directly to the right of the target partition.
- Resize the target partition. Right-click on the target partition, select “Resize/Move”, and drag the right edge to include the unallocated space. Or enter the new size in MiB. Click “Resize/Move”.
- Apply the operations. Click the green checkmark (Apply All Operations) in the toolbar. Confirm. GParted will process the operations. This may take a while, and you should not interrupt it.
- Verify. After completion, your partition will show the new size.
Common Mistakes
- Not backing up. The most common and dangerous mistake. Partition operations can fail due to power loss or bugs, leading to data loss.
- Extending into non-adjacent space with Disk Management. The built-in Windows tool only works when unallocated space is directly to the right. Trying to extend otherwise will grey out the option.
- Forgetting to apply operations. In GUI tools, you must click “Apply” after queuing moves/resizes. If you close the program without applying, nothing changes.
- Moving the system/boot partition without a reboot. If you move a partition that contains Windows, the tool will require a reboot to complete. Let it reboot; do not cancel.
- Using diskpart on non-adjacent space. diskpart’s
extendcommand will fail with “There is not enough space on the disk” if the unallocated space is not contiguous. - Not checking the disk for errors first. Running a resize on a disk with filesystem errors can cause corruption. Run
chkdsk(Windows) orfsck(Linux) before starting.
Tips
- Plan ahead. Before you start, draw a simple diagram of your disk layout: which partitions are where, and where the unallocated space is. This helps you avoid mistakes.
- Move partitions one at a time. In GUI tools, you can queue multiple moves, but it’s safer to apply one move at a time, especially if you’re unsure.
- Use the “Size” field instead of dragging. Dragging is imprecise. Enter exact numbers (in MB or MiB) for the new size to avoid accidentally shrinking the partition.
- Leave a little free space. Don’t extend a partition to the absolute end of the disk. Leave a few GB unallocated for future needs and to reduce fragmentation.
- For system drives, use a tool that supports reboot operations. Third-party tools like AOMEI and MiniTool handle the reboot process smoothly. Avoid using diskpart for C: if possible.
- Consider defragmenting before moving. If the partition you’re moving is heavily fragmented, moving it will take longer. Defragment first (Windows) or use
e4defrag(Linux ext4) to speed up.
Troubleshooting
- “Extend Volume” is greyed out in Disk Management. This means the unallocated space is not adjacent to the right of the partition. Use a third-party tool to move partitions, or use diskpart if you can make the space adjacent.
- diskpart says “There is not enough space on the disk”. The unallocated space is not contiguous. You must move intervening partitions with a GUI tool first.
- The partition move fails mid-way. Do not reboot or force shutdown. If the tool reports an error, it may have partially moved the partition. Run the tool again; it often can resume or roll back. If not, you may need to restore from backup.
- After moving, Windows won’t boot. This can happen if the boot partition was moved incorrectly. Use the Windows Recovery Environment (WinRE) to repair startup. Boot from a Windows installation USB, choose “Repair your computer”, then “Startup Repair”. If that fails, you may need to rebuild the BCD manually with
bootreccommands. - The filesystem shows errors after resize. Run
chkdsk /fon the partition (Windows) orfsck -f /dev/sdXY(Linux) to fix any issues. - GParted reports “Input/output error” during move. This indicates a failing disk. Stop immediately, back up your data, and check the disk’s SMART status.
- The partition didn’t actually extend. You may have forgotten to apply the operations. Check the tool’s pending operations list and click Apply.
Frequently Asked Questions
Can I extend a partition without a third-party tool?
Yes, but only if the unallocated space is already directly to the right of the partition. In that case, you can use Disk Management’s “Extend Volume” or the diskpart command. If the space is elsewhere, you need a third-party tool to move partitions.
Is it safe to move partitions?
Moving partitions is generally safe if you have a backup and a stable power supply. However, any interruption (power loss, crash) can corrupt data. Always back up before proceeding.
Why can’t I extend my C: drive in Disk Management?
Most likely because the unallocated space is not adjacent to C:. Windows only allows extending into contiguous space to the right. You’ll need to move other partitions (e.g., a recovery partition) to the right to free up adjacent space.
How long does it take to move a partition?
It depends on the size of the partition and the speed of your disk. Moving a 100 GB partition on a typical HDD can take 30-60 minutes. On an SSD, it’s much faster. The tool will show progress.
Can I extend a partition that has BitLocker encryption?
Yes, but you may need to suspend BitLocker first. In Windows, go to Control Panel > BitLocker Drive Encryption and select “Suspend protection”. After the operation, re-enable it. Some third-party tools handle BitLocker automatically.
What is the difference between unallocated space and free space?
Unallocated space is space on the disk that is not part of any partition. Free space is space inside an existing partition that is not used by files. You can only extend a partition into unallocated space, not into free space of another partition.