1.\" $NetBSD: iscsi-initiator.8,v 1.2 2009/06/30 02:44:52 agc Exp $ 2.\" 3.\" Copyright � 2007 Alistair Crooks. All rights reserved. 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 1. Redistributions of source code must retain the above copyright 9.\" notice, this list of conditions and the following disclaimer. 10.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" notice, this list of conditions and the following disclaimer in the 12.\" documentation and/or other materials provided with the distribution. 13.\" 3. The name of the author may not be used to endorse or promote 14.\" products derived from this software without specific prior written 15.\" permission. 16.\" 17.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS 18.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 21.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 23.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 25.\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26.\" NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27.\" SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28.\" 29.Dd September 20, 2007 30.Dt ISCSI-INITIATOR 8 31.Os 32.Sh NAME 33.Nm iscsi-initiator 34.Nd refuse-based iSCSI initiator 35.Sh SYNOPSIS 36.Nm 37.Op Fl 46bcfVv 38.Op Fl a Ar authentication-type 39.Op Fl d Ar digest-type 40.Op Fl h Ar target-hostname 41.Op Fl p Ar target-port-number 42.Op Fl t Ar target-number 43.Op Fl u Ar username 44.Ar mount_point 45.Sh DESCRIPTION 46The 47.Nm 48utility can be used to access an iSCSI target, such as 49.Xr iscsi-target 8 , 50to access block storage which has been exported. 51Information pertaining to the target is displayed underneath 52the mount point, along with the device corresponding 53to the storage which the target exports. 54.Pp 55The various arguments are as follows: 56.Bl -tag -width Ds 57.It Fl 4 58Use an IPv4 connection to the target. 59.It Fl 6 60Use an IPv6 connection to the target. 61.It Fl a Ar authentication-type 62Use the specified authentication type when communicating with the target. 63The possible values are chap, kerberos, srp or none. 64The default value is none. 65.It Fl b 66Show the storage as a block device. 67.It Fl c 68Show the storage as a character device. 69.It Fl d Ar digest-type 70Use the specified digest type when communicating with the target. 71The possible values are header, data, both, all or none. 72The default value is none. 73.It Fl f 74Show the storage as a regular file. 75.It Fl h Ar hostname 76Connect to the iSCSI target running on the host specified as the argument. 77.It Fl p Ar port-number 78Connect to the iSCSI target running on the port specified as the argument. 79The default value is 3260. 80.It Fl t Ar target 81Connect to the number of the iSCSI target running as the argument. 82.It Fl u Ar username 83Use the specified user's credentials when logging in to the iSCSI target. 84There is no default. 85.It Fl V 86Print out the version number and then exit. 87.It Fl v 88Be verbose in operation. 89.El 90.Pp 91The 92.Xr refuse 3 93library is used to provide the file system features. 94.Pp 95The mandatory parameter is the local mount point. 96.Pp 97This iSCSI initiator presents a view of the targets underneath the 98mount point. 99Firstly, it creates a directory tree with the hostname of the target, 100and, in that directory, a virtual directory is created for each 101target name exported by the iSCSI target program. 102Within that virtual target directory, symbolic links exist for 103the hostname (for convenience), 104a textual representation of the IP address, 105the iSCSI target product name, 106the iSCSI target IQN, 107the iSCSI target vendor and version number. 108One other directory entry is presented in the virtual target 109directory, relating to the storage presented by the iSCSI target. 110This can be in the form of a regular file, which is also the 111default, a block device or a character device. 112.Pp 113Please note that the 114.Nm 115utility needs the 116.Dq puffs 117kernel module loaded via 118.Xr modload 8 119to operate. 120.Sh EXAMPLES 121.Bd -literal 122# ./iscsi-initiator -u agc iscsi-target0.alistaircrooks.co.uk /mnt 123# ls -al /mnt/iscsi-target0.alistaircrooks.co.uk/target0 124total 576 125drwxr-xr-x 2 agc agc 512 May 11 22:24 . 126drwxr-xr-x 2 agc agc 512 May 11 22:24 .. 127lrw-r--r-- 1 agc agc 39 May 11 22:24 hostname -\*[Gt] iscsi-target0.alistaircrooks.co.uk 128lrw-r--r-- 1 agc agc 14 May 11 22:24 ip -\*[Gt] 172.16.135.130 129lrw-r--r-- 1 agc agc 16 May 11 22:24 product -\*[Gt] NetBSD iSCSI 130-rw-r--r-- 1 agc agc 104857600 May 11 22:24 storage 131lrw-r--r-- 1 agc agc 43 May 11 22:24 targetname -\*[Gt] iqn.1994-04.org.netbsd.iscsi-target:target0 132lrw-r--r-- 1 agc agc 8 May 11 22:24 vendor -\*[Gt] NetBSD 133lrw-r--r-- 1 agc agc 4 May 11 22:24 version -\*[Gt] 0 134# 135.Ed 136.Sh SEE ALSO 137.Xr puffs 3 , 138.Xr refuse 3 , 139.Xr iscsi-target 8 140.Sh HISTORY 141The 142.Nm 143utility first appeared in 144.Nx 5.0 . 145.Sh AUTHORS 146The 147.Nm 148utility was written by 149.An Alistair Crooks 150.Aq agc@NetBSD.org . 151