Go Back   TechArena Community > ARENA > Guides & Tutorials
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



How to use Diskpart.exe to extend a data volume in Windows

Guides & Tutorials


Reply
 
Thread Tools Search this Thread
  #1  
Old 14-10-2008
Yogesh
 
Posts: n/a
How to use Diskpart.exe to extend a data volume in Windows
  

How to use Diskpart.exe to extend a data volume in Windows Server 2003, in Windows XP, and in Windows 2000


Introduction

This article describes how to use the Diskpart.exe command-line utility to extend a data volume into unallocated space. You can use the Diskpart.exe utility to manage disks, partitions, and volumes from a command-line interface. You can use Diskpart.exe on both Basic disks and Dynamic disks. If an NTFS volume resides on a hardware RAID 5 container that has the capability of adding space to the container, you can extend the NTFS Volume with Diskpart.exe while the disk remains a Basic disk.

Use the extend command to incorporate unallocated space into an existing volume while preserving the data.


Requirements for the extend command

The following are the requirements for the extend command:
  • The volume must be formatted with the NTFS file system.

  • For Basic volumes, the unallocated space for the extension must be the next contiguous space on the same disk.

  • For Dynamic Volumes, the unallocated space can be any empty space on any Dynamic disk on the system.

  • Only the extension of data volumes is supported. System or boot volumes may be blocked from being extended, and you may receive the following error:
    Quote:
    Diskpart failed to extend the volume. Please make sure the volume is valid for extending
  • You cannot extend the partition if the system page file is located on the partition. Move the page file to a partition that you do not wish to extend.

Reply With Quote
  #2  
Old 14-10-2008
Yogesh
 
Posts: n/a
How to extend a Partition or Volume

To extend a partition or volume, you must first select the volume to give it the focus, and then you can specify how large to make the extension. To extend a volume, follow these steps:
  1. At a command prompt, type diskpart.exe.

  2. Type list volume to display the existing volumes on the computer.

  3. Type Select volume volume number where volume number is number of the volume that you want to extend.

  4. Type extend [size=n] [disk=n] [noerr]. The following describes the parameters:

    • size=n
      The space, in megabytes (MB), to add to the current partition. If you do not specify a size, the disk is extended to take up all of the next contiguous unallocated space.

    • disk=n
      The dynamic disk on which to extend the volume. Space equal to size=n is allocated on the disk. If no disk is specified, the volume is extended on the current disk.

    • noerr
      For scripting only. When an error is thrown, this parameter specifies that Diskpart continue to process commands as if the error did not occur. Without the noerr parameter, an error causes Diskpart to quit with an error code.

  5. Type exit to quit Diskpart.exe.
When the extend command is complete, you should receive a message that states that Diskpart successfully extended the volume. The new space should be added to the existing drive while maintaining the data on the volume.


Note: In Microsoft Windows XP and in Microsoft Windows 2000, you cannot use Diskpart.exe to extend a simple volume on a Dynamic disk that was originally created on a Basic disk. You can extend only simple volumes that were created after the disk was upgraded to Dynamic disk. If you try to extend a simple volume on a Dynamic disk that was originally created on a Basic disk, you receive the following error message. This restriction was removed in Microsoft Windows Server 2003.
Quote:
Diskpart failed to extend the volume.
Please make sure the volume is valid for extending
Reply With Quote
  #3  
Old 14-10-2008
Member
 
Join Date: Oct 2008
Posts: 76
Nice tutorial man. I was not knowing about this Diskpart thing. But where to find this diskpart. Will I need to download it from somewhere. If so give me the link for download. I am on Windows server 2003.
Reply With Quote
  #4  
Old 14-10-2008
Yogesh
 
Posts: n/a
Windows Server 2003 and Windows XP include Diskpart.exe as part of the base operating system.
To download the Diskpart.exe command-line utility for Windows 2000, follow this link from Microsoft.

Note: We recommend that you contact your system vendor for updated BIOS, firmware, drivers, and agents before you convert to Dynamic disks.
Reply With Quote
  #5  
Old 03-12-2008
Member
 
Join Date: Dec 2008
Posts: 1
Re: How to use Diskpart.exe to extend a data volume in Windows

I use diskpart from a BartPE boot CD to extend boot partitions, and if it works, it works quite well. After extending the boot partition, I run defrag and chkdsk to ensure that everything is uptodate. From that point on, I have no problems at all with applications.

However, when I do get the error that the partition cannot be extended, I don't seem to be able to figure out why. I think it is a BIOS setting that defines the type of drive. For example, my BartPE CD cannot even see the hard drive on most Dell PCs .. such as a Dell Dimension 9100. I discovered a BIOS setting on those machines that let BartPE see the SATA drive, but then I cannot extend it, and get the error. I wonder why?

I know I could buy a product like Acronis, but I consider that to be a rip-off to do something as simple as extend a partition. I have over 200 PCs in my labs that need extending, and at $50 each for Acronis, I simply will not do that.

This is a nice and very useful hack. I can do an entire lab in a couple of hours. The problem deserves a solution.
Reply With Quote
Reply

  TechArena Community > ARENA > Guides & Tutorials
Tags: , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How to use Diskpart.exe to extend a data volume in Windows"
Thread Thread Starter Forum Replies Last Post
Diskpart Error in Windows 7 Croulet Windows Software 3 16-10-2009 11:04 PM
Diskpart.exe to clear volume attribute Firon Hardware Peripherals 3 03-06-2009 02:33 PM
Diskpart arguments not valid error on Windows 2000 JareD Window 2000 Help 1 28-02-2008 08:53 PM
Dynamic Volume Offline in Disk Manager. Invalid in DiskPart Cic!cone Vista Hardware Devices 1 11-06-2007 08:03 PM
diskpart wont let me extend... Whats up? Scott Townsend Windows Server Help 3 04-06-2007 07:16 PM


All times are GMT +5.5. The time now is 06:53 PM.