stmfadm - SCSI target mode framework command line interface
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
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
target
logical unit
logical unit number
initiator group
target group
view
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.
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
add-view supports the following options:
-l, --lun logical-unit-number
-t, --target-group group-name
-h, -host-group group-name
add-hg-member -g group-name group member...
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...
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-tg group-name
delete-hg group-name
delete-tg group-name
list-hg [-v,--verbose] [host-group-name...]
list-target [-v,--verbose] [target-name...]
list-tg [-v,--verbose] [target-group-name...]
list-lu [-v,--verbose] [lu-name...]
list-view --l, --lu-name lu-name [entry-name...]
list-state
remove-hg-member -g group-name group member
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
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
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
See attributes(5) for descriptions of the following attributes:
|
sbdadm(1M), attributes(5)
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |