在第一部分讨论中,我将简要回答LUN和lun之间的区别,然后开始一个漫长的历史叙事,探讨恐龙仍在漫游SCSI环境的时间。 有一段时间,SCSI不再足以满足大数据存储容量需求的大幅增长。 被认为有利的是集中式,高可靠性和高可用性存储架构。 这就是光纤通道SAN的来源。在第一部分的延续中,我们将讨论如何为FC世界修改SCSI协议。
SCSI 地址
在SCSI中,lun在每个目标下仅是唯一的,并且不是独立的唯一标识符。 如果计算机具有多个SCSI适配器(总线),则每个适配器由唯一ID表示。 因此,使用由适配器ID,目标ID和lun(简称ASL)组成的精确地址来实现与任何SCSI设备的特定通信。
在光纤通道之前,一些SCSI供应商试图通过添加称为“通道”的参数在单个适配器中插入多条总线。然后完整地址变为ACSL。 尽管“通道”功能最终被丢弃(因此始终为零),但到目前为止,几乎所有操作系统在寻址设备时都使用ACSL惯例。 例如,在Linux机器中,在控制台输入“cat / proc / scsi / scsi”将列出每个存储设备的ACSL。
这种SCSI约定在所有当前的操作系统中都是根深蒂固的,无论连接是FC,SATA,SAS还是USB。 所有存储设备在访问磁盘时都使用SCSI约定和协议,即使几乎没有任何真正的SCSI硬件。 当将LUN配置给FC SAN中的主机时,它们必须使用旧的SCSI寻址方案。 幸运的是,从LUN到SCSI地址的映射是相当简单的。
光纤通道 SAN
如前所述,SAN代表“存储区域网络”,关键字是“网络”.SAN的优点是集中式存储系统可以向许多主机配置逻辑磁盘(或LUN)。 这通过光纤通道交换机以“网络”方式执行,其中多个主机通常通过这些交换机连接到存储系统。 SAN中的存储系统大多是RAID或一些类似的虚拟化存储系统,其中由存储控制器创建逻辑磁盘并将其分配给特定主机。
因为“逻辑磁盘”是一个太尴尬的术语,然后“LU”又太模糊,所以“LUN”已成为这些磁盘的首选昵称。 LUN将创建为独立的逻辑磁盘,然后分配给主机。 一旦分配给主机,就好像在主机和这些磁盘之间直接连接了一个SCSI电缆。 就主机而言,这些都是SCSI磁盘,就像以前的一样。
从SAN,每个主机都有自己的LUN。 这些LUN不一定永久设置到特定主机。 分配可以很容易地改变。 此外,在群集配置中,将同一组LUN配置给同一群集的所有节点。 对于这些主机,就好像它们各自具有连接到同一组LUN的SCSI电缆。 配置或分配将如何工作? 这就导致了LUN Masking 的概念。
LUN Masking & lun
In an FC SAN, each host has one or more FC initiator ports, and each port has a WWPN (World Wide Port Name). A host is identified by its initiator WWPNs. An FC storage system has multiple FC target ports, also identified by WWPNs. When a set of LUNs are provisioned to a host, this is accomplished by “LUN Masking” the LUNs to the initiator WWPNs of that host, through certain target ports.
What this means is that the storage controller is instructed to only allow commands from specified initiators to be able to access these LUNs. Some storage may even allow administrators to specify to which target ports these commands are allowed. This “masking” allows the LUNs to be only visible to the assigned initiators.
Furthermore, when these LUNs are provisioned to the host, a unique logical unit number (lun), is assigned to each LUN. The assignment is usually handed out in a consecutive manner, but this is not mandatory. One can see this addressing scheme fits right into the original SCSI addressing convention, with initiator, target, lun, forming what we call the I-T-L, providing a unique SCSI address.
Multipath & GUID
Since there are often multiple initiators in a host, and since storage may be provisioned through multiple targets, it follows that the same set of LUNs may be accessed by multiple I-T-L paths. Most of the time, only the I and T are different, but it is possible (though rare) that the lun assignment number can be different when assigned to different initiators, even on the same host.
This further demonstrates how tenuous the logical unit number is and shows how some rules of the old SCSI world no longer apply. When multiple paths can lead to the same set of LUNs, a unique identifier must be used to make sure the correct LUN is being accessed through various paths. This is where the various types of “Vital Product Data” of the LUN is required, so that globally unique identity information is provided for each individual logical unit.
One of the most common types of unique identifiers used is the NAA identifier string, which can be loosely called GUID, or UID, or global unique ID. The NAA, however, doesn’t seem to have a standard nomenclature, other than it is generally a 16 byte number, and that it is represented by a 32 digit hexadecimal string.
This identification information is what the multipath driver uses to consolidate the paths for individual LUNs. It is retrieved in the form of an inquiry command from various pages. From there, regardless what the ACSL paths are, the “GUID” is the only identity it uses to decide which LUN comes from what paths. In this sense the logical unit number is not even part of the identity information.
After all this protracted rambling, I assume these concepts of lun, LUN, and GUID are now as clear and self-explanatory as Fermat’s Last Theorem. As we mentioned, this information is provided for the intention of paving the way for the subsequent descriptions on the new and groundbreaking product features coming up for the data migration product, DMS, from Cirrus Data. They are for destination auto-storage allocation, and for true zero-downtime migration, including cutting over to new storage. These features will bring the technology of data migration to a whole new level.