0% found this document useful (0 votes)
52 views37 pages

04 - iSCSI

iSCSI

Uploaded by

rida
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views37 pages

04 - iSCSI

iSCSI

Uploaded by

rida
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 37

iSCSI

SCSI Over The Network

www.supinfo.com
Copyright © SUPINFO. All rights reserved
iSCSI

Course objectives
By completing this course, you will:

 Use appropriate iSCSI terms.


Targets? Initiators?
 Expose devices on the
network. Create virtual net
devices from block devices.
 Connect to remote devices.
Use remote devices as if they
were local block devs.
 Add redundancy and fault
tolerance. Two (or more) paths
to reach the device.
iSCSI

Course topics
Course’s plan (Or : These are the parts that we will approach :)

 Introduction. Initiators and


targets.
 Target configuration. Expose
devices over the network.
 Initiator configuration. Remote
devices made local.
 Multipath. Fault tolerance and
link aggregation.
iSCSI

Introduction

Target & initiators


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

Do you have any questions ?


Introduction

Stop-and-think
Who’s who?

Target Client

Initiator Server
Introduction

Stop-and-think
Who’s who?

Target Client

Initiator Server
iSCSI

Target Configuration

Expose devices over the network


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

Do you have any questions ?


Target Configuration

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

Remote devices made local


Initiator configuration

Operating your node


Using the iscsiadmin command

 Useful modes
 discovery
 Query targets
 node
 Connect to targets
 Per-target settings
 Common/Default
settings
Initiator configuration

Discovery
Any shared devices?

iscsiadm -m discovery -t mode -p portal

Argument Definitions
Discover targets on the portal using mode. Mode can
mode
be sendtargets (st), isns or fw. Most ubiquous is st.

portal The host to query

Examples:

root@initiator:~# iscsiadm -m discovery -t st \


> -p 192.168.82.164
192.168.82.164:3260,1 iqn.2012.06.net.utopia:disk1
192.168.82.164:3260,1 iqn.2012.06.net.utopia:disk2
Initiator configuration

Node
Connect

iscsiadm -m node -T target -p portal --login

Argument Definitions
The target IQN. Usually got from the discovery
target
command.

portal The host where the target resides.

Examples:

root@initiator:~# iscsiadm -m node \


> --targetname "iqn.2012.06.net.utopia:disk1" \
> --portal "192.168.82.164:3260” \
> --login
Initiator configuration

Node
Change settings
iscsiadm -m node -T target -p portal --op=update -n
key -v value

Argument Definitions

key The setting to alter

value The value to set.

Examples:

root@initiator:~# iscsiadm -m node \


> --targetname "iqn.2012.06.net.utopia:disk1” \
> -p "192.168.82.164:3260" \
> --op=update -n node.session.auth.username -v sanuser
Initiator configuration

Settings and default values


Default values in iscsid.conf:

# to CHAP. The default is None.


#node.session.auth.authmethod = CHAP

# To set a CHAP username and password for initiator


# authentication by the target(s), uncomment the
following lines:
#node.session.auth.username = username
#node.session.auth.password = password

# To enable CHAP authentication for a discovery


session to the target
# set discovery.sendtargets.auth.authmethod to CHAP.
The default is None.
#discovery.sendtargets.auth.authmethod = CHAP

[...]
Initiator configuration

Stop-and-think

Do you have any questions ?


Initiator configuration

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

Fault tolerance and link aggregation


Multipath

Why? When?
Consider the following scenario:
Multipath

Why? When?
Two IP addresses on the target

 Two portals for each target


 Doubled connections from the
initiator
 Four devices
 No (automatic) failover
 Useless
 How to tell the system A
and B are indeed the
same device ?
 Multipath
 Aggregate devices
Multipath

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

Do you have any questions ?


Multipath

Stop-and-think
Using multipath to group iSCSI connections top the
same target, you will

Use the same devices as before

Use a new device that represent the grouped


devices
Multipath

Stop-and-think
Using multipath to group iSCSI connections top the
same target, you will

Use the same devices as before

Use a new device that represent the grouped


devices
iSCSI

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

Web sites Conferences

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

 Double check your settings


 multipath -l

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy