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
stmfadm(1M)						  System Administration Commands					       stmfadm(1M)

NAME
stmfadm - SCSI target mode framework command line interface SYNOPSIS
stmfadm add-hg-member -g, --group-name group-name group-member... stmfadm add-tg-member -g, --group-name group-name group-member... stmfadm add-view [-n, --lun logical-unit-number -t, --target-group group-name -h, --host-group group-name] lu-name stmfadm create-hg group-name stmfadm create-tg group-name stmfadm delete-hg group-name stmfadm delete-tg group-name stmfadm list-hg [-v] [host-group-name...] stmfadm list-tg [-v] [target-group-name...] stmfadm list-lu [-v] [lu-name...] stmfadm list-target [-v] [target-name...] stmfadm list-view -l, --lu-name lu-name [entry-name...] stmfadm list-state stmfadm remove-hg-member -g, --group-name group-name group-member... stmfadm remove-tg-member -g, --group-name group-name group-member... stmfadm remove-view -l, --lu-name lu-name entry-name DESCRIPTION
The stmfadm command configures logical units within the SCSI Target Mode Framework (STMF) framework. The framework and this man page use the following terminology: initiator A device responsible for issuing SCSI I/O commands to a SCSI target and logical unit. target A device responsible for receiving SCSI I/O commands for a logical unit. logical unit A device within a target responsible for executing SCSI I/O commands. logical unit number The identifier of a logical unit within a target. initiator group An initiator group is a set of one or more initiators that are combined for the purposes of being applied to a view (see below). An initiator cannot be a member of more than one initiator group. target group A target group is a set of one or more SCSI target ports that are combined for the purposes of being applied to a view (see below). A target port cannot be a member of more than one target group. view A view defines the association of an initiator group, a target group, and a logical unit number with a specified logical unit. Any view entry added to a logical unit must not be in conflict with existing view entries for that logical unit. A view entry is considered to be in conflict when an attempt is made to duplicate the association of any given initiator, target and logical unit number. As an exam- ple, logical unit LU_0 has the following view entry associated with it: Logical Unit: LU_0 View Entry: 0 initiator group: HostA target group: All targets logical unit number: 32 If you attempted the following: # stmf add-view -n 31 -h HostA LU_0 ...the operation would return an error with a message indicating that the view entry is in conflict with one or more existing view entries. This conflict arises because the existing view entry, 0, already has mapped LU_0 to logical unit number 32 for the initiator group HostA. SUB-COMMANDS The stmfadm command supports the subcommands listed below. add-view [-n, --lun logical-unit-number -t, --target-group group-name -h, --host-group group-name] lu-name Adds a logical unit view entry to a logical unit lu-name, where lu-name is the STMF name for the logical unit as displayed by the list- lu subcommand. The add-view subcommand provides the user with a mechanism to implement access control for a logical unit and also pro- vides a means of assigning a logical unit number to a logical unit for a given set of initiators and targets. A logical unit will not be available to any initiators until at least one view is applied. Each view entry gets assigned an entry name, which can be used to reference the entry in the remove-view and list-view subcommands. add-view supports the following options: -n, --lun logical-unit-number logical-unit-number is an integer in the range 0-16383 to be assigned to the logical unit for this view entry. If this option is not specified, a logical unit number will be assigned by the STMF framework. -t, --target-group group-name group-name is the name of a target group previously created using the STMF create-tg subcommand. If this option is not specified, the logical unit will be available through all targets. -h, -host-group group-name group-name is the name of an host group previously created using the STMF create-hg subcommand. If this option is not specified, the logical unit will be available to all initiators that log in to the STMF framework. add-hg-member -g group-name group member... Add a host group member to a host group. group-name must be an existing group created using the create-hg subcommand. group member can be specified as name_type.name_value, where name_type can be one of the following: wwn iqn eui ...and name_value is the value of the initiator name. As an example, to add a fibre channel initiator port world-wide name 200000e08b909221 to the host group HostA, the command would be: # stmfadm add-hg-member -g HostA wwn.200000e08b909221 To add an ISCSI initiator node member with the name iqn.1986-03.com.sun:01.46f7e262 to HostA, the command would be: # stmfadm add-hg-member -g HostA iqn.1986-03.com.sun:01.46f7e262 Alternatively, members can be specified using their SCSI name string identifiers. To add the two initiators above using their SCSI name string identifiers, the commands would be: # stmfadm add-hg-member -g HostA eui.200000e08b909221 # stmfadm add-hg-member -g HostA iqn.1986-03.com.sun:01.46f7e262 A host group member cannot be a member of more than one host group. add-tg-member -g group-name group member... Add a target group member to a target group. group-name must be an existing group created using the create-tg subcommand. group member can be specified as name_type.name_value, where name_type can be one of the following: wwn iqn eui ...and name_value is the value of the target name. As an example, to add a fibre channel target port world-wide name 501000e092376af7 to the target group TG0, the command would be: # stmfadm add-tg-member -g TG0 wwn.501000e092376af7 To add an ISCSI target member with the name iqn.1986-03.com.sun:target.01.01110 to TG0, the command would be: # stmfadm add-tg-member -g TG0 iqn.1986-03.com.sun:target.01.01110 Alternatively, members can be specified using their SCSI name string identifiers. To add the two targets above using their SCSI name string identifiers, the commands would be: # stmfadm add-tg-member -g TG0 eui.501000e092376af7 # stmfadm add-tg-member -g TG0 iqn.1986-03.com.sun:target.01.01110 A target group member cannot be a member of more than one target group. create-hg group-name Create an initiator group with the name group-name. group-name is a string of Unicode characters with a maximum length of 255. The group name must be unique within the STMF system. create-tg group-name Create a target group with the name group-name. group-name is a string of Unicode characters with a maximum length of 255. The group name must be unique within the STMF system. delete-hg group-name Delete the host group that identified by group-name. delete-tg group-name Delete the target group that identified by group-name. list-hg [-v,--verbose] [host-group-name...] Lists information for the host group in the system referenced by host-group-name. If host-group-name is not specified, all host groups in the system will be listed. If the --v or --verbose option is specified, all members within a host group are displayed. list-target [-v,--verbose] [target-name...] Lists information for the target port in the system referenced by target-name. If target name is not specified, all target ports in the system will be listed. If the -v or --verbose option is specified, additional information about the target along with SCSI session information for logged-in initiators is displayed. list-tg [-v,--verbose] [target-group-name...] Lists information for the target group in the system referenced by target-group-name. If target-group-name is not specified, all tar- get groups in the system will be listed. If the --v or --verbose option is specified, all members within a target group are displayed. list-lu [-v,--verbose] [lu-name...] Lists information for the logical unit in the system referenced by lu-name. If lu-name is not specified, all logical units in the sys- tem will be listed. If the -v or --verbose option is specified, additional information about the logical unit will be displayed. list-view --l, --lu-name lu-name [entry-name...] Lists the view entry for the logical unit referenced by lu-name. If entry-name is not specified, all view entries for the specified logical unit will be listed. list-state Lists the operational and configuration state of the STMF. remove-hg-member -g group-name group member Removes a host group member from a host group. group-name must be an existing group created using the create-hg subcommand. group mem- ber can be specified as name_type.name_value, where name_type can be one of the following: wwn iqn eui ...and name_value is the value of the initiator name. As an example, to remove the fibre channel initiator port world-wide name 200000e08b909221 from the host group HostA, the command would be: # stmfadm remove-hg-member -g HostA wwn.200000e08b909221 To remove the ISCSI initiator node member with the name iqn.1986-03.com.sun:01.46f7e262 from HostA, the command would be: # stmfadm remove-hg-member -g HostA iqn.1986-03.com.sun:01.46f7e262 Alternatively, members can be specified using their SCSI name string identifiers. To remove the two initiators above using their SCSI name string identifiers, the commands would be: # stmfadm remove-hg-member -g HostA eui.200000e08b909221 # stmfadm remove-hg-member -g HostA iqn.1986-03.com.sun:01.46f7e262 remove-tg-member -g group-name group member Removes a target group member from a target group. group-name must be an existing group created using the create-tg subcommand. group member can be specified as name_type.name_value, where name_type can be one of the following: wwn iqn eui ...and name_value is the value of the target name. As an example, to remove the fibre channel target port world-wide name 501000e092376af7 from the target group TG0, the command would be: # stmfadm remove-tg-member -g TG0 wwn.501000e092376af7 To remove the ISCSI target member with the name iqn.1986-03.com.sun:target.01.01110 from TG0, the command would be: # stmfadm remove-tg-member -g TG0 iqn.1986-03.com.sun:target.01.01110 Alternatively, members can be specified using their SCSI name string identifiers. To remove the two targets above using their SCSI name string identifiers, the commands would be: # stmfadm remove-tg-member -g TG0 eui.501000e092376af7 # stmfadm remove-tg-member -g TG0 iqn.1986-03.com.sun:target.01.01110 remove-view --l, --lu-name lu-name entry-name Removes one or more logical unit view entries from a logical unit. EXAMPLES
Example 1 Creating a Host group with Two Initiator Ports The following commands use the create-hg and add-hg-member subcommands to create a host group and add two initiator ports to that host group. # stmfadm create-hg host-group-a # stmfadm add-hg-member -g host-group-a wwn.210105b0000d92d0 Example 2 Adding a View Entry to a Logical Unit The following command uses the add-view subcommand to allow access from host-group-a to a logical unit. # stmfadm add-view -h host-group-a 6000AE40C5000000000046FC4FEA001C Example 3 Listing a View Entry The following command uses the list-view subcommand to list all view entries for the specified logical unit. # stmfadm list-view -l 6000AE40C5000000000046FC4FEA001C View Entry: 0 Host group : host-group-a Target group : All LUN : 0 ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWstmfu | +-----------------------------+-----------------------------+ |Interface Stability |Committed | +-----------------------------+-----------------------------+ SEE ALSO
sbdadm(1M), attributes(5) SunOS 5.11 8 Jan 2009 stmfadm(1M)