scstadmin(1)

NAME
scstadmin - administer the configuration of SCST

SYNOPSIS
scstadmin [<OPTION>]* <COMMAND>

DESCRIPTION
SCST consists of multiple kernel modules: the SCST core, SCST target drivers and SCST device handlers. The state of each of these kernel modules is configurable at runtime. Scstadmin allows query the current state, to modify the current state, to save the current state to a file and to restore the SCST state from a file. The relevant SCST concepts are:

device
    An SCST device represents local storage that is exported via SCST. An SCST device is either a local SCSI device (disk, CD-ROM, tape, ...), a block I/O device like a disk or RAID controller or a file on a filesystem. The SCST drivers that control SCST devices are called device handlers. Examples of such device handlers are dev_disk, vdisk_blockio and vdisk_fileio.

target
    An SCST target is an interface that allows a remote system to access the storage exported via SCST. Each target is controlled by a target driver. Examples of target drivers are iscsi_scst, qla2x00t, ib_srpt and scst_local.

ALUA
    An SCST setup can have multiple storage interfaces. A single SCST server can be equipped with multiple interfaces or two SCST servers can have been set up in a cluster. If there are multiple paths between an initiator and a target system or target cluster then configuring ALUA (Asymmetric Logical Unit Access) will make SCST to tell the initiator which path to use.

OPTIONS

<OPTION> is one of:

-debug
    For commands that modify the SCST state, let scstadmin show which SCST state information would be modified instead of performing these modifications.

-force
    Let certain potentially dangerous operations proceed, e.g. closing a device that 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.

<COMMAND> is one of:

-h  Show usage information.

-help
    Identical to -h.

-config <file>
    Read and apply the specified configuration file.

-check_config <file>
    Verify the syntax of the specified configuration file.

-write_config <file>
    Save the current configuration to the specified file.

-clear_config
    Remove all configured devices, targets that do not correspond to a physical entity, dynamic target attributes, initiator groups, LUNs and dynamic driver attributes. Disable all targets that correspond to a physical entity and disable all target drivers. Note: static SCST core, target and target driver attributes that have been modified are not reset to their default value unless the corresponding kernel modules are reloaded.

-list_handler [<handler>]
    If no device handler name has been specified, show the names of all device handlers supported by the currently loaded kernel modules. If a device handler name has been specified, list the names of the devices that use that device handler.

-list_device [<device>]
    If no device name has been specified, show the names of all configured devices. If a device name has been specified, show all attributes of the specified device.

-list_driver [<driver>]
    If no target driver name has been specified, list the names of all target drivers supported by the currently loaded kernel modules. If a target driver name has been specified, show the names of all targets that use the specified target driver.

-list_target [<target>] [-driver <driver>]
    If no target driver name has been specified, show all target names for all target drivers. If a target driver name has been specified, show all configuration information for the specified target. That information includes the assigned LUNs and information about all initiator groups associated with the target.

-list_group [<group>] [-driver <driver>] [-target <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, show configuration information for the specified initiator group.

-list_scst_attr
    Show name and value of all SCST core attributes.

-list_hnd_attr <handler>
    Show name and value of all attributes of the specified device handler, and also the names of all device creation attributes.

-list_dev_attr <device>
    Show name and value of all attributes of the specified device.

-list_drv_attr <driver>
    Show name and value of all attributes of the specified target driver.

-list_tgt_attr <target> -driver <driver>
    Show name and value of all attributes of the specified target.

-list_grp_attr <group> -target <target> -driver <driver>
    Show name and value of all attributes of the specified initiator group.

-list_lun_attr <lun> -driver <driver> -target <target> [-group <group>]
    Show name and value of all attributes of the specified LUN. The LUN number either refers to a LUN associated with a target or to a LUN associated with an initiator group of a target.

-list_sessions
    Show all active sessions for all targets.

-list_dgrp [<dgrp>]
    If no device group name has been specified, show all defined ALUA device groups. If a device group name has been specified, show configuration information for that device group only.

-list_tgrp [<tgrp>] -dev_group <dgrp>
    If no ALUA target group name has been specified, list the target groups associated with the specified device group. If a target group name has been specified, show configuration information for that target group.

-list_tgrp_attr <tgrp> -dev_group <dgrp>
    Show a list with all ALUA attributes of the specified target group.

-list_ttgt_attr <tgt> -dev_group <dgrp> -tgt_group <tgrp>
    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 <handler> -attributes <p=v,...>
    Set the value of one or more device handler attributes.

-set_dev_attr <device> -attributes <p=v,...>
    Set the value of one or more device attributes.

-set_drv_attr <driver> -attributes <p=v,...>
    Set the value of one or more target driver attributes.

-set_tgt_attr <target> -driver <driver> -attributes <p=v,...>
    Set the value of one or more target attributes.

-set_grp_attr <group> -driver <driver> -target <target> -attributes <p=v,...>
    Set the value of one or more initiator group attributes.

-set_lun_attr <lun> -driver <driver> -target <target> [-group <group>] -attributes <p=v,...>
    Set the value of one or more LUN attributes. The LUN number either refers to a LUN associated with a target or to a LUN associated with an initiator group of a target.

-add_drv_attr <driver> -attributes <p=v,...>
    Add one or more new attributes to the specified target driver and set these to the specified values. Which attribute names are valid depends on the affected target driver. Adding the same attribute several times will cause multiple values to be defined for that attribute.

-add_tgt_attr <target> -driver <driver> -attributes <p=v,...>
    Add one or more new attributes to the specified target and set these to the specified values. Which attribute names are valid depends on the involved target driver. Adding the same attribute several times will cause multiple values to be defined for that attribute.

-rem_drv_attr <driver> -attributes <p=v,...>
    Remove an (attribute, value) pair from the specified target driver.

-rem_tgt_attr <target> -driver <driver> -attributes <p=v,...>
    Remove an (attribute, value) pair from the specified target.

-open_dev <device> -handler <handler> -attributes <p=v,...>
    Create a new SCST device using the specified device handler and attributes.

-resync_dev <device>
    Update device size. SCST caches the size of devices controlled by the vdisk_fileio and the vdisk_blockio device handlers. This command will not only cause SCST to update the cached device size but will also cause any logged in initiator to be notified about the capacity change event.

-close_dev <device> -handler <handler>
    Remove the specified device from SCST.

-add_target <target> -driver <driver>
    Add a target to a target driver.

-rem_target <target> -driver <driver>
    Remove a target from a target driver.

-add_group <group> -driver <driver> -target <target>
    Add an initiator group to the specified target.

-rem_group <group> -driver <driver> -target <target>
    Remove an initiator group from the specified target.

-add_init <init> -driver <driver> -target <target> -group <group>
    Add an initiator to an initiator group. <init> is either an explicit initiator name or an initiator name pattern. The wildcard characters '*', '?' and '!' are supported.

-rem_init <user> -driver <driver> -target <target> -group <group>
    Remove an initiator name or initiator name pattern from an initiator group.

-move_init <init> -driver <driver> -target <target> -group <group1> -to <group2>
    Move an initiator or initiator name pattern from one initiator group to another.

-clear_inits -driver <driver> -target <target> -group <group>
    Remove all initiators from an initiator group.

-add_lun <lun> -driver <driver> -target <target> [-group <group>] -device <device> -attributes <p=v,...>
    Add a LUN to a target or initiator group.

-rem_lun <lun> -driver <driver> -target <target> [-group <group>]
    Remove a LUN from a target or initiator group.

-replace_lun <lun> -driver <driver> -target <target> [-group <group>] -device <device> -attributes <p=v,...>
    Replace the device associated with a LUN by another device.

-clear_luns -driver <driver> -target <target> [-group <group>]
    Remove all LUNs from a target or initiator group.

-enable_target <target> -driver <driver>
    Enable a target.

-disable_target <target> -driver <driver>
    Disable a target.

-issue_lip [<target>] [-driver <driver>]
    Issue a LIP (Loop Initialization Protocol, fibre channel) for a specific target or for all drivers and targets.

-set_tgrp_attr <tgrp> -dev_group <dgrp> -attributes <p=v,...>
    Set one or more attributes of the specified ALUA target group.

-set_ttgt_attr <tgt> -dev_group <dgrp> -tgt_group <tgrp> -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.

REPORTING BUGS
Please send feedback about scstadmin itself or its documentation to the mailing list scst-devel@lists.sourceforge.net. See also https://lists.sourceforge.net/lists/listinfo/scst-devel for more information about this mailing list.

FILES
/etc/scst.conf

SEE ALSO
scst.conf(5)