[PATCH 1/2] Do not run discovery on portals that open-iscsi is logged-in to

2008-01-16 Thread Erez Zilber

Running a discovery on a portal that open-iscsi is logged in to may result
in changes to a logged-in node (like changing the node's transport type).
Changing these properties shouldn't be done while logged in.

Signed-off-by: Erez Zilber [EMAIL PROTECTED]
---
 utils/iscsi_discovery |6 ++
 1 files changed, 6 insertions(+), 0 deletions(-)
 mode change 100644 = 100755 utils/iscsi_discovery

diff --git a/utils/iscsi_discovery b/utils/iscsi_discovery
old mode 100644
new mode 100755
index 7c7083f..6059efe
--- a/utils/iscsi_discovery
+++ b/utils/iscsi_discovery
@@ -63,6 +63,12 @@ parse_cmdline()
 
 discover()
 {
+   # If open-iscsi is already logged in to the portal, exit
+   if [ $(iscsiadm -m session | grep -c ${ip}:${port}) -ne 0 ]; then
+   echo Please logout from all targets on ${ip}:${port} before 
trying to run discovery on that portal
+   exit 2
+   fi
+
connected=0
discovered=0
df=/tmp/discovered.$$
-- 
1.5.3.7



--~--~-~--~~~---~--~~
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: setting up initiator-target pair

2008-01-16 Thread Erez Zilber

__mango wrote:

 I am trying to set up an iscsi communication. I use  open-
 iscsi-2.0-865.15 for initiator and iscsitarget-0.4.0 as target.

 1. Is this target compatible with the initiator.
   

It should be. I think that many people use that target (although I don't).

 2. There is no issue with kernel versions. i try to set up a session
 and i get absolutely no messages. It tells initiator is running fine.
   

First, make sure that your initiator name was set correctly in
/etc/iscsi/initiatorname.iscsi

What's the output of the following commands:

   1. open-iscsi service:
 1. If you're running on RedHat: /etc/init.d/iscsi status
 2. If you're running on SuSE: /etc/init.d/open-iscsi status
   2. iscsiadm -m node
   3. iscsiadm -m session

If iscsiadm -m node doesn't show any nodes, you'll need to discover
them first. Try the iscsi_discovery script. It also has a man page.

If iscsiadm -m node shows nodes but iscsiadm -m session doesn't show
any nodes, try to login to those nodes. I think that the README has some
very useful examples.

 3. The ReadMe s are not of much help.

 Can anyone redirect me to a place where there is a doc about practical
 setup of an iscsi.

I don't know about other docs. BTW - did you read the man pages?

Erez


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---