It took me a while to find the man page for scstadmin so I’ll post here.
scstadmin
Section: User Commands (1)
Updated: July 2011
Index
NAME
scstadmin - administer the configuration of SCST
SYNOPSIS
scstadmin[]*
DESCRIPTION
SCST consists of multiple kernel modules: the SCST core, SCST target driversand SCST device handlers. The state of each of these kernel modules isconfigurable at runtime. Scstadmin allows query the current state, to modifythe current state, to save the current state to a file and to restore the SCSTstate from a file. The relevant SCST concepts are:
device
An SCST device represents local storage that is exported via SCST. An SCSTdevice is either a local SCSI device (disk, CD-ROM, tape, …), a block I/Odevice like a disk or RAID controller or a file on a filesystem. The SCSTdrivers that control SCST devices are called device handlers. Examples ofsuch device handlers are dev_disk, vdisk_blockio and vdisk_fileio.
target
An SCST target is an interface that allows a remote system to access thestorage exported via SCST. Each target is controlled by a targetdriver. Examples of target drivers are iscsi_scst, qla2x00t, ib_srpt andscst_local.
ALUA
An SCST setup can have multiple storage interfaces. A single SCST server canbe equipped with multiple interfaces or two SCST servers can have been set upin a cluster. If there are multiple paths between an initiator and a targetsystem or target cluster then configuring ALUA (Asymmetric Logical UnitAccess) will make SCST to tell the initiator which path to use.
OPTIONS
is one of:
-debug
For commands that modify the SCST state, let scstadmin show which SCST stateinformation would be modified instead of performing these modifications.
-force
Let certain potentially dangerous operations proceed, e.g. closing a devicethat is still in use or removing an initiator group that is still in use.
-nonkey
When writing a config file or listing attributes, include non-key attributes.
-noprompt
Do not prompt for confirmation before modifying the SCST state.
is one of:
-h
Show usage information.
-help
Identical to -h.
-config
Read and apply the specified configuration file.
-check_config
Verify the syntax of the specified configuration file.
-write_config
Save the current configuration to the specified file.
-clear_config
Remove all configured devices, targets that do not correspond to a physicalentity, dynamic target attributes, initiator groups, LUNs and dynamic driverattributes. Disable all targets that correspond to a physical entity anddisable all target drivers. Note: static SCST core, target and target driverattributes that have been modified are not reset to their default value unlessthe corresponding kernel modules are reloaded.
-list_handler []
If no device handler name has been specified, show the names of all devicehandlers supported by the currently loaded kernel modules. If a device handlername has been specified, list the names of the devices that use that devicehandler.
-list_device []
If no device name has been specified, show the names of all configureddevices. If a device name has been specified, show all attributes of thespecified device.
-list_driver []
If no target driver name has been specified, list the names of all targetdrivers supported by the currently loaded kernel modules. If a target drivername has been specified, show the names of all targets that use the specifiedtarget driver.
-list_target [] [-driver ]
If no target driver name has been specified, show all target names for alltarget drivers. If a target driver name has been specified, show allconfiguration information for the specified target. That information includesthe assigned LUNs and information about all initiator groups associated withthe target.
-list_group [] [-driver ] [-target ]
If either the target driver name or the target name has not been specified,show information about all known target drivers, targets and initiator groups.If a target driver name and target name have been specified, showconfiguration information for the specified initiator group.
-list_scst_attr
Show name and value of all SCST core attributes.
-list_hnd_attr
Show name and value of all attributes of the specified device handler,and also the names of all device creation attributes.
-list_dev_attr
Show name and value of all attributes of the specified device.
-list_drv_attr
Show name and value of all attributes of the specified target driver.
-list_tgt_attr -driver
Show name and value of all attributes of the specified target.
-list_grp_attr -target -driver
Show name and value of all attributes of the specified initiator group.
-list_lun_attr -driver -target [-group ]
Show name and value of all attributes of the specified LUN. The LUN numbereither refers to a LUN associated with a target or to a LUN associated withan initiator group of a target.
-list_sessions
Show all active sessions for all targets.
-list_dgrp []
If no device group name has been specified, show all defined ALUA devicegroups. If a device group name has been specified, show configurationinformation for that device group only.
-list_tgrp [] -dev_group
If no ALUA target group name has been specified, list the target groupsassociated with the specified device group. If a target group name has beenspecified, show configuration information for that target group.
-list_tgrp_attr -dev_group
Show a list with all ALUA attributes of the specified target group.
-list_ttgt_attr -dev_group -tgt_group
Show a list with all ALUA attributes of the specified target.
-set_scst_attr -attributes <p=v,…>
Set the value of one or more SCST core attributes.
-set_hnd_attr -attributes <p=v,…>
Set the value of one or more device handler attributes.
-set_dev_attr -attributes <p=v,…>
Set the value of one or more device attributes.
-set_drv_attr -attributes <p=v,…>
Set the value of one or more target driver attributes.
-set_tgt_attr -driver -attributes <p=v,…>
Set the value of one or more target attributes.
-set_grp_attr -driver -target -attributes <p=v,…>
Set the value of one or more initiator group attributes.
-set_lun_attr -driver -target [-group ] -attributes <p=v,…>
Set the value of one or more LUN attributes. The LUN number either refers to aLUN associated with a target or to a LUN associated with an initiator group ofa target.
-add_drv_attr -attributes <p=v,…>
Add one or more new attributes to the specified target driver and set these tothe specified values. Which attribute names are valid depends on the affectedtarget driver. Adding the same attribute several times will cause multiplevalues to be defined for that attribute.
-add_tgt_attr -driver -attributes <p=v,…>
Add one or more new attributes to the specified target and set these to thespecified values. Which attribute names are valid depends on the involvedtarget driver. Adding the same attribute several times will cause multiplevalues to be defined for that attribute.
-rem_drv_attr -attributes <p=v,…>
Remove an (attribute, value) pair from the specified target driver.
-rem_tgt_attr -driver -attributes <p=v,…>
Remove an (attribute, value) pair from the specified target.
-open_dev -handler -attributes <p=v,…>
Create a new SCST device using the specified device handler and attributes.
-resync_dev
Update device size. SCST caches the size of devices controlled by thevdisk_fileio and the vdisk_blockio device handlers. This command will not onlycause SCST to update the cached device size but will also cause any logged ininitiator to be notified about the capacity change event.
-close_dev -handler
Remove the specified device from SCST.
-add_target -driver
Add a target to a target driver.
-rem_target -driver
Remove a target from a target driver.
-add_group -driver -target
Add an initiator group to the specified target.
-rem_group -driver -target
Remove an initiator group from the specified target.
-add_init -driver -target -group
Add an initiator to an initiator group. is either an explicit initiatorname or an initiator name pattern. The wildcard characters ‘*’, ‘?’ and '!'are supported.
-rem_init -driver -target -group
Remove an initiator name or initiator name pattern from an initiator group.
-move_init -driver -target -group -to
Move an initiator or initiator name pattern from one initiator group to another.
-clear_inits -driver -target -group
Remove all initiators from an initiator group.
-add_lun -driver -target [-group ]
-device -attributes <p=v,…>
Add a LUN to a target or initiator group.
-rem_lun -driver -target [-group ]
Remove a LUN from a target or initiator group.
-replace_lun -driver -target [-group ]
-device -attributes <p=v,…>
Replace the device associated with a LUN by another device.
-clear_luns -driver -target [-group ]
Remove all LUNs from a target or initiator group.
-enable_target -driver
Enable a target.
-disable_target -driver
Disable a target.
-issue_lip [] [-driver ]
Issue a LIP (Loop Initialization Protocol, fibre channel) for a specifictarget or for all drivers and targets.
-set_tgrp_attr -dev_group -attributes <p=v,…>
Set one or more attributes of the specified ALUA target group.
-set_ttgt_attr -dev_group -tgt_group
-attributes <p=v,…>
Set one or more attributes of the specified ALUA target.
EXAMPLES
scstadmin -open_dev disk01 -handler vdisk_fileio -attributes filename=/vdisks/disk01.dsk,read_only
Lets SCST open the file /vdisks/disk01.dsk as a disk.
scstadmin -set_dev_attr disk01 -attributes t10_dev_id=0x2345
Sets the T10 device id of SCST device disk01
scstadmin -add_group host01 -driver qla2x00t -target 50:06:0B:00:00:39:71:78
Creates a new initiator group called host01.
scstadmin -add_lun 1 -driver qla2x00t -target 50:06:0B:00:00:39:71:78 -group host01 -device disk01 -attributes read_only=1
Add a LUN to a group in read-only mode.
scstadmin -enable_target 50:06:0B:00:00:39:71:78 -driver qla2x00t
Enables target mode for the fibre channel HCA port with the specified WWN.
scstadmin -write_config /etc/scst-new.conf
Save the current configuration to the specified file.
AUTHORS
The scstadmin software has been developed by Mark R. Buechler and also contains contributions from Bart Van Assche.