Extending Partitions
With Windows Server 2008, you can extend volumes on both basic and dynamic disks using either Disk Management or DiskPart. This is handy if you create a partition that's too small and you want to extend it so you have more space for programs and data. In extending a volume, you convert areas of unallocated space and add them to the existing volume. For spanned volumes on dynamic disks, the space can come from any available dynamic disk, not only those on which the volume was originally created.
Thus you can combine areas of free space on multiple dynamic disks and use those areas to increase the size of an existing volume.
Before you try to extend a volume, be aware of several limitations. First, you can extend simple and spanned volumes only if they are formatted and the file system is NTFS. You can't extend striped volumes. You can't extend volumes that aren't formatted or that are formatted with FAT or FAT32. You can extend NTFS volumes on basic disks but only by using DiskPart. If you try to use Disk Management to extend NTFS volumes on basic disks, Disk Management will display a warning that the Convert To Dynamic Disk Wizard will run first.
Using Disk Management, you can extend a simple or spanned volume by following these steps:
- Open Disk Management. Right-click the volume that you want to extend and then select Extend Volume. This option is available only if the volume meets the previously discussed criteria and free space is available on one or more of the system's dynamic disks.
- In the Extend Volume Wizard, read the introductory message and then click Next.
- On the Select Disks page, select the disk or disks from which you want to allocate free space. Any disks currently being used by the volume will automatically be selected. By default, all remaining free space on those disks will be selected for use.
- With dynamic disks, you can specify the additional space that you want to use on other disks. Select the disk and then click Add to add the disk to the Selected list box. In the Selected list box, select each disk that you want to use and in the Select The Amount Of Space In MB list box, specify the amount of unallocated space to use on the selected disk.
- Click Next, confirm your options, and then click Finish.
By using DiskPart, you can extend partitions using the command line. To extend an NTFS-formatted partition, invoke DiskPart by typing diskpart at the command prompt. List the disks on the computer by typing list disk. After you check the free space of each disk, select the disk by typing select disk N, where N is the disk you want to work with. Next, list the partitions on the selected disk by typing list partition. Select the last partition in the list by typing select partition N, where N is the partition you want to work with.
Now that you've selected a partition, you can extend it. To extend the partition to the end of the disk, type extend. To extend the partition a set amount, type extend size=N, where N is the amount of space to add in megabytes. For example, if you want to add 1200 megabytes to the partition, type extend size=1200.
Listing-2 shows an actual DiskPart session in which a disk is extended. You can use this as an example to help you understand the process of extending disks. Here, disk 2 has 19 GB of free space, and its primary partition is extended so that it fills the disk.
Listing-2 Extending disksC:\> diskpart Microsoft DiskPart version 5.2.3790 Copyright (C) 1999-2001 Microsoft Corporation. On computer: CORPSVR02 DISKPART> list disk Disk ### Status Size Free Dyn Gpt -------- -------- ----- ----- --- --- Disk 0 Online 56 GB 5 GB * * Disk 1 Online 29 GB 0 B Disk 2 Online 37 GB 19 GB DISKPART> select disk 2 Disk 2 is now the selected disk. DISKPART> list partition Partition ### Type Size Offset ------------- --------- ------- ------- Partition 1 Primary 37 GB 32 KB DISKPART> select partition 1 Partition 1 is now the selected partition. DISKPART> extend DiskPart successfully extended the partition. DISKPART> exit Leaving DiskPart... C:\>
To extend a partition on a dynamic disk to free space on another disk, you use the syntax:
extend size=X disk=Y
where size=X sets the amount of space to use in megabytes and disk=Y sets the number of the disk from which to allocate the space. Following this, you could allocate 5000 MB of free space from disk 0 to the selected disk in the previous example (disk 2) using the following command:
extend size=5000 disk=0
In this tutorial:
- Storage Management
- Essential Storage Technologies
- Improving Storage Management
- Booting from SANs and Using SANs with Clusters
- Configuring Multipath I/O
- Installing and Configuring File Services
- Configuring the File Services Role
- Configuring Storage
- Adding New Disks
- Using the MBR and GPT Partition Styles
- Using and Converting MBR and GPT Disks
- Using the Disk Storage Types
- Using and Converting Basic and Dynamic Disks
- Converting FAT or FAT32 to NTFS
- Working with Removable Disks
- Managing MBR Disk Partitions on Basic Disks
- Formatting a Partition, Logical Drive, or Volume
- Configuring Drive Letters
- Configuring Mount Points
- Extending Partitions
- Shrinking Partitions
- Managing GPT Disk Partitions on Basic Disks
- Primary Partitions
- Managing Volumes on Dynamic Disks
- Configuring RAID 0: Striping
- Moving Dynamic Disks
- Configuring RAID 1: Disk Mirroring
- Mirroring Boot and System Volumes
- Configuring RAID 5: Disk Striping with Parity
- Breaking or Removing a Mirrored Set
- Repairing a Mirrored System Volume
- Resolving Problems with RAID-5 Sets