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 target
iscsiadm -m node -T targetname -p ipaddress -u
Display information about a target
iscsiadm -m node -T targetname -p ipaddress
Display statistics about a target
iscsiadm -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 in
iscsiadm -m session
View iSCSI database regarding discovery
iscsiadm -m discovery -o show
View iSCSI database regarding targets to log into
iscsiadm -m node -o show
View iSCSI database regarding sessions logged into
iscsiadm -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 EQL,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] 36000d771000002767de9860 330139e10 dm-8 EQL,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]
联系客服