Creating an iSCSI target on your server

iSCSI is another way to share storage across a network. Well, the term iSCSI itself has more to do with the actual protocol level and the way that the data is transported across the LAN or WAN, but what it looks like as a consumer of iSCSI is that a machine has a drive letter for a disk, but that disk is not physically connected to the server. For example, you might log in to a server and see an M drive. This drive looks just like a local volume, but it is actually a network connection to storage that might be sitting on the other side of the datacenter. Sounds like a mapped network drive, right? Yes, but it works on a lower level. iSCSI virtual disks, as they are called, work with the server as if they are local disks. This gives servers the ability to interface with this data at a system level, and does not require a user context in order to work, like mapped network drives do. This is commonly referred to as block storage.

One good example that I worked with was a database application that a customer was installing onto a new server. The requirements for installing this software were that a drive was to be dedicated for storage, it had to be a full drive letter on the system, and it could not be a mapped drive or a UNC mapping. We were not able to add another hard drive to the physical server, and that wasn't really desirable anyway. We utilized iSCSI to create an iSCSI target on their main storage server, and then connected to that block of storage with an iSCSI initiator on the application server where we were installing the software.

I haven't seen a lot of places utilize iSCSI, which is exactly why I thought we should test the waters with it here. We now have the option in Server 2016 to create our own iSCSI targets right on the server, so let's work on creating one of these targets together.

Getting ready

We have a Windows Server 2016 running, which we are going to prep to be our iSCSI target server.

How to do it…

To create an iSCSI target on your server, go through the following steps:

  1. Open Server Manager and click on the Add roles and features link.
  2. Click Next until you come to the Select server roles screen.
  3. Navigate to File and Storage Services | File and iSCSI Services, and check the box next to iSCSI Target Server:

    How to do it…

  4. Click Next, Next, and Install to finish putting this new role into place.
  5. In the left pane of Server Manager, click on File and Storage Services. Then click on iSCSI.
  6. From the Tasks menu located in the far right corner, click on New iSCSI Virtual Disk….
  7. Choose a location for this iSCSI target to reside. I am going to utilize my D volume for this storage:

    How to do it…

  8. On the next screen, specify a name for your iSCSI virtual disk. You can see that it is going to create and utilize a VHDX file for this storage. Nice!
  9. Now we specify the iSCSI Virtual Disk Size. Read over the text on this screen so that you understand the different types of disks and sizing available to you. For our recipe, we are setting up a Fixed size disk with a size of 10 GB:

    How to do it…

  10. Since this is our first iSCSI target on this server, the New iSCSI target option should be selected for you. Click Next.
  11. Create a name for the iSCSI target. This is the name that you will use on the iSCSI initiator server later in order to connect to the storage. I am calling mine Database1.
  12. Now on the Access Servers screen, click the Add… button in order to specify which initiators will later connect to this target. We are going to connect to this storage from a server called FILE2, so I am adding that server to the list here:

    How to do it…

  13. When you add a server to this list and click OK, you will notice that it is specified on the Access Servers screen with an iSCSI Qualified Name (IQN) value that you did not specify. This is a unique identifier for the server to the iSCSI environment and is a normal behavior. Go ahead and click Next.
  14. If you would like to utilize CHAP or Reverse CHAP in order to authenticate connections between the initiator and target, you can use the next screen to specify user names and passwords for those authentications. For the purposes of testing this out quickly and in a simple manner, we are not setting anything on this page and are only clicking Next.
  15. Review the settings and click the Create button to finish setting up your iSCSI target. This server is now running as a target and is waiting for a connection to it from our iSCSI initiator server.

How it works…

In this recipe, we are starting to figure out how iSCSI might benefit our environment. In addition to the scenario I discussed, where our database server requires a constant drive letter connection to remote storage, there are some other common utilizations for iSCSI connections. You could use iSCSI connections in order to consolidate storage. For example, take multiple servers that have locally attached storage and map them to iSCSI storage blocks. You could then move the physical storage to your iSCSI target for all application servers involved. They would still access the same data, and the applications running on those servers wouldn't know any different, but the physical storage would now be consolidated into a centralized area for safekeeping and better data management.

iSCSI is also an interesting use case for diskless booting. You could equip diskless computers with NICs that are iSCSI-ready, and those computers could boot over the network, over iSCSI, to virtual disks sitting on the iSCSI target.

See also

Check out the following links for some more great information on iSCSI:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.104.53