Re: Open iscsi causes machine to hang on reboot

2008-11-20 Thread zeki

#! /bin/sh
### BEGIN INIT INFO
# Provides:
# Required-Start:
# Required-Stop:
# Default-Start:
# Default-Stop:
# Short-Description: Starts and stops the iSCSI initiator services and
logins to default targets
### END INIT INFO

PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/sbin/iscsid
ADM=/sbin/iscsiadm
PIDFILE=/var/run/iscsid.pid

[ -x $DAEMON ] || exit 0

. /lib/lsb/init-functions

if [ ! -d /sys/class/ ]; then
  log_failure_msg iSCSI requires a mounted sysfs, not started.
  exit 1
fi

nodestartup_re='s/^node\.conn\[0]\.startup[ ]*=[]*//p'

RETVAL=0

start() {
log_daemon_msg Starting iSCSI initiator service iscsid
modprobe -q iscsi_tcp 2/dev/null || :
modprobe -q ib_iser 2/dev/null || :
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec
$DAEMON
RETVAL=$?
log_end_msg $RETVAL
starttargets
}

starttargets() {
log_daemon_msg Setting up iSCSI targets
$ADM -m node --loginall=automatic
log_end_msg 0
}

stoptargets() {
log_daemon_msg Disconnecting iSCSI targets
sync
$ADM -m node --logoutall=all
log_end_msg 0
}

stop() {
stoptargets
log_daemon_msg Stopping iSCSI initiator service
start-stop-daemon --stop --quiet --pidfile $PIDFILE --exec
$DAEMON
rm -f $PIDFILE
status=0
modprobe -r ib_iser 2/dev/null
if [ $? -ne 0 -a $? -ne 1 ]; then
status=1
fi
modprobe -r iscsi_tcp 2/dev/null
if [ $? -ne 0 -a $? -ne 1 ]; then
status=1
fi
log_end_msg $status
}

restart() {
stop
start
}

restarttargets() {
stoptargets
starttargets
}

status() {
#XXX FIXME: what to do here?
#status iscsid
# list active sessions
echo Current active iSCSI sessions:
$ADM -m session
}

case $1 in
start|starttargets|stop|stoptargets|restart|restarttargets|
status)
$1
;;
*)
echo Usage: $0 {start|stop|restart|status}
exit 1
;;
esac
exit $RETVAL


On Nov 19, 2:22 pm, Taka Masuda [EMAIL PROTECTED] wrote:
 I saw below the download link that open-iscsi-2.0-870 supports kernel 2.6.27
 and i don't remember the version it comes with, 86something.  I finally got
 to work around this by moving it to the first to shutdown in /etc/rc6.d . I
 moved it around different orders, but it finally worked when I made it the
 first to shutdown.

 On Tue, Nov 18, 2008 at 11:34 PM, Mike Christie [EMAIL PROTECTED]wrote:



  zeki wrote:
   I'm using Ubuntu intrepid 64bit server kernel 2.6.27-server with open-
   iscsi-2.0-870

   i get this error during reboot and it hangs the system.
   [16470.100020] iscsi: can not broadcast skb (-3)

   i've searched previous dicussions that were very old with no real
   solutions, but to use the latest version.
   I hope there is a solution for this by now.

  There is a solution, but each distro does it differently :) It has never
  been to use the latest version - maybe latest version of your distro :)

  Does Ubuntu have native iscsi support? Can you send the init script that
  gets run when you shutdown the server?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
open-iscsi group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~--~~~~--~~--~--~---



Re: Open iscsi causes machine to hang on reboot

2008-11-19 Thread Taka Masuda
I saw below the download link that open-iscsi-2.0-870 supports kernel 2.6.27
and i don't remember the version it comes with, 86something.  I finally got
to work around this by moving it to the first to shutdown in /etc/rc6.d . I
moved it around different orders, but it finally worked when I made it the
first to shutdown.

On Tue, Nov 18, 2008 at 11:34 PM, Mike Christie [EMAIL PROTECTED]wrote:


 zeki wrote:
  I'm using Ubuntu intrepid 64bit server kernel 2.6.27-server with open-
  iscsi-2.0-870
 
  i get this error during reboot and it hangs the system.
  [16470.100020] iscsi: can not broadcast skb (-3)
 
  i've searched previous dicussions that were very old with no real
  solutions, but to use the latest version.
  I hope there is a solution for this by now.
 

 There is a solution, but each distro does it differently :) It has never
 been to use the latest version - maybe latest version of your distro :)

 Does Ubuntu have native iscsi support? Can you send the init script that
 gets run when you shutdown the server?

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
open-iscsi group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~--~~~~--~~--~--~---



Re: Open iscsi causes machine to hang on reboot

2008-11-18 Thread Mike Christie

zeki wrote:
 I'm using Ubuntu intrepid 64bit server kernel 2.6.27-server with open-
 iscsi-2.0-870
 
 i get this error during reboot and it hangs the system.
 [16470.100020] iscsi: can not broadcast skb (-3)
 
 i've searched previous dicussions that were very old with no real
 solutions, but to use the latest version.
 I hope there is a solution for this by now.
 

There is a solution, but each distro does it differently :) It has never 
been to use the latest version - maybe latest version of your distro :)

Does Ubuntu have native iscsi support? Can you send the init script that 
gets run when you shutdown the server?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
open-iscsi group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~--~~~~--~~--~--~---



Re: Open iscsi causes machine to hang on reboot

2008-01-16 Thread Wilton

I see that you were able to resolve this problem.  I had a similar
problem so I'll state the resolution here for posterity.

My problem was that the shutdown scripts didn't seem to be ordered
properly.  The network was getting shut down before iscsi had a chance
to clear the cache, so the iscsi daemon was hanging.  I reordered the
scripts and it started working.  I know this isn't recommended, but it
worked for me.

On Jan 8, 3:21 am, Andreas Bergstrøm [EMAIL PROTECTED]
wrote:
 On 8. jan.. 2008, at 11:01, Mike Christie wrote:



  Mike Christie wrote:
  Try this tarball which is a rollup of what is in git and what I am
  trying to finish up for the next release:
 http://open-iscsi.org/bits/open-iscsi-2.0-868-test1.tar.gz

  You have to use the kernel modules and tools from this tarball. Do not
  use the tools or iscsi modules from Ubuntu.

 I am happy to report that after a download, make and make install the
 machine is now able to reboot properly. :)

 Regards,

 --
 Andreas Bergstrøm
 Østfold University College
 Dept. of Computer Scienceshttp://media.hiof.no/

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
open-iscsi group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~--~~~~--~~--~--~---



Re: Open iscsi causes machine to hang on reboot

2008-01-08 Thread Andreas Bergstrøm


On 8. jan.. 2008, at 10:29, Mike Christie wrote:
 I am not sure if that will work for you because I am not sure what the
 ubuntu scripts do. The shutdown -h workaround is for a RHEL/Fedora
 scripts issue.

 What are the last messages printed out when you reboot the box? Is it
 something about sending a cache sync for sdXYZ, then a message about a
 conn error? If so then the ubuntu scripts are probably turning off the
 network too soon. They need to log off all the sessions then stop the
 network, or modify the shutdown sciprts so they do not shutdown the
 network if iscsi is running.

No, there is no cache sync error messages, nor conn error messages.

I have tried rebooting after having unmounted and then stopping the  
open-iscsi service manually, but it still hung on reboot.

Usually it gives an
iscsi: can not broadcast skb (-3)

after the rebooting now message, but that came earlier when I stopped  
iscsi manually, and appeared unrelated to me.

However, the /dev/sdx devices created by open-iscsi continues to exist  
after iscsi targets are logged off and disconnected. Could this be the  
cause of the issue?

Regards

--
Andreas Bergstrøm
http://blog.andreasb.net




--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
open-iscsi group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~--~~~~--~~--~--~---



Re: Open iscsi causes machine to hang on reboot

2008-01-08 Thread Mike Christie

Mike Christie wrote:
 Andreas Bergstrøm wrote:
 On 8. jan.. 2008, at 10:29, Mike Christie wrote:
 I am not sure if that will work for you because I am not sure what the
 ubuntu scripts do. The shutdown -h workaround is for a RHEL/Fedora
 scripts issue.

 What are the last messages printed out when you reboot the box? Is it
 something about sending a cache sync for sdXYZ, then a message about a
 conn error? If so then the ubuntu scripts are probably turning off the
 network too soon. They need to log off all the sessions then stop the
 network, or modify the shutdown sciprts so they do not shutdown the
 network if iscsi is running.
 No, there is no cache sync error messages, nor conn error messages.

 I have tried rebooting after having unmounted and then stopping the  
 open-iscsi service manually, but it still hung on reboot.

 Usually it gives an
 iscsi: can not broadcast skb (-3)

 after the rebooting now message, but that came earlier when I stopped  
 iscsi manually, and appeared unrelated to me.

 However, the /dev/sdx devices created by open-iscsi continues to exist  
 after iscsi targets are logged off and disconnected. Could this be the  
 cause of the issue?

 
 Yeah, the iscsi stuff is not getting shutdown completely. There is a bug 
 when using 2.6.21 and newer with targets that are using write back cache 
 like your target.
 
 There is a fix for the upstream 2.6.25 kernel when it comes out. And in 
 the open-iscsi git tree there is a fix in the kernel modules we 
 distribute in that tarball.
 

Try this tarball which is a rollup of what is in git and what I am 
trying to finish up for the next release:
http://open-iscsi.org/bits/open-iscsi-2.0-868-test1.tar.gz

You have to use the kernel modules and tools from this tarball. Do not 
use the tools or iscsi modules from Ubuntu.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
open-iscsi group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~--~~~~--~~--~--~---



Re: Open iscsi causes machine to hang on reboot

2008-01-08 Thread Andreas Bergstrøm


On 8. jan.. 2008, at 11:01, Mike Christie wrote:


 Mike Christie wrote:

 Try this tarball which is a rollup of what is in git and what I am
 trying to finish up for the next release:
 http://open-iscsi.org/bits/open-iscsi-2.0-868-test1.tar.gz

 You have to use the kernel modules and tools from this tarball. Do not
 use the tools or iscsi modules from Ubuntu.


I am happy to report that after a download, make and make install the  
machine is now able to reboot properly. :)

Regards,

--
Andreas Bergstrøm
Østfold University College
Dept. of Computer Sciences
http://media.hiof.no/





--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
open-iscsi group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~--~~~~--~~--~--~---