Iscsi - target + initiator on the same host.


 
Thread Tools Search this Thread
Operating Systems Solaris Iscsi - target + initiator on the same host.
# 1  
Old 09-07-2009
Iscsi - target + initiator on the same host.

Hi all

iscsiadm / iscsitadm.

Ive created two devices on a host.

# iscsitadm list target
Target: 1-disk0
iSCSI Name: iqn.1986-03.com.sun:02:f105ddf3-52a4-ed7a-9590-c3d354b8fc32.1-disk0
Connections: 1
Target: 1-disk1
iSCSI Name: iqn.1986-03.com.sun:02:14fd7226-bbb8-4a62-dcc0-fb5660f709c2.1-disk1
Connections: 1


On another host, Ive created an initiator and via static discovery, attachment to this host.

iscsiadm list target
Target: iqn.1986-03.com.sun:02:14fd7226-bbb8-4a62-dcc0-fb5660f709c2.1-disk1
Alias: 1-disk1
TPGT: 1
ISID: 4000002a0000
Connections: 1
Target: iqn.1986-03.com.sun:02:f105ddf3-52a4-ed7a-9590-c3d354b8fc32.1-disk0
Alias: 1-disk0
TPGT: 1
ISID: 4000002a0000
Connections: 1

Without going into the pros / cons, I know want to make the target server, an initiator too, and `mount` its own disks.

Ive static added them to itself

iscsiadm list static-config
Static Configuration Target: iqn.1986-03.com.sun:02:f105ddf3-52a4-ed7a-9590-c3d354b8fc32.1-disk0,172.30.188.129:3260
Static Configuration Target: iqn.1986-03.com.sun:02:14fd7226-bbb8-4a62-dcc0-fb5660f709c2.1-disk1,172.30.188.129:3260

However, when I devfsadm / format, I cant see the little sods.

Anyone use iscsi on a solaris 10 server ?? Shed any light / help ?? Ive tried static, sendtarget. The host has several NIC's, so I wonder if I need to create a tpgt group ??

SBK

SBK
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. HP-UX

ISCSI initiator (client) for HP-UX 10.20

Is there one? If so where can it be found? I have the 10.20 CD set but I don't think that there's an iSCSI initiator on there. Thank you Dave (0 Replies)
Discussion started by: perdrix
0 Replies

2. Shell Programming and Scripting

Connect to target host from Source host.

Hi All, Need to connect to target host and execute a command and connect back to source host to continue with next set of command execution. Is there a utility/command using which we can connect to target host ? Please suggest. Note: Netezza database is instaled on Linux server. ... (4 Replies)
Discussion started by: Nagaraja Akkiva
4 Replies

3. Linux

How to boot iSCSI target from console linux?

I need boot any images from iSCSI and I'd like to boot from linux console of a previous LiveCD booted. Is possible, without gpxe, ipxe firmware or similar? With a simple iSCSI initiator for example? (1 Reply)
Discussion started by: spark2k06
1 Replies

4. HP-UX

Unable to delete iscsi target

Hi Please can someone give me a hint on this, when I list the targets, I see two o them: #iscsiutil -p Operational Target Information ------------------------------ Target # 1 ----------- Target Name : iqn.1992-08.com.netapp:sn.142241859 Target Alias ... (2 Replies)
Discussion started by: fretagi
2 Replies

5. HP-UX

After adding new iscsi target port, still the session state of that target port is showing offline

Hi, I wanted to configure new iscsi port on HPUX system, i added the target port address and configured it, once done, went to array side and searched for that host iqn number , but was nt able to find the same, came to host, then when i ran "iscsiutil -pVS" command it gave me below result ... (0 Replies)
Discussion started by: Vinay Kumar D
0 Replies

6. UNIX for Dummies Questions & Answers

Delete from target a LUN that is mounted on initiator

hi all, i'm new here and i have a question, i wanted to know, what should happen if i delete a LUN that is already mounted on one of my initiators. thanks! (3 Replies)
Discussion started by: slavash
3 Replies

7. Solaris

Does iscsi initiator supported on SUN

I have a Sun Blade 2500 with SUN 5.9 OS installed. I have configured ISCSI SAN and one of my Red Hat OS can accessed/mount the ISCSI SAN disk Now i want to access/mount another ISCSI SAN disk on SUN solaris. Is that possible ? Thanks (1 Reply)
Discussion started by: z_haseeb
1 Replies

8. UNIX for Advanced & Expert Users

LTO2 tape drive as iSCSI target

I'm using Bacula as my backup system, with full backups going to an LTO2 tape drive, while differentials and incrementals go to a disk array on my main server, babylon4. The tape drive is currently attached to a separate machine, because babylon4 does not have a SCSI controller, nor a free PCI-X... (0 Replies)
Discussion started by: Phil Stracchino
0 Replies

9. UNIX for Dummies Questions & Answers

How to change ethernet cable of iscsi initiator (iscsi client)?

how to change ethernet cable of iscsi initiator (iscsi client) (0 Replies)
Discussion started by: pankajd
0 Replies

10. Solaris

How do I breakdown the Target (tx) part of a cXtXdX Iscsi device?

Hello, I am trying to breakdown the cXtXdX (specifically tX) part of an iscsi device. I know in the fibre SAN world, this tX will usually be a combination of the path to device/device WWN. From what I understand in iscsi world it is similar, breaking down into... (0 Replies)
Discussion started by: Bashful
0 Replies
Login or Register to Ask a Question
itadm(1M)						  System Administration Commands						 itadm(1M)

NAME
itadm - administer iSCSI targets SYNOPSIS
itadm create-target [-a,--auth-method radius | chap | none | default] [-s,--chap-secret] [-S,--chap-secret-file path] [-u,--chap-user chap-user-name] [-n,--node-name target_node_name] [-l,--alias alias] [-t,--tpg tpg-name[,tpg-name]] itadm modify-target [-a,--auth-method radius | chap | none | default] [-s,--chap-secret] [-S,--chap-secret-file path] [-u,--chap-user chap-user-name] [-n,--node-name new_target_node_name] [-l,--alias alias] [-t,--tpg tpg-name[,tpg-name]] target_node_name itadm delete-target [-f,--force] target_node_name itadm list-target [-v,--verbose] [target_node_name] itadm create-tpg tpg_name IP-address[:port] [IP-address[:port]]... itadm list-tpg [-v,--verbose] [tpg_name] itadm delete-tpg [-f,--force] tpg_name itadm create-initiator [-s,--chap-secret] [-S,--chap-secret-file path] [-u,--chap-user chap-user-name] initiator_node_name itadm modify-initiator [-s,--chap-secret] [-S,--chap-secret-file path] [-u,--chap-user chap-user-name] initiator_node_name itadm list-initiator [-v,--verbose] initiator_node_name itadm delete-initiator initiator_node_name itadm modify-defaults [-a,--auth-method radius | chap | none] [-r,--radius-server IP-address[:port]] [-d,--radius-secret] [-D,--radius-secret-file path][-i,--isns enable | disable] [-I,--isns-server IP-address[:port][,IP-address[:port]]] itadm list-defaults DESCRIPTION
The itadm command manages Internet SCSI (iSCSI) target nodes within the SCSI Target Mode Framework described by libstmf(3LIB). This allows the iSCSI initiators to access STMF logical units using the iSCSI protocol. In addition to iSCSI target nodes, itadm manages two other classes of managed objects: iSCSI Target Portal Groups, and iSCSI Initiator Node Contexts. itadm 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, itadm has a help command, which displays the utility's usage information. The help command is invoked with the -? option. iSCSI Target Portal Groups 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 collec- tion of such portals represents a Target Portal Group (TPG). TPGs can be used to limit access to an iSCSI target through certain network interface cards. 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. iSCSI Initiator Node Contexts 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: iqn.1986-03.com.sun:01:e00000000000.47d55444 eui.02004567A425678D Specifying IP Addresses A number of itadm 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. IPv4: 10.2.4.1[:3260] IPv6: [1080:0:0:0:8:800:200C:417A][:3260] SUB-COMMANDS The following are the itadm subcommands with their options. itadm create-target itadm create-target [-a,--auth-method radius | chap | none | default] [-s,--chap-secret] [-S,--chap-secret-file path] [-u,--chap-user chap-user-name] [-n,--node-name target_node_name] [-l,--alias alias] [-t,--tpg tpg-name[,tpg-name,...]] Create a iSCSI target with the specified options. Options are as follows. -a,--auth-method radius | chap | none | default Specifies the authentication method to use for the target. Valid values are radius, chap, and none. chap indicates that initiators con- necting to this target must be authenticated using the Challenge Handshake Authentication Protocol (CHAP). radius 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 radius-server and radius-secret options). none means that no authentication is required to connect to the target. default means the target will use the global setting of this property. (See the modify-defaults subcommand.) -s,--chap-secret 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. -S,--chap-secret-file path Path to a temporary file containing the CHAP secret as described in the -s option. -u,--chap-user chap-user-name 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 iscsiadm(1M). -n,--node-name target_node_name An iSCSI Target Node is identified by its Target Node Name, formatted in either IQN or EUI format (see RFC 3720). This option estab- lishes that name. -l,--alias alias An alternate identifier associated with a target node. The identifier does not need to be unique. -t,--tpg tpg-name[,tpg-name,...] 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 default. If default is specified, the target will use the default portal, INADDR_ANY:3260. itadm modify-target itadm modify-target [-a,--auth-method radius | chap | none | default] [-s,--chap-secret] [-S,--chap-secret-file path] [-u,--chap-user chap-user-name] [-n,--node-name new_tgt_node_name] [-l,--alias alias] [-t,--tpg tpg-name[,tpg-name]] target_node_name Modify an iSCSI target according to the specified options. Options are as follows. -a,--auth-method radius | chap | none | default As described under the create-target subcommand, above. -s,--chap-secret As described under the create-target subcommand, above. -S,--chap-secret-file path As described under the create-target subcommand, above. -u,--chap-user chap-user-name As described under the create-target subcommand, above. To remove an explicitly set CHAP username use -u none. -n,--node-name target_node_name Renames the target. See also the description of -n under the create-target subcommand, above. -l,--alias alias As described under the create-target subcommand, above. To remove an explicitly set alias use -l none. -t,--tpg tpg-name[,tpg-name,...] As described under the create-target subcommand, above. itadm list-target itadm list-target [-v,--verbose] [target_node_name] List information about the configured targets. If target_node_name is specified, list only the information for that target. Option is as follows. -v,--verbose Verbose mode. itadm delete-target itadm delete-target [-f,--force] target_node_name Delete the target specified by target_node_name. The target must be offline before it can be deleted. Option is as follows. -f,--force If the target persists in an online state, this option attempts to offline the target before deleting it. itadm create-tpg itadm create-tpg tpg_name IP-address[:port]... Create an iSCSI target portal group made up of the specified portals and assign it the identifier tpg_name. Each portal is an IP address and port pair. IPv4 portals are specified in dotted address notation, for example, 172.31.255.255. IPv6 portal addresses must be enclosed in square brackets. This subcommand has no options. itadm list-tpg itadm list-tpg [-v,--verbose] [tpg_name] List information about the configured target portal group. If tpg_name is specified then list only the information about the target portal group associated with that tpg_name. Option is as follows. -v,--verbose Verbose mode. itadm delete-tpg itadm delete-tpg [-f,--force] tpg_name Delete the target portal group associated with tpg_name. Option is as follows. -f,--force If the TPG is associated with any targets, the request to delete will be denied unless this option is specified. itadm create-initiator itadm create-initiator [-s,--chap-secret] [-S,--chap-secret-file path] [-u,--chap-user chap-user-name] initiator_node_name Configure parameters associated with the remote initiator named initiator_node_name. Options are as follows. -s,--chap-secret As described under the create-target subcommand, above. -S,--chap-secret-file path As described under the create-target subcommand, above. -u,--chap-user chap-user-name 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. itadm modify-initiator itadm modify-initiator [-s,--chap-secret] [-S,--chap-secret-file path] [-u,--chap-user chap-user-name] initiator_node_name Modify parameters associated with the remote initiator named initiator_node_name. Options are as follows. -s,--chap-secret As described under the create-target subcommand, above. -S,--chap-secret-file path As described under the create-target subcommand, above. -u,--chap-user chap-user-name 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. itadm delete-initiator itadm delete-initiator initiator_node_name Delete parameters associated with the remote initiator named initiator_node_name. This subcommand has no options. itadm list-initiator itadm list-initiator [-v,--verbose] initiator_node_name List parameters associated with the initiator named initiator_node_name. Option is as follows. -v,--verbose Verbose mode. itadm modify-defaults itadm modify-defaults [-a,--auth-method radius | chap | none] [-r,--radius-server IP-address[:port]] [-d,--radius-secret] [-D,--radius-secret-file path][-i,--isns enable | disable] [-I,--isns-server IP-address[:port][,IP-address[:port]]] Modify default parameters. Options are as follows. -a,--auth-method radius | chap | none Specifies the default authentication method to use for all targets. Valid values are radius, chap, and none. chap indicates that ini- tiators connecting to this target must be authenticated using Challenge Handshake Authentication Protocol (CHAP). radius indicates ini- tiators should also be authenticated by means of CHAP, but the required authentication parameters should be obtained from a central RADIUS server. (See --radius-server and --radius-secret options.) none means that no authentication is required to connect to the tar- get. Individual targets can override this global setting using the -a option of the create-target and modify-target subcommands. -d,--radius-secret RADIUS Shared Secret for centralized CHAP authentication. -D,--radius-secret-file path Path to a temporary file containing the CHAP secret as described in the -d option. -i,--sns enable | disable Specifies whether targets should be registered with the set of defined iSCSI Name Service (iSNS) servers. -I,--isns-server IP-address[:port][,IP-address[:port],...] Defines a list of iSNS servers with which iSCSI target nodes will be registered when the isns option associated with the respective target is set. Up to eight iSNS servers can be specified. To remove all iSNS servers, use -I none. itadm list-defaults itadm list-defaults List information about the default properties. This subcommand has no options. EXAMPLES
Example 1 Creating a Target The following command creates a target. # itadm create-target Target iqn.1986-03.com.sun:02:72e1b181-7bce-c0e6-851e-ec0d8cf14b7a successfully created Example 2 Creating a Target with a Specific Name The following command creates a target with a specific IQN. # itadm create-target -n eui.20387ab8943ef7548 or: # itadm create-target -n iqn.1986-03.com.sun:02:a9a366f8-cc2b-f291-840948c7f29e Example 3 Changing a Name The following command changes an IQN for an existing target. # itadm modify-target -n eui.20387ab8943ef7548 iqn.1986-03.com.sun:02:a9a366f8-909b-cc2b-f291-840948c7f29e Example 4 Setting up CHAP Authentication The following command sets up CHAP authentication for a target using the default CHAP username. # itadm modify-initiator -s iqn.1986-03.com.sun:01:e00000000000.47d55444 Enter CHAP secret: ********* Re-enter secret: ********* # itadm modify-target -a chap eui.20387ab8943ef7548 Example 5 Creating Target Portal Groups The following command creates two target portal groups, A and B, using port 8000 for the addresses in TPG 2. # itadm create-tpg A 192.168.0.1 192.168.0.2 # itadm create-tpg B 192.168.0.2:8000 192.168.0.2:8000 Example 6 Configuring a Target to Use TPGs The following command configures a target to use TPGs A and B. # itadm modify-target -t A,B eui.20387ab8943ef7548 Example 7 Setting up RADIUS Authentication for Specific Target The following command sets up RADIUS authentication for a specific target. # itadm modify-defaults -r 192.168.10.1 -d Enter RADIUS secret: ********* Re-enter secret: ********* # itadm modify-target -a radius eui.20387ab8943ef7548 Example 8 Setting up RADIUS Authentication for All Targets The following command sets up RADIUS authentication for all targets. # itadm modify-defaults -d -r 192.168.10.1 -a radius Enter RADIUS secret: ********* Re-enter secret: ********* The preceding command assumes all targets were created with -a default. Example 9 Listing Default Properties The following command lists default properties. # itadm list-defaults iSCSI Target Default Properties: alias: none auth: none radiusserver: none radiussecret: unset isns: disabled isnsserver: 2.3.4.5,4.5.6.7 Example 10 Listing Targets The following command lists targets. # itadm list-target 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 Example 11 Listing Targets (Verbose) The following command lists targets with the verbose option. # itadm list-target -v 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 Example 12 Listing a Specific Target The following command lists targets with the verbose option. # itadm list-target -v iqn.1986-03.com.sun:02:2cb0c526-c05a-e279-e396-a367006f4227 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 ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWiscsitu | +-----------------------------+-----------------------------+ |Interface Stability |Committed | +-----------------------------+-----------------------------+ SEE ALSO
iscsiadm(1M), libstmf(3LIB), attributes(5) SunOS 5.11 11 Nov 2008 itadm(1M)