Package: open-iscsi Version: 1.0.485-3 Severity: important Tags: patch Hi,
Is the init.d script uncomplete?! Well.. I found another script with iscsi_login_all_nodes() function on the http://en.opensuse.org/Open-iSCSI_and_SUSE_Linux. Without this function the sessions isn't restored and the devices isn't available, on the initiator machine. I suggest the patch: ------------------ START FILE -------------------- --- open-iscsi.orig 2006-11-06 16:28:54.543474447 -0300 +++ open-iscsi 2006-11-06 16:51:21.073139156 -0300 @@ -24,6 +24,11 @@ RETVAL=0 ISCSIADM=/usr/bin/iscsiadm +# Include iscsiadm parameters +if [ -f /etc/default/open-iscsi ] ; then + . /etc/default/open-iscsi +fi + iscsid_start() { echo -n "Starting iSCSI initiator service: " @@ -89,9 +94,34 @@ echo "succeeded." else echo "failed." - fi + fi + iscsi_discovery + iscsi_login_all_nodes +} + +iscsi_discovery() +{ + if [ -n "$ISCSI_DISCOVERY" -a -n "$ISCSI_PORTAL" ] + then + $ISCSIADM -m discovery --type=$ISCSI_DISCOVERY --portal=$ISCSI_PORTAL > /dev/null + fi } - + +iscsi_login_all_nodes() +{ + TARGETS=$($ISCSIADM -m node 2> /dev/null | sed '[EMAIL PROTECTED](.*\)\] [EMAIL PROTECTED]@g') + for rec in $TARGETS; do + STARTUP=`$ISCSIADM -m node -r $rec | grep "node.conn\[0\].startup" | cut -d' ' -f3` + NODE=`$ISCSIADM -m node -r $rec | grep "node.name" | cut -d' ' -f3` + if [ $STARTUP = "automatic" ] ; then + echo -n "Logging into $NODE: " + $ISCSIADM -m node -r $rec -l + echo "done" + #rc_status -v + fi + done +} + iscsid_stop() { echo -n "Stopping iSCSI initiator service: " --------------------END FILE----------------- The /etc/default/open-iscsi is like this: ------------------ START FILE --------------- # The iSCSI Default Portal to use on startup. Use either the hostname # or IP number of the machine providing the iSCSI Targets to use # ISCSI_PORTAL= ## Type: list(sendtargets,isns,slp) ## Default: sendtargets # # The iSCSI discovery method to use. Currently only 'sendtargets' is # implemented. # ISCSI_DISCOVERY="sendtargets" ------------------ END FILE ----------------- Thanks and sorry for my mistakes.. and my poor english.. eheh ;) -- Amadeu Jr :: twiki.dcc.ufba.br/~AmadeuJunior -- System Information: Debian Release: testing/unstable APT prefers testing APT policy: (999, 'testing') Architecture: amd64 (x86_64) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.17-2-amd64 Locale: LANG=pt_BR.UTF-8, LC_CTYPE=pt_BR.UTF-8 (charmap=UTF-8) Versions of packages open-iscsi depends on: ii libc6 2.3.6.ds1-4 GNU C Library: Shared libraries ii libdb4.3 4.3.29-6 Berkeley v4.3 Database Libraries [ open-iscsi recommends no packages. -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]