scst.conf(5)

NAME
scst.conf - Main SCST configuration file.

DESCRIPTION
scst.conf is the main SCST configuration file. It contains information about the configuration of the SCST core, device handlers, devices, target drivers, targets, initiator groups, LUNs and ALUA configuration. This file is read and applied by the scstadmin(1) program when the SCST service starts.

The format of the scst.conf file is as follows:
- Blank lines and lines starting with a hash sign (#) are ignored.
- All other lines either define an attribute, mark the start of a new section or the end of a section.
- An attribute definition consists of an attribute name and an attribute value.
- Attribute names consist of a sequence of letters, numbers and underscore characters (_). Attribute names must not contain blanks.
- An attribute name may occur several times in a section with different values.
- Attribute values may contain blanks. Any attribute value that contains blanks must be surrounded with double quotes.
- A line that ends with {. marks the start of a new section.
- A line that contains nothing else than } marks the end of a section.

The recognized section names and their arguments are:

HANDLER <handler>
    Defines device handler attributes and also which devices are associated with the specified device handler. <handler> is the name of an SCST device handler.

DEVICE <name>
    Defines the name and attributes of an SCST device. <name> is either a H:C:I:L quadruplet referring to a local SCSI device or an SCST device name. A DEVICE section is a subsection of a HANDLER section.

TARGET_DRIVER <driver>
    Defines target driver attributes and also which targets are associated with the specified target driver. <driver> is the name of an SCST target driver.

TARGET <target>
    A TARGET section is either a subsection of a TARGET_DRIVER or of a TARGET_GROUP section. The former is the definition of an SCST target while the latter is a reference to an SCST target defined on the local system or on another system in the same cluster.

LUN <number> <device name>
    Associates an SCST device with a target and defines its LUN number. A LUN section is a subsection of a TARGET section.

GROUP <group>
    Defines an initiator group with the specified name. A GROUP section is a subsection of a TARGET section.

INITIATOR <ini>
    Associates an initiator name with an initiator group. <ini> is either an initiator name or a wildcard pattern matching zero or more initiator names. The supported wildcard characters are: !, * and ?. An INITIATOR section is a subsection of a GROUP section.

DEVICE_GROUP <dg>
    <dg> is the name of a group of devices that share ALUA settings.

TARGET_GROUP <tg>
    Defines an ALUA target port group. A TARGET_GROUP section is a subsection of a DEVICE_GROUP section.

An example:

    # Sample SCST configuration file for scstadmin v2.0.

    setup_id 0x1234

    HANDLER dev_disk {
        DEVICE 1:0:0:0
        DEVICE 2:0:0:0
    }

    HANDLER vdisk_fileio {
        DEVICE disk1 {
            filename /disk1
            nv_cache 1
        }

        DEVICE disk2 {
            filename /disk2
            blocksize 4096
            removable 1
        }
    }

    HANDLER vdisk_blockio {
        DEVICE blockio1 {
            filename /dev/sda5
        }
    }

    HANDLER vdisk_nullio {
        DEVICE dummy {
            dummy 1
        }
    }

    HANDLER vcdrom {
        DEVICE cdrom1 {
            filename /cdrom1.iso
        }
    }

    TARGET_DRIVER scst_local {
        TARGET scst_local_tgt {
            session_name scst_local_host

            LUN 0 disk1
        }
    }

    TARGET_DRIVER iscsi {
        IncomingUser "joe 12charsecret"
        enabled 1

        TARGET iqn.2006-10.net.vlnb:tgt {
            IncomingUser "joe 12charsecret"
            IncomingUser "fred 12charsecret2"
            IncomingUser "jonas 12charsecret3"
            HeaderDigest CRC32C,None
            enabled 1

            LUN 0 disk1
            LUN 1 disk2
            LUN 2 blockio1 {
                read_only 1
            }
        }
    }

    TARGET_DRIVER qla2x00t {
        TARGET 25:00:00:f0:98:87:92:f3 {
            enabled 1
            LUN 0 dummy

            GROUP INI1 {
                LUN 0 blockio1
                LUN 1 1:0:0:0 {
                    read_only 1
                }
                LUN 5 cdrom1

                INITIATOR 25:00:00:f0:99:87:94:a3
                INITIATOR 25:00:00:f0:99:87:94:a4
            }
        }

        TARGET 25:00:00:f0:98:87:92:f4 {
        }
    }

    TARGET_DRIVER ib_srpt {
        TARGET ib_srpt_target_0 {
            enabled 1

            LUN 0 disk1
            LUN 1 disk2
        }

        TARGET ib_srpt_target_1 {
            enabled 1

            LUN 0 disk1
            LUN 1 disk2
        }
    }

    TARGET_DRIVER fcst {
        TARGET 20:00:00:22:15:81:74:2b {
            enabled 1

            LUN 0 disk1
            LUN 1 disk2
        }

        TARGET 20:00:00:22:15:81:87:f9 {
            enabled 1

            LUN 0 disk1
            LUN 1 disk2
        }
    }

    DEVICE_GROUP dgroup1 {
        DEVICE disk1

        TARGET_GROUP tgroup1 {
            group_id 1
            state active

            TARGET ib_srpt_target_0 {
                rel_tgt_id 1
            }
        }

        TARGET_GROUP tgroup2 {
            group_id 2
            state offline

            TARGET ib_srpt_target_1 {
                rel_tgt_id 2
            }
        }
    }

    DEVICE_GROUP dgroup2 {
        DEVICE disk2

        TARGET_GROUP tgroup1 {
            group_id 1
            state offline

            TARGET ib_srpt_target_0 {
                rel_tgt_id 1
            }
        }

        TARGET_GROUP tgroup2 {
            group_id 2
            state active

            TARGET ib_srpt_target_1 {
                rel_tgt_id 2
            }
        }
    }

KERNEL MODULE PARAMETERS
Some SCST settings cannot be configured via scst.conf but only as a kernel module parameter. Parameters for an SCST kernel module can be configured in /etc/modprobe.d/99-local.conf just like for any other kernel module. An example:

    options ib_srpt use_node_guid_in_target_name=1

FILES

/etc/scst.conf
    The configuration file read by scstadmin(1).

SEE ALSO
scstadmin(1), scst(5), modprobe.d(5)