32

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
  • 1
    "third-party tools use the system commands anyway" -- I believe you're thinking of defrag tools rather than partition managers. And yes, most do use MS's Defrag API for moving files but each one has their own layout algorithm (choosing which files go where). The Defrag API merely lets them move parts of files in a uniform, (relatively) safe, and supported manner.
    – afrazier
    Oct 13, 2011 at 14:15

7 Answers 7

24

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
  • 1
    Ughh, I totally forgot about this method.
    – surfasb
    Oct 14, 2011 at 9:09
24

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.

9

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)

6
  • 1
    Of course, GParted is a third-party tool, but herpahs the OP meant "commercial".
    – CarlF
    Oct 13, 2011 at 12:21
  • Could you elaborate on the second paragraph? Why do they have to copy all the data from the partition when it's extending backwards?
    – Pacerier
    Oct 13, 2011 at 20:22
  • @Pacerier When extending forwards you are allocating a bunch of empty space at the end of the drive. When extending backwards you create empty space at the beginning of the drive and then you have to move the failes backwards so that the used space is on the inner rings of the disk.
    – alord1689
    Apr 19, 2015 at 2:27
  • @alord1689, I mean why do we need to move the files backwards? If we don't mind fragmentation, Couldn't we just extend, and then leave the files at their original location?
    – Pacerier
    May 24, 2015 at 21:47
  • The segments where the files reside need to be next to each other. A "partition" has to be contiguous segments.
    – alord1689
    May 24, 2015 at 22:21
2

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
0

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.

-1

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

6
  • Since when can partitions be moved and extended forward? o_O Jul 14, 2012 at 15:17
  • 1
    You can use diskpart to expand a partition forward into free space.
    – Bigbio2002
    Jul 16, 2012 at 7:39
  • That still doesn't make you move the partition backwards, which is much harder. Jul 16, 2012 at 12:19
  • 1
    It's possible that the OP edited his question to clarify that after I had answered, I don't remember. The date on this post is nearly a year ago.
    – Bigbio2002
    Jul 16, 2012 at 19:34
  • 1
    "How to do this without using 3rd party tools?" "Using 3rd party tools."
    – gronostaj
    Mar 19, 2023 at 12:23
-1

Go to diskmgmt,

  • right-click the disk 0,
  • select convert to dynamic drive,
  • select disk 0 and click OK.

The volumes on your drive will become olive green and now you can extend the d drive backwards. Notice that there is no way to convert the drive back to basic and a risk of data loss, so be careful.

2
  • 2
    I think you need to explain what a dynamic drive is and what the consequences are. Mar 19, 2023 at 12:44
  • As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
    – Community Bot
    Mar 19, 2023 at 12:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .