LIO -SCSI target

By the end of 2010, LIO project selected to become the new SCSI target kernel mode, replace the original project STGT user mode. There were two major competing projects (LIO and SCST), we are trying to incorporate the mainline kernel code. This article will compare the two projects, and to try to describe all of them offer something.
What is SCSI Target?

SCSI subsystem uses a client - server (C / S) model. Typically, a computer is a client of this model, known as Initiator (Initiator), to target (target) to initiate block operation request, the target is typically a memory device. The Target SCSI subsystem may allow a computer as a SCSI storage devices to operate in response to the storage request node other SCSI Initiator. So that you can customize SCSI storage devices, storage devices and make work a more "intelligent" the.

Examples are an intelligent SCSI Target Data Domain online backup apparatus having a data de-duplication function, save space. Functionally the device is a SCSI target, but it is actually a smart computer, only those data blocks are not stored, and the data already exists, just increment the reference count, then this is written only those last backup there block change. On the other side, initiator seen in SCSI device is connected to a common, shared SCSI storage device, just use any backup software, backup write to the target line.

The most common implementation SCSI subsystem is iSCSI target server, it uses standard TCP / IP to encapsulate SCSI commands to a SCSI device via a network. Most SCSI target in the initial project will be the first to support the iSCSI protocol. Because this matter between the iSCSI initiator and iSCSI target need only a network connection, almost all computers can be used, support for it does not require any special hardware. However, most of the SCSI target can support existing initiator cards, so if you and a Fiber Channel, SAS or parallel SCSI card, SCSI target may be a particular project can support these devices SCSI bus.
The current state of the

current Linux kernel's SCSI subsystem uses STGT to implement SCSI target function; STGT in late 2006, by the Fujita Tomonori introduced. It has a library in the kernel, with the target drive to work in the kernel. And all the target process in the user space is complete, which could bring back some performance bottlenecks.

There has not been incorporated into two SCSI target to achieve the kernel g considered for replacement STGT: LIO and SCST. SCST at least in 2008, tried to push into the Linux kernel. STGT project at that time that the sea can be a slightly longer period of time kernel services. But over time, STGT design limitations to be found, and have alternatives available. The main condition to replace SCSI target subsystem is defined by James Bottomley, he is the SCSI defenders, under the following conditions:

    it will replace out existing STGT, because only one SCSI target infrastructure.
    To use a modern-based control and configuration of sysfs.
    Code to be scrutinized to determine clean enough, you can enter the kernel.

The first condition is a proven too harsh, will inevitably undermine the entire ABI. Therefore, the current goal becomes finding a way to make STGT a smooth transition to the new user interface to come up.

LIO alternative STGT project started in 2010 Linux Storage and File System Summit (LSF 2010). Cristoph Hellwig volunteer to review and clean up the code, the code he will try to reduce to less than one million lines, so that it can be incorporated into the kernel.
Comparing

two projects have provided their properties comparison chart on their official website (LIO and SCST). However, before discuss their differences, similarities first look at it. Both projects have achieved a SCSI target a core kernel mode. They offer a local SCSI target similar loop device, which makes use of them to create a virtual target device becomes very easy. Both projects are supported by iSCSI, this is their first project is the most important motivation.

Two back-end storage management projects can be carried out in the kernel space or user control. Back-End Storage Manager allows administrators to control how the device can target output service to the initiator. For example, pass-through to allow the rear end of a SCSI hardware directly provided to the user, without any details of the block out of the device; and virtual-disk allows the rear end of a file as a virtual disk to output to the initiator.

Both projects are supported by a permanent reserve (Persistent Reservation, PR); this is a high-availability cluster for the storage device I / O isolation and storage device failover to take over the properties. By using the PR command, initiator can be built on a target, seize, inquiry, reset the reservation policy. In the failover process, the new virtual resources can reset the old virtual resource reservation policy, so that failover faster and more easily.
SCST

The main users SCSI target subsystem provide storage solutions storage company. Most of these storage solutions provide a plug and play device, can be very little configuration, even no configuration, it will be added to a storage network. SCST have a wider user base, this may be because they support more transmission.

SCST support Qlogic and Emulex's Fiber Channel cards, and LIO currently only supports Qlogic the target drive, and this drive is also still in beta testing truncated. SCST SCSI supports the RDMA protocol (the SRP), and claims for Fiber Channel Protocol (FCoE) Ethernet transmission, the development of the LSI, and a serial parallel SCSI Fiber Channel SCSI (SAS) protocol and the like is also leader. Currently, it has provided support for the virtual SCSI IBM pSeries. Currently, Scalable Informatics, Storewize, Open- e SCST target companies are based on the development of their plug and play device.

SCST can use asynchronous event notification (AEN) to notice changes session state. AEN is a SCSI target protocol features used for target-side event to inform the initiator, even when no service request can be. Thus initiator can target terminal when an event occurs, such as the device is inserted, removed or replaced when resizing medium can be notified. This allows initiator can see the changes target to plug and play manner.

SCST developers claim that their design is more in line with SCSI standards in robustness and security. SCSI protocol requirements, if you want to clear a initiator another initiator of reserve resources, reserve must be cleared notice, otherwise, more initiator may have to change the reservation data, it can destroy data. SCST can achieve security reserve, the release operation, to avoid similar incidents.

In accordance with the SCSI protocol, initiator and target can be determined through consultation transmission size. End of the initiator of a transmission error may cause the size of the communication device or the crash lock end target. SCST security mechanism can avoid this problem in the size or direction of transmission error. Their code has a good memory management strategy to avoid memory exhaustion. You can also limit the number of intervention target of initiator, to avoid excessive connection footprint. SCST also supports visibility management for each portal, that allows a target visible only to a group of initiator.
LIO

LIO project was originally based iSCSI target as the core, creating a generic SCSI support for iSCSI target subsystem. An important design goal is simplicity of the project, therefore, LIO easier to understand. In addition, LIO developers far more willing to cooperate and kernel developers, as James defenders Vladislav Bolkhovitin of SCST have pointed out:

    Come, let us make things put it simply: in this community, not to make Cook over direct you to the table on the line, you need to join this community to them, known as a part of the linux kernel community. The wider community oven is a necessary condition for the success of the open source project. Have you ever had such an opportunity: we have used in other parts of the sysfs, but STGT here, you said the sentence - this is something we interface with it better. The LIO is to ask what they need, and try to use the sysfs interface. Things are now, why would you be more inclined to STGT people LIO and represents a fuss of it?

LIO project also provides some SCST no or just beginning to develop properties. For example, LIO support asymmetric logical volume distribution (ALUA). ALUA allows administrators to manage target state and the target access path attributes. This allows multi-path routing mechanism can choose the best paths to access according to the state target, optimize the use of bandwidth. In other words, in a multipath environment, target administrator can be adjusted by changing the access path initiator state.

LIO sea supports Management Information Base (MIB), will manage SCSI devices easier. SCSI target device may be described in accordance with RFC4455 SCSI MIB manner to output management information that is collected SNMP agent. This feature extends the iSCSI device, when management has a lot of SCSI storage network benefits will be more apparent.

session, or check the connection layer: iSCSI connection error may occur at three levels. Error recovery work can be started in three levels, so you can begin to recover in the current level will not let errors to reach the next level. First, check the error recovery broken connections. In this case, iSCSI initiator driver will take the initiative to establish a new TCP connection to the target and it will tell target, SCSI command path has been changed to the new connected. This target can handle SCSI commands on the new connection. At this time, the upper SCSI drive has established new connections, new connection control information has been transmitted by something or unconscious. iSCSI session during which remain normal, not re-transformed state. LIO maximum support error recovery level (the ERL) is 2, that is to say, it can be in error recovery session, verify or tie layer. The SCST supports ERL 0, that is to say, it is a smart recovery session-level errors, all connected levels will go wrong SCSI drive level to deal with.

LIO also supports "multi-session connection" (MC / S). MC / S initiator allows multiple connections may be established on one or more physical paths and target. Thus, when a path error occurs, the established session without interrupting the session, direct the use of other paths. MC / S may also be used for load balancing between all connections. In this case, the session will remain sequential order on all the communication paths.

LIO also claim that their code is used in a lot of equipment, although they appear to the user and SCST almost.

Contrast is no performance comparison is not a complete contrast. SCST developers often release their performance data. However, compared to all data and STGT carried out. SCST comparison page that their performance is better than LIO, but the code is based on research rather than real-world test results. SCST accused the LIO does not publish data, (in my mind) does not have performance data for direct comparison between the two.

But in the end, the decision has been made, although there is little opposition voices. The task now is to put all the useful features but no LIO SCST transplant from LIO to come. Although somewhat controversial decision, but it seems they are trying to put the code once and communities can not be incorporated into the core kernel failed attempt.

Switched network

Guess you like

Origin www.cnblogs.com/pipci/p/11618548.html