配置iscsi服务器_在Windows Server 2016上安装和配置iSCSI目标服务器

配置iscsi服务器

In this article, I am going to explain how we can install and configure the iSCSI Target Server Role on Windows Server 2016. iSCSI stands for Internet Small Computer System Interface and iSCSI Target Server allows you to boot multiple computers from a single operating system (OS) image.

在本文中,我将解释如何在Windows Server 2016上安装和配置iSCSI Target服务器角色。iSCSI代表Internet小型计算机系统接口,iSCSI Target Server允许您从单个操作系统(OS)引导多台计算机。 ) 图片。

To demonstrate the deployment process, I have created two virtual machines on my workstation. I have installed Windows Server 2016 on the virtual machines. Following is the configuration of the virtual machines.

为了演示部署过程,我在工作站上创建了两个虚拟机。 我已在虚拟机上安装Windows Server 2016 。 以下是虚拟机的配置。

Host Name

IP Address

Operating System

Role

DC.Local

192.168.0.100

Windows Server 2016

iSCSI initiator

SAN.Dc.Local

192.168.0.130

Windows Server 2016

iSCSI Target Server

主机名

IP地址

操作系统

角色

DC本地

192.168.0.100

Windows Server 2016

iSCSI启动器

SAN.Dc.Local

192.168.0.130

Windows Server 2016

iSCSI目标服务器

First, let us create an iSCSI server. To do that, we must install the iSCSI server role.

首先,让我们创建一个iSCSI服务器。 为此,我们必须安装iSCSI服务器角色。

创建和配置iSCSI目标服务器角色 (Create and configure the iSCSI target server role)

To configure the iSCSI target server, we must install the “File and iSCSI Services” role in Windows Server. To do that, Open Server Manager and click on “Manage” and select “Add roles and features.” See the following image.

要配置iSCSI目标服务器,我们必须在Windows Server中安装“ File and iSCSI Services ”角色。 为此,请打开服务器管理器 ,然后单击“ 管理 ”,然后选择“ 添加角色和功能”。 ”参见下图。

配置iscsi服务器_在Windows Server 2016上安装和配置iSCSI目标服务器

On Add Roles and Features Wizard screen, you can see the detailed information about the wizard. We can skip this screen by checking on “Skip this page by default” checkbox. Click Next. See the following image:

在“ 添加角色和功能向导”屏幕上 ,您可以看到有关该向导的详细信息。 我们可以通过选中“ 默认情况下跳过此页面 ”复选框来跳过此屏幕。 单击下一步 。 见下图:

配置iscsi服务器_在Windows Server 2016上安装和配置iSCSI目标服务器

On Select Installation Type screen, you can choose to install a role on a dedicated computer or install a role on a virtual hard disk. We want to install the iSCSI service on a virtual machine; therefore, choose “Role-based or feature-based installation” Click on Next. See the following image:

在“选择安装类型”屏幕上,您可以选择在专用计算机上安装角色或在虚拟硬盘上安装角色。 我们要在虚拟机上安装iSCSI服务。 因此,选择“ 基于角色或基于功能的安装 ”, 然后单击“ 下一步”。 见下图:

配置iscsi服务器_在Windows Server 2016上安装和配置iSCSI目标服务器

On the “Select destination server” screen, we can choose the server or the virtual disk on which we want to install the desired role or feature. We want to install the iSCSI services on SAN.DC.Local hence, choose SAN.DC.Local from the list of servers within Server Pool.

在“选择目标服务器”屏幕上,我们可以选择要在其上安装所需角色或功能的服务器或虚拟磁盘。 我们要在SAN.DC.Local上安装iSCSI服务,因此,从Server Pool中的服务器列表中选择SAN.DC.Local

配置iscsi服务器_在Windows Server 2016上安装和配置iSCSI目标服务器

On the “Select server roles” screen, we can choose the desired role from the list of roles. We want to install File and iSCSI Services. To do that, expand, File and Storage Services, expand “File and iSCSI Services” and select “iSCSI Target Server”. See the following image:

在“ 选择服务器角色 ”屏幕上,我们可以从角色列表中选择所需的角色。 我们要安装文件和iSCSI服务。 为此,请展开“ 文件和存储服务 ”,再展开“ 文件和iSCSI服务 ”,然后选择“ iSCSI目标服务器 ”。 见下图:

配置iscsi服务器_在Windows Server 2016上安装和配置iSCSI目标服务器

On the “Select features” screen, we can choose the required feature that we want to install. We do not want to install any feature, hence click on Next. See the following image:

在“ 选择功能 ”屏幕上,我们可以选择要安装的必需功能。 我们不想安装任何功能,因此请单击“下一步”。 见下图:

配置iscsi服务器_在Windows Server 2016上安装和配置iSCSI目标服务器

On Confirm installation selections screen, you can see the summary of the roles and the list of features that you are going to install on the server. Some roles and features require to restart the server during the installation process so you can enable the option to restart the server automatically during installation. Review the details of roles and click on Install. See the following image:

在“ 确认安装选择”屏幕上,您可以看到角色摘要以及要在服务器上安装的功能列表。 某些角色和功能需要在安装过程中重新启动服务器,因此您可以启用该选项以在安装过程中自动重新启动服务器。 查看角色的详细信息,然后单击“安装”。 见下图:

配置iscsi服务器_在Windows Server 2016上安装和配置iSCSI目标服务器

Once installation completes, click on Close.

安装完成后,单击“ 关闭”

配置iscsi服务器_在Windows Server 2016上安装和配置iSCSI目标服务器

To verify that the iSCSI target server role has been installed successfully, open Server Manager and expand “File and Storage Services.” See the following image:

要验证是否已成功安装iSCSI目标服务器角色,请打开服务器管理器,然后展开“ 文件和存储服务” 。 见下图:

配置iscsi服务器_在Windows Server 2016上安装和配置iSCSI目标服务器

In the left pan, you can view the iSCSI target server that has been installed. See the following image:

在左窗格中,您可以查看已安装的iSCSI目标服务器。 见下图:

配置iscsi服务器_在Windows Server 2016上安装和配置iSCSI目标服务器

创建iSCSI虚拟磁盘 (Creating iSCSI Virtual disks)

Once the iSCSI target server has been configured, let us create an iSCSI virtual disk. To do that,

配置完iSCSI目标服务器后,让我们创建一个iSCSI虚拟磁盘。 要做到这一点,

  1. Launch Server Manager – expand “File and Storage services

    启动服务器管理器 –展开“ 文件和存储服务
  2. Click on “iSCSI

    点击“ iSCSI
  3. On the right pan, click on “Start the new iSCSI virtual disk wizard

    在右窗格中,单击“ 启动新的iSCSI虚拟磁盘向导

See the following image:

见下图:

配置iscsi服务器_在Windows Server 2016上安装和配置iSCSI目标服务器

New iSCSI disk wizard starts. On the “Select iSCSI virtual disk location” screen, you can choose the location of the virtual disk. If you have installed the iSCSI Target Server role on multiple servers, then you can choose the desired server from the list. The list of servers with the iSCSI target role will be populated automatically in the “Servers” text box. The disk volume can be selected from the “Select by Volume” list. You can also provide the custom path in the “Type a custom path” text box. We are going to create a virtual disk on the C drive of the SAN.DC.Local, hence choose C: from the “Select by Volume” textbox. Click on Next. See the following image:

新的iSCSI磁盘向导启动。 在“ 选择iSCSI虚拟磁盘位置 ”屏幕上,您可以选择虚拟磁盘的位置。 如果已在多个服务器上安装了iSCSI Target服务器角色,则可以从列表中选择所需的服务器。 具有iSCSI目标角色的服务器列表将自动填充在“ 服务器 ”文本框中。 可以从“ 按卷选择 ”列表中选择磁盘卷。 您也可以在“ 输入自定义路径 ”文本框中提供自定义路径 。 我们将在SAN.DC.LocalC驱动器上创建一个虚拟磁盘,因此从“ 按卷选择 ”文本框中选择C :。 点击下一步 。 见下图:

配置iscsi服务器_在Windows Server 2016上安装和配置iSCSI目标服务器

On the “Specify iSCSI virtual disk name” screen, you can provide the desired name of the virtual disk name. Click on Next. See the following image:

在“ 指定iSCSI虚拟磁盘名称 ”屏幕上,您可以提供所需的虚拟磁盘名称。 点击下一步 。 见下图:

配置iscsi服务器_在Windows Server 2016上安装和配置iSCSI目标服务器

On the “Specify iSCSI virtual disk size” screen, you can specify the size of the virtual disk. You can create any of the following disk types:

在“ 指定iSCSI虚拟磁盘大小 ”屏幕上,您可以指定虚拟磁盘的大小。 您可以创建以下任何磁盘类型:

  1. Fixed Size: When we choose the fixed size, the wizard creates the disk that has the size specified in the “Size” textbox. This disk type is useful when you want to run the application that involves high disk activity. When you add or remove the data from the disk, the size of the disk does not change

    固定大小:当我们选择固定大小时,向导将创建具有在“ Size ”文本框中指定的大小的磁盘。 当您要运行磁盘活动频繁的应用程序时,此磁盘类型很有用。 当您从磁盘添加或删除数据时,磁盘的大小不会改变
  2. Dynamically expanding: When we choose dynamically expanding disk type, the wizard creates a disk with a small size. Later, the size of the disk increases based on the volume of the data that has been added

    动态扩展:当我们选择动态扩展磁盘类型时,向导将创建一个较小的磁盘。 以后,磁盘的大小会根据已添加的数据量而增加
  3. Differencing: If you have a scenario when you want to create multiple child virtual disk in one parent disk. The changes should be made in child disks, and those changes can be revert. This setup can be configured using the differencing disk type

    差异 :如果您想在一个父磁盘中创建多个子虚拟磁盘,则有一个方案。 应当在子磁盘中进行更改,并且这些更改可以还原。 可以使用差异磁盘类型配置此设置

We want to create a disk that can be expanded based on the amount of the data added to the disk hence, choose “Dynamically expanding” disk type, enter the desired size of the disk in the “Size” textbox and click on Next. See the following image:

我们要创建一个可以根据添加到磁盘的数据量进行扩展的磁盘,因此,选择“ 动态扩展 ”磁盘类型,在“ 大小 ”文本框中输入所需的磁盘大小 ,然后单击“下一步”。 见下图:

配置iscsi服务器_在Windows Server 2016上安装和配置iSCSI目标服务器

On the “Assign iSCSI target” screen, we can provide the desired name of the iSCSI target. The iSCSI target name is used by the iSCSI initiators to identify the specific target. If you have created an iSCSI target, you can choose it from “Existing iSCSI target.” We have not created any target yet, so select “New iSCSI target” and click on “Next.” See the following image:

在“ 分配iSCSI目标 ”屏幕上,我们可以提供所需的iSCSI目标名称。 iSCSI启动器使用iSCSI目标名称来标识特定目标。 如果已创建iSCSI目标,则可以从“ 现有iSCSI目标 ”中选择它 ”我们尚未创建任何目标,因此选择“ New iSCSI target ”,然后单击“ Next”。 ”,请参见下图:

配置iscsi服务器_在Windows Server 2016上安装和配置iSCSI目标服务器

On the “Specify target name” screen, you can provide the name of the target that can be used by iSCSI initiators. Provide the desired name in “Name” textbox and click on Next. See the following image:

在“ 指定目标名称 ”屏幕上,您可以提供iSCSI启动器可以使用的目标的名称。 在“ 名称 ”文本框中提供所需的名称,然后单击“下一步”。 见下图:

配置iscsi服务器_在Windows Server 2016上安装和配置iSCSI目标服务器

On the “Specify Server Access” screen, you can specify the list of iSCSI initiators that can access the virtual disk. To add the iSCSI initiators, click on Add. See the following image:

在“ 指定服务器访问 ”屏幕上,您可以指定可以访问虚拟磁盘的iSCSI启动器列表。 要添加iSCSI启动器,请单击添加。 见下图:

配置iscsi服务器_在Windows Server 2016上安装和配置iSCSI目标服务器

By default, the iSCSI initiator cannot connect to the target server. We must install/enable iSCSI initiators. To connect to the iSCSI target server, we can use any of the following:

默认情况下,iSCSI启动器无法连接到目标服务器。 我们必须安装/启用iSCSI启动器。 要连接到iSCSI目标服务器,我们可以使用以下任一方法:

  1. Query initiator for computer ID: In “Query initiator for computer ID” text box, you can specify the fully qualified hostname of the computer that has iSCSI initiator. This method is supported by windows server 2008 R2 OR windows 7 or later operating systems

    用于计算机ID的查询启动器:在“ 用于计算机ID的查询启动器 ”文本框中,您可以指定具有iSCSI启动器的计算机的标准主机名。 Windows Server 2008 R2或Windows 7或更高版本的操作系统支持此方法
  2. IQN: You can specify the IQN of the machine that has an iSCSI initiator. IQN is a qualified name of the iSCSI. The format of the IQN is “<Type>.<Date>.<Naming Authority>.<string defined by naming authority>

    IQN :您可以指定具有iSCSI启动器的计算机的IQN。 IQN是iSCSI的合格名称。 IQN的格式为“ <类型>。<日期>。<命名权限>。<由命名权限定义的字符串>
  3. DNS Name: You can specify the DNS name of the computer where the iSCSI initiator has been installed

    DNS名称:您可以指定已安装iSCSI启动器的计算机的DNS名称。
  4. IP Address: If you want to use the iSCSI target from outside of the domain, we can specify the IP Address of the computer that has iSCSI initiator

    IP地址:如果要从域外部使用iSCSI目标,我们可以指定具有iSCSI启动器的计算机的IP地址
  5. Mac Address: You can also specify the MAC address of the computer that has an iSCSI initiator

    Mac地址: 也可以指定具有iSCSI启动器的计算机的MAC地址

We are going to connect the iSCSI target from DC. Local computer. To do that, on “Select a method to identify the initiator” screen, choose “DNS Name” from the type drop-down box and enter “DC.Local” in “Value” text box and click on OK to close the screen. See the following image:

我们将从DC连接iSCSI目标 本地计算机。 为此,在“ 选择一种方法来标识启动器 ”屏幕上,从类型下拉框中选择“ DNS名称 ”,然后在“ ”文本框中输入“ DC.Local ”,然后单击“ 确定”以关闭屏幕。 见下图:

配置iscsi服务器_在Windows Server 2016上安装和配置iSCSI目标服务器

Back to the “Specify Server access” screen, you can see that the initiator has been added to the list. Click on Next. See the following image:

返回到“ 指定服务器访问 ”屏幕,您可以看到启动器已添加到列表中。 单击下一步。 见下图:

配置iscsi服务器_在Windows Server 2016上安装和配置iSCSI目标服务器

If you want to enable CHAP (Challenge-handshake authentication protocol) or reverse CHAP, click on “Enable CHAP” and “Enable reverse CHAP” and provide username and password. We do not want to enable CHAP or Reverse CHAP, hence click on Next. See the following image:

如果要启用CHAP(挑战握手身份验证协议)或反向CHAP,请单击“ 启用CHAP ”和“ 启用反向CHAP ”并提供用户名和密码。 我们不想启用CHAP或反向CHAP,因此请单击“下一步”。 见下图:

配置iscsi服务器_在Windows Server 2016上安装和配置iSCSI目标服务器

On confirm selection screen, review all the settings, and click on “Create” to create an iSCSI virtual disk. See the following image:

在确认选择屏幕上,查看所有设置,然后单击“ 创建 ”以创建iSCSI虚拟磁盘。 见下图:

配置iscsi服务器_在Windows Server 2016上安装和配置iSCSI目标服务器

On the “View Result” screen, you can see that disk has been created successfully. You can close the window. See the following image:

在“ 查看结果 ”屏幕上,您可以看到磁盘已成功创建。 您可以关闭窗口。 见下图:

配置iscsi服务器_在Windows Server 2016上安装和配置iSCSI目标服务器

Once the disk has been created, you can see the list of iSCSI virtual disks in the server manager. See the following image.

创建磁盘后,您可以在服务器管理器中看到iSCSI虚拟磁盘的列表。 参见下图。

配置iscsi服务器_在Windows Server 2016上安装和配置iSCSI目标服务器

摘要 (Summary)

In this article, I have explained how we can install the iSCSI Target Server Role and configure the iSCSI Target Server on Windows Server 2016. In my next article, I will explain that how we can configure the iSCSI initiator and use it to connect to the iSCSI virtual disk. Stay tuned!

在本文中,我已经说明了如何在Windows Server 2016上安装iSCSI Target服务器角色并配置iSCSI Target服务器。在下一篇文章中,我将说明如何配置iSCSI启动器并使用它来连接到iSCSI虚拟磁盘。 敬请关注!

翻译自: https://www.sqlshack.com/installing-and-configuring-the-iscsi-target-server-on-windows-server-2016/

配置iscsi服务器