| .\" -*- nroff -*- |
| .\" Copyright 2011 Bart Van Assche <bvanassche@acm.org>. All rights reserved. |
| .\" Permission is granted to copy, distribute and/or modify this document |
| .\" under the terms of the GNU General Public License, version 2 (GPLv2). |
| .TH scst.conf 5 "July 2011" "scstadmin 2.0.0" |
| .SH NAME |
| scst.conf \- Main SCST configuration file. |
| .SH DESCRIPTION |
| .I 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 |
| .BR scstadmin (1) |
| program when the SCST service starts. |
| .P |
| The format of the |
| .I scst.conf |
| file is as follows: |
| .br |
| - Blank lines and lines starting with a hash sign |
| .RB ( # ) |
| are ignored. |
| .br |
| - All other lines either define an attribute, mark the start of a new section |
| or the end of a section. |
| .br |
| - An attribute definition consists of an attribute name and an attribute |
| value. |
| .br |
| - Attribute names consist of a sequence of letters, numbers and underscore |
| characters (_). Attribute names must not contain blanks. |
| .br |
| - An attribute name may occur several times in a section with different values. |
| .br |
| - Attribute values may contain blanks. Any attribute value that contains |
| blanks must be surrounded with double quotes. |
| .br |
| - A line that ends with |
| .BR { . |
| marks the start of a new section. |
| .br |
| - A line that contains nothing else than |
| .B } |
| marks the end of a section. |
| .P |
| The recognized section names and their arguments are: |
| .TP |
| .B "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. |
| .TP |
| .B "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 |
| .B DEVICE |
| section is a subsection of a |
| .B HANDLER |
| section. |
| .TP |
| .B "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. |
| .TP |
| .B "TARGET <target>" |
| A |
| .B TARGET |
| section is either a subsection of a |
| .B TARGET_DRIVER |
| or of a |
| .B 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. |
| .TP |
| .B "LUN <number> <device name>" |
| Associates an SCST device with a target and defines its LUN number. |
| .RB "A " LUN " section is a subsection of a " TARGET " section." |
| .TP |
| .B "GROUP <group>" |
| Defines an initiator group with the specified name. A |
| .B GROUP |
| section is a subsection of a |
| .B TARGET |
| section. |
| .TP |
| .B "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: |
| .BR ! ", " * " and " ? ". An " INITIATOR |
| section is a subsection of a |
| .B GROUP |
| section. |
| .TP |
| .B "DEVICE_GROUP <dg>" |
| <dg> is the name of a group of devices that share ALUA settings. |
| .TP |
| .B "TARGET_GROUP <tg>" |
| Defines an ALUA target port group. A |
| .B TARGET_GROUP |
| section is a subsection of a |
| .B DEVICE_GROUP |
| section. |
| .P |
| An example: |
| .IP |
| # Sample SCST configuration file for scstadmin v2.0. |
| .IP |
| setup_id 0x1234 |
| .IP |
| HANDLER dev_disk { |
| .br |
| DEVICE 1:0:0:0 |
| .br |
| DEVICE 2:0:0:0 |
| .br |
| } |
| .IP |
| HANDLER vdisk_fileio { |
| .br |
| DEVICE disk1 { |
| .br |
| filename /disk1 |
| .br |
| nv_cache 1 |
| .br |
| } |
| .IP |
| DEVICE disk2 { |
| .br |
| filename /disk2 |
| .br |
| blocksize 4096 |
| .br |
| removable 1 |
| .br |
| } |
| .br |
| } |
| .IP |
| HANDLER vdisk_blockio { |
| .br |
| DEVICE blockio1 { |
| .br |
| filename /dev/sda5 |
| .br |
| } |
| .br |
| } |
| .IP |
| HANDLER vdisk_nullio { |
| .br |
| DEVICE dummy { |
| .br |
| dummy 1 |
| .br |
| } |
| .br |
| } |
| .IP |
| HANDLER vcdrom { |
| .br |
| DEVICE cdrom1 { |
| .br |
| filename /cdrom1.iso |
| .br |
| } |
| .br |
| } |
| .IP |
| TARGET_DRIVER scst_local { |
| .br |
| TARGET scst_local_tgt { |
| .br |
| session_name scst_local_host |
| .IP |
| LUN 0 disk1 |
| .br |
| } |
| .br |
| } |
| .IP |
| TARGET_DRIVER iscsi { |
| .br |
| IncomingUser "joe 12charsecret" |
| .br |
| enabled 1 |
| .IP |
| TARGET iqn.2006-10.net.vlnb:tgt { |
| .br |
| IncomingUser "joe 12charsecret" |
| .br |
| IncomingUser "fred 12charsecret2" |
| .br |
| IncomingUser "jonas 12charsecret3" |
| .br |
| HeaderDigest CRC32C,None |
| .br |
| enabled 1 |
| .IP |
| LUN 0 disk1 |
| .br |
| LUN 1 disk2 |
| .br |
| LUN 2 blockio1 { |
| .br |
| read_only 1 |
| .br |
| } |
| .br |
| } |
| .br |
| } |
| .IP |
| TARGET_DRIVER qla2x00t { |
| .br |
| TARGET 25:00:00:f0:98:87:92:f3 { |
| .br |
| enabled 1 |
| .br |
| LUN 0 dummy |
| .br |
| .IP |
| GROUP INI1 { |
| .br |
| LUN 0 blockio1 |
| .br |
| LUN 1 1:0:0:0 { |
| .br |
| read_only 1 |
| .br |
| } |
| .br |
| LUN 5 cdrom1 |
| .IP |
| INITIATOR 25:00:00:f0:99:87:94:a3 |
| .br |
| INITIATOR 25:00:00:f0:99:87:94:a4 |
| .br |
| } |
| .br |
| } |
| .IP |
| TARGET 25:00:00:f0:98:87:92:f4 { |
| .br |
| } |
| .br |
| } |
| .IP |
| TARGET_DRIVER ib_srpt { |
| .br |
| TARGET fe80:0000:0000:0000:0002:c903:0005:f34b { |
| .br |
| enabled 1 |
| .IP |
| LUN 0 disk1 |
| .br |
| LUN 1 disk2 |
| .br |
| } |
| .IP |
| TARGET fe80:0000:0000:0000:0002:c903:0005:f34c { |
| .br |
| enabled 1 |
| .IP |
| LUN 0 disk1 |
| .br |
| LUN 1 disk2 |
| .br |
| } |
| .br |
| } |
| .IP |
| TARGET_DRIVER fcst { |
| .br |
| TARGET 20:00:00:22:15:81:74:2b { |
| .br |
| enabled 1 |
| .IP |
| LUN 0 disk1 |
| .br |
| LUN 1 disk2 |
| .br |
| } |
| .IP |
| TARGET 20:00:00:22:15:81:87:f9 { |
| .br |
| enabled 1 |
| .IP |
| LUN 0 disk1 |
| .br |
| LUN 1 disk2 |
| .br |
| } |
| .br |
| } |
| .IP |
| DEVICE_GROUP dgroup1 { |
| .br |
| DEVICE disk1 |
| .IP |
| TARGET_GROUP tgroup1 { |
| .br |
| group_id 1 |
| .br |
| state active |
| .IP |
| TARGET fe80:0000:0000:0000:0002:c903:0005:f34b { |
| .br |
| rel_tgt_id 1 |
| .br |
| } |
| .br |
| } |
| .IP |
| TARGET_GROUP tgroup2 { |
| .br |
| group_id 2 |
| .br |
| state offline |
| .IP |
| TARGET fe80:0000:0000:0000:0002:c903:0005:f34c { |
| .br |
| rel_tgt_id 2 |
| .br |
| } |
| .br |
| } |
| .br |
| } |
| .IP |
| DEVICE_GROUP dgroup2 { |
| .br |
| DEVICE disk2 |
| .IP |
| TARGET_GROUP tgroup1 { |
| .br |
| group_id 1 |
| .br |
| state offline |
| .IP |
| TARGET fe80:0000:0000:0000:0002:c903:0005:f34b { |
| .br |
| rel_tgt_id 1 |
| .br |
| } |
| .br |
| } |
| .IP |
| TARGET_GROUP tgroup2 { |
| .br |
| group_id 2 |
| .br |
| state active |
| .IP |
| TARGET fe80:0000:0000:0000:0002:c903:0005:f34c { |
| .br |
| rel_tgt_id 2 |
| .br |
| } |
| .br |
| } |
| .br |
| } |
| .SH 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: |
| .IP |
| options ib_srpt rdma_cm_port=5000 |
| .SH FILES |
| .IP "/etc/scst.conf" |
| The configuration file read by |
| .BR scstadmin (1). |
| .SH "SEE ALSO" |
| scstadmin(1), scst(5), modprobe.d(5) |