wintarget 配置教程(ZT)

wintarget 配置教程



这是我从wintarget的帮助摘出来的,大家都是什么都是从网上搜索,很少去看软件本身的帮助,我就copy过来,改了一下。希望对大家有用


一Install iSCSI
Initiator
Although several iSCSI initiators exist today, this document
focuses on the latest Microsoft iSCSI Initiator.
If you are not using the
Microsoft initiator, please refer to the appropriate vendor’s
documentation.
The following steps guide you through the installation process
of the Microsoft iSCSI Initiator.
Install this software on the computer
marked as the initiator in the Network Architecture
diagram.
1.Download the initiator
Microsoft iSCSI Software Initiator
Version 2.04
http://www.microsoft.com/downloads/details.aspx?FamilyID=12cb3c1a-15d6-4585-b385-befd1319f825&DisplayLang=en
2.Install
the initiator by accepting all default values in the setup wizard.
3.Reboot
the computer if the setup application requires it.
4.Open the iSCSI
Initiator Control Panel
applet:
Start -> Control Panel
-> iSCSI Initiator

5.Click on the General tab
and take note of the Initiator Node Name field.
This is the
Internet Qualified Name (IQN) of the initiator.(
你需要记住这个名字,等下配置wintarget,要用到)
You will need this value later when configuring
WinTarget.
6.Close the iSCSI Initiator Control Panel applet
by clicking OK.


二:Install
WinTarget

New WinTarget Installation
The steps
below guide you through the process of installing WinTarget for the first time.
Before you install WinTarget, make sure all applications are
closed.
1.
Start the WinTarget installation by double-clicking on the
setup binary.
2.
If you are evaluating WinTarget, accept all default
values in the installation wizard.
3.
If you have purchased WinTarget,
accept all default values in the installation wizard except the Customer
Information
screen where you will need to enter the license
key.
4.
On the Finish screen of the wizard, ensure that
the Launch WinTarget checkbox is marked.
5.
Click
OK to finish the installation.
6.
The main WinTarget
window opens.

三:Add Initiator to WinTarget
Before the
initiator can use the storage services from WinTarget you must first create a
Host entry for that initiator in WinTarget as described below.
1.
Open the
WinTarget console.
2.
Right-click on the Hosts node in
the left-hand pane and select Create New Host.
The
New Host wizard opens.
3.
Click Next on
the Welcome screen.
4.
Enter a name that uniquely
identifies this host (eg. “Initiator”).
You may optionally enter a
description for this host such as “Test initiator”.
Click
Next.
5.
Enter the initiator IQN.(就是上面图的那个名字)
It is
important that this IQN is the same as that on the initiator side or you will
get an error when the initiator attempts to log into WinTarget.
Click
Next.
6.
Click Finish to add the
initiator to WinTarget.
7.
The initiator appears in the Hosts
list.

四:Create iSCSI Disk
Now that you have added the
initiator to WinTarget, the next step is to create a virtual iSCSI disk for the
initiator.
The steps below outlines this process.
1.
Open the WinTarget
console.
2.
Right-click on the Devices node in the
left-hand pane and select Create New WinTarget Disk.
The
New WinTarget Disk wizard opens.
3.
Click
Next on the Welcome screen.
4.
Select
the Create WinTarget Disk from a File option and click
Next.
5.
Enter the path to the file that will hold the
content of the virtual iSCSI disk, such as “C:\TestDisk.wtd”.
Click
Next.
6.
Specify the size of the iSCSI disk in megabytes
(eg. 500 MB), then click Next.
7.
Enter a user-friendly
description of the disk such as “Test Disk”.
Click
Next.
8.
In the Assign To screen, click
on Add to assign this disk to the initiator created in the
Add Initiator to WinTarget section.
The Select Host
dialog opens.
9.
Select the host created previously and click
OK.
10.
Click Next when you’re back to
the Assign To screen.
11.
Click Finish
to create the iSCSI disk.

五:Access iSCSI Disk
On the
initiator computer, you can now log into WinTarget and use the virtual iSCSI
disk that has been created for it.
The steps below guide you through this
process.
Log into WinTarget
1.
Open the
Microsoft iSCSI Initiator Control Panel
applet:
Start -> Control Panel -> iSCSI
Initiator

2.
Click on the Discovery
tab.
3.
In the Target Portals section of the page, click
on Add.
The Add Target Portal dialog
opens.
4.
Enter the IP address of the WinTarget server and click
OK.
5.
Click on the Targets tab, a target should be
listed with a Status set to Inactive.
6.
Select this target and
click on Log On.
The Log On Target dialog
opens.
7.
Click OK to log into WinTarget.
8.
The
Status should now change to Connected.
9.
Close the iSCSI
Initiator Control Panel
applet by clicking on
OK.

Partition and Format iSCSI
Disk

1.
Open the Disk Management
console:
Start -> All Programs ->
Administrative Tools -> Computer Management

2.
Select the
Disk Management node in the left hand pane.
If the
Disk Management node is not visible, expand the
Storage node in the left-hand pane.
3.
The
Initialize Disk Wizard opens.
Complete the wizard by
accepting all default values.
4.
In the right-hand pane, scroll down until
you see the iSCSI disk.
You can identify this disk by looking at the disk
size, it should be slightly smaller than the size specified in Step 6 of the
Create iSCSI Disk section.
5.
Right click on the disk and select
New Volume.
The New Volume wizard
opens.
6.
Complete the wizard by accepting all default
values.
7.
You can now access this disk as if it was a local physical
disk.





Several protocols exist today that a disk
controller uses to communicate with connected disk drives such as ATA, SATA and
SCSI.
These are predefined standards that dictate how commands such as read
and write requests are packaged and sent between the controller and
drive.
iSCSI is a new protocol that extends the SCSI standards by
encapsulating SCSI commands in TCP/IP packets.
These commands are sent across
a TCP/IP network enabling servers to access storage that is located outside of
the reach of its physical hardware.
iSCSI opens up a vast array of solutions
such as consolidated storage, centralized backup and remote disaster
recovery.
In an iSCSI network, there are three components: a
target
, an initiator and a network
that interconnects the two.
The target is analogous to the disk drives in the
traditional locally attached storage model, it serves up the disks to the
initiator.
The initiator can be thought of as the traditional disk
controller, it uses the disks hosted by the target.
A TCP/IP network
interconnects the target and the initiator.
一:Install iSCSI
Initiator

Although several iSCSI initiators exist today, this
document focuses on the latest Microsoft iSCSI Initiator.
If you are not
using the Microsoft initiator, please refer to the appropriate vendor’s
documentation.
The following steps guide you through the installation process
of the Microsoft iSCSI Initiator.
Install this software on the computer
marked as the initiator in the Network Architecture
diagram.
1.Download the initiator
Microsoft iSCSI Software Initiator
Version 2.04
http://www.microsoft.com/downloads/details.aspx?FamilyID=12cb3c1a-15d6-4585-b385-befd1319f825&DisplayLang=en



2.Install
the initiator by accepting all default values in the setup wizard.
3.Reboot
the computer if the setup application requires it.
4.Open the iSCSI
Initiator Control Panel
applet:
Start -> Control Panel
-> iSCSI Initiator

5.Click on the General tab
and take note of the Initiator Node Name field.
This is the
Internet Qualified Name (IQN) of the initiator.(
你需要记住这个名字,等下配置wintarget,要用到)
You will need this value later when configuring
WinTarget.
6.Close the iSCSI Initiator Control Panel applet
by clicking OK.

---

Part 1 iSCSI基础介绍

首先简单的介绍一下iSCSI,iSCSI是一种新兴的存储协议,全称是Internet SCSI,和传统的SCSI设备不同,iSCSI存储设备使用IP网络来进行数据的传输。这样的好处就是网络中的任何一台主机都可以使用iSCSI存储设备作为自己的存储设备,缺点就是比较依赖IP网络的传输性能,所以通常情况下推荐在1000M网络中使 用iSCSI存储设备。
首先介绍一下iSCSI存储中所使用的组件。iSCSI存储使用以下三个组件:
发起方(Initiator):安装在需要使用iSCSI存储设备的主机上的客户端软件,提供连接iSCSI存储设备并进行数据读写的驱动程序;
目标(Target):iSCSI存储设备,提供数据存储服务;
入口(Portal):由IP地址和端口(默认为TCP 3260)组成,发起方通过入口来连接目标。

连接过程:
发起方通过入口来连接目标,目标通常通过发起方的IQN(发起方完全限定名称)来识别发起方的连接。此外,你还可以配置CHAP身份验证和IPSec加密,通常情况下,不推荐使用IPSec加密,更占用服务器性能。

微软很早以前已经开始了对iSCSI存储设备的支持,目前最新的发起方应用程序版本为2.01 (build 1748),大家可以在

http://www.microsoft.com/downloads/details...&DisplayLang=en
下载,支持在Windows XP Pro SP1及其后版本、Windows Server 2003及其后版本、Windows 2000 SP3及其后版本进行安装。


而Wintarget则是软件iSCSI解决方案中的佼佼者,不过微软已经于上周把Wintarget收购了,估计会将Wintarget的功能整合在Windows Storage Server的下一代版本中。 Part2 Wintarget安装和配置


Wintarget本身的安装非常简单,一直next即可。在Wintarget中主要需要做以下两个配置:
1、创建并配置主机(即Initiator);
2、配置Wintarget Disk,然后分配给相应的主机使用,此时当对应的Initiator连接上Wintarget后,即可使用Wintarget分配给它的Disk。你也可以通过R2中的San存储管理器来创建Wintarget Disk,只是只能创建基于文件的Disk,后面再详细介绍。


1、创建并配置主机
在Wintarget MMC中右击Host,选择New host,在欢迎页点击下一步;
在指定主机名页,输入主机名和描述,

Click for normal size...



在识别方式页,你可以直接输入Initiator的IQN来作为发起方的识别方式,不过在此我选择更方便的方式,因此点击高级,
Click for normal size...


然后点击添加,选择IP地址,
Click for normal size...

然后输入发起方的IP地址;然后点击确定;
Click for normal size...


然后点击下一步;再点击确定。此时,主机创建完成。

在Host的属性中,你还可以设置是否对此host启用chap身份验证以及配置它的传输性能等;你也可以同时为一个主机配置多个发起方连接程序,这样便于群集的使用。但是,不要在多个发起方上同时读写此目标。 
2、创建并配置Wintarget Disk
Wintarget Disk即分配给发起方使用的存储空间。在Wintarget MMC中右击Device,选择创建Wintarget disk,然后点击下一步;
在选择类型页,你可以选择从卷或文件创建disk,如果从卷,则可以利用本地硬盘上的未划分分区的磁盘空间来创建Wintarget Disk;如果从文件,则将Wintarget Disk保存为本地已划分分区上根目录下的文件。你可以根据自己的需要来创建,通常情况下最好使用从卷划分。如果是在R2中的SAN存储管理器中通过Wintarget来创建LUN,将从文件来创建Wintarget Disk。
Click for normal size...


在此我选择为从卷划分,然后在选择卷页,选择一个未划分分区的磁盘空间,点击下一步;
Click for normal size...



然后输入磁盘尺寸,next,
Click for normal size...

输入磁盘名称,next;
Click for normal size...


在分配到页,点击添加按钮来将此磁盘分配给刚才创建的主机,然后next,
Click for normal size...

确定。 

此时,Wintarget上的配置已经完成,现在进入Initiator(发起方)的配置。
首先从

http://www.microsoft.com/downloads/details...&DisplayLang=en

下载Initiator应用程序并安装,完成后在桌面和控制面板中都有一个iSCSI Initiator程序,双击它进行配置,首先设置Wintarget的入口,在Discover标签点击添加按钮,
Click for normal size...


然后输入Wintarget的IP地址,端口为默认的3260,
Click for normal size...

如果此发起方和Wintarget上所设置的Host一致,则会在Target标签显示现有的目标,如图所示,
Click for normal size...

点击Log On登录,
Click for normal size...

成功登录后如下图所示:
Click for normal size...

此时发起方程序会将Wintarget中为Host所分配的Wintarget Disk作为本地磁盘一样进行连接,你现在需要在计算机管理中为此磁盘进行初始化和创建分区,完成后即可像本地磁盘一样进行读写。 
Part 3 和SAN存储管理器一起使用

如果没有使用SAN存储管理器,则发起方只能使用Wintarget中分配的磁盘,而不能自行创建LUN。通过SAN存储管理器,你就可以通过Wintarget自行创建、分配LUN。


首先,你需要和上面的过程一样,在Wintarget上创建host和disk,然后在客户端进行以下操作:
安装Initiator程序;
安装SAN存储管理器;
安装Wintarget的VDS驱动,在安装VDS驱动的过程中要求你输入一个用户账户,此账户必须在本地主机和Wintarget上都具有管理员权限。


当安装好VDS驱动时,你进入SAN存储管理器中就可以看到Wintarget的子系统,默认情况下它会在本地进行广播来搜索Wintarget的入口,你也可以在iSCSI Initiator中预先配置入口。

Click for normal size...



关于SAN存储管理器中的具体操作可以参考
R2使用指南之二:SAN存储管理器
http://www.winsvr.org/info/info.php?sessid=&infoid=49

这篇文章本身就是通过Wintarget实现的。

需要注意的几点:
1、在SAN存储管理器中可以从Wintarget主机上创建LUN,但是它创建的LUN只能存储在文件中;
2、对于从卷创建的Wintarget Disk,SAN存储管理器中可以执行的管理方式比较单一,只能分配、删除等。 

 鉴于Wintarget已经被收购,我这篇文章也写的很简单。

Wintarget的功能其实很强大,也很好用。非常便于你做群集或者提供存储设备,通过它,可以把你的Windows Server当做iSCSI SAN来使用。最后,提醒大家一点,Wintarget对于本机是无效的,它只能为其他主机提供服务,而不能为自己提供提供服务。


Related links:

用于修复 Windows Server 2003 中各种卷影复制服务问题的更新已推出
http://support.microsoft.com/kb/891957
原文地址:https://www.cnblogs.com/liangqihui/p/2678786.html