如何在Windows Server 2016上配置iSCSI启动器

In this article, I am going to explain how we can configure the iSCSI initiator and use it to connect to the iSCSI virtual disk on the target server.

在本文中,我将解释如何配置iSCSI启动器并使用它来连接到目标服务器上的iSCSI虚拟磁盘。

In my previous article, Installing and configuring the iSCSI target Server on Windows Server 2016, I have explained the following:

在我之前的文章《 在Windows Server 2016上安装和配置iSCSI目标服务器》中 ,我解释了以下内容:

  1. Install iSCSI target role on windows server 2016

    在Windows Server 2016上安装iSCSI目标角色
  2. Create a new iSCSI virtual disk and configure the access server

    创建一个新的iSCSI虚拟磁盘并配置访问服务器

The iSCSI initiator (Internet small computer system interface) is used to connect to the iSCSI based external storage. Workstations and servers use it to mount the target-based volume as a local volume and can be managed accordingly. It uses an IP-based Ethernet network to communicate with the iSCSI target server.

iSCSI启动器(Internet小型计算机系统接口)用于连接到基于iSCSI的外部存储。 工作站和服务器使用它来将基于目标的卷安装为本地卷,并可以进行相应的管理。 它使用基于IP的以太网络与iSCSI目标服务器进行通信。

In the previous article, I have already configured the iSCSI target server and created a virtual disk on “SAN.Dc.Local” server. We will configure the initiator on “Dc. Local” server and connect the virtual disk that is created on SAN.DC.Local. Following is the setup that I have created on my workstation.

在上一篇文章中,我已经配置了iSCSI目标服务器并在“ SAN.Dc.Local ”服务器上创建了虚拟磁盘。 我们将在“ DC ”上配置启动器 本地 ”服务器,并连接在SAN.DC.Local上创建的虚拟磁盘。 以下是我在工作站上创建的设置。

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目标服务器

启用iSCSI启动器 (Enable the iSCSI initiator)

By default, the iSCSI service is stopped. To use it, we must start the service. To start the service, open “Server Manager” -> Click on “Tools” and select “iSCSI initiator”. See the following image:

默认情况下,iSCSI服务已停止。 要使用它,我们必须启动服务。 要启动该服务,请打开“ 服务器管理器 ”->单击“ 工具 ”,然后选择“ iSCSI启动器 ”。 见下图:

如何在Windows Server 2016上配置iSCSI启动器

A message box opens that says, we must start the services on the computer, and the service will be started automatically.” Click on Yes. See the following image:

将打开一个消息框,提示我们必须在计算机上启动服务,然后该服务将自动启动。” 点击 。 见下图:

如何在Windows Server 2016上配置iSCSI启动器

Alternatively, you can start the service from Administrative tools. Open Control Panel -> Administrative Tools -> open Services -> Find “Microsoft iSCSI Initiator Service” service. Right-click on it and click on Start. See the following image.

或者,您可以从管理工具启动该服务。 打开控制面板 -> 管理工具 ->打开服务 ->查找“ Microsoft iSCSI Initiator Service ”服务。 右键单击它,然后单击开始 。 参见下图。

如何在Windows Server 2016上配置iSCSI启动器

配置iSCSI启动器 (Configure iSCSI initiator)

To configure the initiator, open the Server manager -> Click on tools and click on “iSCSI initiator”. A dialog box to configure it opens. Here you can specify the IP Address or DNS Name of the iSCSI target server OR iSCSI target portal. See the following image:

要配置启动器,请打开服务器管理器 ->单击工具,然后单击“ iSCSI启动器 ”。 将打开一个配置对话框。 在这里,您可以指定iSCSI目标服务器或iSCSI目标门户的IP地址或DNS名称。 见下图:

如何在Windows Server 2016上配置iSCSI启动器

To connect to the iSCSI virtual disk, enter the DNS or IP Address of the iSCSI target server. We have configured the iSCSI target server on “SAN.DC.Local” hence, enter the DNS Name and click on “Quick Connect.” See the following image:

要连接到iSCSI虚拟磁盘,请输入iSCSI目标服务器的DNSIP地址 。 我们已经在“ SAN.DC.Local ”上配置了iSCSI目标服务器,因此,输入DNS名称,然后单击“ 快速连接”。 ”,请参见下图:

如何在Windows Server 2016上配置iSCSI启动器

As you can see in the following image, the initiator has been connected to the iSCSI virtual disk.

如下图所示,启动器已连接到iSCSI虚拟磁盘。

如何在Windows Server 2016上配置iSCSI启动器

Click on Done to close the dialog box.

单击“ 完成”关闭对话框。

Now to use the iSCSI virtual disk, we must initialize it. To do that, open Control Panel -> Open Administrator Tools -> Computer Management ->Click on “Disk management,” which is on the left pan of Computer Management Snap-in. See the following image:

现在要使用iSCSI虚拟磁盘 ,我们必须对其进行初始化。 为此,请打开控制面板 ->打开管理员工具 -> 计算机管理 ->单击“ 磁盘管理 ”,该磁盘位于“ 计算机管理”管理单元的左窗格 。 见下图:

如何在Windows Server 2016上配置iSCSI启动器

As you can see in the above image, an unallocated partition has been created. To use it first, we must bring it online. To do that, right-click on “Disk 1” and click on Online. See the following image:

如上图所示,已经创建了一个未分配的分区 。 要首先使用它,我们必须使其在线 。 为此,请右键单击“ 磁盘1 ”,然后单击“ 联机” 。 见下图:

如何在Windows Server 2016上配置iSCSI启动器

Once the disk is online, we must initialize it so that the logical disk manager can access it. To do that, right-click on “Disk 1” and click on “Initialize disk.” See the following image:

磁盘联机后,我们必须对其进行初始化,以便逻辑磁盘管理器可以访问它。 为此,右键单击“ Disk 1 ”,然后单击“ Initialize disk。 ”,请参见下图:

如何在Windows Server 2016上配置iSCSI启动器

A dialog box “Initialize Disk” opens. Click on OK.

将打开一个对话框“ Initialize Disk ”。 单击确定

如何在Windows Server 2016上配置iSCSI启动器

Once the disk is online, let us create a volume. To do that, right-click on “Disk 1” and click on “New Simple Volume.

磁盘联机后,让我们创建一个卷。 为此,请右键单击“ Disk 1 ”,然后单击“ New Simple Volume”。

如何在Windows Server 2016上配置iSCSI启动器

The New Simple Volume Wizard starts. The first screen shows details about the wizard. Click on Next. On Specify Volume Size screen, enter the desired size of the disk in text-box named, “Simple volume size in MB”. Click on Next. See the following image:

新建简单卷向导启动。 第一个屏幕显示有关向导的详细信息。 点击下一步 。 在“ 指定卷大小”屏幕上,在名为“ 以MB为单位的简单卷大小 ”的文本框中输入所需的磁盘大小 。 点击下一步 。 见下图:

如何在Windows Server 2016上配置iSCSI启动器

On the Assign Drive Letter or Path screen, you can specify the drive letter. Choose the desired drive letter from “Assign the following drive letter” drop-down box and click on Next. See the following image:

分配驱动器号或路径屏幕上,您可以指定驱动器号。 从“ 分配以下驱动器号 ”下拉框中选择所需的驱动器号,然后单击“ 下一步” 。 见下图:

如何在Windows Server 2016上配置iSCSI启动器

On the Format partition screen, you can specify the File system type, allocation unit size, and volume name. You can choose the FAT32 or NTFS file system type from the “File System” drop-down box. You can choose the size of the allocation unit from the “Allocation unit size” drop-down box and provide the desired volume name in the “Volume Label” text box. If you want to enable the file and folder compression, click on the “Enable file and folder compression” checkbox. Once all settings are configured, click on Next. See the following image:

在格式化分区屏幕上,您可以指定文件系统类型分配单元大小卷名 。 您可以从“ 文件系统 ”下拉框中选择FAT32NTFS文件系统类型。 您可以从“ 分配单位大小 ”下拉框中选择分配单位的大小 ,然后在“ 卷标 ”文本框中提供所需的卷名。 如果要启用文件和文件夹压缩,请单击“ 启用文件和文件夹压缩 ”复选框。 配置完所有设置后,单击“ 下一步” 。 见下图:

如何在Windows Server 2016上配置iSCSI启动器

On “Completing the New Simple Volume Wizard”, review all the settings and click on Finish to create a new volume. See the following image

在“正在完成新建简单卷向导 ”上,查看所有设置,然后单击“ 完成”以创建一个新卷。 见下图

如何在Windows Server 2016上配置iSCSI启动器

Once the volume has been created, you can access it from windows explorer, as you can see in the following image that the drive “iSCSI Share” has been created successfully.

一旦创建了卷,就可以从Windows资源管理器中对其进行访问,如下图所示,该驱动器“ iSCSI Share ”已成功创建。

如何在Windows Server 2016上配置iSCSI启动器

You can view the list of sessions connected to the iSCSI virtual disk using the server manager. To do that, log in to “SAN.DC.Local” and open Server Manager -> Click on “File and Storage Services” -> Click on iSCSI -> In iSCSI target section, you can see that the iSCSI target is connected. If you want more details of it, right-click on it and choose properties. See the following image:

您可以使用服务器管理器查看连接到iSCSI虚拟磁盘的会话列表。 要做到这一点,请登录到“SAN.DC.Local”,打开服务器管理器 - >点击“ 文件和存储服务” - >点击的iSCSI - >在iSCSI目标部分,你可以看到iSCSI目标已连接。 如果需要更多详细信息,请右键单击它并选择属性。 见下图:

如何在Windows Server 2016上配置iSCSI启动器

In the properties dialog box, select “initiators” In the list box, you can view the IQN of the initiator and session count by each IQN. See the following image:

在属性对话框中,选择“ 启动器 ”。在列表框中,您可以查看启动器的IQN和每个IQN的会话计数。 见下图:

如何在Windows Server 2016上配置iSCSI启动器

摘要 (Summary)

In this article, I have covered the following:

在本文中,我介绍了以下内容:

  1. Enable the iSCSI initiator service and use it to connect to the virtual disk that has been created on SAN.Dc.Local

    启用iSCSI启动器服务,并使用它连接到已在SAN.Dc.Local上创建的虚拟磁盘。
  2. How to create an iSCSI volume using the “Create Simple Volume” wizard

    如何使用“ 创建简单卷 ”向导创建 iSCSI卷
  3. View the list of initiators connected to the iSCSI virtual disk

    查看连接到iSCSI虚拟磁盘的启动器列表

翻译自: https://www.sqlshack.com/how-to-configure-an-iscsi-initiator-on-windows-server-2016/