JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
man pages section 1M: System Administration Commands     Oracle Solaris 11 Express 11/10
search filter icon
search icon

Document Information

Preface

Introduction

System Administration Commands - Part 1

System Administration Commands - Part 2

makedbm(1M)

makemap(1M)

makeuuid(1M)

masfcnv(1M)

mdlogd(1M)

mdmonitord(1M)

mdnsd(1M)

medstat(1M)

metaclear(1M)

metadb(1M)

metadetach(1M)

metadevadm(1M)

metahs(1M)

metaimport(1M)

metainit(1M)

metaoffline(1M)

metaonline(1M)

metaparam(1M)

metarecover(1M)

metarename(1M)

metareplace(1M)

metaroot(1M)

metaset(1M)

metassist(1M)

metastat(1M)

metasync(1M)

metattach(1M)

mib2mof(1M)

mibiisa(1M)

mkbootmedia(1M)

mkdevalloc(1M)

mkdevmaps(1M)

mkfifo(1M)

mkfile(1M)

mkfs(1M)

mkfs_pcfs(1M)

mkfs_udfs(1M)

mkfs_ufs(1M)

mknod(1M)

mkntfs(1M)

mkpwdict(1M)

modinfo(1M)

modload(1M)

modunload(1M)

mofcomp(1M)

mofreg(1M)

monacct(1M)

monitor(1M)

mount(1M)

mountall(1M)

mount_cachefs(1M)

mountd(1M)

mount_hsfs(1M)

mount_nfs(1M)

mount_pcfs(1M)

mount_smbfs(1M)

mount_tmpfs(1M)

mount_udfs(1M)

mount_ufs(1M)

mpathadm(1M)

mpstat(1M)

msgid(1M)

mvdir(1M)

named(1M)

named-checkconf(1M)

named-checkzone(1M)

named-compilezone(1M)

ncaconfd(1M)

ncheck(1M)

ncheck_ufs(1M)

ndd(1M)

ndmpadm(1M)

ndmpd(1M)

ndmpstat(1M)

netcfgd(1M)

netservices(1M)

netstat(1M)

netstrategy(1M)

newaliases(1M)

newfs(1M)

newkey(1M)

nfs4cbd(1M)

nfsd(1M)

nfslogd(1M)

nfsmapid(1M)

nfsref(1M)

nfsstat(1M)

nlsadmin(1M)

nscadm(1M)

nscd(1M)

nslookup(1M)

nsupdate(1M)

ntfscat(1M)

ntfsclone(1M)

ntfscluster(1M)

ntfscmp(1M)

ntfscp(1M)

ntfsfix(1M)

ntfsinfo(1M)

ntfslabel(1M)

ntfsls(1M)

ntfsprogs(1M)

ntfsresize(1M)

ntfsundelete(1M)

nulladm(1M)

nwamadm(1M)

nwamcfg(1M)

nwamd(1M)

obpsym(1M)

oplhpd(1M)

parse_dynamic_clustertoc(1M)

parted(1M)

pbind(1M)

pcitool(1M)

pfinstall(1M)

pginfo(1M)

pgstat(1M)

pgxconfig(1M)

picld(1M)

ping(1M)

pkg2du(1M)

pkgadd(1M)

pkgadm(1M)

pkgask(1M)

pkgchk(1M)

pkgcond(1M)

pkgrm(1M)

plockstat(1M)

pmadm(1M)

pmconfig(1M)

pntadm(1M)

polkit-is-privileged(1M)

pooladm(1M)

poolbind(1M)

poolcfg(1M)

poold(1M)

poolstat(1M)

ports(1M)

powerd(1M)

poweroff(1M)

powertop(1M)

ppdmgr(1M)

pppd(1M)

pppoec(1M)

pppoed(1M)

pppstats(1M)

pprosetup(1M)

pprosvc(1M)

praudit(1M)

prctmp(1M)

prdaily(1M)

printmgr(1M)

print-service(1M)

privatepw(1M)

prodreg(1M)

projadd(1M)

projdel(1M)

projmod(1M)

prstat(1M)

prtacct(1M)

prtconf(1M)

prtdiag(1M)

prtdscp(1M)

prtfru(1M)

prtpicl(1M)

prtvtoc(1M)

psradm(1M)

psrinfo(1M)

psrset(1M)

putdev(1M)

putdgrp(1M)

pwck(1M)

pwconv(1M)

quot(1M)

quota(1M)

quotacheck(1M)

quotaoff(1M)

quotaon(1M)

raidctl(1M)

ramdiskadm(1M)

rarpd(1M)

rcapadm(1M)

rcapd(1M)

rctladm(1M)

rdate(1M)

rdisc(1M)

reboot(1M)

reject(1M)

rem_drv(1M)

remove_allocatable(1M)

removef(1M)

reparsed(1M)

repquota(1M)

re-preinstall(1M)

restricted_shell(1M)

rexd(1M)

rexecd(1M)

rlogind(1M)

rm_install_client(1M)

rmmount(1M)

rmt(1M)

rmvolmgr(1M)

rndc(1M)

rndc-confgen(1M)

roleadd(1M)

roledel(1M)

rolemod(1M)

root_archive(1M)

route(1M)

routeadm(1M)

routed(1M)

rpcbind(1M)

rpc.bootparamd(1M)

rpcinfo(1M)

rpc.mdcommd(1M)

rpc.metad(1M)

rpc.metamedd(1M)

rpc.metamhd(1M)

rpc.rexd(1M)

rpc.rstatd(1M)

rpc.rusersd(1M)

rpc.rwalld(1M)

rpc.smserverd(1M)

rpc.sprayd(1M)

rpc.yppasswdd(1M)

rpc.ypupdated(1M)

rquotad(1M)

rsh(1M)

rshd(1M)

rstatd(1M)

rtc(1M)

rtquery(1M)

runacct(1M)

rusersd(1M)

rwall(1M)

rwalld(1M)

rwhod(1M)

sa1(1M)

sa2(1M)

sac(1M)

sacadm(1M)

sadc(1M)

saf(1M)

sar(1M)

sasinfo(1M)

savecore(1M)

sbdadm(1M)

scadm(1M)

sckmd(1M)

scmadm(1M)

sconadm(1M)

sdpadm(1M)

sendmail(1M)

setuname(1M)

setup_install_server(1M)

sf880drd(1M)

sftp-server(1M)

share(1M)

shareall(1M)

sharectl(1M)

sharemgr(1M)

share_nfs(1M)

showmount(1M)

showrev(1M)

shutacct(1M)

shutdown(1M)

slpd(1M)

smattrpop(1M)

smbadm(1M)

smbd(1M)

smbiod(1M)

smbiod-svc(1M)

smbios(1M)

smbstat(1M)

smc(1M)

smccompile(1M)

smcconf(1M)

smcregister(1M)

smcron(1M)

smcwebserver(1M)

smdiskless(1M)

smexec(1M)

smgroup(1M)

smlog(1M)

smmaillist(1M)

smmultiuser(1M)

smosservice(1M)

smpatch(1M)

smprofile(1M)

smreg(1M)

smrole(1M)

smrsh(1M)

smserialport(1M)

smtnrhdb(1M)

smtnrhtp(1M)

smtnzonecfg(1M)

smtp-notify(1M)

smuser(1M)

sndradm(1M)

sndrd(1M)

sndrsyncd(1M)

snmpdx(1M)

snmp-notify(1M)

snmpXwbemd(1M)

snoop(1M)

soconfig(1M)

soladdapp(1M)

soldelapp(1M)

solstice(1M)

sppptun(1M)

spray(1M)

sprayd(1M)

srptadm(1M)

sshd(1M)

ssh-keysign(1M)

startup(1M)

statd(1M)

stclient(1M)

stmfadm(1M)

stmsboot(1M)

strace(1M)

strclean(1M)

strerr(1M)

sttydefs(1M)

su(1M)

sulogin(1M)

suninstall(1M)

SUNWafb_config(1M)

SUNWffb_config(1M)

SUNWgfb_config(1M)

SUNWifb_config(1M)

SUNWjfb_config(1M)

SUNWkfb_config(1M)

SUNWm64_config(1M)

SUNWnfb_config(1M)

SUNWpfb_config(1M)

SUNWzulu_config(1M)

svadm(1M)

svcadm(1M)

svccfg(1M)

svc.configd(1M)

svc.ipfd(1M)

svc.startd(1M)

swap(1M)

sync(1M)

syncinit(1M)

syncloop(1M)

syncstat(1M)

sysdef(1M)

syseventadm(1M)

syseventconfd(1M)

syseventd(1M)

sysidconfig(1M)

sysidkbd(1M)

sysidnet(1M)

sysidnfs4(1M)

sysidns(1M)

sysidpm(1M)

sysidroot(1M)

sysidsys(1M)

sysidtool(1M)

syslogd(1M)

sys-unconfig(1M)

talkd(1M)

tapes(1M)

tcxconfig(1M)

telinit(1M)

telnetd(1M)

tftpd(1M)

th_define(1M)

th_manage(1M)

tic(1M)

tnchkdb(1M)

tnctl(1M)

tnd(1M)

tninfo(1M)

tpmadm(1M)

traceroute(1M)

trapstat(1M)

TSIgfxp_config(1M)

ttyadm(1M)

ttymon(1M)

tunefs(1M)

turnacct(1M)

System Administration Commands - Part 3

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-lu [-p, --lu-prop logical-unit-property=val
     -s, --size size] lu-file
stmfadm create-tg group-name
stmfadm delete-hg group-name
stmfadm delete-lu lu-name
stmfadm delete-tg group-name
stmfadm import-lu lu-file
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 modify-lu [-p, --lu-prop logical-unit-property=val
     -s, --size size, -f, --file] lu-name|lu-file
stmfadm online-lu lu-name
stmfadm offline-lu lu-name
stmfadm online-lu target-name
stmfadm offline-lu target-name
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 treated the same when creating a view (see below). The set of logical units that a particular SCSI initiator can see is determined by the combined set of views.

Each logical unit has a set of view entries, and each view entry specifies a target group, host group, and a LUN. An initiator from that host group, when connecting through that target group, is able to identify and connect to that logical unit using the specified LUN. You can use views to restrict the set of logical units that a specific initiator can see, and assign the set of LUNs that will be used.

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 example, 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 provides 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-lu [-p, --lu-prop logical-unit-property=val --s, --size size] lu-file

Create a logical unit that can be registered with STMF. For the -p option, logical-unit-property can be one of the following properties:

alias

Up to 255 characters, representing a user-defined name for the device. The default is the name of the backing store.

blk

Specifies the block size for the device. The default is 512.

guid

Thirty–two hexadecimal ASCII characters representing a valid NAA Registered Extended Identifier. The default is set by the STMF to a generated value.

host-id

Eight hexadecimal ASCII characters representing the host ID assignment. This will be used to generate the globally unique identifier (GUID) for the logical unit. The default is the value returned by hostid(1).

meta

Metadata file name. When specified, will be used to hold the SCSI metadata for the logical unit. There is no default.

mgmt-url

Up to 1024 characters representing a Management Network Address URL. More than one URL can be passed as a single parameter by using space-delimited URLs enclosed inside a single pair of quotation marks (").

oui

Organizational Unique Identifier. Six hexadecimal ASCII characters representing the IEEE OUI company ID assignment. This will be used to generate the device identifier (GUID). The default is 00144F.

pid

Sixteen characters of product identification SCSI SPC-3. This value will be reflected in the Standard INQUIRY data returned for the device. The default is COMSTAR.

serial

Serial Number. Specifies the SCSI Vital Product Data Serial Number (page 80h). It is a character value up to 252 bytes in length. There is no default value.

vid

Eight characters of vendor identification per SCSI SPC-3. This value will be reflected in the Standard INQUIRY data returned for the device. The default is SUN.

wcd

Write-back cache disable. Specify true or falseto determine write-back cache disable behavior. The default is the write-back cache setting of the backing store device specified by the lu-file argument.

wp

Write-protect bit. Specify true or false to determine whether the device reports as write-protected. The default is false.

For the -s option, size is an integer followed by one of the following letters, to indicate a unit of size:

k

kilobyte

m

megabyte

g

gigabyte

t

terabyte

p

petabyte

e

exabyte

lu-file is the file to be used as the backing store for the logical unit. If the -s option is not specified, the size of the specified lu-file will be used as the size of the logical unit. Logical units registered with the STMF require space for the metadata to be stored. When a zvol is specified as the backing store device, the default will be to use a special property of the zvol to contain the metadata. For all other devices, the default behavior will be to use the first 64k of the device. An alternative approach would be to use the meta property in a create-lu command to specify an alternate file to contain the metadata. It is advisable to use a file that can provide sufficient storage of the logical unit metadata, preferably 64k.

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-lu lu-name

Deletes an existing logical unit that was created using stmfadm create-lu. This effectively unloads the logical unit from the STMF framework. Any existing data on the logical unit remains intact.

delete-tg group-name

Delete the target group that identified by group-name.

import-lu lu-file

Imports and loads a logical unit into the STMF that was previously created using stmfadm create-lu and was then deleted from the STMF using stmfadm delete-lu. On success, the logical unit is again made available to the STMF. lu-file is the filename used in the stmfadm create-lu command. If this logical unit is using a separate metadata file, the filename in the meta property value that was used in the stmfadm create-lu command must be used here.

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-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 system will be listed. If the -v or --verbose option is specified, additional information about the logical unit will be 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 target groups in the system will be listed. If the --v or --verbose option is specified, all members within a target group are 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.

modify-lu [-p, --lu-prop logical-unit-property=val --s, --size size, -f, --file] lu-name|lu-file

Modifies attributes of a logical unit created using the stmfadm create-lu command. For the -p option, logical-unit-property can be one of the following properties:

alias

Up to 255 characters, representing a user-defined name for the device. The default is the name of the backing store.

mgmt-url

Up to 1024 characters representing a Management Network Address URL. More than one URL can be passed as a single parameter by using space-delimited URLs enclosed inside a single pair of quotation marks (").

wcd

Write-back cache disable. Specify true or falseto determine write-back cache disable behavior. The default is the write-back cache setting of the backing store device specified by the lu-file argument.

wp

Write-protect bit. Specify true or false to determine whether the device reports as write-protected. The default is false.

For the -s option, size is an integer followed by one of the following letters, to indicate a unit of size:

k

kilobyte

m

megabyte

g

gigabyte

t

terabyte

p

petabyte

e

exabyte

lu-name is the guid of the logical unit to be modified. If the -f option is specified, the operand is interpreted as a file name. This provides the ability to modify a logical unit that is not currently imported into the STMF.

online-lu lu-name

Online a logical unit currently registered with the STMF.

online-target target-name

Online the specified target.

offline-lu lu-name

Offline a logical unit currently registered with the STMF.

offline-target target-name

Online the specified target.

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 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 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
network/iscsi
Interface Stability
Committed

See Also

hostid(1), sbdadm(1M), attributes(5)