Here is what I've done for proof of concept. In real life production environment, you might want to design this properly such as providing high availability clustered iSCSI target with hot spared storage pool and fault tolerance. Thomas Maurer has very good articles on how to create a Windows Server 2012 iSCSI Target Server and how to build a iSCSI Target cluster server on Windows Server 2012.
Preparing Storage on iSCSI Target:
- Prepare a storage server in the domain. This iSCSI target will be providing iSCSI storage to the hosts.
- Created a Storage Pool. Select New Storage Pool from the Task menu, provide it with a name. Let's call it "StoragePool1" for now.
- Select the Physical Disks which will be part of the storage pool. Let say I have here 4 X 126 GB disks. (one to be used for Hot Spare)
- Under Virtual Disk, select New Virtual Disk. The wizard will start. Select the "StoragePool1" which you have created from previous step.
- Provide a name to the Virtual Disk. We will call it "VirtualDisk1" for now.
- Select your Layout. I guess you can call this the fault tolerance configuration. If you have 2 disks, you can choose to go with RAID 1 Mirror or if you have 3+ disks, you can go with RAID 5 Parity depending on your needs.
- Select your Provisioning Type. Let's go with Fixed to maximize size
- Click Create to create a virtual disk.
- The New Volume Wizard will start. This will help you to create a volume for the Virtual Disk. Follow the prompt to create a new volume. (i.e Drive F:)
- The final disk storage pool configuration will look something like this.
Installing iSCSI Target Role and iSCSI Virtual Disk
- Go to Server Manager and Add Roles and Features. Under File and Storage Services | File and iSCSI Services, select iSCSI Target Server. You might want to select iSCSI Target Storage (VDS and VSS Hardware Provider) to enable applications on the server that are connected to the iSCSI target to perform volume shadow copies of data on the iSCSI virtual disks. We will leave it for now in this example.
- In the File and Storage | iSCSI tab, navigate to the TASKS drop down box and select New iSCSI Virtual Disk. Select the disk volume which you would like to save your iSCSI virtual disks. This will be the virtual disk drive volume F: which we have created from previous section.
- Provide a iSCSI virtual disk name. We will use "iSCSI-VD1" as an example.
- Specify the disk size and whether it is a fixed, dynamically expand or differencing. We will use Dynamically Expanding as an example.
- Select New iSCSI and provide a iSCSI Target name. (i.e Srv3-iSCSITarget1)
- Add servers which can access this iSCSI virtual disks. Query the initiator computer by browsing the Active Directory.
- Once you finish adding the servers, (2 or more for clustering usually), you can optionally enable CHAP protocol for initiator authentication. We will skip this for now and move on to complete the creation of the iSCSI Virtual Disk.
iSCSI Initiator connections
We are going to use server name Srv1 and Srv2 in this example, assuming that they will be in a cluster.
- On Srv1, go to the Tools menu in the Server Manager and start the iSCSI Initiator.
- In the Discovery tab, click Discover Portal.
- In the IP address or DNS name box, key in the name of the iSCSI Target Server. The Target server which we have created previously.
- In the Target tab, click Refresh.
- In the Target list, select the iqn address of the iSCSI target server and click Connect.
- Acknowledge the default and finish the connection. It should show Connected in the status. OK to exit.
- Repeat 1 - 6 on the secondary server Srv2.
- On Srv1, go to Disk Management, you should see the unknown disk appear in the list. Right click and bring the disks Online and also Initialize the disk with the default value.
- On Srv2, go to Disk Management and bring the same disk online as well. (You might need to refresh the configuration when asked.)
Installing Failover Clustering Software and validate the cluster
- On Srv1, go to Server Manager and add the Failover Clustering feature and accept the defaults.
- Do the same on Srv2 and add the Failover Clustering feature.
- On Srv 1, start the Failover Cluster Manager, in the action pane, select Validate Configuration.
- Add Srv1 and Srv2 into the wizard and Run all tests (recommended).
- Confirm the results and ensure there are no errors before proceeding. Some warnings ae expected.
- Uncheck the Create the cluster now using the validated nodes and click Finish.
Creating Failover Cluster
Note: Ensure that you have a small iSCSI virtual disk (e.g. 100 MB) created from the iSCSI target for use as a Quorum Disk Witness. Also having a secondary network connections between the 2 servers is recommended.
- On Srv1, in the center pane, click Create Cluster.
- Add Srv1 and Srv2 in selection.
- Provide a Cluster Name. We will use FileCluster1 for now.
- Uncheck Add all eligible storage to the cluster and Next.
- View Report to confirm everything is fine. (note: you might get a warning for not specifying a quorum disk. We will configure this later). Click Finish.
- Navigate to Disk branch, right click and Add Disk.
- Select the disks you want to add to the cluster and OK.
- Ensure that the disks you have selected are showing up in the window and change the name if needed.
Creating a High Availability File Server
- On Srv1 Server Manager, Navigate to Add and Remote Roles, File and Storage Services | File and iSCSI services and add the File Server role to the server.
- On the Cluster Manager console, right-click on Roles and select Configure Role
- Select File Server and File Server for general use.
- Type in a name that the client will use when access this cluster role. (e.g. FileSrv) and IP address in the Address box.
- Select the disks which you want to assign to this cluster role. (e.g. Data and the Quorum disks)
- Confirm the configuration and complete the setup.
- In the Node section, confirm that the cluster is up and running in the Status column.
Adding shared folder to the clustered File Server
- Navigate to Roles, right click on the cluster and Add File Share.
- Select an appropriate file share profile. SMB Share - Quick should suit most cases.
- Specify the volume of the share location. In this case, the Data disk volume.
- Specify the Share Name, the local path and the remote path to share will appear.
- Enable other settings which you see fit. Accept the default and customize the permission if needed.
- Confirm and create the share.
Configure the failover and failback settings
- Navigate to Roles, right click on the FileSrv Name and go to into Properties.
- Specify the Preferred Owners and the Failover Settings. For example, allowing both to be the preferred owners and Allow failback between 4 - 5 hours etc. Adjust these settings as needed.
Configuring Cluster Quorum Settings
- Navigate to the Cluster, in the Action pane, navigate to More Actions and select Configure Cluster Quorum Settings.
- Select Advanced quorum configuration.
- On the Select Voting Configuration, review the settings and note that you can select nodes that will or will not have votes in the cluster.
- Select Quorum Witness and Configure a disk witness.
- Select the Quorum disk. (e.g. 100MB disk)
- Accept the default and finish configuring the cluster quorum settings.
Find more information on Quorum Configuration here.