From owner-freebsd-scsi@freebsd.org Thu Jul 2 19:40:33 2015 Return-Path: Delivered-To: freebsd-scsi@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 842A8993A52 for ; Thu, 2 Jul 2015 19:40:33 +0000 (UTC) (envelope-from rah.lists@gmail.com) Received: from mail-ob0-x230.google.com (mail-ob0-x230.google.com [IPv6:2607:f8b0:4003:c01::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C0B52F83 for ; Thu, 2 Jul 2015 19:40:33 +0000 (UTC) (envelope-from rah.lists@gmail.com) Received: by obpn3 with SMTP id n3so56337959obp.0 for ; Thu, 02 Jul 2015 12:40:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=vtLJ/mVBRbP7UhhhP4qY15Vk+6WvfKVuDEU37cCtOXU=; b=LeT5kNFSB6J3DeHu6NghHiS157NW0iqqNsyQb1QWEKoTr+dF8QaAnAwJ9BjVIE4ksO zEEtjFTWFP+S4VicNBMqUAk0ZFqriyNwdOBpiKPesLvIm4D+5iUqwwlYIBL/QANh8yPD dmfFtFcwLc1IWMBq4CUb41w6aY8EQ+Cy/pSwPKOyA1/ZH9E8NJFuz0Cb811yl4EmOoXl gcsQY2cBXjuxXAzbNm2oqCEi3Z5YRgKTRXYJ05utSGdXp75s+FZ+bqd7CFbUGEbefuro Gq9jq80k/n0hR41cB2YS3sZGhZTfGAMEYlC9zAu+UuulJZ3XZmwsiJPQxsiVZGWYBPuk k1zw== MIME-Version: 1.0 X-Received: by 10.60.74.2 with SMTP id p2mr31415534oev.57.1435866032469; Thu, 02 Jul 2015 12:40:32 -0700 (PDT) Received: by 10.202.44.16 with HTTP; Thu, 2 Jul 2015 12:40:32 -0700 (PDT) In-Reply-To: <20150702083218.GA16246@brick.home> References: <20150630194558.GA1223@brick.home> <20150702083218.GA16246@brick.home> Date: Thu, 2 Jul 2015 15:40:32 -0400 Message-ID: Subject: Re: [iscsictl] connection to invalid target From: RA H To: RA H , freebsd-scsi@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jul 2015 19:40:33 -0000 On Thu, Jul 2, 2015 at 4:32 AM, Edward Tomasz Napiera=C5=82a wrote: > So basically it's not a FreeBSD bug? > Correct. > The problem here is that the discovery is performed by iscsid; the way > to implement it would be to make iscsictl add the discovery session, wait > for iscsid to finish discovery but not connect to the targets, report > targets, and then remove them. So basically pretty much what you are > doing anyway. > But that's not what I'm doing because I have no idea how to do discovery only through any means. Roughly, my process is as follows: * Get list of connected targets (iscsictl -L) * Do discovery+login (iscsictl -Ad ) * Get list of connected targets (iscsictl -L) * Filter newly connected targets * Compare newly connected target names to user-input target name and disconnect non-matching sessions If you could demonstrate how to implement the process you described above I'd be incredibly greatful. Also, apologies for not keeping this on the ML, I'm new at this...