Monday, August 1, 2011

How to extend a data volume in Windows Server 2003, in Windows XP

 

About Diskpart.exe

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 can add 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.


The following are the requirements for the extend command:

1.       The volume must be formatted with the NTFS file system.

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

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

4.       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:

Diskpart failed to extend the volume. Please make sure the volume is valid for extending

5.       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 want to extend.


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 use all 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 exit with an error code.

5.       Type exit to exit 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.

How to extend the boot partition in Windows Server 2008

To extend the boot partition in Windows Server 2008, follow these steps:

  1. Click Start, and then click Server Manager.

2.       In the navigation pane, expand Storage, and then click Disk Management.

3.       In the details pane, right-click the volume that you want, and then click Extend Volume.

4.       Follow the instructions in the Extend Volume Wizard to extend the boot partition.



What I did in my case.

Steps to get this done:

1.     Go to command prompt and write diskpart.exe

 

Microsoft Windows [Version 5.2.3790]

(C) Copyright 1985-2003 Microsoft Corp.

 

C:\Documents and Settings\sp_admin>diskpart.exe

 

Microsoft DiskPart version 5.2.3790.3959

Copyright (C) 1999-2001 Microsoft Corporation.

On computer: ALCVMSPD004

 

2.       If you need to see the what all activity we can perform with diskpart.exe then, just make a mistake and it will let you know all it can do for you.

DISKPART> slect volume

 

Microsoft DiskPart version 5.2.3790.3959

 

ADD         - Add a mirror to a simple volume.

ACTIVE      - Marks the current basic partition as active.

ASSIGN      - Assign a drive letter or mount point to the selected volume.

AUTOMOUNT   - Enables and disables automatic mounting of basic volumes.

BREAK       - Break a mirror set.

CLEAN       - Clear the configuration information, or all information, off the disk.

CONVERT     - Converts between different disk formats.

CREATE      - Create a volume or partition.

DELETE      - Delete an object.

DETAIL      - Provide details about an object.

ATTRIBUTES  - Manipulate volume attributes.

EXIT        - Exit DiskPart

EXTEND      - Extend a volume.

GPT         - Assigns attributes to the selected GPT partition.

HELP        - Prints a list of commands.

IMPORT      - Imports a disk group.

INACTIVE    - Marks the current basic partition as inactive.

LIST        - Prints out a list of objects.

ONLINE      - Online a disk that is currently marked as offline.

REM         - Does nothing. Used to comment scripts.

REMOVE      - Remove a drive letter or mount point assignment.

REPAIR      - Repairs a RAID-5 volume with a failed member.

RESCAN      - Rescan the computer looking for disks and volumes.

RETAIN      - Place a retained partition under a simple volume.

SELECT      - Move the focus to an object.

 

3.       To start from beginning, let us do it once more

 

DISKPART> exit

 

Leaving DiskPart...

 

C:\Documents and Settings\sp_admin>diskpart.exe

 

Microsoft DiskPart version 5.2.3790.3959

Copyright (C) 1999-2001 Microsoft Corporation.

On computer: ALCVMSPD004

 

4.       See the listing of the volumes available

 

DISKPART> list volume

 

  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info

  ----------  ---  -----------  -----  ----------  -------  ---------  --------

  Volume 0     E   VSSD1        UDF    CD-ROM       103 MB  Healthy

  Volume 1     C                NTFS   Partition     40 GB  Healthy    System

  Volume 2     D   DATA         NTFS   Partition     80 GB  Healthy

 

5.       In my case I have increase the D: so select the appropriate volume you want.

DISKPART> select volume 2

 

Volume 2 is the selected volume.

6.       Now is the time to extend it,  give the size you want to allocate.

DISKPART> extend size = 100

 

DiskPart successfully extended the volume.

 

DISKPART>

 

Please post a comment if you have other ways of doing this same thing… I’ll be happy to hear.

...HaPpY CoDiNg

Partha (Aurum)

Reference:

http://support.microsoft.com/kb/325590

 

 

 

No comments:

Post a Comment