1.\" Copyright (c) 2007-2010 Daniel Braniss <danny@cs.huji.ac.il> 2.\" All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. 9.\" 2. Redistributions in binary form must reproduce the above copyright 10.\" notice, this list of conditions and the following disclaimer in the 11.\" documentation and/or other materials provided with the distribution. 12.\" 13.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23.\" SUCH DAMAGE. 24.\" 25.\" $FreeBSD: stable/9/sbin/iscontrol/iscontrol.8 249490 2013-04-14 22:38:28Z jpaetzel $ 26.\" 27.Dd August 9, 2010 28.Dt ISCONTROL 8 29.Os 30.Sh NAME 31.Nm iscontrol 32.Nd login/negotiator/control for an iSCSI initiator session 33.Sh SYNOPSIS 34.Nm 35.Op Fl dv 36.Oo 37.Fl c Ar file 38.Op Fl n Ar nickname 39.Oc 40.Op Fl p Ar pidfile 41.Op Fl t Ar target 42.Op Ar variable Ns = Ns Ar value 43.Sh DESCRIPTION 44Internet SCSI (iSCSI) is a network protocol standard, that allows the 45use of the SCSI protocol over TCP/IP networks, 46the 47.Nm 48program is the userland side of an iSCSI session, see 49.Xr iscsi_initiator 4 . 50It has 2 modes of operation, if -d (discovery session) is specified, 51it will print out the 52.Em target names 53returned by the target and exit. 54In the second mode, it will, after a successful login/negotiation, run 55in daemon mode, monitoring the connection, and will try to reconnect 56in case of a network/target failure. 57It will terminate/logout the session 58when a SIGHUP signal is received. 59The flags are as follows: 60.Bl -tag -width variable=value 61.It Fl c Ar file 62a file containing configuration 63.Em key-options , 64see 65.Xr iscsi.conf 5 . 66.It Fl d 67do a 68.Em discovery session 69and exit. 70.It Fl n Ar nickname 71if 72.Sy -c file 73is specified, then search for the block named 74.Em nickname 75in that file, see 76.Xr iscsi.conf 5 . 77.It Fl p Ar pidfile 78will write the process ID of the session to the specified 79.Em pidfile 80.It Fl t Ar target 81the target's IP address or name. 82.It Fl v 83verbose mode. 84.It Ar variable Ns = Ns Ar value 85see 86.Xr iscsi.conf 5 87for the complete list of variables/options and their 88possible values. 89.El 90.Sh EXAMPLES 91.Dl iscontrol -dt myiscsitarget 92.Pp 93will start a 94.Em discovery session 95with the target and 96print to stdout the list of available targetnames/targetadresses. 97Note: this listing does not necessarily mean availability, since 98depending on the target configuration, a discovery session might 99not need login/access permission, but a 100.Em full session 101certainly does. 102.sp 103.Dl iscontrol -c /etc/iscsi.conf -n myiscsi 104.Pp 105will read options from 106.Pa /etc/iscsi.conf , 107use the targetaddress 108found in the block nicknamed myiscsi, login and negotiate 109whatever options are specified, and start an iscsi-session. 110.Sh SEE ALSO 111.Xr da 4 , 112.Xr iscsi_initiator 4 , 113.Xr sa 4 , 114.Xr iscsi.conf 5 , 115.Xr camcontrol 8 116.Sh STANDARDS 117RFC 3720 118.\"Sh HISTORY 119.Sh BUGS 120.Nm 121should probably load the iscsi_initiator module if needed. 122.br 123Not all functions/specifications have been implemented yet, noticeably 124missing are the Task Management Functions. 125The error recovery, though not 126.Em fully compliant 127does a brave effort to recover from network disconnects. 128