Extending a Microsoft Hyper-V R2 Cluster Shared Volume

Hyper-V

This quick blog post shows you how you can simply extend a Hyper-V R2 or Windows Server 2008 R2 Cluster Shared Volume without any downtime. First you expand your LUN in your OEM SAN management software. This is mostly of the time nothing special. But after that you have to expand the Cluster Shared Volume.

  • In your OEM SAN Management Software expand the size of the LUN or disk
  • Open the Microsoft Failover Cluster Manager and check the CSV coordinator for the disk or LUN you have expanded. The CSV coordinator is the disk owner in the cluster
  • Login to the CSV coordinator machine
  • If you are using the GUI version you can use the Disk Management under Storage in the Server Manager. You can now rescan for disks and then expand the Disk or LUN.
  • If you are using Hyper-V or Windows Server Core you can use diskpart
  • First start the cmd and open diskpart
  • type rescan
  • now type list volume, to list all volumes
  • Use select volume IDNumber, the IDNumber is the number you could see with list volume in the previous step.
  • now you can type extend
  • with list volume you can see the results

In some environments sometimes if you need to expand a Cluster Shared volume it makes more sense to create a new one and move the Virtual Machines with Storage Migration but this cannot be done without downtime.

Cheatsheet: Using Diskpart on a Server Core installation #4

Using Diskpart on a Server Core installation. Disk Administration or Partition a disk.

Create a new partition and format a partition

SELECT DISK 0
CREATE PARTITION PRIMARY
ASSIGN LETTER=E
SELECT PARTITION 1
FORMAT FS=NTFS LABEL="New Volume" QUICK
EXIT

Commands you may then issue at the DISKPART prompt:

LIST Disk
LIST Partition
LIST Volume

SELECT Disk n
SELECT Volume n
SELECT Partition n

DETAIL Disk
DETAIL Partition
DETAIL volume

HELP
REM (remark/comment)
EXIT

Commands to Manage Basic Disks:

(set the current in-focus partition to be the system partition)

ASSIGN (allocate the next free drive letter)
ASSIGN LETTER=l (Choose a free letter)

CREATE PARTITION Primary Size=50000 (50 GB)
CREATE PARTITION Extended Size=25000
CREATE PARTITION logical Size=25000

DELETE Partition

EXTEND Size=10000

REMOVE letter=l (Remove drive letter l from the in-focus partition)
REMOVE /ALL (Remove ALL current drive letters and mount points)

Commands to Manage Dynamic Disks:

(set the current in-focus partition to be the system partition)

ASSIGN (allocate the next free drive letter)
ASSIGN LETTER=l (Choose a free letter)

ADD disk=n (Add a mirror to the in-focus SIMPLE volume on the specified disk.)

BREAK disk=n (Break the current in-focus mirror)

CREATE VOLUME Simple Size=n Disk=n
CREATE VOLUME Stripe Size=n Disk=n,n,...
CREATE VOLUME Raid Size=n Disk=n,n,...

DELETE DISK
DELETE PARTITION
DELETE VOLUME

EXTEND disk=n [Size=n]
IMPORT
ONLINE

REMOVE letter=l (Remove drive letter l from the in-focus volume)
REMOVE /ALL (Remove ALL current drive letters and mount points)
RETAIN

Commands to Convert Disks:

CONVERT mbr
CONVERT gpt
CONVERT dynamic
CONVERT basic

CLEAN ALL (remove all partition and volume info from the hard drive)
RESCAN