From owner-freebsd-scsi@freebsd.org Mon Jun 29 18:58:08 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 181C998F7FC for ; Mon, 29 Jun 2015 18:58:08 +0000 (UTC) (envelope-from rah.lists@gmail.com) Received: from mail-la0-x230.google.com (mail-la0-x230.google.com [IPv6:2a00:1450:4010:c03::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 B4D3110A1 for ; Mon, 29 Jun 2015 18:58:07 +0000 (UTC) (envelope-from rah.lists@gmail.com) Received: by lagc2 with SMTP id c2so21252935lag.3 for ; Mon, 29 Jun 2015 11:58:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=v31O0N0TNO92BjGZmPg8Ow5slp2KESmxAw903oBHj2A=; b=Wk9Gw/NMHeRrpxRqTc9as4m+oAFFCo8R1FDEaP/TW47FGijxJJMUeXABOQ6X6/YD/D kCrqosHKqkMJ1czwkjVDSE1+QUAPw61NCoqaZw+W66USudrrB4bL+auYo3ms4TDdBEvJ c/JtF8HSOWck/0zoD+pFw9Ox0frTpC578ZqlnvZtxP2Cqj5rNCknOyPaYz/GPiwwrQgc vxrLghRIYrklFa+IN4IrvjhrFUL/tYIqZT8q0HtQJ4+yAJEJ1QDLav04anyWdAM9rfWN mKq45KEVmdgAdL2HbtNkz8Eqe3J1SdYkWupruydIyFGY5hevn2mrmWS/w1iprP75gySp 2WDg== MIME-Version: 1.0 X-Received: by 10.152.170.234 with SMTP id ap10mr12090498lac.28.1435604285746; Mon, 29 Jun 2015 11:58:05 -0700 (PDT) Received: by 10.25.218.66 with HTTP; Mon, 29 Jun 2015 11:58:05 -0700 (PDT) Date: Mon, 29 Jun 2015 14:58:05 -0400 Message-ID: Subject: [iscsictl] connection to invalid target From: RA H To: freebsd-scsi@freebsd.org Content-Type: text/plain; charset=UTF-8 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: Mon, 29 Jun 2015 18:58:08 -0000 I have a SAN with four iSCSI targets, eui.000B56007135B1B0 through eui.000B56007135B1B3 I need to validate target names entered manually by a user. Normally, I would do this is by searching the output of a discovery session. Since iscsictl doesn't allow doing discovery *only*, the only way I can think of to validate a target is to connect, then parse the output of "iscsictl -L". Unfortunately, attempting to connect to certain invalid targets results in connection to a valid target: # iscsictl -Ad 192.168.3.111 # iscsictl -L Target name Target portal State eui.000B56007135B1B0 192.168.3.111 Connected: da0 eui.000B56007135B1B1 192.168.3.111 Connected: da2 eui.000B56007135B1B2 192.168.3.111 Connected: da1 eui.000B56007135B1B3 192.168.3.111 Connected: da3 # iscsictl -Ra # iscsictl -A -p 192.168.3.111 -t eui.000B56007135B1A1 # iscsictl -L Target name Target portal State eui.000B56007135B1A1 192.168.3.111 Connected: da0 # dmesg ... da0: Serial Number 000B56007135B1B10000 ... As the Serial Number indicates, iscsictl actually connected to target eui.000B56007135B1B1.