Top Banner
Design and Implementation of a Linux SCSI Target for Storage Area Networks Ashish A. Palekar Anshul Chaddha, Trebia Networks Narendran Ganapathy, 33 Nagog Park Robert Russell Acton, MA 01720 UNH-IOL Durham, NH – 03824
21

Linux Conf Presentation

Jul 10, 2016

Download

Documents

AllenMamaril
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Linux Conf Presentation

Design and Implementation of a Linux

SCSI Target for Storage Area Networks

Ashish A. Palekar Anshul Chaddha,Trebia Networks Narendran Ganapathy,33 Nagog Park Robert RussellActon, MA 01720 UNH-IOL

Durham, NH –[email protected] {achadda, ng3, rdr}@iol.unh.edu

Page 2: Linux Conf Presentation

Overview• Motivation and Objectives• Architecture• Design Details

– User Space Target Emulator– Kernel Space Target Emulator

• Implementation Issues• Configuration Tool• Applications• Conclusions and Future Work

Page 3: Linux Conf Presentation

Motivation and Objectives

• Internet + E-Commerce = Data• Storage Area Networks – Concept• Emergence of Protocols

– Fibre Channel– SEP (SCSI Encapsulation)– iSCSI (Internet SCSI)– iFCP– Infiniband

• Linux as a SCSI Target ?

Page 4: Linux Conf Presentation

SCSI Protocol Overview

Page 5: Linux Conf Presentation

SCSI Initiator Mid-LevelUser Space

Kernel SpaceSD

disksBlock device

Lower Level

SRcdrom/dvd

Block device

STtapesChar

device

SGgeneric

Char device

Upper Level

Mid Level

SCSI Unifying LayerConversion of command requests into SCSI requests.Hands off these requests to the low level driver.

Host Bus Adapter Drivers

Drivers for Non-SCSI

buses

Page 6: Linux Conf Presentation

SCSI Initiator and Target

Page 7: Linux Conf Presentation

Software Design Aspects

Basic Code Paths:1. Registration /

Deregistration2. SCSI Read Type

Commands3. SCSI Write Type

Commands4. SCSI Task Management

Commands5. Configuration of the SCSI

Target

Page 8: Linux Conf Presentation

Step One: User Space Target Emulator

SCSI Mid-level

SEP Initiator

SEP Target Front-end

interpret_cmdhandle_SEP_connectionscsi_server

SCSI Target Emulator

handle_file_iohandle_generic_cmdhandle_SCSI_cmd

sep_disk_file

scsi_generic

API

TCP/IP Connection

SCSI Mid-level

qlogicfc driver (for QLA 2200)

Fibre Channel Disk (Seagate)

SD disks (Block

devices)

user spacekernel space

User Level Application to generate SCSI activity e.g., cp

Page 9: Linux Conf Presentation

Registration Interface

Page 10: Linux Conf Presentation

Deregistration Interface

Page 11: Linux Conf Presentation

Handling a SCSI Read Type Command

Page 12: Linux Conf Presentation

Handling a SCSI Write Type Command

Page 13: Linux Conf Presentation

“Processing” a SCSI Command“Processing” – different handle_cmd functions1. I/O to and from memory MEMORYIO

- Return junk data on READ commands- Drop data from WRITE commands- Used for protocol performance testing

2. I/O to and from a file FILEIO- Open a file on the local system- Block READs and WRITEs to the file- “Safe” mode for driver testing- Abstract view IDE SCSI conversion

3. I/O to and from a disk GENERICIO/DISKIO- “Bridge” mode of operation- Protocol conversion between different SCSI

Transport Protocols

Page 14: Linux Conf Presentation

“Processing” a SCSI Command

DISKIO

GENERICIO

Page 15: Linux Conf Presentation

Handling a SCSI Task Management Command

Page 16: Linux Conf Presentation

Implementation Details• Initiator side:

– Existent Fibre Channel Initiator used (QLogic ISP 2200 A)

– Front End Initiator drivers – SEP, iSCSI written

• Target Side:– Developed the SCSI Target Mid-Level– Developed Front End Target Drivers for

– Fibre Channel (QLogic ISP 2200 A)– SEP– iSCSI – draft ’06’ – upgrading to ’09’

– Linux TCP/IP stack used …

Page 17: Linux Conf Presentation

Target Configuration• Need

– Statistical information– Configuration Needs for individual driver– Interface for complex SAN management

tools• Mechanism

– “proc” file system• Usage

– iSCSI Login Negotiation Parameters

Page 18: Linux Conf Presentation

Conclusions• Input to Standards Bodies (IETF)

– Development of Frame Structure– Simplification of Login Process– Identifying potential performance issues– iSCSI State Diagram

• SCSI Target Mid-Level - Generic uses– IDE disks used as SCSI drives– Linux as a bridge

• Implementations used at Interop plugfests

Page 19: Linux Conf Presentation

Future/Current Work• Making STML/FETDs more robust• Upgrading iSCSI FETD to current

versions• IP-sec and Authentication (CHAPs)

for iSCSI• Submit for inclusion in kernel• “Storage Virtualization” interface• “Command Processing”

Page 20: Linux Conf Presentation

Acknowledgements

• SUN Microsystems• EMC• Trebia Networks• InterOperability Lab, UNH

Page 21: Linux Conf Presentation

Thank you

Downloads:http://www.iol.unh.edu/consortiums/fc/fc_li

nux.html