04 - iSCSI
04 - iSCSI
www.supinfo.com
Copyright © SUPINFO. All rights reserved
iSCSI
Course objectives
By completing this course, you will:
Course topics
Course’s plan (Or : These are the parts that we will approach :)
Introduction
iSCSI Overview
Introduction
Target
Expose devices.
Kernel mode
iSCSI Enterprise
Target
Receive (i)SCSI
commands
Translate to the
device proto
Userland tools
deamon
ietd
Easy to configure
Introduction
Initiator
The “client” part.
Kernel
Expose regular
device to userland
Send (i)SCSI
commands to the
target
Userland tools
open-iscsi
daemon
iscsiadm
command
Introduction
Stop-and-think
Stop-and-think
Who’s who?
Target Client
Initiator Server
Introduction
Stop-and-think
Who’s who?
Target Client
Initiator Server
iSCSI
Target Configuration
Items to configure
Main configuration items.
Per Target
Lun’s
Path to dev
IO Type
Who can connect
Optionally who I am
Target
iSCSI Qualified Name
iqn.<yyyy-
mm>.<domain>[:id]
Target Configuration
IO Types
fileio vs blockio
fileio
Uses the VFS
page cache / IO Sched
4k block split
Example Use: file server
blockio
Direct device access
Page cache bypass
Arbitrary block size
Example use: virtual
machine
Target Configuration
Sample configuration
ietd.conf:
Target iqn.2012.06.net.utopia:disk1
IncomingUser sanuser sanuser
Lun 0 Path=/dev/sdb1,Type=fileio
Target iqn.2012.06.net.utopia:disk2
IncomingUser sanuser sanuser
Lun 0 Path=/dev/sdc2,Type=fileio
Target Configuration
Stop-and-think
Stop-and-think
Blockio is faster than fileio.
True
False
Target Configuration
Stop-and-think
Blockio is faster than fileio.
True
False
iSCSI
Initiator configuration
Useful modes
discovery
Query targets
node
Connect to targets
Per-target settings
Common/Default
settings
Initiator configuration
Discovery
Any shared devices?
Argument Definitions
Discover targets on the portal using mode. Mode can
mode
be sendtargets (st), isns or fw. Most ubiquous is st.
Examples:
Node
Connect
Argument Definitions
The target IQN. Usually got from the discovery
target
command.
Examples:
Node
Change settings
iscsiadm -m node -T target -p portal --op=update -n
key -v value
Argument Definitions
Examples:
[...]
Initiator configuration
Stop-and-think
Stop-and-think
A target can only be offered on a single portal at a
time.
True
False
Initiator configuration
Stop-and-think
A target can only be offered on a single portal at a
time.
True
False
iSCSI
Multipath
Why? When?
Consider the following scenario:
Multipath
Why? When?
Two IP addresses on the target
How it works?
Grouping devices
Kernel feature
Use the DM
Group any devices
Create a
/dev/mapper/mpathX
Userland
Tell which devices to
group
Using a config file/regexes
Default conf knows how to
group iSCSI by targets.
Multipath
Stop-and-think
Stop-and-think
Using multipath to group iSCSI connections top the
same target, you will
Stop-and-think
Using multipath to group iSCSI connections top the
same target, you will
Course summary
multipath
Initiator config
iSCSI Protocol
What’s an IQN
Target config
iSCSI
For more
If you want to go into these subjects more deeply, …
Publications Courses
Cisco CCNA
www.supinfo.com RMLL
www.labo-linux.org FOSDEM
iscsitarget.sourceforge.net Solution Linux
Congratulations
You have successfully completed
the SUPINFO course module n°04
iSCSI
iSCSI
The end