1 '\" te
   2 .\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved
   3 .\" 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.
   4 .\"  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
   5 .\" fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
   6 .TH STMFADM 1M "Jul 30, 2009"
   7 .SH NAME
   8 stmfadm \- SCSI target mode framework command line interface
   9 .SH SYNOPSIS
  10 .LP
  11 .nf
  12 \fBstmfadm\fR \fBadd-hg-member\fR \fB-g\fR, \fB--group-name\fR \fIgroup-name\fR \fIgroup-member\fR...
  13 .fi
  14 
  15 .LP
  16 .nf
  17 \fBstmfadm\fR \fBadd-tg-member\fR \fB-g\fR, \fB--group-name\fR \fIgroup-name\fR \fIgroup-member\fR...
  18 .fi
  19 
  20 .LP
  21 .nf
  22 \fBstmfadm\fR \fBadd-view\fR [\fB-n\fR, \fB--lun\fR \fIlogical-unit-number\fR
  23      \fB-t\fR, \fB--target-group\fR \fIgroup-name\fR \fB-h\fR, \fB--host-group\fR \fIgroup-name\fR] \fIlu-name\fR
  24 .fi
  25 
  26 .LP
  27 .nf
  28 \fBstmfadm\fR \fBcreate-hg\fR \fIgroup-name\fR
  29 .fi
  30 
  31 .LP
  32 .nf
  33 \fBstmfadm\fR \fBcreate-lu\fR [\fB-p\fR, \fB--lu-prop\fR \fIlogical-unit-property\fR=\fIval\fR
  34      \fB-s\fR, \fB--size\fR \fIsize\fR] \fIlu-file\fR
  35 .fi
  36 
  37 .LP
  38 .nf
  39 \fBstmfadm\fR \fBcreate-tg\fR \fIgroup-name\fR
  40 .fi
  41 
  42 .LP
  43 .nf
  44 \fBstmfadm\fR \fBdelete-hg\fR \fIgroup-name\fR
  45 .fi
  46 
  47 .LP
  48 .nf
  49 \fBstmfadm\fR \fBdelete-lu\fR \fIlu-name\fR
  50 .fi
  51 
  52 .LP
  53 .nf
  54 \fBstmfadm\fR \fBdelete-tg\fR \fIgroup-name\fR
  55 .fi
  56 
  57 .LP
  58 .nf
  59 \fBstmfadm\fR \fBimport-lu\fR \fIlu-file\fR
  60 .fi
  61 
  62 .LP
  63 .nf
  64 \fBstmfadm\fR \fBlist-hg\fR [\fB-v\fR] [\fIhost-group-name\fR...]
  65 .fi
  66 
  67 .LP
  68 .nf
  69 \fBstmfadm\fR \fBlist-tg\fR [\fB-v\fR] [\fItarget-group-name\fR...]
  70 .fi
  71 
  72 .LP
  73 .nf
  74 \fBstmfadm\fR \fBlist-lu\fR [\fB-v\fR] [\fIlu-name\fR...]
  75 .fi
  76 
  77 .LP
  78 .nf
  79 \fBstmfadm\fR \fBlist-target\fR [\fB-v\fR] [\fItarget-name\fR...]
  80 .fi
  81 
  82 .LP
  83 .nf
  84 \fBstmfadm\fR \fBlist-view\fR \fB-l\fR, \fB--lu-name\fR \fIlu-name\fR [\fIentry-name\fR...]
  85 .fi
  86 
  87 .LP
  88 .nf
  89 \fBstmfadm\fR \fBlist-state\fR
  90 .fi
  91 
  92 .LP
  93 .nf
  94 \fBstmfadm\fR \fBmodify-lu\fR [\fB-p\fR, \fB--lu-prop\fR \fIlogical-unit-property\fR=\fIval\fR
  95      \fB-s\fR, \fB--size\fR \fIsize\fR, \fB-f\fR, \fB--file\fR] \fIlu-name\fR|\fIlu-file\fR
  96 .fi
  97 
  98 .LP
  99 .nf
 100 \fBstmfadm\fR \fBonline-lu\fR \fIlu-name\fR
 101 .fi
 102 
 103 .LP
 104 .nf
 105 \fBstmfadm\fR \fBoffline-lu\fR \fIlu-name\fR
 106 .fi
 107 
 108 .LP
 109 .nf
 110 \fBstmfadm\fR \fBonline-lu\fR \fItarget-name\fR
 111 .fi
 112 
 113 .LP
 114 .nf
 115 \fBstmfadm\fR \fBoffline-lu\fR \fItarget-name\fR
 116 .fi
 117 
 118 .LP
 119 .nf
 120 \fBstmfadm\fR \fBremove-hg-member\fR \fB-g\fR, \fB--group-name\fR \fIgroup-name\fR \fIgroup-member\fR...
 121 .fi
 122 
 123 .LP
 124 .nf
 125 \fBstmfadm\fR \fBremove-tg-member\fR \fB-g\fR, \fB--group-name\fR \fIgroup-name\fR \fIgroup-member\fR...
 126 .fi
 127 
 128 .LP
 129 .nf
 130 \fBstmfadm\fR \fBremove-view\fR \fB-l\fR, \fB--lu-name\fR \fIlu-name\fR \fIentry-name\fR
 131 .fi
 132 
 133 .SH DESCRIPTION
 134 .sp
 135 .LP
 136 The \fBstmfadm\fR command configures logical units within the SCSI Target Mode
 137 Framework (STMF) framework. The framework and this man page use the following
 138 terminology:
 139 .sp
 140 .ne 2
 141 .na
 142 \fB\fBinitiator\fR\fR
 143 .ad
 144 .sp .6
 145 .RS 4n
 146 A device responsible for issuing SCSI I/O commands to a SCSI target and logical
 147 unit.
 148 .RE
 149 
 150 .sp
 151 .ne 2
 152 .na
 153 \fB\fBtarget\fR\fR
 154 .ad
 155 .sp .6
 156 .RS 4n
 157 A device responsible for receiving SCSI I/O commands for a logical unit.
 158 .RE
 159 
 160 .sp
 161 .ne 2
 162 .na
 163 \fB\fBlogical unit\fR\fR
 164 .ad
 165 .sp .6
 166 .RS 4n
 167 A device within a target responsible for executing SCSI I/O commands.
 168 .RE
 169 
 170 .sp
 171 .ne 2
 172 .na
 173 \fB\fBlogical unit number\fR\fR
 174 .ad
 175 .sp .6
 176 .RS 4n
 177 The identifier of a logical unit within a target.
 178 .RE
 179 
 180 .sp
 181 .ne 2
 182 .na
 183 \fB\fBinitiator group\fR\fR
 184 .ad
 185 .sp .6
 186 .RS 4n
 187 An initiator group is a set of one or more initiators that are combined for the
 188 purposes of being applied to a \fBview\fR (see below). An initiator cannot be a
 189 member of more than one initiator group.
 190 .RE
 191 
 192 .sp
 193 .ne 2
 194 .na
 195 \fB\fBtarget group\fR\fR
 196 .ad
 197 .sp .6
 198 .RS 4n
 199 A target group is a set of one or more SCSI target ports that are treated the
 200 same when creating a \fBview\fR (see below). The set of logical units that a
 201 particular SCSI initiator can see is determined by the combined set of  views.
 202 .sp
 203 Each logical unit has a set of view entries, and each view entry specifies a
 204 target group, host group, and a LUN. An initiator from that host group, when
 205 connecting through that target group, is able to identify and connect to that
 206 logical unit using the specified LUN. You can use views to restrict the set of
 207 logical units that a specific initiator can see, and assign the set of LUNs
 208 that will be used.
 209 .RE
 210 
 211 .sp
 212 .ne 2
 213 .na
 214 \fB\fBview\fR\fR
 215 .ad
 216 .sp .6
 217 .RS 4n
 218 A view defines the association of an initiator group, a target group, and a
 219 logical unit number with a specified logical unit. Any view entry added to a
 220 logical unit must not be in conflict with existing view entries for that
 221 logical unit. A view entry is considered to be in conflict when an attempt is
 222 made to duplicate the association of any given initiator, target and logical
 223 unit number. As an example, logical unit \fBLU_0\fR has the following view
 224 entry associated with it:
 225 .sp
 226 .in +2
 227 .nf
 228 Logical Unit: LU_0
 229                         View Entry: 0   
 230                                 initiator group: HostA
 231                                 target group: All targets
 232                                 logical unit number: 32
 233 .fi
 234 .in -2
 235 .sp
 236 
 237 If you attempted the following:
 238 .sp
 239 .in +2
 240 .nf
 241 # \fBstmf add-view -n 31 -h HostA LU_0\fR
 242 .fi
 243 .in -2
 244 .sp
 245 
 246 \&...the operation would return an error with a message indicating that the
 247 view entry is in conflict with one or more existing view entries. This conflict
 248 arises because the existing view entry, \fB0\fR, already has mapped \fBLU_0\fR
 249 to logical unit number 32 for the initiator group \fBHostA\fR.
 250 .RE
 251 
 252 .SH SUB-COMMANDS
 253 .sp
 254 .LP
 255 The \fBstmfadm\fR command supports the subcommands listed below.
 256 .sp
 257 .ne 2
 258 .na
 259 \fB\fBadd-view\fR [\fB-n\fR, \fB--lun\fR \fIlogical-unit-number\fR \fB-t\fR,
 260 \fB--target-group\fR \fIgroup-name\fR \fB-h\fR, \fB--host-group\fR
 261 \fIgroup-name\fR] \fIlu-name\fR\fR
 262 .ad
 263 .sp .6
 264 .RS 4n
 265 Adds a logical unit view entry to a logical unit \fIlu-name\fR, where
 266 \fIlu-name\fR is the STMF name for the logical unit as displayed by the
 267 \fBlist-lu\fR subcommand. The \fBadd-view\fR subcommand provides the user with
 268 a mechanism to implement access control for a logical unit and also provides a
 269 means of assigning a logical unit number to a logical unit for a given set of
 270 initiators and targets. A logical unit will not be available to any initiators
 271 until at least one view is applied. Each view entry gets assigned an entry
 272 name, which can be used to reference the entry in the \fBremove-view\fR and
 273 \fBlist-view\fR subcommands.
 274 .sp
 275 \fBadd-view\fR supports the following options:
 276 .sp
 277 .ne 2
 278 .na
 279 \fB\fB-n\fR, \fB--lun\fR \fIlogical-unit-number\fR\fR
 280 .ad
 281 .sp .6
 282 .RS 4n
 283 \fIlogical-unit-number\fR is an integer in the range 0-16383 to be assigned to
 284 the logical unit for this view entry. If this option is not specified, a
 285 logical unit number will be assigned by the STMF framework.
 286 .RE
 287 
 288 .sp
 289 .ne 2
 290 .na
 291 \fB\fB-t\fR, \fB--target-group\fR \fIgroup-name\fR\fR
 292 .ad
 293 .sp .6
 294 .RS 4n
 295 \fIgroup-name\fR is the name of a target group previously created using the
 296 STMF \fBcreate-tg\fR subcommand. If this option is not specified, the logical
 297 unit will be available through all targets.
 298 .RE
 299 
 300 .sp
 301 .ne 2
 302 .na
 303 \fB\fB-h\fR, \fB-host-group\fR \fIgroup-name\fR\fR
 304 .ad
 305 .sp .6
 306 .RS 4n
 307 \fIgroup-name\fR is the name of an host group previously created using the STMF
 308 \fBcreate-hg\fR subcommand. If this option is not specified, the logical unit
 309 will be available to all initiators that log in to the STMF framework.
 310 .RE
 311 
 312 .RE
 313 
 314 .sp
 315 .ne 2
 316 .na
 317 \fB\fBadd-hg-member\fR \fB-g\fR \fIgroup-name\fR \fIgroup member\fR...\fR
 318 .ad
 319 .sp .6
 320 .RS 4n
 321 Add a host group member to a host group. \fIgroup-name\fR must be an existing
 322 group created using the \fBcreate-hg\fR subcommand. \fIgroup member\fR can be
 323 specified as \fIname_type\fR.\fIname_value\fR, where \fIname_type\fR can be one
 324 of the following:
 325 .sp
 326 .in +2
 327 .nf
 328 wwn
 329 iqn
 330 eui
 331 .fi
 332 .in -2
 333 .sp
 334 
 335 \&...and \fIname_value\fR is the value of the initiator name. As an example, to
 336 add a fibre channel initiator port world-wide name \fB200000e08b909221\fR to
 337 the host group \fBHostA\fR, the command would be:
 338 .sp
 339 .in +2
 340 .nf
 341 # \fBstmfadm add-hg-member -g HostA wwn.200000e08b909221\fR
 342 .fi
 343 .in -2
 344 .sp
 345 
 346 To add an ISCSI initiator node member with the name
 347 \fBiqn.1986-03.com.sun:01.46f7e262\fR to \fBHostA\fR, the command would be:
 348 .sp
 349 .in +2
 350 .nf
 351 # \fBstmfadm add-hg-member -g HostA iqn.1986-03.com.sun:01.46f7e262\fR
 352 .fi
 353 .in -2
 354 .sp
 355 
 356 Alternatively, members can be specified using their SCSI name string
 357 identifiers. To add the two initiators above using their SCSI name string
 358 identifiers, the commands would be:
 359 .sp
 360 .in +2
 361 .nf
 362 # \fBstmfadm add-hg-member -g HostA eui.200000e08b909221\fR
 363 # \fBstmfadm add-hg-member -g HostA iqn.1986-03.com.sun:01.46f7e262\fR
 364 .fi
 365 .in -2
 366 .sp
 367 
 368 A host group member cannot be a member of more than one host group.
 369 .RE
 370 
 371 .sp
 372 .ne 2
 373 .na
 374 \fB\fBadd-tg-member\fR \fB-g\fR \fIgroup-name\fR \fIgroup member\fR...\fR
 375 .ad
 376 .sp .6
 377 .RS 4n
 378 Add a target group member to a target group. \fIgroup-name\fR must be an
 379 existing group created using the \fBcreate-tg\fR subcommand. \fIgroup member\fR
 380 can be specified as \fIname_type\fR.\fIname_value\fR, where \fIname_type\fR can
 381 be one of the following:
 382 .sp
 383 .in +2
 384 .nf
 385 wwn
 386 iqn
 387 eui
 388 .fi
 389 .in -2
 390 .sp
 391 
 392 \&...and \fIname_value\fR is the value of the target name. As an example, to
 393 add a fibre channel target port world-wide name \fB501000e092376af7\fR to the
 394 target group \fBTG0\fR, the command would be:
 395 .sp
 396 .in +2
 397 .nf
 398 # \fBstmfadm add-tg-member -g TG0 wwn.501000e092376af7\fR
 399 .fi
 400 .in -2
 401 .sp
 402 
 403 To add an ISCSI target member with the name
 404 \fBiqn.1986-03.com.sun:target.01.01110\fR to \fBTG0\fR, the command would be:
 405 .sp
 406 .in +2
 407 .nf
 408 # \fBstmfadm add-tg-member -g TG0 iqn.1986-03.com.sun:target.01.01110\fR
 409 .fi
 410 .in -2
 411 .sp
 412 
 413 Alternatively, members can be specified using their SCSI name string
 414 identifiers. To add the two targets above using their SCSI name string
 415 identifiers, the commands would be:
 416 .sp
 417 .in +2
 418 .nf
 419 # \fBstmfadm add-tg-member -g TG0 eui.501000e092376af7\fR
 420 # \fBstmfadm add-tg-member -g TG0 iqn.1986-03.com.sun:target.01.01110\fR
 421 .fi
 422 .in -2
 423 .sp
 424 
 425 A target group member cannot be a member of more than one target group.
 426 .RE
 427 
 428 .sp
 429 .ne 2
 430 .na
 431 \fB\fBcreate-hg\fR \fIgroup-name\fR\fR
 432 .ad
 433 .sp .6
 434 .RS 4n
 435 Create an initiator group with the name \fIgroup-name\fR. \fIgroup-name\fR is a
 436 string of Unicode characters with a maximum length of 255. The group name must
 437 be unique within the STMF system.
 438 .RE
 439 
 440 .sp
 441 .ne 2
 442 .na
 443 \fB\fBcreate-lu\fR [\fB-p\fR, \fB--lu-prop\fR
 444 \fIlogical-unit-property\fR=\fIval\fR \fB-s\fR, \fB--size\fR \fIsize\fR]
 445 \fIlu-file\fR\fR
 446 .ad
 447 .sp .6
 448 .RS 4n
 449 Create a logical unit that can be registered with STMF. For the \fB-p\fR
 450 option, \fIlogical-unit-property\fR can be one of the following properties:
 451 .sp
 452 .ne 2
 453 .na
 454 \fB\fBalias\fR\fR
 455 .ad
 456 .sp .6
 457 .RS 4n
 458 Up to 255 characters, representing a user-defined name for the device. The
 459 default is the name of the backing store.
 460 .RE
 461 
 462 .sp
 463 .ne 2
 464 .na
 465 \fB\fBblk\fR\fR
 466 .ad
 467 .sp .6
 468 .RS 4n
 469 Specifies the block size for the device. The default is 512.
 470 .RE
 471 
 472 .sp
 473 .ne 2
 474 .na
 475 \fB\fBguid\fR\fR
 476 .ad
 477 .sp .6
 478 .RS 4n
 479 Thirty-two hexadecimal ASCII characters representing a valid NAA Registered
 480 Extended Identifier. The default is set by the STMF to a generated value.
 481 .RE
 482 
 483 .sp
 484 .ne 2
 485 .na
 486 \fB\fBmeta\fR\fR
 487 .ad
 488 .sp .6
 489 .RS 4n
 490 Metadata file name. When specified, will be used to hold the SCSI metadata for
 491 the logical unit. There is no default.
 492 .RE
 493 
 494 .sp
 495 .ne 2
 496 .na
 497 \fB\fBmgmt-url\fR\fR
 498 .ad
 499 .sp .6
 500 .RS 4n
 501 Up to 1024 characters representing a Management Network Address URL. More than
 502 one URL can be passed as a single parameter by using space-delimited URLs
 503 enclosed inside a single pair of quotation marks (\fB"\fR).
 504 .RE
 505 
 506 .sp
 507 .ne 2
 508 .na
 509 \fB\fBoui\fR\fR
 510 .ad
 511 .sp .6
 512 .RS 4n
 513 Organizational Unique Identifier. Six hexadecimal ASCII characters representing
 514 the IEEE OUI company ID assignment. This will be used to generate the device
 515 identifier (GUID). The default is \fB00144F\fR.
 516 .RE
 517 
 518 .sp
 519 .ne 2
 520 .na
 521 \fB\fBpid\fR\fR
 522 .ad
 523 .sp .6
 524 .RS 4n
 525 Sixteen characters of product identification SCSI SPC-3. This value will be
 526 reflected in the Standard \fBINQUIRY\fR data returned for the device. The
 527 default is \fBCOMSTAR\fR.
 528 .RE
 529 
 530 .sp
 531 .ne 2
 532 .na
 533 \fB\fBserial\fR\fR
 534 .ad
 535 .sp .6
 536 .RS 4n
 537 Serial Number. Specifies the SCSI Vital Product Data Serial Number (page
 538 \fB80h\fR). It is a character value up to 252 bytes in length. There is no
 539 default value.
 540 .RE
 541 
 542 .sp
 543 .ne 2
 544 .na
 545 \fB\fBvid\fR\fR
 546 .ad
 547 .sp .6
 548 .RS 4n
 549 Eight characters of vendor identification per SCSI SPC-3. This value will be
 550 reflected in the Standard \fBINQUIRY\fR data returned for the device. The
 551 default is \fBSUN\fR.
 552 .RE
 553 
 554 .sp
 555 .ne 2
 556 .na
 557 \fB\fBwcd\fR\fR
 558 .ad
 559 .sp .6
 560 .RS 4n
 561 Write-back cache disable. Specify \fBtrue\fR or \fBfalse\fRto determine
 562 write-back cache disable behavior. The default is the write-back cache setting
 563 of the backing store device specified by the \fIlu-file\fR argument.
 564 .RE
 565 
 566 .sp
 567 .ne 2
 568 .na
 569 \fB\fBwp\fR\fR
 570 .ad
 571 .sp .6
 572 .RS 4n
 573 Write-protect bit. Specify \fBtrue\fR or \fBfalse\fR to determine whether the
 574 device reports as write-protected. The default is \fBfalse\fR.
 575 .RE
 576 
 577 For the \fB-s\fR option, \fIsize\fR is an integer followed by one of the
 578 following letters, to indicate a unit of size:
 579 .sp
 580 .ne 2
 581 .na
 582 \fB\fBk\fR\fR
 583 .ad
 584 .RS 5n
 585 kilobyte
 586 .RE
 587 
 588 .sp
 589 .ne 2
 590 .na
 591 \fB\fBm\fR\fR
 592 .ad
 593 .RS 5n
 594 megabyte
 595 .RE
 596 
 597 .sp
 598 .ne 2
 599 .na
 600 \fB\fBg\fR\fR
 601 .ad
 602 .RS 5n
 603 gigabyte
 604 .RE
 605 
 606 .sp
 607 .ne 2
 608 .na
 609 \fB\fBt\fR\fR
 610 .ad
 611 .RS 5n
 612 terabyte
 613 .RE
 614 
 615 .sp
 616 .ne 2
 617 .na
 618 \fB\fBp\fR\fR
 619 .ad
 620 .RS 5n
 621 petabyte
 622 .RE
 623 
 624 .sp
 625 .ne 2
 626 .na
 627 \fB\fBe\fR\fR
 628 .ad
 629 .RS 5n
 630 exabyte
 631 .RE
 632 
 633 \fIlu-file\fR is the file to be used as the backing store for the logical unit.
 634 If the \fB-s\fR option is not specified, the size of the specified
 635 \fIlu-file\fR will be used as the size of the logical unit. Logical units
 636 registered with the STMF require space for the metadata to be stored. When a
 637 \fBzvol\fR is specified as the backing store device, the default will be to use
 638 a special property of the \fBzvol\fR to contain the metadata. For all other
 639 devices, the default behavior will be to use the first 64k of the device. An
 640 alternative approach would be to use the \fBmeta\fR property in a
 641 \fBcreate-lu\fR command to specify an alternate file to contain the metadata.
 642 It is advisable to use a file that can provide sufficient storage of the
 643 logical unit metadata, preferably 64k.
 644 .RE
 645 
 646 .sp
 647 .ne 2
 648 .na
 649 \fB\fBcreate-tg\fR \fIgroup-name\fR\fR
 650 .ad
 651 .sp .6
 652 .RS 4n
 653 Create a target group with the name \fIgroup-name\fR. \fIgroup-name\fR is a
 654 string of Unicode characters with a maximum length of 255. The group name must
 655 be unique within the STMF system.
 656 .RE
 657 
 658 .sp
 659 .ne 2
 660 .na
 661 \fB\fBdelete-hg\fR \fIgroup-name\fR\fR
 662 .ad
 663 .sp .6
 664 .RS 4n
 665 Delete the host group that identified by \fIgroup-name\fR.
 666 .RE
 667 
 668 .sp
 669 .ne 2
 670 .na
 671 \fB\fBdelete-lu\fR \fIlu-name\fR\fR
 672 .ad
 673 .sp .6
 674 .RS 4n
 675 Deletes an existing logical unit that was created using \fBstmfadm
 676 create-lu\fR. This effectively unloads the logical unit from the STMF
 677 framework. Any existing data on the logical unit remains intact.
 678 .RE
 679 
 680 .sp
 681 .ne 2
 682 .na
 683 \fB\fBdelete-tg\fR \fIgroup-name\fR\fR
 684 .ad
 685 .sp .6
 686 .RS 4n
 687 Delete the target group that identified by \fIgroup-name\fR.
 688 .RE
 689 
 690 .sp
 691 .ne 2
 692 .na
 693 \fB\fBimport-lu\fR \fIlu-file\fR\fR
 694 .ad
 695 .sp .6
 696 .RS 4n
 697 Imports and loads a logical unit into the STMF that was previously created
 698 using \fBstmfadm create-lu\fR and was then deleted from the STMF using
 699 \fBstmfadm delete-lu\fR. On success, the logical unit is again made available
 700 to the STMF. \fIlu-file\fR is the filename used in the \fBstmfadm create-lu\fR
 701 command. If this logical unit is using a separate metadata file, the filename
 702 in the \fBmeta\fR property value that was used in the \fBstmfadm create-lu\fR
 703 command must be used here.
 704 .RE
 705 
 706 .sp
 707 .ne 2
 708 .na
 709 \fB\fBlist-hg\fR [\fB-v\fR,\fB--verbose\fR] [\fIhost-group-name\fR...]\fR
 710 .ad
 711 .sp .6
 712 .RS 4n
 713 Lists information for the host group in the system referenced by
 714 \fIhost-group-name\fR. If \fIhost-group-name\fR is not specified, all host
 715 groups in the system will be listed. If the \fB--v\fR or \fB--verbose\fR option
 716 is specified, all members within a host group are displayed.
 717 .RE
 718 
 719 .sp
 720 .ne 2
 721 .na
 722 \fB\fBlist-lu\fR [\fB-v\fR,\fB--verbose\fR] [\fIlu-name\fR...]\fR
 723 .ad
 724 .sp .6
 725 .RS 4n
 726 Lists information for the logical unit in the system referenced by
 727 \fIlu-name\fR. If \fIlu-name\fR is not specified, all logical units in the
 728 system will be listed. If the \fB-v\fR or \fB--verbose\fR option is specified,
 729 additional information about the logical unit will be displayed.
 730 .RE
 731 
 732 .sp
 733 .ne 2
 734 .na
 735 \fB\fBlist-target\fR [\fB-v\fR,\fB--verbose\fR] [\fItarget-name\fR...]\fR
 736 .ad
 737 .sp .6
 738 .RS 4n
 739 Lists information for the target port in the system referenced by
 740 \fItarget-name\fR. If target name is not specified, all target ports in the
 741 system will be listed. If the \fB-v\fR or \fB--verbose\fR option is specified,
 742 additional information about the target along with SCSI session information for
 743 logged-in initiators is displayed.
 744 .RE
 745 
 746 .sp
 747 .ne 2
 748 .na
 749 \fB\fBlist-tg\fR [\fB-v\fR,\fB--verbose\fR] [\fItarget-group-name\fR...]\fR
 750 .ad
 751 .sp .6
 752 .RS 4n
 753 Lists information for the target group in the system referenced by
 754 \fItarget-group-name\fR. If \fItarget-group-name\fR is not specified, all
 755 target groups in the system will be listed. If the \fB--v\fR or \fB--verbose\fR
 756 option is specified, all members within a target group are displayed.
 757 .RE
 758 
 759 .sp
 760 .ne 2
 761 .na
 762 \fB\fBlist-view\fR \fB--l\fR, \fB--lu-name\fR \fIlu-name\fR
 763 [\fIentry-name\fR...]\fR
 764 .ad
 765 .sp .6
 766 .RS 4n
 767 Lists the view entry for the logical unit referenced by \fIlu-name\fR. If
 768 \fIentry-name\fR is not specified, all view entries for the specified logical
 769 unit will be listed.
 770 .RE
 771 
 772 .sp
 773 .ne 2
 774 .na
 775 \fB\fBmodify-lu\fR [\fB-p\fR, \fB--lu-prop\fR
 776 \fIlogical-unit-property\fR=\fIval\fR \fB-s\fR, \fB--size\fR \fIsize\fR,
 777 \fB-f\fR, \fB--file\fR] \fIlu-name\fR|\fIlu-file\fR\fR
 778 .ad
 779 .sp .6
 780 .RS 4n
 781 Modifies attributes of a logical unit created using the \fBstmfadm create-lu\fR
 782 command. For the \fB-p\fR option, \fIlogical-unit-property\fR can be one of the
 783 following properties:
 784 .sp
 785 .ne 2
 786 .na
 787 \fB\fBalias\fR\fR
 788 .ad
 789 .sp .6
 790 .RS 4n
 791 Up to 255 characters, representing a user-defined name for the device. The
 792 default is the name of the backing store.
 793 .RE
 794 
 795 .sp
 796 .ne 2
 797 .na
 798 \fB\fBmgmt-url\fR\fR
 799 .ad
 800 .sp .6
 801 .RS 4n
 802 Up to 1024 characters representing a Management Network Address URL. More than
 803 one URL can be passed as a single parameter by using space-delimited URLs
 804 enclosed inside a single pair of quotation marks (\fB"\fR).
 805 .RE
 806 
 807 .sp
 808 .ne 2
 809 .na
 810 \fB\fBwcd\fR\fR
 811 .ad
 812 .sp .6
 813 .RS 4n
 814 Write-back cache disable. Specify \fBtrue\fR or \fBfalse\fRto determine
 815 write-back cache disable behavior. The default is the write-back cache setting
 816 of the backing store device specified by the \fIlu-file\fR argument.
 817 .RE
 818 
 819 .sp
 820 .ne 2
 821 .na
 822 \fB\fBwp\fR\fR
 823 .ad
 824 .sp .6
 825 .RS 4n
 826 Write-protect bit. Specify \fBtrue\fR or \fBfalse\fR to determine whether the
 827 device reports as write-protected. The default is \fBfalse\fR.
 828 .RE
 829 
 830 For the \fB-s\fR option, \fIsize\fR is an integer followed by one of the
 831 following letters, to indicate a unit of size:
 832 .sp
 833 .ne 2
 834 .na
 835 \fB\fBk\fR\fR
 836 .ad
 837 .RS 5n
 838 kilobyte
 839 .RE
 840 
 841 .sp
 842 .ne 2
 843 .na
 844 \fB\fBm\fR\fR
 845 .ad
 846 .RS 5n
 847 megabyte
 848 .RE
 849 
 850 .sp
 851 .ne 2
 852 .na
 853 \fB\fBg\fR\fR
 854 .ad
 855 .RS 5n
 856 gigabyte
 857 .RE
 858 
 859 .sp
 860 .ne 2
 861 .na
 862 \fB\fBt\fR\fR
 863 .ad
 864 .RS 5n
 865 terabyte
 866 .RE
 867 
 868 .sp
 869 .ne 2
 870 .na
 871 \fB\fBp\fR\fR
 872 .ad
 873 .RS 5n
 874 petabyte
 875 .RE
 876 
 877 .sp
 878 .ne 2
 879 .na
 880 \fB\fBe\fR\fR
 881 .ad
 882 .RS 5n
 883 exabyte
 884 .RE
 885 
 886 \fIlu-name\fR is the \fBguid\fR of the logical unit to be modified. If the
 887 \fB-f\fR option is specified, the operand is interpreted as a file name. This
 888 provides the ability to modify a logical unit that is not currently imported
 889 into the STMF.
 890 .RE
 891 
 892 .sp
 893 .ne 2
 894 .na
 895 \fB\fBonline-lu\fR \fIlu-name\fR\fR
 896 .ad
 897 .sp .6
 898 .RS 4n
 899 Online a logical unit currently registered with the STMF.
 900 .RE
 901 
 902 .sp
 903 .ne 2
 904 .na
 905 \fB\fBonline-target\fR \fItarget-name\fR\fR
 906 .ad
 907 .sp .6
 908 .RS 4n
 909 Online the specified target.
 910 .RE
 911 
 912 .sp
 913 .ne 2
 914 .na
 915 \fB\fBoffline-lu\fR \fIlu-name\fR\fR
 916 .ad
 917 .sp .6
 918 .RS 4n
 919 Offline a logical unit currently registered with the STMF.
 920 .RE
 921 
 922 .sp
 923 .ne 2
 924 .na
 925 \fB\fBoffline-target\fR \fItarget-name\fR\fR
 926 .ad
 927 .sp .6
 928 .RS 4n
 929 Online the specified target.
 930 .RE
 931 
 932 .sp
 933 .ne 2
 934 .na
 935 \fB\fBlist-state\fR\fR
 936 .ad
 937 .sp .6
 938 .RS 4n
 939 Lists the operational and configuration state of the STMF.
 940 .RE
 941 
 942 .sp
 943 .ne 2
 944 .na
 945 \fB\fBremove-hg-member\fR \fB-g\fR \fIgroup-name\fR \fIgroup member\fR\fR
 946 .ad
 947 .sp .6
 948 .RS 4n
 949 Removes a host group member from a host group. \fIgroup-name\fR must be an
 950 existing group created using the \fBcreate-hg\fR subcommand. \fIgroup member\fR
 951 can be specified as \fIname_type\fR.\fIname_value\fR, where \fIname_type\fR can
 952 be one of the following:
 953 .sp
 954 .in +2
 955 .nf
 956 wwn
 957 iqn
 958 eui
 959 .fi
 960 .in -2
 961 .sp
 962 
 963 \&...and \fIname_value\fR is the value of the initiator name. As an example, to
 964 remove the fibre channel initiator port world-wide name \fB200000e08b909221\fR
 965 from the host group \fBHostA\fR, the command would be:
 966 .sp
 967 .in +2
 968 .nf
 969 # \fBstmfadm remove-hg-member -g HostA wwn.200000e08b909221\fR
 970 .fi
 971 .in -2
 972 .sp
 973 
 974 To remove the ISCSI initiator node member with the name
 975 \fBiqn.1986-03.com.sun:01.46f7e262\fR from \fBHostA\fR, the command would be:
 976 .sp
 977 .in +2
 978 .nf
 979 # \fBstmfadm remove-hg-member -g HostA iqn.1986-03.com.sun:01.46f7e262\fR
 980 .fi
 981 .in -2
 982 .sp
 983 
 984 Alternatively, members can be specified using their SCSI name string
 985 identifiers. To remove the two initiators above using their SCSI name string
 986 identifiers, the commands would be:
 987 .sp
 988 .in +2
 989 .nf
 990 # \fBstmfadm remove-hg-member -g HostA eui.200000e08b909221\fR
 991 # \fBstmfadm remove-hg-member -g HostA iqn.1986-03.com.sun:01.46f7e262\fR
 992 .fi
 993 .in -2
 994 .sp
 995 
 996 .RE
 997 
 998 .sp
 999 .ne 2
1000 .na
1001 \fB\fBremove-tg-member\fR \fB-g\fR \fIgroup-name\fR \fIgroup member\fR\fR
1002 .ad
1003 .sp .6
1004 .RS 4n
1005 Removes a target group member from a target group. \fIgroup-name\fR must be an
1006 existing group created using the \fBcreate-tg\fR subcommand. \fIgroup member\fR
1007 can be specified as \fIname_type\fR.\fIname_value\fR, where \fIname_type\fR can
1008 be one of the following:
1009 .sp
1010 .in +2
1011 .nf
1012 wwn
1013 iqn
1014 eui
1015 .fi
1016 .in -2
1017 .sp
1018 
1019 \&...and \fIname_value\fR is the value of the target name. As an example, to
1020 remove the fibre channel target port world-wide name \fB501000e092376af7\fR
1021 from the target group \fBTG0\fR, the command would be:
1022 .sp
1023 .in +2
1024 .nf
1025 # \fBstmfadm remove-tg-member -g TG0 wwn.501000e092376af7\fR
1026 .fi
1027 .in -2
1028 .sp
1029 
1030 To remove the ISCSI target member with the name
1031 \fBiqn.1986-03.com.sun:target.01.01110\fR from \fBTG0\fR, the command would be:
1032 .sp
1033 .in +2
1034 .nf
1035 # \fBstmfadm remove-tg-member -g TG0 iqn.1986-03.com.sun:target.01.01110\fR
1036 .fi
1037 .in -2
1038 .sp
1039 
1040 Alternatively, members can be specified using their SCSI name string
1041 identifiers. To remove the two targets above using their SCSI name string
1042 identifiers, the commands would be:
1043 .sp
1044 .in +2
1045 .nf
1046 # \fBstmfadm remove-tg-member -g TG0 eui.501000e092376af7\fR
1047 # \fBstmfadm remove-tg-member -g TG0 iqn.1986-03.com.sun:target.01.01110\fR
1048 .fi
1049 .in -2
1050 .sp
1051 
1052 .RE
1053 
1054 .sp
1055 .ne 2
1056 .na
1057 \fB\fBremove-view\fR \fB--l\fR, \fB--lu-name\fR \fIlu-name\fR
1058 \fIentry-name\fR\fR
1059 .ad
1060 .sp .6
1061 .RS 4n
1062 Removes one or more logical unit view entries from a logical unit.
1063 .RE
1064 
1065 .SH EXAMPLES
1066 .LP
1067 \fBExample 1 \fRCreating a Host group with Two Initiator Ports
1068 .sp
1069 .LP
1070 The following commands use the \fBcreate-hg\fR and \fBadd-hg-member\fR
1071 subcommands to create a host group and add two initiator ports to that host
1072 group.
1073 
1074 .sp
1075 .in +2
1076 .nf
1077 # \fBstmfadm create-hg host-group-a\fR
1078 # \fBstmfadm add-hg-member -g host-group-a wwn.210105b0000d92d0\fR
1079 .fi
1080 .in -2
1081 .sp
1082 
1083 .LP
1084 \fBExample 2 \fRAdding a View Entry to a Logical Unit
1085 .sp
1086 .LP
1087 The following command uses the \fBadd-view\fR subcommand to allow access from
1088 \fBhost-group-a\fR to a logical unit.
1089 
1090 .sp
1091 .in +2
1092 .nf
1093 # \fBstmfadm add-view -h host-group-a 6000AE40C5000000000046FC4FEA001C\fR
1094 .fi
1095 .in -2
1096 .sp
1097 
1098 .LP
1099 \fBExample 3 \fRListing a View Entry
1100 .sp
1101 .LP
1102 The following command uses the \fBlist-view\fR subcommand to list all view
1103 entries for the specified logical unit.
1104 
1105 .sp
1106 .in +2
1107 .nf
1108 # \fBstmfadm list-view -l 6000AE40C5000000000046FC4FEA001C\fR
1109 View Entry: 0
1110                         Host group      : host-group-a
1111                         Target group   : All
1112                         LUN               : 0
1113 .fi
1114 .in -2
1115 .sp
1116 
1117 .SH ATTRIBUTES
1118 .sp
1119 .LP
1120 See \fBattributes\fR(5) for descriptions of the following attributes:
1121 .sp
1122 
1123 .sp
1124 .TS
1125 box;
1126 c | c
1127 l | l .
1128 ATTRIBUTE TYPE  ATTRIBUTE VALUE
1129 _
1130 Interface Stability     Committed
1131 .TE
1132 
1133 .SH SEE ALSO
1134 .sp
1135 .LP
1136 \fBsbdadm\fR(1M), \fBattributes\fR(5)