I’ve been doing a lot of work lately with Red Hat Enterprise Virtualization. The hosts that I am using are currently connecting to the SAN using iSCSI. However, in the future they will be connecting with Fiber Channel instead.
I find myself having to remember how to use the iSCSI initiator a lot. Here are some quick notes on how to do the most common tasks.
Discover available targets from a discovery portal
iscsiadm -m discovery -t sendtargets -p ipaddress
Log into a specific target
iscsiadm -m node -T targetname -p ipaddress -l
Log out of a specific targetiscsiadm -m node -T targetname -p ipaddress -u
Display information about a targetiscsiadm -m node -T targetname -p ipaddress
Display statistics about a targetiscsiadm -m node -s -T targetname -p ipaddress
Remove the portal address to receive information or statistics about all targets.
Display list of all current sessions logged iniscsiadm -m session
View iSCSI database regarding discoveryiscsiadm -m discovery -o show
View iSCSI database regarding targets to log intoiscsiadm -m node -o show
View iSCSI database regarding sessions logged intoiscsiadm -m session -o show
View if the targets are multipathed (MPIO)multipath -ll
If it is multipathed, you will see output like below (this is an example of two LUNs, both multipathed). Note that this show the MPIO mode is round-robin:36000d77100000b117de986015d5d5746 dm-7 FALCON,IPSTOR DISK [size=20G][features=0][hwhandler=0][rw] \_ round-robin 0 [prio=0][active] \_ 12:0:0:0 sdb 8:16 [active][ready] \_ 13:0:0:0 sdd 8:48 [active][ready] 36000d771000002767de9860330139e10 dm-8 FALCON,IPSTOR DISK [size=200G][features=0][hwhandler=0][rw] \_ round-robin 0 [prio=0][active] \_ 12:0:0:1 sdc 8:32 [active][ready] \_ 13:0:0:1 sde 8:64 [active][ready] Here is a very helpful article that covers similar commands, etc. http://kbase.redhat.com/faq/docs/DOC-6388
Trying to boot from SAN using iSCSI? Are you using the integrated NICS (Intel or Broadcom) on a recent PowerEdge?
Then this is the clear and concise document you need to get it going.