Skip to content

Commit

Permalink
Imported Upstream version 2.0.873+git1.1dfb88a4
Browse files Browse the repository at this point in the history
  • Loading branch information
frank-fegert committed Jul 27, 2016
1 parent 1f542ad commit f5ab51f
Show file tree
Hide file tree
Showing 114 changed files with 4,952 additions and 1,131 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
*.o
.gitignore
.pc/
29 changes: 22 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@ INSTALL = install
ETCFILES = etc/iscsid.conf
IFACEFILES = etc/iface.example

# Compatibility: parse old OPTFLAGS argument
ifdef OPTFLAGS
CFLAGS = $(OPTFLAGS)
endif

# Export it so configure of iscsiuio & open-isns will
# pick it up.
ifneq (,$(CFLAGS))
export CFLAGS
endif

# Random comments:
# using '$(MAKE)' instead of just 'make' allows make to run in parallel
# over multiple makefile.
Expand All @@ -44,11 +55,14 @@ user: utils/open-isns/Makefile iscsiuio/Makefile
@echo "Read README file for detailed information."

utils/open-isns/Makefile: utils/open-isns/configure utils/open-isns/Makefile.in
cd utils/open-isns; ./configure CFLAGS="$(OPTFLAGS)" --with-security=no
cd utils/open-isns; ./configure --with-security=no

iscsiuio/Makefile: iscsiuio/configure iscsiuio/Makefile.in
cd iscsiuio; ./configure

iscsiuio/configure iscsiuio/Makefile.in: iscsiuio/configure.ac iscsiuio/Makefile.am
cd iscsiuio; autoreconf --install

kernel: force
$(MAKE) -C kernel
@echo "Kernel Compilation complete Output file"
Expand All @@ -66,9 +80,10 @@ clean:
$(MAKE) -C utils clean
$(MAKE) -C usr clean
$(MAKE) -C kernel clean
$(MAKE) -C iscsiuio clean
$(MAKE) -C utils/open-isns clean
$(MAKE) -C utils/open-isns distclean
[ ! -f iscsiuio/Makefile ] || $(MAKE) -C iscsiuio clean
[ ! -f iscsiuio/Makefile ] || $(MAKE) -C iscsiuio distclean
[ ! -f utils/open-isns/Makefile ] || $(MAKE) -C utils/open-isns clean
[ ! -f utils/open-isns/Makefile ] || $(MAKE) -C utils/open-isns distclean

# this is for safety
# now -jXXX will still be safe
Expand Down Expand Up @@ -121,7 +136,7 @@ install_iface: $(IFACEFILES)
$(INSTALL) -m 644 $^ $(DESTDIR)$(etcdir)/iscsi/ifaces

install_etc: $(ETCFILES)
if [ ! -f /etc/iscsi/iscsid.conf ]; then \
if [ ! -f $(DESTDIR)/etc/iscsi/iscsid.conf ]; then \
$(INSTALL) -d $(DESTDIR)$(etcdir)/iscsi ; \
$(INSTALL) -m 644 $^ $(DESTDIR)$(etcdir)/iscsi ; \
fi
Expand All @@ -134,11 +149,11 @@ install_kernel:
$(MAKE) -C kernel install_kernel

install_iname:
if [ ! -f /etc/iscsi/initiatorname.iscsi ]; then \
if [ ! -f $(DESTDIR)/etc/iscsi/initiatorname.iscsi ]; then \
echo "InitiatorName=`$(DESTDIR)/sbin/iscsi-iname`" > $(DESTDIR)/etc/iscsi/initiatorname.iscsi ; \
echo "***************************************************" ; \
echo "Setting InitiatorName to `cat $(DESTDIR)/etc/iscsi/initiatorname.iscsi`" ; \
echo "To override edit /etc/iscsi/initiatorname.iscsi" ; \
echo "To override edit $(DESTDIR)/etc/iscsi/initiatorname.iscsi" ; \
echo "***************************************************" ; \
fi

Expand Down
56 changes: 52 additions & 4 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ by running:
make kernel

When building those modules the kernel source found at
/lib/modules/`uname -a`/build
/lib/modules/`uname -r`/build
will be used to compile the open-iscsi modules. To specify a different
kernel to build against use:

Expand Down Expand Up @@ -393,7 +393,7 @@ Usage: iscsiadm [OPTION]
See below for examples.
-m iface --interface=iscsi_ifacename -C ping --ip=[ipaddr] --packetsize=[size]
--count=[count] --interval=[interval]
-m host --host=hostno|MAC --print=level -C chap --op=[op] --value=[chap_tbl_idx]
-m host --host=hostno|MAC --print=level -C chap --op=[SHOW]
Display information for a specific host. The host
can be passed in by host number or by MAC address.
If a host is not passed in then info
Expand All @@ -406,6 +406,14 @@ Usage: iscsiadm [OPTION]
is connected to.
3 = Print iscsi params used.
4 = Print SCSI info like LUNs, device state.
-m host --host=hostno|MAC -C chap --op=[DELETE] --index=[chap_tbl_idx]
Delete chap entry at the given index from chap table.
-m host --host=hostno|MAC -C chap --op=[NEW | UPDATE] --index=[chap_tbl_idx] \
--name=[name] --value=[value]
Add new or update existing chap entry at the given
index with given username and password pair. If index
is not passed then entry is added at the first free
index in chap table.
-m host --host=hostno|MAC -C flashnode
Display list of all the targets in adapter's
flash (flash node), for the specified host,
Expand All @@ -414,13 +422,13 @@ Usage: iscsiadm [OPTION]
Create new flash node entry for the given host of the
specified portal_type. This returns the index of the
newly created entry on success.
-m host --host=hostno|MAC -C flashnode --flashnode_idx=[flashnode index] \
-m host --host=hostno|MAC -C flashnode --index=[flashnode index] \
--op=[UPDATE] --name=[name] --value=[value]
Update the params of the speficied flash node.
The [name] and [value] pairs must be provided for the
params that need to be updated. Multiple params can
be updated using a single command.
-m host --host=hostno|MAC -C flashnode--flashnode_idx=[flashnode index] \
-m host --host=hostno|MAC -C flashnode --index=[flashnode index] \
--op=[SHOW | DELETE | LOGIN | LOGOUT]
op=DELETE|LOGIN|LOGOUT will perform deletion/login/
logout operation on the specified flash node.
Expand Down Expand Up @@ -1033,6 +1041,46 @@ To now log into targets it is the same as with sofware iscsi. See section
- Delete a flash node entry
./iscsiadm -m host -H 6 -C flashnode -x 1 -o delete

Host mode with chap submode:

- Display list of chap entries for a host

./iscsiadm -m host -H 6 -C chap -o show

This will list all the chap entries for the given host.

- Delete a chap entry for a host

./iscsiadm -m host -H 6 -C chap -o delete -x 5

This will delete any chap entry present at given index 5.

- Add/Update a local chap entry for a host

./iscsiadm -m host -H 6 -C chap -o update -x 4 -n username \
-v value -n password -v value

This will update the local chap entry present at index 4. If index 4
is free then entry of type local chap will be created at that index
with given username and password values.

- Add/Update a bidi chap entry for a host

./iscsiadm -m host -H 6 -C chap -o update -x 5 -n username_in \
-v value -n password_in -v value

This will update the bidi chap entry present at index 5. If index 5
is free then entry of type bidi chap will be created at that index
with given username_in and password_in values.

Host mode with stats submode:

- Display host statistics:
./iscsiadm -m host -H 6 -C stats

This will print the aggregate statistics on the host adapter port.
This includes MAC, TCP/IP, ECC & iSCSI statistics.

6. Configuration
================

Expand Down
12 changes: 11 additions & 1 deletion doc/iscsi_discovery.8
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,17 @@
.SH NAME
iscsi_discovery \- discover iSCSI targets
.SH SYNOPSIS
.B iscsi_discovery <IP> [-p <port>] [-d] [-t <tcp|iser> [-f]] [-m] [-l]
.B iscsi_discovery
.I <IP>
.RB [ -p
.IR <port> ]
.RB [ -d ]
.RB [\ -t
.IR <tcp|iser>
.RB [ -f ]
.R ]
.RB [ -m ]
.RB [ -l ]

.SH DESCRIPTION
Perform send-targets discovery to the specified IP. If a discovery record
Expand Down
Loading

0 comments on commit f5ab51f

Please sign in to comment.