diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2013-05-18 00:00:40 +0400 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2013-05-18 00:00:40 +0400 |
commit | 213d4f4f0d053d779dd43aa3ed1b6e256569ce16 (patch) | |
tree | 613b497a9c3f9cb385b8c35bb8b77252621f9f93 /usr/src/man | |
download | iscsit-illumos.tar.gz |
Initial illumos sourcesillumos
Diffstat (limited to 'usr/src/man')
-rw-r--r-- | usr/src/man/man1m/itadm.1m | 943 | ||||
-rw-r--r-- | usr/src/man/man3iscsit/it_config_load.3iscsit | 182 | ||||
-rw-r--r-- | usr/src/man/man3iscsit/it_ini_create.3iscsit | 188 | ||||
-rw-r--r-- | usr/src/man/man3iscsit/it_portal_create.3iscsit | 139 | ||||
-rw-r--r-- | usr/src/man/man3iscsit/it_tgt_create.3iscsit | 291 | ||||
-rw-r--r-- | usr/src/man/man3iscsit/it_tpg_create.3iscsit | 175 | ||||
-rw-r--r-- | usr/src/man/man3lib/libiscsit.3lib | 87 |
7 files changed, 2005 insertions, 0 deletions
diff --git a/usr/src/man/man1m/itadm.1m b/usr/src/man/man1m/itadm.1m new file mode 100644 index 0000000..12a3e7e --- /dev/null +++ b/usr/src/man/man1m/itadm.1m @@ -0,0 +1,943 @@ +'\" te +.\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. +.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with +.\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH ITADM 1M "Aug 4, 2009" +.SH NAME +itadm \- administer iSCSI targets +.SH SYNOPSIS +.LP +.nf +\fBitadm\fR create-target [\fB-a\fR,\fB--auth-method\fR radius | chap | none | default] + [\fB-s\fR,\fB--chap-secret\fR] [\fB-S\fR,\fB--chap-secret-file\fR \fIpath\fR] + [\fB-u\fR,\fB--chap-user\fR \fIchap-user-name\fR] [\fB-n\fR,\fB--node-name\fR \fItarget_node_name\fR] + [\fB-l\fR,\fB--alias\fR \fIalias\fR] [\fB-t\fR,\fB--tpg\fR \fItpg-name\fR[,\fItpg-name\fR]] +.fi + +.LP +.nf +\fBitadm\fR modify-target [\fB-a\fR,\fB--auth-method\fR radius | chap | none | default] + [\fB-s\fR,\fB--chap-secret\fR] [\fB-S\fR,\fB--chap-secret-file\fR \fIpath\fR] + [\fB-u\fR,\fB--chap-user\fR \fIchap-user-name\fR] [\fB-n\fR,\fB--node-name\fR \fInew_target_node_name\fR] + [\fB-l\fR,\fB--alias\fR \fIalias\fR] [\fB-t\fR,\fB--tpg\fR \fItpg-name\fR[,\fItpg-name\fR]] \fItarget_node_name\fR +.fi + +.LP +.nf +\fBitadm\fR delete-target [\fB-f\fR,\fB--force\fR] \fItarget_node_name\fR +.fi + +.LP +.nf +\fBitadm\fR list-target [\fB-v\fR,\fB--verbose\fR] [\fItarget_node_name\fR] +.fi + +.LP +.nf +\fBitadm\fR create-tpg \fItpg_name\fR \fIIP-address\fR[:\fIport\fR] [\fIIP-address\fR[:\fIport\fR]]... +.fi + +.LP +.nf +\fBitadm\fR list-tpg [\fB-v\fR,\fB--verbose\fR] [\fItpg_name\fR] +.fi + +.LP +.nf +\fBitadm\fR delete-tpg [\fB-f\fR,\fB--force\fR] \fItpg_name\fR +.fi + +.LP +.nf +\fBitadm\fR create-initiator [\fB-s\fR,\fB--chap-secret\fR] [\fB-S\fR,\fB--chap-secret-file\fR \fIpath\fR] + [\fB-u\fR,\fB--chap-user\fR \fIchap-user-name\fR] \fIinitiator_node_name\fR +.fi + +.LP +.nf +\fBitadm\fR modify-initiator [\fB-s\fR,\fB--chap-secret\fR] [\fB-S\fR,\fB--chap-secret-file\fR \fIpath\fR] + [\fB-u\fR,\fB--chap-user\fR \fIchap-user-name\fR] \fIinitiator_node_name\fR +.fi + +.LP +.nf +\fBitadm\fR list-initiator [\fB-v\fR,\fB--verbose\fR] \fIinitiator_node_name\fR +.fi + +.LP +.nf +\fBitadm\fR delete-initiator \fIinitiator_node_name\fR +.fi + +.LP +.nf +\fBitadm\fR modify-defaults [\fB-a\fR,\fB--auth-method\fR radius | chap | none] + [\fB-r\fR,\fB--radius-server\fR \fIIP-address\fR[:\fIport\fR]] [\fB-d\fR,\fB--radius-secret\fR] + [\fB-D\fR,\fB--radius-secret-file\fR \fIpath\fR][\fB-i\fR,\fB--isns\fR enable | disable] + [\fB-I\fR,\fB--isns-server\fR \fIIP-address\fR[:\fIport\fR][,\fIIP-address\fR[:\fIport\fR]]] +.fi + +.LP +.nf +\fBitadm\fR list-defaults +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBitadm\fR command manages Internet SCSI (iSCSI) target nodes within the +SCSI Target Mode Framework described in \fBstmfadm\fR(1M) and +\fBlibstmf\fR(3LIB). This allows the iSCSI initiators to access STMF logical +units using the iSCSI protocol. In addition to iSCSI target nodes, \fBitadm\fR +manages two other classes of managed objects: iSCSI Target Portal Groups, and +iSCSI Initiator Node Contexts. +.sp +.LP +\fBitadm\fR is implemented as a set of subcommands with options and operands +for each subcommand. These subcommands are described in their own section, +below. In addition to its subcommands, \fBitadm\fR has a help command, which +displays the utility's usage information. The help command is invoked with the +\fB-?\fR option. +.SS "iSCSI Target Portal Groups" +.sp +.LP +An iSCSI Target Network Portal is an IP address and TCP port that can be used +by an initiator node to connect to an iSCSI target. A collection of these +portals is called a Target Portal Group (TPG). You can use a TPG to limit +access to an iSCSI target. Use the \fBitadm modify\fR \fB-t\fR command to bind +a specific iSCSI target to the TPG. An iSCSI listener is created on each IP +address that belongs to the TPG, and listens for connections to the iSCSI +target. +.sp +.LP +A TPG is identified by a unique name provided when the TPG is created. A +numerical "Target Portal Group Tag" from the range 2-65535 is automatically +generated when the TPG is created. The Target Portal Group Tag 1 is reserved +for the "default" target portal group that is used when no explicit Target +Portal Groups are set on the target. The portal for the default TPG matches +requests from all network interfaces on port 3260. +.SS "iSCSI Initiator Node Contexts" +.sp +.LP +Certain operations such as authentication by means of Challenge Handshake +Authentication Protocol (CHAP) require parameters associated with a remote +iSCSI Initiator Node. These parameters are associated with an iSCSI Initiator +Node Context. An iSCSI Initiator Node Context is identified by its Initiator +Node Name, formatted in either IQN or EUI format (see RFC 3720). For example: +.sp +.in +2 +.nf +iqn.1986-03.com.sun:01:e00000000000.47d55444 +eui.02004567A425678D +.fi +.in -2 +.sp + +.SS "Specifying IP Addresses" +.sp +.LP +A number of \fBitadm\fR subcommands require that you specify one or more IP +addresses with optional port numbers. For IPv4, use standard dotted decimal +notation. For IPv6, enclose addresses in square brackets. The following are +example specifications. +.sp +.in +2 +.nf +\fBIPv4\fR: 10.2.4.1 + 10.2.4.1:3260 +\fBIPv6\fR: [1080:0:0:0:8:800:200C:417A] + [1080:0:0:0:8:800:200C:417A]:3260 +.fi +.in -2 +.sp + +.SH SUB-COMMANDS +.sp +.LP +The following are the \fBitadm\fR subcommands with their options. +.SS "\fBitadm create-target\fR" +.sp +.in +2 +.nf +itadm create-target [-a,--auth-method radius | chap | none | default] + [-s,--chap-secret] + [-S,--chap-secret-file \fIpath\fR] [-u,--chap-user \fIchap-user-name\fR] + [-n,--node-name \fItarget_node_name\fR] [-l,--alias \fIalias\fR] + [-t,--tpg \fItpg-name\fR[,\fItpg-name\fR,...]] +.fi +.in -2 +.sp + +.sp +.LP +Create a iSCSI target with the specified options. Options are as follows. +.sp +.ne 2 +.na +\fB\fB-a\fR,\fB--auth-method\fR \fBradius | chap | none | default\fR\fR +.ad +.sp .6 +.RS 4n +Specifies the authentication method to use for the target. Valid values are +\fBradius\fR, \fBchap\fR, and \fBnone\fR. \fBchap\fR indicates that initiators +connecting to this target must be authenticated using the Challenge Handshake +Authentication Protocol (CHAP). \fBradius\fR indicates initiators should also +be authenticated by means of CHAP but the required authentication parameters +should be obtained from a central RADIUS server (see the \fBradius-server\fR +and \fBradius-secret\fR options). \fBnone\fR means that no authentication is +required to connect to the target. \fBdefault\fR means the target will use the +global setting of this property. (See the \fBmodify-defaults\fR subcommand.) +.RE + +.sp +.ne 2 +.na +\fB\fB-s\fR,\fB--chap-secret\fR\fR +.ad +.sp .6 +.RS 4n +The CHAP secret to send during mutual CHAP authentication. There is no default +for this property. Maximum length is 255 characters; minimum required length is +12 characters. +.RE + +.sp +.ne 2 +.na +\fB\fB-S\fR,\fB--chap-secret-file\fR \fIpath\fR\fR +.ad +.sp .6 +.RS 4n +Path to a temporary file containing the CHAP secret as described in the +\fB-s\fR option. +.RE + +.sp +.ne 2 +.na +\fB\fB-u\fR,\fB--chap-user\fR \fIchap-user-name\fR\fR +.ad +.sp .6 +.RS 4n +Specifies the CHAP username for a target for use in mutual CHAP authentication. +This value is allowed only for targets, cannot be set globally, and is used +only when the initiator node is configured to use mutual CHAP authentication. +If no value is specified then the target node name is used as the username. See +\fBiscsiadm\fR(1M). +.RE + +.sp +.ne 2 +.na +\fB\fB-n\fR,\fB--node-name\fR \fItarget_node_name\fR\fR +.ad +.sp .6 +.RS 4n +An iSCSI Target Node is identified by its Target Node Name, formatted in either +IQN or EUI format (see RFC 3720). This option establishes that name. +.RE + +.sp +.ne 2 +.na +\fB\fB-l\fR,\fB--alias\fR \fIalias\fR\fR +.ad +.sp .6 +.RS 4n +An alternate identifier associated with a target node. The identifier does not +need to be unique. +.RE + +.sp +.ne 2 +.na +\fB\fB-t\fR,\fB--tpg\fR \fItpg-name\fR[,\fItpg-name\fR,...]\fR +.ad +.sp .6 +.RS 4n +A list of Target Portal Group (TPG) identifiers that specifies the TPGs that an +initiator can use to access a specific target or the keyword \fBdefault\fR. If +\fBdefault\fR is specified, the target will use the default portal, +\fBINADDR_ANY:3260\fR. +.RE + +.SS "\fBitadm modify-target\fR" +.sp +.in +2 +.nf +itadm modify-target [\fB-a\fR,\fB--auth-method\fR radius | chap | none | default] + [\fB-s\fR,\fB--chap-secret\fR] [\fB-S\fR,\fB--chap-secret-file\fR \fIpath\fR] + [\fB-u\fR,\fB--chap-user\fR \fIchap-user-name\fR] [\fB-n\fR,\fB--node-name\fR \fInew_tgt_node_name\fR] + [\fB-l\fR,\fB--alias\fR \fIalias\fR] [\fB-t\fR,\fB--tpg\fR \fItpg-name\fR[,\fItpg-name\fR]] \fItarget_node_name\fR +.fi +.in -2 +.sp + +.sp +.LP +Modify an iSCSI target according to the specified options. Options are as +follows. +.sp +.ne 2 +.na +\fB\fB-a\fR,\fB--auth-method\fR \fBradius | chap | none | default\fR\fR +.ad +.sp .6 +.RS 4n +As described under the \fBcreate-target\fR subcommand, above. +.RE + +.sp +.ne 2 +.na +\fB\fB-s\fR,\fB--chap-secret\fR\fR +.ad +.sp .6 +.RS 4n +As described under the \fBcreate-target\fR subcommand, above. +.RE + +.sp +.ne 2 +.na +\fB\fB-S\fR,\fB--chap-secret-file\fR \fIpath\fR\fR +.ad +.sp .6 +.RS 4n +As described under the \fBcreate-target\fR subcommand, above. +.RE + +.sp +.ne 2 +.na +\fB\fB-u\fR,\fB--chap-user\fR \fIchap-user-name\fR\fR +.ad +.sp .6 +.RS 4n +As described under the \fBcreate-target\fR subcommand, above. To remove an +explicitly set CHAP username use \fB-u\fR \fBnone\fR. +.RE + +.sp +.ne 2 +.na +\fB\fB-n\fR,\fB--node-name\fR \fItarget_node_name\fR\fR +.ad +.sp .6 +.RS 4n +Renames the target. See also the description of \fB-n\fR under the +\fBcreate-target\fR subcommand, above. +.RE + +.sp +.ne 2 +.na +\fB\fB-l\fR,\fB--alias\fR \fIalias\fR\fR +.ad +.sp .6 +.RS 4n +As described under the \fBcreate-target\fR subcommand, above. To remove an +explicitly set alias use \fB-l\fR \fBnone\fR. +.RE + +.sp +.ne 2 +.na +\fB\fB-t\fR,\fB--tpg\fR \fItpg-name\fR[,\fItpg-name\fR,...]\fR +.ad +.sp .6 +.RS 4n +As described under the \fBcreate-target\fR subcommand, above. +.RE + +.SS "\fBitadm list-target\fR" +.sp +.in +2 +.nf +itadm list-target [\fB-v\fR,\fB--verbose\fR] [\fItarget_node_name\fR] +.fi +.in -2 +.sp + +.sp +.LP +List information about the configured targets. If \fItarget_node_name\fR is +specified, list only the information for that target. Option is as follows. +.sp +.ne 2 +.na +\fB\fB-v\fR,\fB--verbose\fR\fR +.ad +.sp .6 +.RS 4n +Verbose mode. +.RE + +.SS "\fBitadm delete-target\fR" +.sp +.in +2 +.nf +itadm delete-target [\fB-f\fR,\fB--force\fR] \fItarget_node_name\fR +.fi +.in -2 +.sp + +.sp +.LP +Delete the target specified by \fItarget_node_name\fR. The target must be +\fBoffline\fR before it can be deleted. Option is as follows. +.sp +.ne 2 +.na +\fB\fB-f\fR,\fB--force\fR\fR +.ad +.sp .6 +.RS 4n +If the target persists in an online state, this option attempts to offline the +target before deleting it. +.RE + +.SS "\fBitadm create-tpg\fR" +.sp +.in +2 +.nf +itadm create-tpg \fItpg_name\fR \fIIP-address\fR[:\fIport\fR]... +.fi +.in -2 +.sp + +.sp +.LP +Create an iSCSI target portal group made up of the specified portals and assign +it the identifier \fItpg_name\fR. Each portal is an IP address and port pair. +IPv4 portals are specified in dotted address notation, for example, +\fB172.31.255.255\fR. IPv6 portal addresses must be enclosed in square +brackets. +.sp +.LP +This subcommand has no options. +.SS "\fBitadm list-tpg\fR" +.sp +.in +2 +.nf +itadm list-tpg [\fB-v\fR,\fB--verbose\fR] [\fItpg_name\fR] +.fi +.in -2 +.sp + +.sp +.LP +List information about the configured target portal group. If \fItpg_name\fR is +specified then list only the information about the target portal group +associated with that \fItpg_name\fR. Option is as follows. +.sp +.ne 2 +.na +\fB\fB-v\fR,\fB--verbose\fR\fR +.ad +.sp .6 +.RS 4n +Verbose mode. +.RE + +.SS "\fBitadm delete-tpg\fR" +.sp +.in +2 +.nf +itadm delete-tpg [\fB-f\fR,\fB--force\fR] \fItpg_name\fR +.fi +.in -2 +.sp + +.sp +.LP +Delete the target portal group associated with \fItpg_name\fR. Option is as +follows. +.sp +.ne 2 +.na +\fB\fB-f\fR,\fB--force\fR\fR +.ad +.sp .6 +.RS 4n +If the TPG is associated with any targets, the request to delete will be denied +unless this option is specified. +.RE + +.SS "\fBitadm create-initiator\fR" +.sp +.in +2 +.nf +itadm create-initiator [\fB-s\fR,\fB--chap-secret\fR] [\fB-S\fR,\fB--chap-secret-file\fR \fIpath\fR] + [\fB-u\fR,\fB--chap-user\fR \fIchap-user-name\fR] \fIinitiator_node_name\fR +.fi +.in -2 +.sp + +.sp +.LP +Configure parameters associated with the remote initiator named +\fIinitiator_node_name\fR. Options are as follows. +.sp +.ne 2 +.na +\fB\fB-s\fR,\fB--chap-secret\fR\fR +.ad +.sp .6 +.RS 4n +As described under the \fBcreate-target\fR subcommand, above. +.RE + +.sp +.ne 2 +.na +\fB\fB-S\fR,\fB--chap-secret-file\fR \fIpath\fR\fR +.ad +.sp .6 +.RS 4n +As described under the \fBcreate-target\fR subcommand, above. +.RE + +.sp +.ne 2 +.na +\fB\fB-u\fR,\fB--chap-user\fR \fIchap-user-name\fR\fR +.ad +.sp .6 +.RS 4n +Specifies the CHAP username for an initiator, for use in CHAP authentication. +If no value is specified then the initiator node name is used as the username. +.RE + +.SS "\fBitadm modify-initiator\fR" +.sp +.in +2 +.nf +itadm modify-initiator [\fB-s\fR,\fB--chap-secret\fR] [\fB-S\fR,\fB--chap-secret-file\fR \fIpath\fR] + [\fB-u\fR,\fB--chap-user\fR \fIchap-user-name\fR] \fIinitiator_node_name\fR +.fi +.in -2 +.sp + +.sp +.LP +Modify parameters associated with the remote initiator named +\fIinitiator_node_name\fR. Options are as follows. +.sp +.ne 2 +.na +\fB\fB-s\fR,\fB--chap-secret\fR\fR +.ad +.sp .6 +.RS 4n +As described under the \fBcreate-target\fR subcommand, above. +.RE + +.sp +.ne 2 +.na +\fB\fB-S\fR,\fB--chap-secret-file\fR \fIpath\fR\fR +.ad +.sp .6 +.RS 4n +As described under the \fBcreate-target\fR subcommand, above. +.RE + +.sp +.ne 2 +.na +\fB\fB-u\fR,\fB--chap-user\fR \fIchap-user-name\fR\fR +.ad +.sp .6 +.RS 4n +Specifies the CHAP username for an initiator, for use in CHAP authentication. +If no value is specified then the initiator node name is used as the username. +.RE + +.SS "\fBitadm delete-initiator\fR" +.sp +.in +2 +.nf +itadm delete-initiator \fIinitiator_node_name\fR +.fi +.in -2 +.sp + +.sp +.LP +Delete parameters associated with the remote initiator named +\fIinitiator_node_name\fR. This subcommand has no options. +.SS "\fBitadm list-initiator\fR" +.sp +.in +2 +.nf +\fBitadm\fR list-initiator [\fB-v\fR,\fB--verbose\fR] \fIinitiator_node_name\fR +.fi +.in -2 +.sp + +.sp +.LP +List parameters associated with the initiator named \fIinitiator_node_name\fR. +Option is as follows. +.sp +.ne 2 +.na +\fB\fB-v\fR,\fB--verbose\fR\fR +.ad +.sp .6 +.RS 4n +Verbose mode. +.RE + +.SS "\fBitadm modify-defaults\fR" +.sp +.in +2 +.nf +itadm modify-defaults [\fB-a\fR,\fB--auth-method\fR radius | chap | none] + [\fB-r\fR,\fB--radius-server\fR \fIIP-address\fR[:\fIport\fR]] [\fB-d\fR,\fB--radius-secret\fR] + [\fB-D\fR,\fB--radius-secret-file\fR \fIpath\fR][\fB-i\fR,\fB--isns\fR enable | disable] + [\fB-I\fR,\fB--isns-server\fR \fIIP-address\fR[:\fIport\fR][,\fIIP-address\fR[:\fIport\fR]]] +.fi +.in -2 +.sp + +.sp +.LP +Modify default parameters. Options are as follows. +.sp +.ne 2 +.na +\fB\fB-a\fR,\fB--auth-method\fR \fBradius | chap | none\fR\fR +.ad +.sp .6 +.RS 4n +Specifies the default authentication method to use for all targets. Valid +values are \fBradius\fR, \fBchap\fR, and \fBnone\fR. \fBchap\fR indicates that +initiators connecting to this target must be authenticated using Challenge +Handshake Authentication Protocol (CHAP). \fBradius\fR indicates initiators +should also be authenticated by means of CHAP, but the required authentication +parameters should be obtained from a central RADIUS server. (See +\fB--radius-server\fR and \fB--radius-secret\fR options.) \fBnone\fR means that +no authentication is required to connect to the target. Individual targets can +override this global setting using the \fB-a\fR option of the +\fBcreate-target\fR and \fBmodify-target\fR subcommands. +.RE + +.sp +.ne 2 +.na +\fB\fB-d\fR,\fB--radius-secret\fR\fR +.ad +.sp .6 +.RS 4n +RADIUS Shared Secret for centralized CHAP authentication. +.RE + +.sp +.ne 2 +.na +\fB\fB-D\fR,\fB--radius-secret-file\fR \fIpath\fR\fR +.ad +.sp .6 +.RS 4n +Path to a temporary file containing the CHAP secret as described in the +\fB-d\fR option. +.RE + +.sp +.ne 2 +.na +\fB\fB-i\fR,\fB--sns\fR \fBenable | disable\fR\fR +.ad +.sp .6 +.RS 4n +Specifies whether targets should be registered with the set of defined iSCSI +Name Service (iSNS) servers. +.RE + +.sp +.ne 2 +.na +\fB\fB-I\fR,\fB--isns-server\fR +\fIIP-address\fR[:\fIport\fR][,\fIIP-address\fR[:\fIport\fR],...]\fR +.ad +.sp .6 +.RS 4n +Defines a list of iSNS servers with which iSCSI target nodes will be registered +when the \fBisns\fR option associated with the respective target is set. Up to +eight iSNS servers can be specified. To remove all iSNS servers, use \fB-I\fR +\fBnone\fR. +.RE + +.sp +.ne 2 +.na +\fB\fB-r\fR,\fB--radius-server\fR \fIIP-address\fR[:\fIport\fR]\fR +.ad +.sp .6 +.RS 4n +Specify the IP address of the RADIUS server used for centralized CHAP +authentication. +.RE + +.SS "\fBitadm list-defaults\fR" +.sp +.in +2 +.nf +itadm list-defaults +.fi +.in -2 +.sp + +.sp +.LP +List information about the default properties. This subcommand has no options. +.SH EXAMPLES +.LP +\fBExample 1 \fRCreating a Target +.sp +.LP +The following command creates a target. + +.sp +.in +2 +.nf +# \fBitadm create-target\fR +Target iqn.1986-03.com.sun:02:72e1b181-7bce-c0e6-851e-ec0d8cf14b7a +successfully created +.fi +.in -2 +.sp + +.LP +\fBExample 2 \fRCreating a Target with a Specific Name +.sp +.LP +The following command creates a target with a specific IQN. + +.sp +.in +2 +.nf +# \fBitadm create-target -n eui.20387ab8943ef7548\fR +or: +# \fBitadm create-target \e +-n iqn.1986-03.com.sun:02:a9a366f8-cc2b-f291-840948c7f29e\fR +.fi +.in -2 +.sp + +.LP +\fBExample 3 \fRChanging a Name +.sp +.LP +The following command changes an IQN for an existing target. + +.sp +.in +2 +.nf +# \fBitadm modify-target -n eui.20387ab8943ef7548 \e +iqn.1986-03.com.sun:02:a9a366f8-909b-cc2b-f291-840948c7f29e\fR +.fi +.in -2 +.sp + +.LP +\fBExample 4 \fRSetting up CHAP Authentication +.sp +.LP +The following command sets up CHAP authentication for a target using the +default CHAP username. + +.sp +.in +2 +.nf +# \fBitadm modify-initiator -s iqn.1986-03.com.sun:01:e00000000000.47d55444\fR +\fBEnter CHAP secret:\fR ********* +\fBRe-enter secret:\fR ********* + +# \fBitadm modify-target -a chap eui.20387ab8943ef7548\fR +.fi +.in -2 +.sp + +.LP +\fBExample 5 \fRCreating Target Portal Groups +.sp +.LP +The following command creates two target portal groups, \fBA\fR and \fBB\fR, +using port 8000 for the addresses in TPG 2. + +.sp +.in +2 +.nf +# \fBitadm create-tpg A 192.168.0.1 192.168.0.2\fR +# \fBitadm create-tpg B 192.168.0.2:8000 192.168.0.2:8000\fR +.fi +.in -2 +.sp + +.LP +\fBExample 6 \fRConfiguring a Target to Use TPGs +.sp +.LP +The following command configures a target to use TPGs A and B. + +.sp +.in +2 +.nf +# \fBitadm modify-target -t A,B eui.20387ab8943ef7548\fR +.fi +.in -2 +.sp + +.LP +\fBExample 7 \fRSetting up RADIUS Authentication for Specific Target +.sp +.LP +The following command sets up RADIUS authentication for a specific target. + +.sp +.in +2 +.nf +# \fBitadm modify-defaults -r 192.168.10.1 -d\fR +\fBEnter RADIUS secret:\fR ********* +\fBRe-enter secret:\fR ********* + +# \fBitadm modify-target -a radius eui.20387ab8943ef7548\fR +.fi +.in -2 +.sp + +.LP +\fBExample 8 \fRSetting up RADIUS Authentication for All Targets +.sp +.LP +The following command sets up RADIUS authentication for all targets. + +.sp +.in +2 +.nf +# \fBitadm modify-defaults -d -r 192.168.10.1 -a radius\fR +\fBEnter RADIUS secret:\fR ********* +\fBRe-enter secret:\fR ********* +.fi +.in -2 +.sp + +.sp +.LP +The preceding command assumes all targets were created with \fB-a\fR +\fBdefault\fR. + +.LP +\fBExample 9 \fRListing Default Properties +.sp +.LP +The following command lists default properties. + +.sp +.in +2 +.nf +# \fBitadm list-defaults\fR +iSCSI Target Default Properties: + +alias: \fInone\fR +auth: \fInone\fR +radiusserver: \fInone\fR +radiussecret: unset +isns: disabled +isnsserver: 2.3.4.5,4.5.6.7 +.fi +.in -2 +.sp + +.LP +\fBExample 10 \fRListing Targets +.sp +.LP +The following command lists targets. + +.sp +.in +2 +.nf +# \fBitadm list-target\fR +TARGET NAME STATE SESSIONS +iqn.1986-03.com.sun:02:72e1b181-7bce-c0e6-851e-ec0d8cf14b7a online 0 +iqn.1986-03.com.sun:02:2cb0c526-c05a-e279-e396-a367006f4227 online 0 +iqn.1986-03.com.sun:02:d14125bb-1c9d-c28d-97b0-f89259b642f3 online 0 +iqn.1986-03.com.sun:02:03ff9fc5-794a-e9b4-a081-bb82917c292a online 0 +.fi +.in -2 +.sp + +.LP +\fBExample 11 \fRListing Targets (Verbose) +.sp +.LP +The following command lists targets with the verbose option. + +.sp +.in +2 +.nf +# \fBitadm list-target -v\fR +TARGET NAME STATE SESSIONS +iqn.1986-03.com.sun:02:d23e68d8-2d79-c988-98e7-a6361689d33c online 0 + alias: - + auth: none (defaults) + targetchapuser: - + targetchapsecret: unset + tpg-tags: default +iqn.1986-03.com.sun:02:94ec46d4-c8e1-6993-ef03-ffc1dcd66606 online 1 + alias: - + auth: chap + targetchapuser: - + targetchapsecret: unset + tpg-tags: nge1_ipv4 = 3 +.fi +.in -2 +.sp + +.LP +\fBExample 12 \fRListing a Specific Target +.sp +.LP +The following command lists targets with the verbose option. + +.sp +.in +2 +.nf +# \fBitadm list-target -v \e +iqn.1986-03.com.sun:02:2cb0c526-c05a-e279-e396-a367006f4227\fR +TARGET NAME STATE SESSIONS +iqn.1986-03.com.sun:02:2cb0c526-c05a-e279-e396-a367006f4227 online 1 + alias: - + auth: chap + targetchapuser: - + targetchapsecret: unset + tpg-tags: nge1_ipv4 = 3 +.fi +.in -2 +.sp + +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +box; +c | c +l | l . +ATTRIBUTE TYPE ATTRIBUTE VALUE +_ +Interface Stability Committed +.TE + +.SH SEE ALSO +.sp +.LP +\fBiscsiadm\fR(1M), \fBstmfadm\fR(1M), \fBlibstmf\fR(3LIB), \fBattributes\fR(5) diff --git a/usr/src/man/man3iscsit/it_config_load.3iscsit b/usr/src/man/man3iscsit/it_config_load.3iscsit new file mode 100644 index 0000000..046fed8 --- /dev/null +++ b/usr/src/man/man3iscsit/it_config_load.3iscsit @@ -0,0 +1,182 @@ +'\" te +.\" Copyright (c) 2008, Sun Microsystems Inc. All Rights Reserved. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH IT_CONFIG_LOAD 3ISCSIT "Oct 1, 2008" +.SH NAME +it_config_load, it_config_commit, it_config_setprop, it_config_free \- set and +retrieve configuration data for the iSCSI Target Port Provider +.SH SYNOPSIS +.LP +.nf +cc [ \fIflag\fR\&.\|.\|. ] \fIfile\fR\&.\|.\|. \fB-liscsit\fR [ \fIlibrary\fR\&.\|.\|. ] +#include <libiscsit.h> + +\fBint\fR \fBit_config_load\fR(\fBit_config_t **\fR\fIcfg\fR); +.fi + +.LP +.nf +\fBint\fR \fBit_config_commit\fR(\fBit_config_t *\fR\fIcfg\fR); +.fi + +.LP +.nf +\fBint\fR \fBit_config_setprop\fR(\fBit_config_t *\fR\fIcfg\fR, \fBnvlist_t *\fR\fIproplist\fR, + \fBnvlist_t **\fR\fIerrlist\fR); +.fi + +.LP +.nf +\fBvoid\fR \fBit_config_free\fR(\fBit_config_t *\fR\fIcfg\fR); +.fi + +.SH PARAMETERS +.sp +.ne 2 +.na +\fB\fIcfg\fR\fR +.ad +.RS 12n +a pointer to the iSCSI configuration structure +.RE + +.sp +.ne 2 +.na +\fB\fIproplist\fR\fR +.ad +.RS 12n +a pointer to an \fBnvlist_t\fR containing the global properties to be set +.RE + +.sp +.ne 2 +.na +\fB\fIerrlist\fR\fR +.ad +.RS 12n +an optional pointer to an \fBnvlist_t\fR that will be used to store specific +errors (if any) when validating global properties +.RE + +.SH DESCRIPTION +.sp +.LP +The \fBit_config_load()\fR function allocates and creates an \fBit_config_t\fR +structure representing the current iSCSI configuration. This structure is +compiled using the "provider" data returned by +\fBstmfGetProviderData\fR(3STMF). If there is no provider data associated with +iscsit, the \fBit_config_t\fR structure is set to a default configuration. +.sp +.LP +The \fBit_config_commit()\fR function informs the iscsit service that the +configuration has changed and commits the new configuration to the persistent +store by calling \fBstmfSetProviderData\fR(3STMF). This function can be called +multiple times during a configuration sequence, if necessary. +.sp +.LP +The \fBit_config_setprop()\fR function validates the provided property list and +sets the global properties for iSCSI Target. If \fIerrlist\fR is not +\fINULL\fR, this function returns detailed errors for each property that +failed. The format for \fIerrorlist\fR is \fIkey\fR = \fIproperty\fR, +\fIvalue\fR = \fIerror\fR string. +.sp +.LP +The \fBit_config_free()\fR function frees resources associated with the +\fBit_config_t\fR structure. +.sp +.LP +Global nvlist properties are as follows: +.sp + +.sp +.TS +c c c +l l l . +\fBnvlist\fR Key Type Valid Values +_ +\fBalias\fR \fBstring\fR any string +\fBauth\fR \fBstring\fR \fBradius\fR, \fBchap\fR, or \fBnone\fR +\fBisns\fR \fBboolean\fR \fBB_TRUE\fR, \fBB_FALSE\fR +\fBisnsserver\fR \fBstring\fR array T{ +Array of portal specifications of the form IPaddress:port. Port is optional; if not specified, the default iSNS port number of 3205 will be used. IPv6 addresses should be enclosed in square brackets '[' ']'. If "none" is specified, all defined iSNS servers will be removed from the configuration. +T} +\fBradiusserver\fR \fBstring\fR T{ +IPaddress:port specification as described for 'isnsserver' +T} +\fBradiussecret\fR \fBstring\fR T{ +string of at least 12 characters but not more than 255 characters. secret will be base64 encoded when stored. +T} +.TE + +.SH RETURN VALUES +.sp +.LP +The \fBit_config_load()\fR, \fBit_config_commit()\fR, and +\fBit_config_setprop()\fR functions return 0 on success and an error value on +failure. +.SH ERRORS +.sp +.LP +The \fBit_config_load()\fR, \fBit_config_commit()\fR, and +\fBit_config_setprop()\fR functions will fail if: +.sp +.ne 2 +.na +\fB\fBEINVAL\fR\fR +.ad +.RS 10n +A parameter or property is invalid. +.RE + +.sp +.ne 2 +.na +\fB\fBENOMEM\fR\fR +.ad +.RS 10n +Resources could not be allocated. +.RE + +.sp +.LP +The \fBit_config_commit()\fR function will also fail if: +.sp +.ne 2 +.na +\fB\fBSTMF_ERROR_SERVICE_DATA_VERSION\fR\fR +.ad +.sp .6 +.RS 4n +The configuration was updated by another client. See +\fBstmfSetProviderData\fR(3STMF). +.RE + +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +box; +c | c +l | l . +ATTRIBUTE TYPE ATTRIBUTE VALUE +_ +Interface Stability Committed +_ +MT-Level MT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBit_ini_create\fR(3ISCSIT), \fBit_portal_create\fR(3ISCSIT), +\fBit_tgt_create\fR(3ISCSIT), \fBit_tpg_create\fR(3ISCSIT), +\fBlibiscsit\fR(3LIB), \fBlibnvpair\fR(3LIB), \fBlibstmf\fR(3LIB), +\fBstmfGetProviderData\fR(3STMF), \fBstmfSetProviderData\fR(3STMF), +\fBattributes\fR(5) diff --git a/usr/src/man/man3iscsit/it_ini_create.3iscsit b/usr/src/man/man3iscsit/it_ini_create.3iscsit new file mode 100644 index 0000000..56944f9 --- /dev/null +++ b/usr/src/man/man3iscsit/it_ini_create.3iscsit @@ -0,0 +1,188 @@ +'\" te +.\" Copyright (c) 2008, Sun Microsystems Inc. All Rights Reserved. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH IT_INI_CREATE 3ISCSIT "Oct 1, 2008" +.SH NAME +it_ini_create, it_ini_setprop, it_ini_delete, it_ini_free \- create, modify and +delete iSCSI Initiator Contexts +.SH SYNOPSIS +.LP +.nf +cc [ \fIflag\fR\&.\|.\|. ] \fIfile\fR\&.\|.\|. \fB-liscsit\fR [ \fIlibrary\fR\&.\|.\|. ] +#include <libiscsit.h> + +\fBint\fR \fBit_ini_create\fR(\fBit_config_t *\fR\fIcfg\fR, \fBit_ini_t **\fR\fIini\fR, + \fBchar *\fR\fIini_node_name\fR); +.fi + +.LP +.nf +\fBint\fR \fBit_ini_setprop\fR(\fBit_ini_t *\fR\fIini\fR, \fBnvlist_t *\fR\fIproplist\fR, + \fBnvlist_t **\fR\fIerrlist\fR);); +.fi + +.LP +.nf +\fBvoid\fR \fBit_ini_delete\fR(\fBit_config_t *\fR\fIcfg\fR, \fBit_ini_t *\fR\fIini\fR); +.fi + +.LP +.nf +\fBvoid\fR \fBit_ini_free\fR(\fBit_ini_t *\fR\fIini\fR); +.fi + +.SH PARAMETERS +.sp +.ne 2 +.na +\fB\fIcfg\fR\fR +.ad +.RS 17n +a pointer t the iSCSI configuration structure +.RE + +.sp +.ne 2 +.na +\fB\fIini\fR\fR +.ad +.RS 17n +a pointer to the \fBit_ini_t\fR structure representing the initiator context +.RE + +.sp +.ne 2 +.na +\fB\fIini_node_name\fR\fR +.ad +.RS 17n +the iSCSI node name of the remote initiator +.RE + +.sp +.ne 2 +.na +\fB\fIproplist\fR\fR +.ad +.RS 17n +a pointer to an \fBnvlist_t\fR containing the initiator properties to be set +.RE + +.sp +.ne 2 +.na +\fB\fIerrlist\fR\fR +.ad +.RS 17n +an optional pointer to an \fBnvlist_t\fR that will be used to store specific +errors (if any) when validating initiator properties +.RE + +.SH DESCRIPTION +.sp +.LP +The \fBit_ini_create()\fR function adds an initiator context to the global +configuration. +.sp +.LP +The \fBit_ini_setprop()\fR function validates the provided property list and +sets the properties for the specified initiator. If \fIerrlist\fR is not +\fINULL\fR, this function returns detailed errors for each property that +failed. The format for \fIerrlist\fR is \fIkey\fR = \fIproperty\fR, +\fIvalue\fR = \fIerror\fR string. +.sp +.LP +The \fBit_ini_delete()\fR function removes the specified initiator context from +the global configuration. +.sp +.LP +The \fBit_ini_free()\fR function deallocates resources of an \fBit_ini_t\fR +structure. If \fIini\fR\(->\fInext\fR is not \fINULL\fR, this function frees +all members of the list. +.sp +.LP +Configuration changes as a result of these functions are not instantiated until +the modified configuration is committed by calling +\fBit_config_commit\fR(3ISCSIT). +.sp +.LP +Initiator nvlist properties are as follows: +.sp + +.sp +.TS +c c c +l l l . +\fBnvlist\fR Key Type Valid Values +_ +\fBchapuser\fR \fBstring\fR any string, or \fBnone\fR to remove +\fBchapsecret\fR \fBstring\fR T{ +string of at least 12 characters but not more than 255 characters. secret will be base64 encoded when stored. +T} +.TE + +.SH RETURN VALUES +.sp +.LP +The \fBit_ini_create()\fR, \fBit_ini_setprop()\fR, and \fBit_ini_delete()\fR +functions return 0 on success and an error value on failure. +.SH ERRORS +.sp +.LP +The \fBit_ini_create()\fR, \fBit_ini_setprop()\fR, and \fBit_ini_delete()\fR +functions will fail if: +.sp +.ne 2 +.na +\fB\fBEEXIST\fR\fR +.ad +.RS 10n +The requested initiator context is already configured. +.RE + +.sp +.ne 2 +.na +\fB\fBEINVAL\fR\fR +.ad +.RS 10n +A parameter or property is invalid. +.RE + +.sp +.ne 2 +.na +\fB\fBENOMEM\fR\fR +.ad +.RS 10n +Resources could not be allocated. +.RE + +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +box; +c | c +l | l . +ATTRIBUTE TYPE ATTRIBUTE VALUE +_ +Interface Stability Committed +_ +MT-Level MT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBit_config_commit\fR(3ISCSIT), \fBit_portal_create\fR(3ISCSIT), +\fBit_tgt_create\fR(3ISCSIT), \fBit_tpg_create\fR(3ISCSIT), +\fBlibiscsit\fR(3LIB), \fBlibnvpair\fR(3LIB), \fBlibstmf\fR(3LIB), +\fBstmfGetProviderData\fR(3STMF), \fBstmfSetProviderData\fR(3STMF), +\fBattributes\fR(5) diff --git a/usr/src/man/man3iscsit/it_portal_create.3iscsit b/usr/src/man/man3iscsit/it_portal_create.3iscsit new file mode 100644 index 0000000..ef12705 --- /dev/null +++ b/usr/src/man/man3iscsit/it_portal_create.3iscsit @@ -0,0 +1,139 @@ +'\" te +.\" Copyright (c) 2008, Sun Microsystems Inc. All Rights Reserved. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH IT_PORTAL_CREATE 3ISCSIT "Oct 1, 2008" +.SH NAME +it_portal_create, it_portal_delete \- create and delete iSCSI portals +.SH SYNOPSIS +.LP +.nf +cc [ \fIflag\fR\&.\|.\|. ] \fIfile\fR\&.\|.\|. \fB-liscsit\fR [ \fIlibrary\fR\&.\|.\|. ] +#include <libiscsit.h> + +\fBint\fR \fBit_portal_create\fR(\fBit_config_t *\fR\fIcfg\fR, \fBit_tpg_t *\fR\fItpg\fR, + \fBit_portal_t **\fR\fIportal\fR, \fBchar *\fR\fIportal_ip_port\fR); +.fi + +.LP +.nf +\fBvoid\fR \fBit_portal_delete\fR(\fBit_config_t *\fR\fIcfg\fR, \fBit_tpg_t *\fR\fItpg\fR, + \fBit_portal_t *\fR\fIportal\fR); +.fi + +.SH PARAMETERS +.sp +.ne 2 +.na +\fB\fIcfg\fR\fR +.ad +.RS 18n +a pointer to the iSCSI configuration structure +.RE + +.sp +.ne 2 +.na +\fB\fItpg\fR\fR +.ad +.RS 18n +a pointer to the \fBit_tpg_t\fR structure representing the target portal group +.RE + +.sp +.ne 2 +.na +\fB\fIportal\fR\fR +.ad +.RS 18n +a pointer to the \fBit_portal_t\fR structure representing the portal +.RE + +.sp +.ne 2 +.na +\fB\fIportal_ip_port\fR\fR +.ad +.RS 18n +a string containing an appropriatedly formatted IP address:port. Both IPv4 and +IPv6 addresses are permitted. IPv6 addresses should be enclosed in square +brackets ('[', ']'). +.RE + +.SH DESCRIPTION +.sp +.LP +The \fBit_portal_create()\fR function adds an \fBit_portal_t\fR structure +representing a new portal to the specified target portal group. A portal may +belong to one and only one target portal group. +.sp +.LP +The \fBit_portal_delete()\fR function removes the specified portal from the +specified target portal group. +.sp +.LP +Configuration changes as a result of these functions are not instantiated until +the modified configuration is committed by calling +\fBit_config_commit\fR(3ISCSIT). +.SH RETURN VALUES +.sp +.LP +The \fBit_portal_create()\fR function returns 0 on success and an error value +on failure. +.SH ERRORS +.sp +.LP +The \fBit_portal_create()\fR function will fail if: +.sp +.ne 2 +.na +\fB\fBEEXIST\fR\fR +.ad +.RS 10n +The portal was already configured for another portal group. +.RE + +.sp +.ne 2 +.na +\fB\fBEINVAL\fR\fR +.ad +.RS 10n +A parameter is invalid. +.RE + +.sp +.ne 2 +.na +\fB\fBENOMEM\fR\fR +.ad +.RS 10n +Resources could not be allocated. +.RE + +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +box; +c | c +l | l . +ATTRIBUTE TYPE ATTRIBUTE VALUE +_ +Interface Stability Committed +_ +MT-Level MT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBit_ini_create\fR(3ISCSIT), \fBit_tgt_create\fR(3ISCSIT), +\fBit_tpg_create\fR(3ISCSIT), \fBlibiscsit\fR(3LIB), +\fBit_config_commit\fR(3ISCSIT), \fBlibiscsit\fR(3LIB), \fBlibnvpair\fR(3LIB), +\fBlibstmf\fR(3LIB), \fBattributes\fR(5) diff --git a/usr/src/man/man3iscsit/it_tgt_create.3iscsit b/usr/src/man/man3iscsit/it_tgt_create.3iscsit new file mode 100644 index 0000000..30cc41f --- /dev/null +++ b/usr/src/man/man3iscsit/it_tgt_create.3iscsit @@ -0,0 +1,291 @@ +'\" te +.\" Copyright (c) 2008, Sun Microsystems Inc. All Rights Reserved. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH IT_TGT_CREATE 3ISCSIT "Oct 1, 2008" +.SH NAME +it_tgt_create, it_tgt_setprop, it_tgt_delete, it_tpgt_create, it_tpgt_delete, +it_tgt_free, it_tpgt_free \- create, modify and delete iSCSI Targets +.SH SYNOPSIS +.LP +.nf +cc [ \fIflag\fR\&.\|.\|. ] \fIfile\fR\&.\|.\|. \fB-liscsit\fR [ \fIlibrary\fR\&.\|.\|. ] +#include <libiscsit.h> + +\fBint\fR \fBit_tgt_create\fR(\fBit_config_t **\fR\fIcfg\fR, \fBit_tgt_t **\fR\fItgt\fR, + \fBchar *\fR\fItgt_name\fR); +.fi + +.LP +.nf +\fBint\fR \fBit_tgt_setprop\fR(\fBit_config_t *\fR\fIcfg\fR \fBit_tgt_t *\fR\fItgt\fR, + \fBnvlist_t *\fR\fIproplist\fR, \fBnvlist_t **\fR\fIerrlist\fR); +.fi + +.LP +.nf +\fBint\fR \fBit_tgt_delete\fR(\fBit_config_t *\fR\fIcfg\fR, \fBit_tgt_t *\fR\fItgt\fR, + \fBboolean_t\fR \fIforce\fR); +.fi + +.LP +.nf +\fBint\fR \fBit_tpgt_create\fR(\fBit_config_t *\fR\fIcfg\fR, \fBit_tgt_t *\fR\fItgt\fR, + \fBit_tpgt_t **\fR\fItpgt\fR, \fBchar *\fR\fItpg_name\fR, \fBuint16_t\fR \fItpgt_tag\fR); +.fi + +.LP +.nf +\fBvoid\fR \fBit_tpgt_delete\fR(\fBit_config_t *\fR\fIcfg\fR, \fBit_tgt_t *\fR\fItgt\fR, + \fBit_tpgt_t *\fR\fItpgt\fR); +.fi + +.LP +.nf +\fBvoid\fR \fBit_tgt_free\fR(\fBit_tgt_t *\fR\fItgt\fR); +.fi + +.LP +.nf +\fBvoid\fR \fBit_tpgt_free\fR(\fBit_tpgt_t *\fR\fItpgt\fR); +.fi + +.SH PARAMETERS +.sp +.ne 2 +.na +\fB\fIcfg\fR\fR +.ad +.RS 13n +a pointer to the iSCSI configuration structure +.RE + +.sp +.ne 2 +.na +\fB\fItgt\fR\fR +.ad +.RS 13n +a pointer to an iSCSI target structure +.RE + +.sp +.ne 2 +.na +\fB\fItgt_name\fR\fR +.ad +.RS 13n +the target node name for the target to be created. The name must be in either +IQN or EUI format. If this value is \fINULL\fR, a node name will be generated +automatically in IQN format. +.RE + +.sp +.ne 2 +.na +\fB\fIproplist\fR\fR +.ad +.RS 13n +a pointer to an \fBnvlist_t\fR containing the target properties to be set +.RE + +.sp +.ne 2 +.na +\fB\fIerrlist\fR\fR +.ad +.RS 13n +an optional pointer to an \fBnvlist_t\fR that will be used to store specific +errors (if any) when validating target properties +.RE + +.sp +.ne 2 +.na +\fB\fIforce\fR\fR +.ad +.RS 13n +a boolean value indicating if the target should be set to offline before +removing it from the configuration. If not specified, the operation will fail +if the target is determined to be online +.RE + +.sp +.ne 2 +.na +\fB\fItpgt\fR\fR +.ad +.RS 13n +a pointer to a target portal group tag structure +.RE + +.sp +.ne 2 +.na +\fB\fItpgt_name\fR\fR +.ad +.RS 13n +the name of the target portal group to be associated with this target portal +group tag +.RE + +.sp +.ne 2 +.na +\fB\fItpgt_tag\fR\fR +.ad +.RS 13n +a 16-bit numerical identifier for this target portal group tag. Valid values +are 2 through 65535. If tpgt_tag is '0', \fBit_tpgt_create()\fR will assign an +appropriate tag number. If \fItpgt_tag\fR is != 0, and the requested tag number +is unavailable, another value will be chosen. +.RE + +.SH DESCRIPTION +.sp +.LP +The \fBit_tgt_create()\fR function allocates and creates an \fBit_tgt_t\fR +structure representing a new iSCSI target node. If \fItgt_name\fR is +\fINULL\fR, then a unique target node name will be generated automatically. +Otherwise, the value of \fItgt_name\fR will be used as the target node name. +The new \fBit_tgt_t\fR structure is added to the target list +(\fIcfg_tgt_list\fR) in the configuration structure. +.sp +.LP +The \fBit_tgt_setprop()\fR function validates the provided property list and +sets the properties for the specified target. If \fIerrlist\fR is not +\fINULL\fR, this function returns detailed errors for each property that +failed. The format for \fIerrlist\fR is \fIkey\fR = \fIproperty\fR, +\fIvalue\fR = \fIerror\fR string. +.sp +.LP +The \fBit_tgt_delete()\fR function removes the target represented by \fItgt\fR +from the configuration. The \fItgt\fR argument is an existing \fBit_tgt_t\fR +structure within the configuration \fIcfg\fR. +.sp +.LP +The \fBit_tpgt_create()\fR function allocates and creates an \fBit_tpgt_t\fR +structure representing a new iSCSI target portal group tag. The new +\fBit_tpgt_t\fR structure is added to the target \fItpgt\fR list +(\fItgt_tpgt_list\fR) in the \fBit_tgt_t\fR structure. +.sp +.LP +The \fBit_tpgt_delete()\fR function removes the target portal group tag +represented by \fItpgt\fR, from the configuration. The \fItpgt\fR argument is +an existing \fBis_tpgt_t\fR structure within the target \fItgt\fR. +.sp +.LP +The \fBit_tgt_free()\fR function frees an \fBit_tgt_t\fR structure. If +\fItgt\fR\(->\fInext\fR is not \fINULL\fR, this function frees all structures +in the list. +.sp +.LP +The \fBit_tpgt_free()\fR function deallocates resources of an \fBit_tpgt_t\fR +structure. If \fItpgt\fR->\fInext\fR is not \fINULL\fR, this function frees +all members of the list. +.sp +.LP +Configuration changes as a result of these functions are not instantiated until +the modified configuration is committed by calling +\fBit_config_commit\fR(3ISCSIT). +.sp +.LP +Target nvlist properties are as follows: +.sp + +.sp +.TS +c c c +l l l . +\fBnvlist\fR Key Type Valid Values +_ +\fBtargetchapuser\fR \fBstring\fR any string, or \fBnone\fR to remove +\fBtargetchapsecret\fR \fBstring\fR T{ +string of at least 12 characters but not more than 255 characters. secret will be base64 encoded when stored. +T} +\fBalias\fR \fBstring\fR any string or \fBnone\fR to remove +\fBauth\fR \fBstring\fR \fBradius\fR, \fBchap\fR, or \fBnone\fR +.TE + +.SH RETURN VALUES +.sp +.LP +The \fBit_tgt_create()\fR, \fBit_tgt_setprop()\fR, \fBit_tgt_delete()\fR, +\fBit_tpgt_create()\fR, and \fBit_tpgt_delete()\fR functions return 0 on +success and an error value on failure. +.SH ERRORS +.sp +.LP +The \fBit_tgt_create()\fR, \fBit_tgt_setprop()\fR, \fBit_tgt_delete()\fR, +\fBit_tpgt_create()\fR, and \fBit_tpgt_delete()\fR functions will fail if: +.sp +.ne 2 +.na +\fB\fBE2BIG\fR\fR +.ad +.RS 10n +All tag numbers are already in use. +.RE + +.sp +.ne 2 +.na +\fB\fBEBUSY\fR\fR +.ad +.RS 10n +The target is online. +.RE + +.sp +.ne 2 +.na +\fB\fBEEXIST\fR\fR +.ad +.RS 10n +The requested target node name is already configured. +.RE + +.sp +.ne 2 +.na +\fB\fBEINVAL\fR\fR +.ad +.RS 10n +A parameter or property is invalid. +.RE + +.sp +.ne 2 +.na +\fB\fBENOMEM\fR\fR +.ad +.RS 10n +Resources could not be allocated. +.RE + +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +box; +c | c +l | l . +ATTRIBUTE TYPE ATTRIBUTE VALUE +_ +Interface Stability Committed +_ +MT-Level MT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBit_config_commit\fR(3ISCSIT), \fBit_ini_create\fR(3ISCSIT), +\fBit_portal_create\fR(3ISCSIT), \fBit_tpg_create\fR(3ISCSIT), +\fBlibiscsit\fR(3LIB), \fBlibnvpair\fR(3LIB), \fBlibstmf\fR(3LIB), +\fBattributes\fR(5) diff --git a/usr/src/man/man3iscsit/it_tpg_create.3iscsit b/usr/src/man/man3iscsit/it_tpg_create.3iscsit new file mode 100644 index 0000000..2ba3628 --- /dev/null +++ b/usr/src/man/man3iscsit/it_tpg_create.3iscsit @@ -0,0 +1,175 @@ +'\" te +.\" Copyright (c) 2008, Sun Microsystems Inc. All Rights Reserved. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH IT_TPG_CREATE 3ISCSIT "Oct 1, 2008" +.SH NAME +it_tpg_create, it_tpg_delete, it_tpg_free \- create and delete iSCSI +target portal groups +.SH SYNOPSIS +.LP +.nf +cc [ \fIflag\fR\&.\|.\|. ] \fIfile\fR\&.\|.\|. \fB-liscsit\fR [ \fIlibrary\fR\&.\|.\|. ] +#include <libiscsit.h> + +\fBint\fR \fBit_tpg_create\fR(\fBit_config_t *\fR\fIcfg\fR, \fBit_tpg_t **\fR\fItpg\fR, + \fBchar *\fR\fItpg_name\fR, \fBchar *\fR\fIportal_ip_port\fR); +.fi + +.LP +.nf +\fBint\fR \fBit_tpg_delete\fR(\fBit_config_t *\fR\fIcfg\fR, \fBit_tpg_t *\fR\fItpg\fR, + \fBboolean_t\fR \fIforce\fR);); +.fi + +.LP +.nf +\fBvoid\fR \fBit_tpg_free\fR(\fBit_tpg_t *\fR\fItpg\fR); +.fi + +.SH PARAMETERS +.sp +.ne 2 +.na +\fB\fIcfg\fR\fR +.ad +.RS 18n +a pointer t the iSCSI configuration structure +.RE + +.sp +.ne 2 +.na +\fB\fItpg\fR\fR +.ad +.RS 18n +a pointer to the \fBit_tpg_t\fR structure representing the target portal group +.RE + +.sp +.ne 2 +.na +\fB\fItpg_name\fR\fR +.ad +.RS 18n +an identifier for the target portal group +.RE + +.sp +.ne 2 +.na +\fB\fIportal_ip_port\fR\fR +.ad +.RS 18n +a string containing an appropriately formatted IP \fBaddress\fR:\fBport\fR. +Both IPv4 and IPv6 addresses are permitted. This value becomes the first portal +in the target portal group. Applications can add additional values using +\fBit_portal_create\fR(3ISCSIT) before committing the target portal group. IPv6 +addresses should be enclosed in square brackets ('[', ']'). +.RE + +.sp +.ne 2 +.na +\fB\fIforce\fR\fR +.ad +.RS 18n +boolean value indicating if the target portal group should be removed even if +it is associated with one or more targets. If not \fBB_TRUE\fR, the operation +will fail if the target product group is associated with a target. +.RE + +.SH DESCRIPTION +.sp +.LP +The \fBit_tpg_create()\fR function allocates and creates an \fBit_tpg_t\fR +structure representing a new iSCSI target portal group. The new \fBit_tpg_t\fR +structure is added to the global \fItpg\fR list (\fIcfg_tgt_list\fR) in the +\fBit_config_t\fR structure. +.sp +.LP +The \fBit_tpg_delete()\fR function deletes the target portal group represented +by \fItpg\fR, where \fItpg\fR is an existing \fBit_tpg_t\fR structure within +the global configuration \fIcfg\fR. +.sp +.LP +The \fBit_tpg_free()\fR function deallocates resources associated with an +\fBit_tpg_t\fR structure. If \fItpg\fR->\fInext\fR is not \fINULL\fR, this +function frees all members of the list. +.sp +.LP +Configuration changes as a result of these functions are not instantiated until +the modified configuration is committed by calling +\fBit_config_commit\fR(3ISCSIT). +.SH RETURN VALUES +.sp +.LP +The \fBit_tpg_create()\fR and \fBit_tpg_delete()\fR functions return 0 on +success and an error value on failure. +.SH ERRORS +.sp +.LP +The \fBit_tpg_create()\fR and \fBit_tpg_delete()\fR functions will fail if: +.sp +.ne 2 +.na +\fB\fBEBUSY\fR\fR +.ad +.RS 10n +The portal group is associated with one or more targets. +.RE + +.sp +.ne 2 +.na +\fB\fBEEXIST\fR\fR +.ad +.RS 10n +The portal was already configured for another portal group associated with this +target. +.RE + +.sp +.ne 2 +.na +\fB\fBEINVAL\fR\fR +.ad +.RS 10n +A parameter is invalid. +.RE + +.sp +.ne 2 +.na +\fB\fBENOMEM\fR\fR +.ad +.RS 10n +Resources could not be allocated. +.RE + +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +box; +c | c +l | l . +ATTRIBUTE TYPE ATTRIBUTE VALUE +_ +Interface Stability Committed +_ +MT-Level MT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBit_config_commit\fR(3ISCSIT), \fBit_ini_create\fR(3ISCSIT), +\fBit_portal_create\fR(3ISCSIT), \fBit_tgt_create\fR(3ISCSIT), +\fBlibiscsit\fR(3LIB), \fBlibnvpair\fR(3LIB), \fBlibstmf\fR(3LIB), +\fBattributes\fR(5) diff --git a/usr/src/man/man3lib/libiscsit.3lib b/usr/src/man/man3lib/libiscsit.3lib new file mode 100644 index 0000000..0f162fc --- /dev/null +++ b/usr/src/man/man3lib/libiscsit.3lib @@ -0,0 +1,87 @@ +'\" te +.\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH LIBISCSIT 3LIB "Oct 1, 2008" +.SH NAME +libiscsit \- iSCSI Management library +.SH SYNOPSIS +.LP +.nf +cc [ \fIflag\fR... ] \fIfile\fR... \fB-liscsit\fR [ \fIlibrary\fR... ] +#include <libiscsit.h> +.fi + +.SH DESCRIPTION +.sp +.LP +Functions in this library provide management services for COMSTAR iSCSI target +ports. +.SH INTERFACES +.sp +.LP +The shared object \fBlibiscsit.so.1\fR provides the public interfaces defined +below. See \fBIntro\fR(3) for additional information on shared object +interfaces. +.sp + +.sp +.TS +l l +l l . +\fBit_config_commit\fR \fBit_config_free\fR +\fBit_config_load\fR \fBit_config_setprop\fR +\fBit_ini_create\fR \fBit_ini_delete\fR +\fBit_ini_free\fR \fBit_ini_setprop\fR +\fBit_portal_create\fR \fBit_portal_delete\fR +\fBit_tgt_create\fR \fBit_tgt_delete\fR +\fBit_tgt_free\fR \fBit_tgt_setprop\fR +\fBit_tpg_create\fR \fBit_tpg_delete\fR +\fBit_tpg_free\fR \fBit_tpgt_create\fR +\fBit_tpgt_delete\fR \fBit_tpgt_free\fR +.TE + +.SH FILES +.sp +.ne 2 +.na +\fB\fB/lib/libiscsit.so.1\fR\fR +.ad +.RS 26n +shared object +.RE + +.sp +.ne 2 +.na +\fB\fB/lib/64/libiscsit.so.1\fR\fR +.ad +.RS 26n +64-bit shared object +.RE + +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +box; +c | c +l | l . +ATTRIBUTE TYPE ATTRIBUTE VALUE +_ +Interface Stability Committed +_ +MT-Level MT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBIntro\fR(3), \fBit_config_load\fR(3ISCSIT), \fBit_ini_create\fR(3ISCSIT), +\fBit_portal_create\fR(3ISCSIT), \fBit_tgt_create\fR(3ISCSIT), +\fBit_tpg_create\fR(3ISCSIT), \fBattributes\fR(5) |