Search This Blog

Extend a Logical Drive in Windows Server 2008 R2

I recently successfully P2V a Windows Server 2008 R2 physical server to a vSphere VM. The server has two drives (Drive C and D), and both of drives were originally on one RAID 5 LUN. I didn’t know how the drives were originally created on the physical server, e.g.  whether Drive D is a primary partition or a logical drive on an extended partition.

When the Drive D starts low on the free disk space, I thought it’s very simple to extend a drive since the server is running Windows Server 2008.

  • I increase the size of hard disk 1 on the VM (both Drive C and D are on the hard drive) while the server is on
  • In Wndows Disk Management, rescan disks and then the extra unallocated disk space is showed
  • At this point, I noticed Drive D is a logical drive on an extended parition. I normally create the drive on the primary partition.
  • When right-click on the logical drive, the “Extend Volume” option is grayed out.
  • I had extended a non-OS drive in Windows Server 2008 via GUI before; and for Windows Server 2003, I had to use the diskpart utility.
  • Why I cannot extend this drive? Is it because it’s a logical drive on an extended partition? I’m not sure.
  • I know there are some third-party utilities can resize the partition. But I don’t have them handy.
  • Finally, I want to try the diskpart utility.
    • First, I tried extending the extended partition. It didn’t work. (see the yellow highlight)
    • Next, I tried extending the logical partition directly. It worked. (see the green highlight)

    C:\Windows\system32>diskpart

    Microsoft DiskPart version 6.1.7601
    Copyright (C) 1999-2008 Microsoft Corporation.
    On computer: AVLDB

    DISKPART> list disk

      Disk ###  Status         Size     Free     Dyn  Gpt
      --------  -------------  -------  -------  ---  ---
      Disk 0    Online          360 GB  1024 KB

    DISKPART> select disk 0

    Disk 0 is now the selected disk.
     
    DISKPART> list partition

      Partition ###  Type              Size     Offset
      -------------  ----------------  -------  -------
      Partition 1    OEM                 40 MB  1024 KB
      Partition 2    Primary           3072 MB    41 MB
      Partition 3    Primary             60 GB  3113 MB
      Partition 0    Extended           200 GB    63 GB
      Partition 4    Logical            200 GB    63 GB

    DISKPART> select partition 0

    Partition 0 is now the selected partition.

    DISKPART> extend

    There is no volume selected.
    Please select a volume and try again.

    DISKPART> list partition

      Partition ###  Type              Size     Offset
      -------------  ----------------  -------  -------
      Partition 1    OEM                 40 MB  1024 KB
      Partition 2    Primary           3072 MB    41 MB
      Partition 3    Primary             60 GB  3113 MB
    * Partition 0    Extended           200 GB    63 GB
      Partition 4    Logical            200 GB    63 GB

    DISKPART> select partition 4

    Partition 4 is now the selected partition.

    DISKPART> extend

    DiskPart successfully extended the volume.

No comments:

Post a Comment

Use WinSCP to Transfer Files in vCSA 6.7

This is a quick update on my previous post “ Use WinSCP to Transfer Files in vCSA 6.5 ”. When I try the same SFTP server setting in vCSA 6.7...