How to extend hard disk partition backwards (to the left) without third-party tools?

enter image description here

I'm trying to extend the D: partition using unallocated 30.91 GB space at its left side.

Another thread states it can't be done using Disk Management's UI and it suggests using 3rd-party tools.

However, how can we do this natively (e.g. diskpart) without installing/downloading additional software?

1

7 Answers

Yes that is possible. Copy all the data from your D drive to a different disk/partition, delete the volume of D and then re-create it. Then move your data back on the new D drive.

That is the only way without 3rd party tools.

1

The reason why there's no simple way to do what you want is that the internal data structures in a partition record where files are located relative to the start of the partition.

Extending a partition to the right is relatively simple since it only requires changing the maximum size value.

Extending to the left also requires either relocating every sector of data, or modifying all the data structures in the partition to change their offset values to reflect the changed starting location. Neither of those operations are quick and during the process the partition is not internally consistent which means that any interruption in the process (eg power failure) would leave it corrupt.

The data loss risk in doing this is probably why a way to do this isn't built into the OS. The benefit to a small minority of users isn't worth the (primarily PR) liability they'd be taking on for when something goes wrong.

If you don't want to spend money on third party tools, the resize you want to do can be done with GParted and you can download the GParted LiveCD for free. GParted Live CD Website

Have in mind that resizing the partition to use 'previous' space will take a long time since the partition software usually have to copy all data from your partition (259 Gb)

5

Here's another possibility...

  1. Get another drive with enough space to store the contents of drive D:
  2. Delete the existing partition D:
  3. Create a new partition in the empty space, which will include the extra 30GB
  4. Copy your files back

Make sure that when performing the copy, both the source and the destination are NTFS, and that you take care to preserve permissions.

1

Just move the partition backwards using a 3rd-party tool, then extend it forward. Simple!

5

It cannot be done. Yes, third-party tools use the system functions, but this takes millions of carefully constructed such functions and must be done from an environment in which it is safe to pass the disk through inconsistent states. You could not do it manually.

Raw? No third party? Learn C++ and you can write a simple defragger that consolidates the partition, which then allows you to shrink the partition. You can download Visual Studios Express as a Dev environment.

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like