| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This support lets the user manage the target entries in adapter flash
and
perform various operations like add, delete, login, logout,
and update the target information.
The sysfs entries will look as cited below:
/sys/bus/iscsi_flashnode/devices/flashnode_sess-<host_no>:<flashnode_id>/<session
attrs>
/sys/bus/iscsi_flashnode/devices/flashnode_conn-<host_no>:<flashnode_id>:<conn_id>/<conn
attrs>
Operations using iscsiadm:
=========================
List all target nodes stored in the FLASH of the adapter
\# iscsiadm -m host -H hostno -C flashnode -o show
View all parameters of one particular flash node
\# iscsiadm -m host -H hostno -C flashnode -x <flashnode_idx> -o show
Update an entry and commit to adapter FLASH
\# iscsiadm -m host -H hostno -C flashnode -x <flashnode_idx> -n <name>
-v <value> -o update
Multiple name, value pairs can be specified in a single command for
update operation
Delete an entry
\# iscsiadm -m host -H hostno -C flashnode -x <flashnode_idx> -o delete
Create a new entry
\# iscsiadm -m host -H hostno -C flashnode -o new -A <ipv4/ipv6>
\# iscsiadm -m host -H hostno -C flashnode -x <flashnode_idx> -n <name>
-v <value> -o update
Example, create new entry:
\#iscsiadm -m host -H 7 -C flashnode -o new -A ipv4
Flashnode index: 2
New flashnode for host7 added
\#iscsiadm -m host -H 7 -C flashnode -o show
qla4xxx: [0] 192.168.1.12:3260,2
iqn.2002-03.com.compellent:5000d310004b0716
qla4xxx: [1] 192.168.1.12:3260,2
qla4xxx: [2]
Here - The newly created entry is at flashnode_idx 2, use it to update
the entry
\# iscsiadm -m host -H 7 -C flashnode -x 2 -o update
flashnode.conn[0].ipaddress -v 192.168.1.13
\#iscsiadm -m host -H 7 -C flashnode -o show
qla4xxx: [0] 192.168.1.12:3260,2
iqn.2002-03.com.compellent:5000d310004b0716
qla4xxx: [1] 192.168.1.12:3260,2
qla4xxx: [2] 192.168.1.13:3260,0
Login
\# iscsiadm -m host -H hostno -C flashnode -x <flashnode_idx> -o login
Logout
\# iscsiadm -m host -H hostno -C flashnode -x <flashnode_idx> -o logout
\# iscsiadm -m session -r sid -u
Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>
Signed-off-by: Manish Rangankar <manish.rangankar@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
|
|
|
|
| |
No need to run modprobe if the module is already loaded.
|
|
|
|
|
|
| |
This patch removes the check for the transport class version.
We have not used it, and instead have checked for kernel
functionality on a per operation basis.
|
|
|
|
|
|
|
|
| |
We do not want to sync iscsid with qla4xxx's flash/fw sessions,
because the kernel/fw controls recovery.
This uses the creator sysfs file to figure out if the session
is ours or not.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch is based on initial work done by Mike Christie here,
http://groups.google.com/group/open-iscsi/browse_thread/thread/193fe9037f3127da#
This patch modifies iscsiadm so it can control sessions that are
accessed
through qla4xxx.
To do discovery using the qla4xxx iscsi class interface first check the
available qla4xxx iface
./iscsiadm -m iface -P 0
will display the different ifaces like this:
qla4xxx.00:0e:1e:04:87:fa qla4xxx,00:0e:1e:04:87:fa,192.168.1.112,\
<empty>,<empty>
qla4xxx.00:0e:1e:04:87:fe
qla4xxx,00:0e:1e:04:87:fe,<empty>,<empty>,<empty>
Issue discovery command
./iscsiadm -m discovery -t sendtargets -I qla4xxx.00:0e:1e:04:87:fa \
-p 192.168.1.10:3260
192.168.1.10:3260,1 iqn.2001-05.com.target:0-7d76ca2b7d54b541-disk2
192.168.1.10:3260,1 iqn.2001-05.com.target:0-46f6ca2b7d84b541-disk3
192.168.1.10:3260,1 iqn.2001-05.com.target:0-4c76ca2b7db4b541-disk4
192.168.1.10:3260,1 iqn.2001-05.com.target:0-7346ca2b6d04b6bb-disk1
To view discovered nodes do
./iscsiadm -m node
To login
./iscsiadm -m node -T iqn.2001-05.com.target:0-7346ca2b6d04b6bb-disk1 \
-I qla4xxx.00:0e:1e:04:87:fa -p 192.168.1.10:3260 -l
An error or ok message is displayed to indicate login failure or
success.
To see the sessions use
./iscsiadm -m session
And then to logout do
./iscsiadm -m node -T iqn.2001-05.com.target:0-7346ca2b6d04b6bb-disk1 \
-I qla4xxx.00:0e:1e:04:87:fa -p 192.168.1.10:3260 -u
An error or a ok message is displayed to indicate logout failure or
success.
Signed-off-by: Manish Rangankar <manish.rangankar@qlogic.com>
Signed-off-by: Lalit Chandivade <lalit.chandivade@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch prints the kernel's iface info.
iscsiadm -m host -P 2
iscsiadm -m host -H $N -P 2
will print out the kernel's iface info for the ifaces under all
hosts or for specific hosts.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The problem is current bnx2i boot firmware has 2 modes.
1. hba mode - Will export the iscsi MAC in ibft.
2. non hba mode - Will export the network MAC in ibft.
[In both modes there should be a sysfs link to the network
netdev from the ibft ethernet dir]
For #1 we want to create a session using bnx2i. For #2 we want to use
software iscsi (we can only use software iscsi since we do not know the
MAC for the offload card).
This patch fixes a bug where we would create a iscsi session using the
offload card if the netdev that is found through the ibft sysfs tree was
managed by a net driver that has a iscsi offload driver. With this patch
we now determine if we use the offload card during boot based on if
the /sys/class/iscsi_host/hostX/hwaddres matches the one in iBFT. If
it does, then we know the iBFT MAC is the iscsi one and use the offload
driver.
Note that cxgb*i always uses 1 MAC for both iscsi and offload. So
for that driver we always use offload. To get the netdev we follow
the sysfs ethernet link to the netdev like is done with bnx2i.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This prints out the info for iSCSI hosts in the system.
EXAMPLE
-------
iscsiadm -m host
cxgb3i: [9] 10.10.15.50,[00:07:43:05:97:07],eth3 <empty>
$TRANSPORT: [$HOST_NO] $HOST_IP,[$MAC},$NETDEV $INITIATORNAME
EXAMPLE
---------
iscsiadm -m host -P 2
Host Number: 9
State: running
Transport: cxgb3i
Initiatorname: <empty>
IPaddress: 10.10.15.50
HWaddress: 00:07:43:05:97:07
Netdev: eth3
*********
Sessions:
*********
Target: iqn.2001-04.com.home:meanminna
Current Portal: 10.10.15.10:3260,1
Persistent Portal: 10.10.15.10:3260,1
**********
Interface:
**********
Iface Name: cxgb3i
Iface Transport: cxgb3i
Iface Initiatorname: iqn.2005-06.com.redhat:noisymax
Iface IPaddress: 10.10.15.50
Iface HWaddress: 00:07:43:05:97:07
Iface Netdev: eth3
SID: 8
iSCSI Connection State: LOGGED IN
iSCSI Session State: LOGGED_IN
Internal iscsid Session State: NO CHANGE
**********
Interface:
**********
Iface Name: cxgb3i.def
Iface Transport: cxgb3i
Iface Initiatorname: iqn.2005-06.com.redhat:madmax
Iface IPaddress: 10.10.15.50
Iface HWaddress: 00:07:43:05:97:07
Iface Netdev: eth3
SID: 9
iSCSI Connection State: LOGGED IN
iSCSI Session State: LOGGED_IN
Internal iscsid Session State: NO CHANGE
|
|
|
|
| |
This sets node.session.queue_depth for the session's devices.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If you run
iscsiadm -m iface -P 1
or
iscsiadm -m iface -I $my_iface -P 1
we print the iface info and if possible the host number and state
(only for offload hbas).
The P2 level will print the session running through a iface.
The P3 level will print the negotiated iscsi params for each session.
The P4 level will print the scsi devices accessed through each
session.
|
|
|
|
|
|
|
|
| |
Commands that printed out records were mixing up the ordering.
This just has us use alphasort since it is safe for things like
uclibc and we do not really care about the alphabetical ordering
and are more concerned with targets/portals that are alike being
grouped together.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
firmware
This adds the ibft sysfs module (iscsi_ibft) parsing support. It
was original done by Konard, but I have ported it to use the
sysfs.c helpers (add new ones and ported iscsi_sysfs.c too).
This patch also modifies iscsistart and iscsiadm to print/log
into all the portals found in firmware.
It also changes the behavior of
iscsiadm -m discovery -t fw
so that we create db records for what is found. It is not
fully hooked into the iface code, so it will use the
different inititor name, but it will not create a iface for
it (this means that if you have a record for the same portal that
is bound to a iface with a iname you can run into problems).
|
|
|
|
|
|
|
|
| |
This has us use the udev_sysfs code instead of hacking our own.
There are two items that need future proofing:
1. handling of iscsi_session class device symlinks
2. scanning opens /sys/class/iscsi_* dir instead of doing
a proper search like udev_sysfs.
|
|
|
|
|
|
|
|
|
| |
We do not need a new event to figure out that a transport is missing.
We can just check before accessing the transport.
This reverts the original patch.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
|
|
|
|
|
|
|
|
|
|
| |
When iscsid detects a new transport (e.g. iscsi_tcp, ib_iser), it
allocates an entry for it in the transport list. If the transport
is unloaded and then reloaded, iscsid would still use the old
transport entry. Therefore, the transport entry must be deleted
when the transport is unloaded.
Signed-off-by: Erez Zilber <erezz@voltaire.com>
|
|
|
|
|
|
|
|
|
|
| |
This patch moves the iface code to iface.c/.h. It also adds some
default ifaces for iser and bnx2i. Currently if those modules
are loaded then we will bind to them along with default/tcp when
discovery is run. The user can then set the startup flag or delete
the record.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
|
|
|
|
|
|
| |
rm num_transports from sysfs header.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
|
|
|
|
| |
Set ifacename so we can look it back up on iscsid restart.
|
|
|
|
|
|
|
|
|
| |
If iscsid is restarted while a session is running, then the
session is logged out we are leaving the iscsi connection
in the kernel. The reason for this is because conn->ksetup
is not set during the sync up. Instead of that hacky bool
we can just check the kernel if there is a connection setup
by looking in sysfs.
|
|
|
|
|
|
|
|
|
|
|
| |
Bug report and Patch from From Natanael Copa:
I'm trying to compile open-iscsi on uclibc to be able to use it on
embedded linux.
I found out that there are 3 functions that are used that are not
implemented in uclibc: getifaddrs, freeifaddrs and versionsort. None of
those are in POSIX afaik.
|
|
|
|
| |
During start if we exited we did not close the logging proc.
|
|
|
|
|
|
|
|
| |
drivers like qla4xxx do not use iscsid's state machine (there
sm is in hw), so iscsid cannot print the state of the session
or connection. In the kernel we export the session state, so
this patch has iscsiadm print it with the other state values
when running iscsiadm -session -P 1.
|
|
|
|
|
|
| |
session_info and host_info are the structs used by
iscsi_sysfs.c to return data and make more sense
being defined in iscsi_sysfs.h
|
|
|
|
|
|
| |
iscsiadm --rescan was only picking up new devices. This has it now
also pick up whatever /sys/block/sdX/device/rescan can pick up along with
new devices.
|
|
|
|
|
|
| |
rm last queue item user with list
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
|
|
|
|
|
|
| |
targets are not handling it well) and use the iface argument instead of the actual values
git-svn-id: svn://svn.berlios.de/open-iscsi@845 d7303112-9cec-0310-bdd2-e83a94d6c2b6
|
|
|
|
| |
git-svn-id: svn://svn.berlios.de/open-iscsi@831 d7303112-9cec-0310-bdd2-e83a94d6c2b6
|
|
|
|
| |
git-svn-id: svn://svn.berlios.de/open-iscsi@830 d7303112-9cec-0310-bdd2-e83a94d6c2b6
|
|
|
|
| |
git-svn-id: svn://svn.berlios.de/open-iscsi@827 d7303112-9cec-0310-bdd2-e83a94d6c2b6
|
|
|
|
|
|
| |
sessions running through each host and other info. THIS OUTPUT FORMAT WILL CHANGE
git-svn-id: svn://svn.berlios.de/open-iscsi@817 d7303112-9cec-0310-bdd2-e83a94d6c2b6
|
|
|
|
|
|
| |
iface (driver and hardware are bound). Also merge the -D and -I arguments so they are now -I driver,hwaddress. Also add some basic qla4xxx support. We can rescan/scan it and perform sendtargets through it but it stores the targets it finds in Flash and then logs into all of them autmatically (when we do discovery and later when reload the driver). So qla4xxx support is mostly to make sure we have the --interfae argument right. We will have to decide how to set other params, manage nodes, and if we should move scanning to the kernel and then also move some error recovery code to the kernel (today qla4xxx is calling block directly and is not able to export it iscsi state yet (the beginnings to fix that is in the git tree but we still need to reduce some code duplcation)). qla4xxx behavior and functionality is going to change as we learn more about the hw (what format the flash data is supposed to be in for example).
git-svn-id: svn://svn.berlios.de/open-iscsi@816 d7303112-9cec-0310-bdd2-e83a94d6c2b6
|
|
|
|
|
|
| |
some print output
git-svn-id: svn://svn.berlios.de/open-iscsi@815 d7303112-9cec-0310-bdd2-e83a94d6c2b6
|
|
|
|
|
|
| |
as well as the other params, so add a -D param
git-svn-id: svn://svn.berlios.de/open-iscsi@814 d7303112-9cec-0310-bdd2-e83a94d6c2b6
|
|
|
|
|
|
| |
node db record, and may be using chap so we store the values in sysfs in the kernel and then read them out again when iscsid starts up. This is also really more useful for qla4xxx which needs to export this stuff since it stores/sets it in flash
git-svn-id: svn://svn.berlios.de/open-iscsi@788 d7303112-9cec-0310-bdd2-e83a94d6c2b6
|
|
|
|
|
|
| |
session that does not have a node db record. Int he nic binding patches we fixed up a lot of places like the logout path. This patch fixes up the iscsid sync up path
git-svn-id: svn://svn.berlios.de/open-iscsi@784 d7303112-9cec-0310-bdd2-e83a94d6c2b6
|
|
|
|
|
|
| |
bound to. Note that binding a session to a NIC with software iscsi is sometimes difficult and experimental. If you cannot do a ping -I eth0 someadddress, then binding a session through that specific nic will not work :) so please try the ping before reporting a problem.
git-svn-id: svn://svn.berlios.de/open-iscsi@782 d7303112-9cec-0310-bdd2-e83a94d6c2b6
|
|
|
|
| |
git-svn-id: svn://svn.berlios.de/open-iscsi@738 d7303112-9cec-0310-bdd2-e83a94d6c2b6
|
|
|
|
|
|
| |
and print out the sd/sr values. Tape is not supported since I am not sure what link it makes ATM. Will add when I can get someone to test.
git-svn-id: svn://svn.berlios.de/open-iscsi@736 d7303112-9cec-0310-bdd2-e83a94d6c2b6
|
|
|
|
| |
git-svn-id: svn://svn.berlios.de/open-iscsi@734 d7303112-9cec-0310-bdd2-e83a94d6c2b6
|
|
|
|
| |
git-svn-id: svn://svn.berlios.de/open-iscsi@733 d7303112-9cec-0310-bdd2-e83a94d6c2b6
|
|
|
|
|
|
| |
delete device code and it also fixes the problem where we leave zombie delete threads. It does this by just having iscsiadm do the delete since it can block (iscsid cannot). We probably want to fix this in the kernel somehow with the new interface. This patch fixes the logout code, delete code and blocking code for now though.
git-svn-id: svn://svn.berlios.de/open-iscsi@717 d7303112-9cec-0310-bdd2-e83a94d6c2b6
|
|
|
|
| |
git-svn-id: svn://svn.berlios.de/open-iscsi@693 d7303112-9cec-0310-bdd2-e83a94d6c2b6
|
|
to a broken loop in iscsid.c
git-svn-id: svn://svn.berlios.de/open-iscsi@691 d7303112-9cec-0310-bdd2-e83a94d6c2b6
|