SlideShare a Scribd company logo
1 of 28
Download to read offline
1
Agenda
• SCSI Targets
• STGT and Need of LIO
• LIO Introduction
• LIO Architecture
• LIO Directory structure
• Linux Storage Stack and LIO
• LIO Configfs Interface
• LIO Configfs tree
• LIO Command Line interface
• Use cases
• LIO users and partners
• Demo
2
SCSI targets
• The subsystem enables a computer node to behave as
a SCSI storage device, responding to storage requests
by other SCSI initiator nodes.
• Opens up the possibility of creating custom SCSI
devices and putting intelligence behind the storage.
• Extra functionality can be added on top of it – RAID,
snapshots, replication, HA, backup, data deduplication.
• Some existing SCSI target implementations – SCST, IET,
STGT
3
STGT and Need of LIO
• Many major distributions included STGT support
for userspace iSCSI target mode
• But is still unsupported in many commercial cases
• Major distributors wanted to see proper in-kernel
iSCSI target mode support and the community
offered out of tree modules for those interested
• Many developers, hardware vendors and users
wanted upstream kernel level iSCSI target mode
4
LIO Introduction
• TCM/LIO = Target core module / Linux- IO
• Open source Linux SCSI target
• Developed by Datera Inc. (Rising tide systems)
• Merged in Linux Kernel on March, 2011
• Requirements
o Linux Kernel version >= 2.6.38
• Supported by almost all Linux distributions by
default
5
LIO Introduction…Contd
• Supports SCSI Advanced features
o Persistent Reservations (SPC3/SPC4)
o ALUA (Asymmetric Logical Unit Assignment)
Both explicit and implicit
o T10 Data Integrity Format
o VAAI (vStorage APIs for Array Integration)
o Multiple connection per session (MC/S)
o iSCSI ERLs (Error Recovery Levels)
ERL 0 – Session Recovery
ERL 1 – Digest failure Recovery
ERL 2 – Connection Recovery
6
LIO Architecture
7
LIO Architecture…Contd
LIO consists of three group of modules :
• Fabric modules
o Frontend of LIO, encapsulates supported storage protocols
o Supports iSCSI, FC, FCOE, SRP, infiniband, vHost
• Storage modules / backstores
o Backend of LIO – provide access to imported devices via device drivers
o Supports –
Block ( HDDs, SSDs, LVM, Raids )
File
RAMdisk
• Core Functionality (target_core_mod.ko)
o Manages resources and memory
o Implements Persistent resvervation, ALUA and other core features.
8
Linux Storage Stack and LIO
9
VFS (Virtual File System)
Memory Management
ext3 ext4 others
Block Layer and Device Mapper
SCSI Layer
target
/dev/sdb
LIO core modules
FC iSCSI SRP
Block Fileio Raw
/dev/mapper/xxx /dev/vg/lv ext4
file
Logical Volume Manager
Low Level
drivers
user
Kernel
Storage
LIO directory Structure
10
Storage and
core modules
Core data
structures
declarations
LIO dir
structure
LIO Configfs Interface
• Configfs is a RAM-based virtual file system similar
to sysfs (but not same)
• Precisely, it is inverse of sysfs.
• Provide better control from userland
• Unlike sysfs, configfs allows to create, manage
and destroy kernel objects from user-space
• Typically mounted at /config or /sys/kernel/config
• LIO uses it for management and configuration of
storage and fabric modules.
11
LIO Configfs tree
12
LIO Command Line Interface
• lio_node and tcm_node
o Low level utility to manage storage and fabric configfs nodes
o Python based cli for developers, intergrators and advanced users
o Different tcm utilities available for fabric modules
• lio-dump, tcm-dump
o Save configuration
• target-cli
o Provide unified single node SAN configuration shell
o Fabric agnostic
o Exports functionality via RTSlib library and API
python-rtslib (python API library over configfs)
13
Use Cases
• HA clustering
• Openstack Cinder apis written to consume LIO
iSCSI storage
• IO virtualization(IOV) with KVM on IOV capable
hardware
• iSCSI LAN and WAN replication – DRBD and
pacemaker support
• iSCSI boot using PXE
• Implementing advanced features on top of LIO –
dedupe, thin provisioning, etc
14
LIO users and partners
15
Its DEMO time
16
iSCSI discovery and LIO
Data structures
17
STEP 2:
# Create 2 sparse files and we will export them as file based LUNs
dd if=/dev/zero of=/data/file1 bs=1K count=1 seek=10000
dd if=/dev/zero of=/data/file2 bs=1K count=1 seek=10000
file1
file2
STEP 1:
# Start the target rc script
# This will insert target core module (core Engine activated)
/etc/init.d/target start
iSCSI discovery and LIO
Data structures
18
fileio_0
disk1
disk2
default_tg_
pt_gp
default_tg_
pt_gp
STEP 3:
# Allocate fd_dev and create file based luns
# This will insert LIO’s fileio storage module
tcm_node --fileio fileio_0/disk1 /data/file1 10240000
tcm_node --fileio fileio_0/disk2 /data/file2 10240000
file1(fd_dev)
file2 (fd_dev)
se_hba
se_device
t10_alua_tg_
pt_gp
iSCSI discovery and LIO
Data structures
19
fileio_0
disk1
disk2
default_tg_
pt_gp
default_tg_
pt_gp
STEP 4:
# Add and bind LUN0 to 1st target port of portal group 1
lio_node --addlun <target_iqn1> 1 0 iscsi00 fileio_0/disk1
# Add and bind LUN0 to 2nd target port of portal group 1
lio_node --addlun <target_iqn2> 1 0 iscsi00 fileio_0/disk1
# Add and bind LUN1 to 1st target port of portal group 1
lio_node --addlun <target_iqn1> 1 1 iscsi01 fileio_0/disk2
# Add and bind LUN1 to 2nd target port of portal group 1
lio_node --addlun <target_iqn2> 1 1 iscsi01 fileio_0/disk2
file1(fd_dev)
file2 (fd_dev)
se_hba
se_device
t10_alua_tg_
pt_gp
tpgt_1
lun_0
lun_1
se_lun
iscsi_portal
_group
iSCSI discovery – Target port binding
20
TCM/LIO
file1 file2
lun 0
(iscisi00)
lun 1
(iscsi01)
target_port0 target_port1
==TARGET PORT BINDING==
lun0 binds to target_port0 and target_port1
lun1 binds to target_port0 and target_port1
iSCSI discovery and LIO
Data structures
21
fileio_0
disk1
disk2
default_tg_
pt_gp
default_tg_
pt_gp
file1(fd_dev)
file2 (fd_dev)
se_hba
se_device
t10_alua_tg_
pt_gp
tpgt_1
lun_0
lun_1
se_lun
iscsi_portal
_group
STEP 5:
# Create network portals for target ports
lio_node --addnp <target_iqn1> 1 <IP address:port>
lio_node --addnp <target_iqn2> 1 <IP address:port>
IP:port
IP:port
iscsi_np
iscsi_np
STEP 6:
# Disable iSCSI authentication of target portal group . Enabled by default
lio_node --disableauth <target_iqn1> 1
lio_node --disableauth <target_iqn2> 1
iSCSI discovery and LIO
Data structures
22
fileio_0
disk1
disk2
default_tg_
pt_gp
default_tg_
pt_gp
file1(fd_dev)
file2 (fd_dev)
se_hba
se_device
t10_alua_tg_
pt_gp
tpgt_1
lun_0
lun_1
se_lun
iscsi_portal
_group
STEP 7:
# Give access of bound luns to initiator and assign mapped lun numbers
lio_node –addlunacl <target_iqn1> 1 <initiator_iqn> 0 0
lio_node --addlunacl <target_iqn2> 1 <initiator_iqn> 0 1
lio_node --addlunacl <target_iqn1> 1 <initiator_iqn> 1 2
lio_node --addlunacl <target_iqn2> 1 <initiator_iqn> 1 3
IP:port
IP:port
iscsi_np
iscsi_np
lun_0 lun_2
lun_1 lun_3
Mapped
luns
STEP 8:
# Enable target portal group
lio_node --enabletpg <target_iqn1> 1
lio_node --enabletpg <target_iqn2> 1
23
TCM/LIO
file1 file2
lun 0
(iscisi00)
lun 1
(iscsi01)
target_port1 target_port2
IP:Port IP:Port
Network portals Target portal
group
iSCSI discovery – Network Portals and
Target Portal Group
lun 0
lun 1 lun 2
lun 3
lnitiator
iSCSI discovery and LIO
Data structures
24
fileio_0
disk1
disk2
default_tg_
pt_gp
default_tg_
pt_gp
file1(fd_dev)
file2 (fd_dev)
se_hba
se_device
t10_alua_tg_
pt_gp
tpgt_1
lun_0
lun_1
se_lun
iscsi_portal
_group
STEP 9:
# Initiator discovers and login to target ports to establish iscsi session with target
iscsiadm --mode discovery -t sendtargets --portal <IPaddr:Port>
iscsiadm --mode node --targetname <target_iqn1> --portal <IPaddr:Port> --login
iscsiadm --mode node --targetname <target_iqn2> --portal <IPaddr:Port> --login
IP:port
IP:port
iscsi_np
iscsi_np
lun_0 lun_2
lun_1 lun_3
Mapped
luns
iSCSI login
and session
creation
25
TCM/LIO
file1 file2
lun 0
(iscisi00)
lun 1
(iscsi01)
target_port1 target_port2
IP:Port IP:Port
Network portals Target portal
group
/dev/sda
/dev/sdb
/dev/sdc
/dev/sdd
Initiator
lun 0
lun 1 lun 2
lun 3
References
• RFC 3720
• LIO wiki page
• SCST vs LIO
• iscsi targets wiki page
• LIO-utils – github
• Configfs
• Targetcli and rtslib
• Cinder plugin for LIO
• Open iSCSI utility
• STGT project
• Distributed replicated block device
26
Questions ?
27
Author Biography
28
Kashish Bhatia – Member of Technical Staff, VMware
• Technology enthusiast, with most of the experience in storage domain
• Has exposure to other Linux subsystems like filesystems, block layer, Selinux
• Experience of working on distributed file system (Lustre) and storage virtualization
• Interests : open source, linux kernel hacking
• Published technical paper in Openstack Summit Nov 2013
• Bachelor of Engineering, Computer Science, Pune University
• To know more about Kashish connect on LinkedIn

More Related Content

What's hot

AOS Lab 10: File system -- Inodes and beyond
AOS Lab 10: File system -- Inodes and beyondAOS Lab 10: File system -- Inodes and beyond
AOS Lab 10: File system -- Inodes and beyondZubair Nabi
 
Unix file systems 2 in unix internal systems
Unix file systems 2 in unix internal systems Unix file systems 2 in unix internal systems
Unix file systems 2 in unix internal systems senthilamul
 
Linux directory structure by jitu mistry
Linux directory structure by jitu mistryLinux directory structure by jitu mistry
Linux directory structure by jitu mistryJITU MISTRY
 
Linux Kernel Tour
Linux Kernel TourLinux Kernel Tour
Linux Kernel Toursamrat das
 
Memory Forensics: Defeating Disk Encryption, Skilled Attackers, and Advanced ...
Memory Forensics: Defeating Disk Encryption, Skilled Attackers, and Advanced ...Memory Forensics: Defeating Disk Encryption, Skilled Attackers, and Advanced ...
Memory Forensics: Defeating Disk Encryption, Skilled Attackers, and Advanced ...Andrew Case
 
AOS Lab 7: Page tables
AOS Lab 7: Page tablesAOS Lab 7: Page tables
AOS Lab 7: Page tablesZubair Nabi
 
Linux Device Driver Training-TutorialsDaddy
Linux Device Driver Training-TutorialsDaddyLinux Device Driver Training-TutorialsDaddy
Linux Device Driver Training-TutorialsDaddyStryker King
 
AOS Lab 12: Network Communication
AOS Lab 12: Network CommunicationAOS Lab 12: Network Communication
AOS Lab 12: Network CommunicationZubair Nabi
 
Workshop - Linux Memory Analysis with Volatility
Workshop - Linux Memory Analysis with VolatilityWorkshop - Linux Memory Analysis with Volatility
Workshop - Linux Memory Analysis with VolatilityAndrew Case
 
Linux standard file system
Linux standard file systemLinux standard file system
Linux standard file systemTaaanu01
 
Next Generation Memory Forensics
Next Generation Memory ForensicsNext Generation Memory Forensics
Next Generation Memory ForensicsAndrew Case
 
The linux file system structure
The linux file system structureThe linux file system structure
The linux file system structureTeja Bheemanapally
 
11 linux filesystem copy
11 linux filesystem copy11 linux filesystem copy
11 linux filesystem copyShay Cohen
 
(120513) #fitalk an introduction to linux memory forensics
(120513) #fitalk   an introduction to linux memory forensics(120513) #fitalk   an introduction to linux memory forensics
(120513) #fitalk an introduction to linux memory forensicsINSIGHT FORENSIC
 
Linux kernel modules
Linux kernel modulesLinux kernel modules
Linux kernel modulesEddy Reyes
 
A fast file system for unix presentation by parang saraf (cs5204 VT)
A fast file system for unix presentation by parang saraf (cs5204 VT)A fast file system for unix presentation by parang saraf (cs5204 VT)
A fast file system for unix presentation by parang saraf (cs5204 VT)Parang Saraf
 

What's hot (20)

AOS Lab 10: File system -- Inodes and beyond
AOS Lab 10: File system -- Inodes and beyondAOS Lab 10: File system -- Inodes and beyond
AOS Lab 10: File system -- Inodes and beyond
 
Unix file systems 2 in unix internal systems
Unix file systems 2 in unix internal systems Unix file systems 2 in unix internal systems
Unix file systems 2 in unix internal systems
 
005 skyeye
005 skyeye005 skyeye
005 skyeye
 
4. linux file systems
4. linux file systems4. linux file systems
4. linux file systems
 
Linux directory structure by jitu mistry
Linux directory structure by jitu mistryLinux directory structure by jitu mistry
Linux directory structure by jitu mistry
 
Linux Kernel Tour
Linux Kernel TourLinux Kernel Tour
Linux Kernel Tour
 
Memory Forensics: Defeating Disk Encryption, Skilled Attackers, and Advanced ...
Memory Forensics: Defeating Disk Encryption, Skilled Attackers, and Advanced ...Memory Forensics: Defeating Disk Encryption, Skilled Attackers, and Advanced ...
Memory Forensics: Defeating Disk Encryption, Skilled Attackers, and Advanced ...
 
Basic Linux kernel
Basic Linux kernelBasic Linux kernel
Basic Linux kernel
 
Linux introduction
Linux introductionLinux introduction
Linux introduction
 
AOS Lab 7: Page tables
AOS Lab 7: Page tablesAOS Lab 7: Page tables
AOS Lab 7: Page tables
 
Linux Device Driver Training-TutorialsDaddy
Linux Device Driver Training-TutorialsDaddyLinux Device Driver Training-TutorialsDaddy
Linux Device Driver Training-TutorialsDaddy
 
AOS Lab 12: Network Communication
AOS Lab 12: Network CommunicationAOS Lab 12: Network Communication
AOS Lab 12: Network Communication
 
Workshop - Linux Memory Analysis with Volatility
Workshop - Linux Memory Analysis with VolatilityWorkshop - Linux Memory Analysis with Volatility
Workshop - Linux Memory Analysis with Volatility
 
Linux standard file system
Linux standard file systemLinux standard file system
Linux standard file system
 
Next Generation Memory Forensics
Next Generation Memory ForensicsNext Generation Memory Forensics
Next Generation Memory Forensics
 
The linux file system structure
The linux file system structureThe linux file system structure
The linux file system structure
 
11 linux filesystem copy
11 linux filesystem copy11 linux filesystem copy
11 linux filesystem copy
 
(120513) #fitalk an introduction to linux memory forensics
(120513) #fitalk   an introduction to linux memory forensics(120513) #fitalk   an introduction to linux memory forensics
(120513) #fitalk an introduction to linux memory forensics
 
Linux kernel modules
Linux kernel modulesLinux kernel modules
Linux kernel modules
 
A fast file system for unix presentation by parang saraf (cs5204 VT)
A fast file system for unix presentation by parang saraf (cs5204 VT)A fast file system for unix presentation by parang saraf (cs5204 VT)
A fast file system for unix presentation by parang saraf (cs5204 VT)
 

Similar to Linux io introduction-fudcon-2015-with-demo-slides

LinuxIO-Introduction-FUDCon-2015
LinuxIO-Introduction-FUDCon-2015LinuxIO-Introduction-FUDCon-2015
LinuxIO-Introduction-FUDCon-2015KASHISH BHATIA
 
Devicemgmt
DevicemgmtDevicemgmt
Devicemgmtxyxz
 
BKK16-103 OpenCSD - Open for Business!
BKK16-103 OpenCSD - Open for Business!BKK16-103 OpenCSD - Open for Business!
BKK16-103 OpenCSD - Open for Business!Linaro
 
Char Drivers And Debugging Techniques
Char Drivers And Debugging TechniquesChar Drivers And Debugging Techniques
Char Drivers And Debugging TechniquesYourHelper1
 
Monitoring IO performance with iostat and pt-diskstats
Monitoring IO performance with iostat and pt-diskstatsMonitoring IO performance with iostat and pt-diskstats
Monitoring IO performance with iostat and pt-diskstatsBen Mildren
 
embedded-linux-120203.pdf
embedded-linux-120203.pdfembedded-linux-120203.pdf
embedded-linux-120203.pdftwtester
 
Make Your Containers Faster: Linux Container Performance Tools
Make Your Containers Faster: Linux Container Performance ToolsMake Your Containers Faster: Linux Container Performance Tools
Make Your Containers Faster: Linux Container Performance ToolsKernel TLV
 
Inside Docker for Fedora20/RHEL7
Inside Docker for Fedora20/RHEL7Inside Docker for Fedora20/RHEL7
Inside Docker for Fedora20/RHEL7Etsuji Nakai
 
2008-09-09 IBM Interaction Conference, Red Hat Update for System z
2008-09-09 IBM Interaction Conference, Red Hat Update for System z2008-09-09 IBM Interaction Conference, Red Hat Update for System z
2008-09-09 IBM Interaction Conference, Red Hat Update for System zShawn Wells
 
DPDK Summit 2015 - Intel - Keith Wiles
DPDK Summit 2015 - Intel - Keith WilesDPDK Summit 2015 - Intel - Keith Wiles
DPDK Summit 2015 - Intel - Keith WilesJim St. Leger
 
Linux Char Device Driver
Linux Char Device DriverLinux Char Device Driver
Linux Char Device DriverGary Yeh
 
OMFW 2012: Analyzing Linux Kernel Rootkits with Volatlity
OMFW 2012: Analyzing Linux Kernel Rootkits with VolatlityOMFW 2012: Analyzing Linux Kernel Rootkits with Volatlity
OMFW 2012: Analyzing Linux Kernel Rootkits with VolatlityAndrew Case
 
My First 100 days with an Exadata (PPT)
My First 100 days with an Exadata (PPT)My First 100 days with an Exadata (PPT)
My First 100 days with an Exadata (PPT)Gustavo Rene Antunez
 
Design, Build,and Maintain the Embedded Linux Platform
Design, Build,and Maintain the Embedded Linux PlatformDesign, Build,and Maintain the Embedded Linux Platform
Design, Build,and Maintain the Embedded Linux PlatformSZ Lin
 
제3회난공불락 오픈소스 인프라세미나 - lustre
제3회난공불락 오픈소스 인프라세미나 - lustre제3회난공불락 오픈소스 인프라세미나 - lustre
제3회난공불락 오픈소스 인프라세미나 - lustreTommy Lee
 
Ssa0 g formation-ibm-xiv-technical-training
Ssa0 g formation-ibm-xiv-technical-trainingSsa0 g formation-ibm-xiv-technical-training
Ssa0 g formation-ibm-xiv-technical-trainingCERTyou Formation
 
Lec 10-linux-review
Lec 10-linux-reviewLec 10-linux-review
Lec 10-linux-reviewabinaya m
 

Similar to Linux io introduction-fudcon-2015-with-demo-slides (20)

LinuxIO-Introduction-FUDCon-2015
LinuxIO-Introduction-FUDCon-2015LinuxIO-Introduction-FUDCon-2015
LinuxIO-Introduction-FUDCon-2015
 
Devicemgmt
DevicemgmtDevicemgmt
Devicemgmt
 
BKK16-103 OpenCSD - Open for Business!
BKK16-103 OpenCSD - Open for Business!BKK16-103 OpenCSD - Open for Business!
BKK16-103 OpenCSD - Open for Business!
 
First steps on CentOs7
First steps on CentOs7First steps on CentOs7
First steps on CentOs7
 
Char Drivers And Debugging Techniques
Char Drivers And Debugging TechniquesChar Drivers And Debugging Techniques
Char Drivers And Debugging Techniques
 
Monitoring IO performance with iostat and pt-diskstats
Monitoring IO performance with iostat and pt-diskstatsMonitoring IO performance with iostat and pt-diskstats
Monitoring IO performance with iostat and pt-diskstats
 
embedded-linux-120203.pdf
embedded-linux-120203.pdfembedded-linux-120203.pdf
embedded-linux-120203.pdf
 
Make Your Containers Faster: Linux Container Performance Tools
Make Your Containers Faster: Linux Container Performance ToolsMake Your Containers Faster: Linux Container Performance Tools
Make Your Containers Faster: Linux Container Performance Tools
 
Inside Docker for Fedora20/RHEL7
Inside Docker for Fedora20/RHEL7Inside Docker for Fedora20/RHEL7
Inside Docker for Fedora20/RHEL7
 
2008-09-09 IBM Interaction Conference, Red Hat Update for System z
2008-09-09 IBM Interaction Conference, Red Hat Update for System z2008-09-09 IBM Interaction Conference, Red Hat Update for System z
2008-09-09 IBM Interaction Conference, Red Hat Update for System z
 
DPDK Summit 2015 - Intel - Keith Wiles
DPDK Summit 2015 - Intel - Keith WilesDPDK Summit 2015 - Intel - Keith Wiles
DPDK Summit 2015 - Intel - Keith Wiles
 
Linux Char Device Driver
Linux Char Device DriverLinux Char Device Driver
Linux Char Device Driver
 
OMFW 2012: Analyzing Linux Kernel Rootkits with Volatlity
OMFW 2012: Analyzing Linux Kernel Rootkits with VolatlityOMFW 2012: Analyzing Linux Kernel Rootkits with Volatlity
OMFW 2012: Analyzing Linux Kernel Rootkits with Volatlity
 
My First 100 days with an Exadata (PPT)
My First 100 days with an Exadata (PPT)My First 100 days with an Exadata (PPT)
My First 100 days with an Exadata (PPT)
 
Design, Build,and Maintain the Embedded Linux Platform
Design, Build,and Maintain the Embedded Linux PlatformDesign, Build,and Maintain the Embedded Linux Platform
Design, Build,and Maintain the Embedded Linux Platform
 
제3회난공불락 오픈소스 인프라세미나 - lustre
제3회난공불락 오픈소스 인프라세미나 - lustre제3회난공불락 오픈소스 인프라세미나 - lustre
제3회난공불락 오픈소스 인프라세미나 - lustre
 
Ssa0 g formation-ibm-xiv-technical-training
Ssa0 g formation-ibm-xiv-technical-trainingSsa0 g formation-ibm-xiv-technical-training
Ssa0 g formation-ibm-xiv-technical-training
 
#WeSpeakLinux Session
#WeSpeakLinux Session#WeSpeakLinux Session
#WeSpeakLinux Session
 
Introduction and course Details of Embedded Linux Platform Developer Training
Introduction and course Details of Embedded Linux Platform Developer TrainingIntroduction and course Details of Embedded Linux Platform Developer Training
Introduction and course Details of Embedded Linux Platform Developer Training
 
Lec 10-linux-review
Lec 10-linux-reviewLec 10-linux-review
Lec 10-linux-review
 

Recently uploaded

Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsMehedi Hasan Shohan
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?Watsoo Telematics
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 

Recently uploaded (20)

Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software Solutions
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 

Linux io introduction-fudcon-2015-with-demo-slides

  • 1. 1
  • 2. Agenda • SCSI Targets • STGT and Need of LIO • LIO Introduction • LIO Architecture • LIO Directory structure • Linux Storage Stack and LIO • LIO Configfs Interface • LIO Configfs tree • LIO Command Line interface • Use cases • LIO users and partners • Demo 2
  • 3. SCSI targets • The subsystem enables a computer node to behave as a SCSI storage device, responding to storage requests by other SCSI initiator nodes. • Opens up the possibility of creating custom SCSI devices and putting intelligence behind the storage. • Extra functionality can be added on top of it – RAID, snapshots, replication, HA, backup, data deduplication. • Some existing SCSI target implementations – SCST, IET, STGT 3
  • 4. STGT and Need of LIO • Many major distributions included STGT support for userspace iSCSI target mode • But is still unsupported in many commercial cases • Major distributors wanted to see proper in-kernel iSCSI target mode support and the community offered out of tree modules for those interested • Many developers, hardware vendors and users wanted upstream kernel level iSCSI target mode 4
  • 5. LIO Introduction • TCM/LIO = Target core module / Linux- IO • Open source Linux SCSI target • Developed by Datera Inc. (Rising tide systems) • Merged in Linux Kernel on March, 2011 • Requirements o Linux Kernel version >= 2.6.38 • Supported by almost all Linux distributions by default 5
  • 6. LIO Introduction…Contd • Supports SCSI Advanced features o Persistent Reservations (SPC3/SPC4) o ALUA (Asymmetric Logical Unit Assignment) Both explicit and implicit o T10 Data Integrity Format o VAAI (vStorage APIs for Array Integration) o Multiple connection per session (MC/S) o iSCSI ERLs (Error Recovery Levels) ERL 0 – Session Recovery ERL 1 – Digest failure Recovery ERL 2 – Connection Recovery 6
  • 8. LIO Architecture…Contd LIO consists of three group of modules : • Fabric modules o Frontend of LIO, encapsulates supported storage protocols o Supports iSCSI, FC, FCOE, SRP, infiniband, vHost • Storage modules / backstores o Backend of LIO – provide access to imported devices via device drivers o Supports – Block ( HDDs, SSDs, LVM, Raids ) File RAMdisk • Core Functionality (target_core_mod.ko) o Manages resources and memory o Implements Persistent resvervation, ALUA and other core features. 8
  • 9. Linux Storage Stack and LIO 9 VFS (Virtual File System) Memory Management ext3 ext4 others Block Layer and Device Mapper SCSI Layer target /dev/sdb LIO core modules FC iSCSI SRP Block Fileio Raw /dev/mapper/xxx /dev/vg/lv ext4 file Logical Volume Manager Low Level drivers user Kernel Storage
  • 10. LIO directory Structure 10 Storage and core modules Core data structures declarations LIO dir structure
  • 11. LIO Configfs Interface • Configfs is a RAM-based virtual file system similar to sysfs (but not same) • Precisely, it is inverse of sysfs. • Provide better control from userland • Unlike sysfs, configfs allows to create, manage and destroy kernel objects from user-space • Typically mounted at /config or /sys/kernel/config • LIO uses it for management and configuration of storage and fabric modules. 11
  • 13. LIO Command Line Interface • lio_node and tcm_node o Low level utility to manage storage and fabric configfs nodes o Python based cli for developers, intergrators and advanced users o Different tcm utilities available for fabric modules • lio-dump, tcm-dump o Save configuration • target-cli o Provide unified single node SAN configuration shell o Fabric agnostic o Exports functionality via RTSlib library and API python-rtslib (python API library over configfs) 13
  • 14. Use Cases • HA clustering • Openstack Cinder apis written to consume LIO iSCSI storage • IO virtualization(IOV) with KVM on IOV capable hardware • iSCSI LAN and WAN replication – DRBD and pacemaker support • iSCSI boot using PXE • Implementing advanced features on top of LIO – dedupe, thin provisioning, etc 14
  • 15. LIO users and partners 15
  • 17. iSCSI discovery and LIO Data structures 17 STEP 2: # Create 2 sparse files and we will export them as file based LUNs dd if=/dev/zero of=/data/file1 bs=1K count=1 seek=10000 dd if=/dev/zero of=/data/file2 bs=1K count=1 seek=10000 file1 file2 STEP 1: # Start the target rc script # This will insert target core module (core Engine activated) /etc/init.d/target start
  • 18. iSCSI discovery and LIO Data structures 18 fileio_0 disk1 disk2 default_tg_ pt_gp default_tg_ pt_gp STEP 3: # Allocate fd_dev and create file based luns # This will insert LIO’s fileio storage module tcm_node --fileio fileio_0/disk1 /data/file1 10240000 tcm_node --fileio fileio_0/disk2 /data/file2 10240000 file1(fd_dev) file2 (fd_dev) se_hba se_device t10_alua_tg_ pt_gp
  • 19. iSCSI discovery and LIO Data structures 19 fileio_0 disk1 disk2 default_tg_ pt_gp default_tg_ pt_gp STEP 4: # Add and bind LUN0 to 1st target port of portal group 1 lio_node --addlun <target_iqn1> 1 0 iscsi00 fileio_0/disk1 # Add and bind LUN0 to 2nd target port of portal group 1 lio_node --addlun <target_iqn2> 1 0 iscsi00 fileio_0/disk1 # Add and bind LUN1 to 1st target port of portal group 1 lio_node --addlun <target_iqn1> 1 1 iscsi01 fileio_0/disk2 # Add and bind LUN1 to 2nd target port of portal group 1 lio_node --addlun <target_iqn2> 1 1 iscsi01 fileio_0/disk2 file1(fd_dev) file2 (fd_dev) se_hba se_device t10_alua_tg_ pt_gp tpgt_1 lun_0 lun_1 se_lun iscsi_portal _group
  • 20. iSCSI discovery – Target port binding 20 TCM/LIO file1 file2 lun 0 (iscisi00) lun 1 (iscsi01) target_port0 target_port1 ==TARGET PORT BINDING== lun0 binds to target_port0 and target_port1 lun1 binds to target_port0 and target_port1
  • 21. iSCSI discovery and LIO Data structures 21 fileio_0 disk1 disk2 default_tg_ pt_gp default_tg_ pt_gp file1(fd_dev) file2 (fd_dev) se_hba se_device t10_alua_tg_ pt_gp tpgt_1 lun_0 lun_1 se_lun iscsi_portal _group STEP 5: # Create network portals for target ports lio_node --addnp <target_iqn1> 1 <IP address:port> lio_node --addnp <target_iqn2> 1 <IP address:port> IP:port IP:port iscsi_np iscsi_np STEP 6: # Disable iSCSI authentication of target portal group . Enabled by default lio_node --disableauth <target_iqn1> 1 lio_node --disableauth <target_iqn2> 1
  • 22. iSCSI discovery and LIO Data structures 22 fileio_0 disk1 disk2 default_tg_ pt_gp default_tg_ pt_gp file1(fd_dev) file2 (fd_dev) se_hba se_device t10_alua_tg_ pt_gp tpgt_1 lun_0 lun_1 se_lun iscsi_portal _group STEP 7: # Give access of bound luns to initiator and assign mapped lun numbers lio_node –addlunacl <target_iqn1> 1 <initiator_iqn> 0 0 lio_node --addlunacl <target_iqn2> 1 <initiator_iqn> 0 1 lio_node --addlunacl <target_iqn1> 1 <initiator_iqn> 1 2 lio_node --addlunacl <target_iqn2> 1 <initiator_iqn> 1 3 IP:port IP:port iscsi_np iscsi_np lun_0 lun_2 lun_1 lun_3 Mapped luns STEP 8: # Enable target portal group lio_node --enabletpg <target_iqn1> 1 lio_node --enabletpg <target_iqn2> 1
  • 23. 23 TCM/LIO file1 file2 lun 0 (iscisi00) lun 1 (iscsi01) target_port1 target_port2 IP:Port IP:Port Network portals Target portal group iSCSI discovery – Network Portals and Target Portal Group lun 0 lun 1 lun 2 lun 3
  • 24. lnitiator iSCSI discovery and LIO Data structures 24 fileio_0 disk1 disk2 default_tg_ pt_gp default_tg_ pt_gp file1(fd_dev) file2 (fd_dev) se_hba se_device t10_alua_tg_ pt_gp tpgt_1 lun_0 lun_1 se_lun iscsi_portal _group STEP 9: # Initiator discovers and login to target ports to establish iscsi session with target iscsiadm --mode discovery -t sendtargets --portal <IPaddr:Port> iscsiadm --mode node --targetname <target_iqn1> --portal <IPaddr:Port> --login iscsiadm --mode node --targetname <target_iqn2> --portal <IPaddr:Port> --login IP:port IP:port iscsi_np iscsi_np lun_0 lun_2 lun_1 lun_3 Mapped luns
  • 25. iSCSI login and session creation 25 TCM/LIO file1 file2 lun 0 (iscisi00) lun 1 (iscsi01) target_port1 target_port2 IP:Port IP:Port Network portals Target portal group /dev/sda /dev/sdb /dev/sdc /dev/sdd Initiator lun 0 lun 1 lun 2 lun 3
  • 26. References • RFC 3720 • LIO wiki page • SCST vs LIO • iscsi targets wiki page • LIO-utils – github • Configfs • Targetcli and rtslib • Cinder plugin for LIO • Open iSCSI utility • STGT project • Distributed replicated block device 26
  • 28. Author Biography 28 Kashish Bhatia – Member of Technical Staff, VMware • Technology enthusiast, with most of the experience in storage domain • Has exposure to other Linux subsystems like filesystems, block layer, Selinux • Experience of working on distributed file system (Lustre) and storage virtualization • Interests : open source, linux kernel hacking • Published technical paper in Openstack Summit Nov 2013 • Bachelor of Engineering, Computer Science, Pune University • To know more about Kashish connect on LinkedIn