Thursday, November 16, 2017

Series 2 - Build a Shared storage with StarWind Virtual SAN Free

Unlike SQL Server AlwaysOn Availability Groups, SQL Server failover clustering requires a dedicated shared storage. We have picked StarWind Virtual SAN Free since it's free for lifetime without sacrificing feature set! There are two caveats though. One is the GUI based management console will stop working after one month since installation. But you can still use PowerShell script to manage it. The other caveat is lack of commercial support. Help comes from StarWind forum and user community. Note there's a one month trial version that has technical support available. They can even help you build a SAN environment.

Here is how I built my storage SAN step by step:

Step 1.   Fill registration form at https://www.starwindsoftware.com/ which sends the license key and download link to your email address. Click the download link in your email. A copy of StarWind Virtual SAN FREE Version 8 will be downloaded on your local PC. Also click on the license key download link to save a copy to local PC. You'll need it during the installation.

Step 2.   On the Hyper-V host, double click on  starwind-v8.exe and launch the setup. Click the "I accept the agreement" radio button and Next. Verify the installation path. Click next to choose components.



Step 3.   At the license key page, choose the free version key.



Step 4.   Browse to the folder where the license key was previously downloaded.


Step 5.   Click Next to finish the installation. Open "StarWind Management Console" (SMC). Click on "Add Server" menu button, or right click on Servers icon and select "Add Server". In the "Add new StarWind Server" window, fill in the IP address (192.168.1.123) for Hyper-V host. Alternatively you can click on Advanced bar and choose "Scan StarWind Servers..." button to find the server by itself.


Step 6.   Click on Connect to show the StarWind Management Server. Select the server and choose "Add Target". In the Add Target Wizard, type in "Disks" as alias. Check the boxes for "Target Name" and "Allow Multiple Concurrent iSCSI Connections".



Step 7.   Click on Next and Create buttons.



Step 8.   Check the Target Creation completed page in the Wizard and close it out. Now you should see a Disk target below the host server in the SMC. Right click on the Disks target, and from the right menu choose "Add New Devices to the Target".


Step 9.   In "Add Device Wizard" choose hard disk device.


Step 10.   Click on Next. Choose "Virtual Disk" as disk device type.


Step 11.   Fill in virtual disk name. We start with the quorum disk. Define a disk file path by pointing tot he location box. Choose a desired disk size. For quorum we set it as half a GB.


Step 12.   In the next page of Add Device Wizard, we will choose LSFS (a Log Structure File System developed by StarWind to reduce random read/write IOs) as an optimal file system. Specify the size of cache in MB.


Step 13.   Click Next. Leave default cache mode ("Write Back") unchanged. Set cache size 128 MB.


Step 14.   Next specify a Flash Cache size. Use the same path as virtual disk created previously.


Step 15.   Click on Next. A list of progress is listed for creating device.


Step 16.   Click Create button to let it run. Click Close when done.


Step 17.   Repeat the above procedures for all shared disks with different sizes appropriate for SQL Server data/log/tempdb/backup.


Step 18.   On each Windows cluster node go to Administrator Tools and launch "iSCSI Initiator" from the menu. When iSCSI Initiator Properties window opens up, click on the second Discovery tab. Click on Discover Portal button. Manually type in the IP address of the Hyper-V SAN host (192.168.1.123). Click Advanced button. In the Advanced Settings select "Microsoft iSCSI Initiator" for local adapter and choose the iSCSI NIC IP address from initiator IP drop down list. Hit OK.


Step 19.   Return to the first Target tab. Highlight the server and click Connect button. Check the box to add this connection to the favorite list so that when the server reboots the connection is automatically restored. Check Enable multi-path. Hit OK and then OK again. Repeat this step on all remaining cluster nodes.


Step 19.   You can confirm from Disk Manager which should show a list of shared disk drives. They are not accessible yet. Right click on the left part of disk # and select Online. Right click again and choose Initialize Disk. select list of disks to initialize them in MBR partition styles. Right click again to create new simple volume with proper size and drive letter. Ensure to use NTFS for file system. Pick 64K allocation unit size. After formatting is done the drive are visible and accessible in Windows Explorer.






No comments:

Post a Comment