locked
How to extend C:\ Drive from D:\ using Command line. RRS feed

  • Question

  • Hi Friend,

    Need your help for extend 30 GB from D:\ to C:\ Drive using Diskpart cmd.

    1. My HDD size : 500,
    2. C:\ Drive : 70 GB (Want round this drive as 100 GB)
    3. D:\ Drive : 394 GB (Want to increase form here)

    After rounding C:\ as 100 GB want to create D:\ drive from unallocated volume and need to do this migration in Diskpart or in BAT Command line.

    -Thanks

    Saturday, January 24, 2015 5:49 AM

Answers

  • It is not possible to take space from one volume and add it to another volume on the same drive by using diskpart.cmd or any other Microsoft built in tool.

    There are some third party tools that can achieve the task you describe.

    Anyways, the first step is to take backup of your disk, especially volume D:

    After backing up your data, you could perform following steps.

    • Using diskpart, remove partition D:
    • Using diskpart, extend volume C: (extend size=30000)
    • Using diskpart create partition in the remaining space (create partition primary)
    • Assign drive letter D: to the partition created in previous step
    • Format volume d:
    • Restore data from backup to volume D:
    • Proposed as answer by T. Kujala Saturday, January 24, 2015 6:06 PM
    • Marked as answer by Yolanda Zhu Monday, February 2, 2015 1:52 AM
    Saturday, January 24, 2015 6:05 PM
  • Hi IT Ambattur ,

    I agree with Les52Extending the C drive directly is not available with the DiskPart command .We should take the steps as Les52 suggested ,the key point is to backup the D drive. With the "Wbadmin" tool, we can easily to backup and restore .

    Here is a link for reference of "Wbadmin" tool :
    Wbadmin
    https://technet.microsoft.com/en-us/library/cc754015.aspx

    Here is another link for reference of diskpart
    DiskPart Command-Line Options
    https://technet.microsoft.com/en-us/library/cc766465(v=ws.10).aspx

    Best regards


    Monday, January 26, 2015 8:32 AM

All replies

  • It is not possible to take space from one volume and add it to another volume on the same drive by using diskpart.cmd or any other Microsoft built in tool.

    There are some third party tools that can achieve the task you describe.

    Anyways, the first step is to take backup of your disk, especially volume D:

    After backing up your data, you could perform following steps.

    • Using diskpart, remove partition D:
    • Using diskpart, extend volume C: (extend size=30000)
    • Using diskpart create partition in the remaining space (create partition primary)
    • Assign drive letter D: to the partition created in previous step
    • Format volume d:
    • Restore data from backup to volume D:
    • Proposed as answer by T. Kujala Saturday, January 24, 2015 6:06 PM
    • Marked as answer by Yolanda Zhu Monday, February 2, 2015 1:52 AM
    Saturday, January 24, 2015 6:05 PM
  • Hi IT Ambattur ,

    I agree with Les52Extending the C drive directly is not available with the DiskPart command .We should take the steps as Les52 suggested ,the key point is to backup the D drive. With the "Wbadmin" tool, we can easily to backup and restore .

    Here is a link for reference of "Wbadmin" tool :
    Wbadmin
    https://technet.microsoft.com/en-us/library/cc754015.aspx

    Here is another link for reference of diskpart
    DiskPart Command-Line Options
    https://technet.microsoft.com/en-us/library/cc766465(v=ws.10).aspx

    Best regards


    Monday, January 26, 2015 8:32 AM
  • 1. backup d:\ data.

    2. Delete d:\

    3. expand c:\ to 100 GB

    4. create d:\ and restore data from backup. 

    there is no other way.


    Mayank Sharma Support Engineer at Microsoft working in Enterprise Platform Support.

    Monday, January 26, 2015 11:31 AM