Windows Server 2012 Hyper-V Cluster – Part 3: Shared Storage

Windows Server 2012 Hyper-V Cluster – Part 3: Shared Storage
We have already built your domain controller and failover cluster nodes. Now all we need to do is build some shared storage for our Hyper-V cluster before we can kick off with some serious cluster magic.

In this articles will be covering on Windows Server 2012 Hyper-V Cluster and series is divided into 4 part as below:-

1) Windows Server 2012 Hyper-V Cluster – Part 1: Requirements
2) Windows Server 2012 Hyper-V Cluster – Part 2: Hyper-V cluster nodes
3) Windows Server 2012 Hyper-V Cluster – Part 3: Shared Storage
4) Windows Server 2012 Hyper-V Cluster – Part 4: Setup

Contents
Steps 4: Create your shared storage

In this, we’ll build a Windows Server 2012 installation with iSCSI targets.

Configure the storage hardware
With 300GB disks on my shared storage box, I opted to use the same server on which Domain Controller role is install as my Storage capabilities box and create redundancy and the best performance.

Install Windows Server 2012

I won’t cover installing Windows Server 2012, since this was already covered in Part 2 of this series as part of the installation steps to create a domain controller.

Install the iSCSI Target Services role

Now it’s time to convert our Windows installation to an iSCSI serving shared storage box. Perform these steps:

  1. In Server Manager, on the grey task bar at the top, click Manage Select Add Roles and Features
  2. This will fire up the Add Roles and Features Wizard, which will guide you through the process.
  3. Click Next on the Before you begin
  4. Select Role-based or feature-based installation on the Select installation type screen and click Next.
  5. Select your server from the server pool list on the Select destination server screen and click Next when done.
  6. In the list with Server Roles, scroll down to File and Storage Services (Installed). As you’ll notice, every Windows Server is already equipped with some file and storage services, and the role itself is not (un)installable. That’s OK, because we’re going to add three Role Services to the Server Role.
  7. Expand File and Storage Services (Installed) by clicking the triangle to the left of it. Then, expand File and iSCSI Services

  1. Here, select the radio buttons to the right of File Server, iSCSI Target Server and iSCSI Target Storage Provider (VDS and VSS hardware providers). Click Next when done.Click Next again underneath the Select Features
  2. On the Confirm installation selections screen, click Install. Do not bother to select the box next to Restart the server automatically if required, since installing these role services does not require a reboot.

  1. When the wizard is done installing, click Close

Configure the shared storage

Let’s create the two shared disks we need for our failover cluster now:

  1. In the left pane of Server Manager, select File and Storage Services.
  2. In the new sub pane, select iSCSI.

  1. In the main pane, click the link To create an iSCSI virtual disk, start the New iSCSI Virtual Disk Wizard.
  2. On the Select iSCSI virtual disk location screen, select a suitable location for the new iSCSI virtual disk. Since I’ve created one big 300GB (hardware mirrored) D:\ drive, I clicked Next on this screen, accepting the default location.

  1. For Specify iSCSI virtual disk name, I named my first iSCSI virtual disk Quorum and clicked Next.

  1. On the iSCSI Virtual Disk Size screen, I specified 512 MB as the size for this disk and clicked Next.
    Note: Microsoft recommends a 512MB Quorum disk for Windows-based failover clusters. There’s no need to create a larger Quorum disk.

  1. On the Assign iSCSI target screen, opt for the default New iSCSI target and click Next.

  1. Specify a name for the iSCSI target on the Specify target name I chose the same name for both the disk and the target (Quorum) and clicked Next.

  1. On the Specify access servers screen, add both the Hyper-V Server failover cluster nodes as the iSCSI initiators that will access this iSCSI virtual disk:
    a) Click Add…
    b) SelectEnter a value for the selected type
    c) ChangeType: to IP Address



d) Enter the IP Address of the NIC designated as the shared storage connection on the first Hyper-V failover cluster node, and then clickOK
e) ClickAdd…again and add the information for the second node.

  1. Click Next.
  2. Since this is a simple failover cluster, we won’t Enable Authentication and thus simply click Next on this screen.
  3. On the Confirmation screen, click Create.

  1. When done, click Close.

  1. Run the New iSCSI Virtual Disk Wizard again, by right-clicking in an empty part of the iSCSI Virtual Disks list in the main pane of Server Manager. This time, create a larger iSCSI target that will serve as storage for your virtual machines. I created a 100GB iSCSI target with SharedDisk as both the name for the shared disk and the iSCSI target.

Connect the shared storage to your Hyper-V nodes

To use the iSCSI targets for our cluster, we will need to add them to our Hyper-V failover cluster nodes. For this purpose, log on to the console of the first cluster node. Then, perform the following actions:

  1. Start up the iSCSI initiator by typing iSCSIcpl at the command prompt.
    • Tip: – You can Alt+Tab to it when you have sconfig in front of you.
  2. Since this is the first time you’re starting the iSCSI initiator, you’ll receive a pop-up message asking you whether you’d like to start the servers and configure the initiator to automatically start when the server starts. Of course, you want to have the iSCSI service running every time you restart the machine, so choosing Yes would be the obvious choice.
  3. On the iSCSI Initiator Properties window, go to the Discovery

4. Press the Discover Portal… button to insert the properties of your iSCSI server, hosting the iSCSI targets you need for your cluster.

5. After pressing OK, you can switch to the Targets tab and hit the Refresh Both iSCSI targets (the Quorum and SharedDisk targets) should now be available to connect to. Their reported status would be inactive.

6. To connect to a target select it in the list and press the Connect When you connect to a target, it will be automatically configured as a persistent target. This will make the system automatically attempt to restore the connection every time this computer restarts. Press OK when you’re done.

7) Connect the second iSCSI target.

8) Press OK to close the iSCSI Initiator Properties

You’re now ready to move on to the other node of your soon-to-be Hyper-V cluster. Both iSCSI targets need to be connected on both nodes before you can successfully join them in a real-world-useful failover cluster.

Manage the Quorum disk

Now you need to make a pretty drastic decision: you need to choose between your nodes. One of them will be leading, whereas the other one (initially) will not be very active. I chose Hyper-V-1 as the active node and Hyper-V-2 as the (initial) passive node. This means Hyper-V-1 will be used to access the locations where we will store our witness disk and our virtual machines, while Hyper-V-1 can only dream of accessing them for now.

On Hyper-V-2, you need to switch from the (blue) sconfig.cmd screen to the (black) command prompt window and use diskpart.exe on the iSCSI target designated as Quorum (quorum):

Type the following commands:

  • diskpart.exe
  • DISKPART > list disk

This will output a list containing the disks in the box. Memorize the disk number corresponding to the Quorum target. (This is the small 512 MB disk.)

  • DISKPART > select disk 1
  • DISKPART > attributes disk clear readonly
  • DISKPART > clean
  • DISKPART > online disk
  • DISKPART > create partition primary
  • DISKPART > format fs=ntfs quick

Manage the storage disk

On the same node, you also need to create a partition on the second iSCSI target. Use the following commands on the disk designated as Virtual Machine Storage (hvstuff) (this is the big disk):

  • DISKPART > select disk 2
  • DISKPART > attributes disk clear readonly
  • DISKPART > clean
  • DISKPART > online disk
  • DISKPART > create partition primary
  • DISKPART > format fs=ntfs quick

Tip!
You can use the Up arrow on your keyboard to recall the commands you used to create the partition on the previous disk.

  • DISKPART > exit

Now we can fire up the Cluster Manager to create the cluster containing our Hyper-V Server 2012 R2 nodes. This will make an excellent subject for the last part of this series.

 

Comments

comments

Share This Post

Post Comment

Time limit is exhausted. Please reload CAPTCHA.