iSCSI is an acronym for Internet Small Computer System Interface. It is a network protocol that encapsulates storage device communication data into IP packets for transmission over an Ethernet connection. This allows the IP-connected hosts to access the Storage Area Network (SAN). iSCSI Target Server also enables admins to run/boot multiple devices on a network from a single operating system image that’s stored in a central location. Traditional Storage Area Networks are based on Fiber Channel. Fiber Channel SANs are very fast but they’re also expensive. iSCSI will provide us with most of the benefits of a Fiber Channel SAN without all the cost associated with Fiber Channel SAN. iSCSI is the most frequently used solution and it enables us to create a very reliable and fast SAN using ethernet hardware. It will also be nice to emphasize that, iSCSI does not run as fast as a Fiber Channel SAN and the associated offered by Fiber Channel SAN can not be achieved by iSCSI. Here are some guides you may be interested in: Initialize and format a virtual disk: How to add and remove a new virtual disk from a VM on VMware Workstation, how to scale up and scale out on Azure, how to track your device performance and health via Windows Security in Windows 10, and Unable to access files in Synology Disk station from Windows 10.
iSCSI allows access to a remote server (target) disk by making it virtually available as a local disk. When you configure iSCSI SAN, the iSCSI target Server is configured and therefore offers access to the shared storage. The server that connects to the iSCSI Target is referred to as the iSCSI Initiator. The advantage of iSCSI over Fiber Channel is the cost as Fibre Channel is relatively very expensive to implement. By imploying iSCSI, we can create a SAN that runs at a relatively low cost which requires no additional interface cards, fiber optic cabling, no fiber-optic switches etc, therfore,, ensuring everything run as software. Below is a table showing some iSCSI terminologies.
|IQN||The is referred to as the iSCSI qualified name. It is unique name that is used for identifying targets as well as initiators|
|Backend Storage||The storage location on the iSCSI target that the iSCSI target component is providing access to|
|Target||The service on an iSCSi server that gives access to backend storage devices.|
|Initiator||The iSCSi client that connects to a target and is identified by IQN|
|ACl||The access control list that is based on the iSCSI initiator IQN and used to provide access to specific user|
|LUN||A Logical Unit Number. The backend storage devices that are shared through the target. This can be any device that supports read/write operations, such as disk, partitions, logical volumes, files or tape drves|
|Discovery||The process whereby an initiator finds the targets that are configured on a portal and stores the information locally for future reference.|
Part A – Install iSCSI Server (Role): There are quite a few different ways to add the iSCSI Target server on a Windows device.
– To do this via PowerShell, run the command below
Install-WindowsFeature -Name FS-iSCSITarget-Server
– Via the Server Manager: Click on the Dashboard on the Server Manager and click on Add roles and features as shown below.
On the “Before you begin” page, you can just click on Next. If you do not want the page to appear subsequent times, check the button to skip the page by default.
On the next Window “Select installation type“, select “Role-based or feature-based installation” and click on “Next“.
If you have multiple servers, please ensure you select the right server to have the iSCSI Target Server installed.
– Click on Next to continue
Expand and check the the iSCSI Target Server box as shown below. As you can see, it has not previously been installed.
– When you are done checking the box, click on Next to continue
On the Features page, we do not have to select any Feature, simply click on Next to continue as shown below.
To avoid restarting the Server yourself when a restart is needed, you can check the button “Restart the destination server automatically if required”. For this setp, a restart is not required, therefore I will still not check it.
– Confirm you have selected the right role (iSCSI Target Server) and click on Install as shown below.
Once your installation is complete, click on “Close”. You can also click on close while the installation is going on.
Part B – Create an iSCSI target: Now that the iSCSI Target Server has been installed, we will configure a new iSCSI Target. You can create an iSCSI disk (virtual disk)using PowerShell.
New-IscsiVirtualDisk -Path c:\xxxxxxxxxx\TechDASAN.vhdx -Size 10GB
Via the Server Manager: To do this, click on File and Storage Services as shown below.
Click To create an iSCSI virtual disk, click on iSCSI and under iSCSI Virtual Disks. Click on the Task dropdown menu and
– Click on “New iSCSI Virtual Disk” Wizard
Select a volume and click on Next to proceed as shown below.
Enter the the iSCSI Virtual Disk name and description. When you done, click on Next to continue.
Enter the size of the desired Virtual Disk GB. Also, select the vDisk type (Fixed Size, Dynamically expanding or Differencing) as shown below .
– I am going with the Dynmaically exapning as shown below.
– Click next to proceed.
Select New iSCSI target and click Next to continue.
Under Target Name and Access, enter a name to identify the disk by Target servers. Therefore, type a Name, description and click on Next
At the Access Servers step, specify the servers (iSCSI initiators) that will be able to connect to the iSCSI target by selecting one of the following connection options: IQN (This requires that you configure iSCSI initiator on your server before you the IQN can be copied), Server Name (DNS Name), IP Address, MAC Address.
– To proceed, click on “Browse” as shown below.
As you can see below, I am using the DNS name “HyperV“. I will enter my Server Name and click on check names and when fund, I will click on Ok to complete close the “Select Computer” wizard.
Ensure on the target server that you have enabled the iSCSI initiator service as well. Click on Ok on cloe the window below.
As you can see below, the creation of the iSCSI Target and Initiator are currently being saved.
Click on Next to continue.
– Note: You can click on Add. This will Add the Servers which will be accessing this disk.
On the Enable Authentication window, as you can see, this is optional. This is a Lab task and therefore, I will not be needing to authenticate the initiator’s connection.
– Click on Next to continue.
Confirm the iSCSI virtual disk settings and click Create.
As you can see, the iSCSI virtual Virtual Disk has been successfully created.
You can follow the steps mentioned in creating an iSCSI Virtual Disk. As you can see below, you can perform the following settings you can perform for the iSCSI Virtual Disks and iSCSI Targets.
As yu can see in the figure below, here are the iSCSI Target Properties window.
Part C – Install and Configure iSCSI Initiator: In this step, we will be connecting to the virtual iSCSI disk from another server (iSCSI initiator). Also, there are different ways to launch the iSCSI Initiator.
– First, launch the Control Panel and start the iSCSI initiator (or run
iscsicpl.exe) from the run dialogbox.
– Alternatively, you can launch the Server Manager and click on Tools and then on the iSCSI Initiator.
Note: To connect to the iSCSI storage, you may need to open TCP ports 860 and 3260 in Windows Firewall. iSCSI target servers listen on port 3260 and initiators connect using port 860.
On the prompt, click on YES to automatically start t he Microsoft iSCSI service as shown below.
In the window below, click on the Target tab and this will open up the iSCSI initiator properties. Here, we will need to enter the DNS Name or IP Address of the iSCSI target configured in Part B above and then click on Quick Connect to automatically connect to the discovered targets.
– As you can see below, the iSCSI targets was discovered and connected. If you find an inactive iSCSI Target, select it and click on Connect.
– Navigate to the Volume and Devices Tab, click on Auto Configure to configure the volumes so upon restart, the it is readily available for use.
Note: It is also possible to connect an iSCSI disk on the initiator host via PowerShell. To get the target IQN, use the
Get-iSCSITarget cmdlet as shown below.
If you are using CHAP authentication, the command will be different. This is not covered in this guide.
Connect-IscsiTarget –IsPersistent $False and enter the IQN.
Part D – Initialize and Format the vDisk: To do this, open disk management via the Server Manager or Windows Administrative Tools. Here is a similar guide on how to do this: How to initialize and format a virtual disk. I will be showing you how to launch this via Windows Administrative Tools “Control Panel\System and Security\Administrative Tools\Computer Management.lnk”.
– Click on Computer Management
As you can see below, there is a new volume in the Disk Management panel of the client PC. You can format it and adminsister it just like other volumes.
Right-click the disk and select bring it online.
– If you do not find the drive yet, please under “Actions” > Rescan Disks“. If you on working on a cloud platform such as AWS, you may have to rescan in order to see the attached disk.
Right-click the disk to be initialized and then click Initialize Disk. Windows prompts you to initialize the disk before the Logical Disk Manager can access it.
I will be selecting MBR but I recommend you select GPT.
– Kindly refer to this link. GPT is the abbreviation of GUID Partition Table, which is a standard for the layout of the partition table on a physical hard disk, using globally unique identifiers (GUID). MBR is another kind of partition table format. It is short for the master boot record. Comparatively, the MBR is older than the GPT
Right-click the unallocated space and click New Simple Volume.
Click on Next to continue
Enter the size of the partition (in MB) and click Next. I will leave it as default to use all available disk space.
Select a drive letter and click Next.
Select the file system type and volume label. For me as you can see below, I entered a Volume name “TechDAStorage”.
Click on Finish to complete the process.
As you can see below, we have our newly created virtual disk available on our VM.
iSCSI allows access to a remote server (target) disk by making it virtually available as a local disk. Note that accessing an entire disk is quite different than accessing file/folders over CIFS(Windows file sharing or Samba) or NFS. In case of iSCSI the client can choose any file-system supported by client and setup their own ACLs. Further the same iSCSI disk cane be accessed by multiple clients to have some kind of distributed or clustered filesystem for High-Availability (HA).
– iSCSI Target Server has the ability to boot hundreds of computers using just a single OS image.
I hope you found this blog post helpful. If you have any questions, please let me know in the comment session.