- Turn the tables on your organization with Adaxes 2018.1’s Web Interface and reporting capabilities - Thu, Sep 20 2018
- Review: Softerra Adaxes – Automating Active Directory management - Thu, Jun 4 2015
- Azure Multi-Factor Authentication – Part 8: Delegating Administration - Tue, Apr 28 2015
Task 4: Create your shared storage
In this task, we’ll build a Windows Server 2012 installation with iSCSI targets.
Configure the storage hardware
With two 320GB disks on my shared storage box, I opted to use the hardware RAID capabilities of the box itself to 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.
Configure Windows Server 2012
When installation of Windows Server 2012 is finished, you will be presented with the screen to change the password for the local administrator. Change it by performing the same steps as before. Then, perform these steps:
- After login, you will be presented with the Server Manager. Click Local Server in the left pane.
- In the main pane on the System Properties screen, click the automatically generated name to the left of Computer name, and then click the Change… button. Change the computer name to something more obvious. I chose SAN. Click OK when done. Click OK on the Computer Name / Domain Changes screen to acknowledge the server has to restart to apply these changes. Click Close on the System Properties screen, and then Restart Now on the generic screen.
- After the server reboots, log on. Click Local Server again in the left pane of Server Manager; this time, click the text Ipv4 address assigned by DHCP, Ipv6 enabled next to Ethernet. Right-click the Network Interface Card (NIC) on the Network Connections screen and select Properties from the context menu. Double-click IPv4 in the list of items and then select Use the following IP address:. Insert meaningful values for the IP address, subnet mask, and (if necessary) the default gateway. The Use the following DNS server addresses: option will also have changed. Leave the addresses blank.
- Back in Server Manager, click the (UTC -8:00) Pacific Time (US & Canada) text next to Time zone. On the Date and Time screen, click the Change time zone… button. Choose your time zone and click OK when done. Click Close on the Date and Time screen.
I’m not joining the shared storage box to Active Directory. You can join it to the domain created earlier when you add a second NIC to the shared storage box. This would be beneficial if you want to use centrally configured IPSec, for instance.
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:
- In Server Manager, on the grey task bar at the top, click Manage.
- Select Add Roles and Features. This will fire up the Add Roles and Features Wizard, which will guide you through the process.
- Click Next on the Before you begin screen.
- Select Role-based or feature-based installation on the Select installation type screen and click Next.
- Select your server from the server pool list on the Select destination server screen and click Next when done.
- 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. Expand File and Storage Services (Installed) by clicking the triangle to the left of it. Then, expand File and iSCSI Services too.
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 list.
- 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.
- 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:
- In the left pane of Server Manager, select File and Storage Services.
- In the new sub pane, select iSCSI.
- In the main pane, click the link To create an iSCSI virtual disk, start the New iSCSI Virtual Disk Wizard.
- On the Select iSCSI virtual disk location screen, select a suitable location for the new iSCSI virtual disk. Since I’ve created one big 320GB (hardware mirrored) C:\ drive, I clicked Next on this screen, accepting the default location.
- For Specify iSCSI virtual disk name, I named my first iSCSI virtual disk Quorum and clicked Next.
- On the iSCSI Virtual Disk Size screen, I specified 512 MB as the size for this disk and clicked Next.
Microsoft recommends a 512MB Quorum disk for Windows-based failover clusters.
There’s no need to create a larger Quorum disk.
- On the Assign iSCSI target screen, opt for the default New iSCSI target and click Next.
- Specify a name for the iSCSI target on the Specify target name screen. I chose the same name for both the disk and the target (Quorum) and clicked Next.
- 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:
- Click Next.
- Since this is a simple failover cluster, we won’t Enable Authentication and thus simply click Next on this screen.
- On the Confirmation screen, click Create. When done, click Close.
- 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 HVMachines 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:
- Start up the iSCSI initiator by typing iSCSIcpl at the command prompt.
You can Alt+Tab to it when you have sconfig in front of you.
- 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.
- On the iSCSI Initiator Properties window, go to the Discovery tab.
- Press the Discover Portal… button to insert the properties of your iSCSI server, hosting the iSCSI targets you need for your cluster.
- After pressing OK, you can switch to the Targets tab and hit the Refresh button. Both iSCSI targets (the Quorum and HVMachines targets) should now be available to connect to. Their reported status would be inactive.
- To connect to a target select it in the list and press the Connect button. 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.
- Connect the second iSCSI target.
- Press OK to close the iSCSI Initiator Properties window.
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 HvNode1 as the active node and HvNode2 as the (initial) passive node. This means HvNode1 will be used to access the locations where we will store our witness disk and our virtual machines, while HvNode2 can only dream of accessing them for now.
On HVNode1, 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 (hvquorum):
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 HVQuorum 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
You can use the Up arrow on your keyboard to recall the commands you used to create the partition on the previous disk.
Subscribe to 4sysops newsletter!
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.