From: Bart V. A. <bva...@ac...> - 2011-07-18 16:25:03
Attachments:
0001-Add-scstadmin-and-scst.conf-man-pages.patch
|
Several Linux distributions require having man pages available before a software package can be considered for inclusion. Hence the patch below, which adds man pages for the scstadmin command and the /etc/scst.conf and /etc/default.scst configuration files. Also, the sysfs scstadmin example is moved to the scst.conf man page and scstadmin/Makefile has been modified such that the man pages are installed in the proper location. Signed-off-by: Bart Van Assche <bva...@ac...> --- scstadmin/Makefile | 7 + scstadmin/examples/scst.conf.sysfs | 82 ---------- scstadmin/scstadmin.sysfs/man1/scstadmin.1 | 226 ++++++++++++++++++++++++++++ scstadmin/scstadmin.sysfs/man5/scst.5 | 37 +++++ scstadmin/scstadmin.sysfs/man5/scst.conf.5 | 200 ++++++++++++++++++++++++ 5 files changed, 470 insertions(+), 82 deletions(-) delete mode 100644 scstadmin/examples/scst.conf.sysfs create mode 100644 scstadmin/scstadmin.sysfs/man1/scstadmin.1 create mode 100644 scstadmin/scstadmin.sysfs/man5/scst.5 create mode 100644 scstadmin/scstadmin.sysfs/man5/scst.conf.5 diff --git a/scstadmin/Makefile b/scstadmin/Makefile index 4948a11..600c6ca 100644 --- a/scstadmin/Makefile +++ b/scstadmin/Makefile @@ -1,5 +1,6 @@ SCSTADMIN_DIR = scstadmin +MANDIR := $(DESTDIR)$(PREFIX)/usr/local/man/ INITDIR := $(shell if [ -f /etc/slackware-version ]; then \ echo $(PREFIX)/etc/rc.d; \ else \ @@ -35,6 +36,9 @@ install: "Scientific Linux, Fedora) or insserv (SLES, openSUSE) package must" \ "be installed first"; false; fi cd $(SCSTADMIN_DIR) && $(MAKE) $@ + for m in scstadmin/man*/*.[1-9]; do \ + install -m 644 $$m $(MANDIR)$$(basename $$(dirname $$m)); \ + done install -d $(DESTDIR)$(INITDIR) install -m 755 init.d/scst $(DESTDIR)$(INITDIR) if [ ! -e $(DESTDIR)$(DEFAULTDIR)/scst ]; then \ @@ -63,6 +67,9 @@ uninstall: fi; \ rm -f $(DESTDIR)$(INITDIR)/scst; \ fi + for m in scstadmin/man*/*.[1-9]; do \ + rm -f $(MANDIR)$$(basename $$(dirname $$m)); \ + done cd $(SCSTADMIN_DIR) && $(MAKE) $@ perl-module: diff --git a/scstadmin/examples/scst.conf.sysfs b/scstadmin/examples/scst.conf.sysfs deleted file mode 100644 index 0a575ce..0000000 --- a/scstadmin/examples/scst.conf.sysfs +++ /dev/null @@ -1,82 +0,0 @@ -# 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 vcdrom { - DEVICE cdrom1 { - filename /cdrom1.iso - } -} - -TARGET_DRIVER scst_local { - TARGET scst_local_tgt { - session_name scst_local_host - session_name scst_local_host1 - - LUN 0 disk1 - } -} - -TARGET_DRIVER qla2x00t { - TARGET 25:00:00:f0:98:87:92:f3 { - 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 - } - - enabled 1 - } - - TARGET 25:00:00:f0:98:87:92:f4 { - } -} - -TARGET_DRIVER iscsi { - IncomingUser "joe 12charsecret" - - TARGET iqn.2006-10.net.vlnb:tgt { - IncomingUser "joe 12charsecret" - HeaderDigest CRC32C,None - - LUN 0 disk1 - LUN 1 disk2 - LUN 2 blockio1 { - read_only 1 - } - - enabled 1 - } - - enabled 1 -} - diff --git a/scstadmin/scstadmin.sysfs/man1/scstadmin.1 b/scstadmin/scstadmin.sysfs/man1/scstadmin.1 new file mode 100644 index 0000000..7242573 --- /dev/null +++ b/scstadmin/scstadmin.sysfs/man1/scstadmin.1 @@ -0,0 +1,226 @@ +.\" -*- nroff -*- +.\" Copyright 2011 Bart Van Assche <bva...@ac...>. 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 scstadmin 1 "July 2011" "scstadmin 2.0.0" +.SH NAME +scstadmin \- administer the configuration of SCST +.SH SYNOPSIS +.B scstadmin +[<OPTION>]* <COMMAND> +.SH 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. +.SH OPTIONS +.PP +<OPTION> is one of: +.TP +.B -debug +For commands that modify the SCST state, let scstadmin show which SCST state +information would be modified instead of performing these modifications. +.TP +.B -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. +.TP +.B -nonkey +When writing a config file or listing attributes, include non-key attributes. +.TP +.B -noprompt +Do not prompt for confirmation before modifying the SCST state. +.PP +<COMMAND> is one of: +.TP +.B -h +Show usage information. +.TP +.B -help +Identical to -h. +.TP +.B -config <file> +Read and apply the specified configuration file. +.TP +.B -check_config <file> +Verify the syntax of the specified configuration file. +.TP +.B -write_config <file> +Save the current configuration to the specified file. +.TP +.B -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. +.TP +.B -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. +.TP +.B -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. +.TP +.B -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. +.TP +.B -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. +.TP +.B -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. +.TP +.B -list_scst_attr +Show name and value of all SCST core attributes. +.TP +.B -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. +.TP +.B -list_dev_attr <device> +Show name and value of all attributes of the specified device. +.TP +.B -list_drv_attr <driver> +Show name and value of all attributes of the specified target driver. +.TP +.B -list_tgt_attr <target> -driver <driver> +Show name and value of all attributes of the specified target. +.TP +.B -list_grp_attr <group> -target <target> -driver <driver> +Show name and value of all attributes of the specified initiator group. +.TP +.B -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. +.TP +.B -list_ini_attr <ini> -driver <driver> -target <target> -group <group> +Show name and value of all attributes of the specified initiator. +.TP +.B -list_sessions +Show all active sessions for all targets. +.TP +.B -set_scst_attr -attributes <p=v,...> +Set the value of one or more SCST core attributes. +.TP +.B -set_hnd_attr <handler> -attributes <p=v,...> +Set the value of one or more device handler attributes. +.TP +.B -set_dev_attr <device> -attributes <p=v,...> +Set the value of one or more device attributes. +.TP +.B -set_drv_attr <driver> -attributes <p=v,...> +Set the value of one or more target driver attributes. +.TP +.B -set_tgt_attr <target> -driver <driver> -attributes <p=v,...> +Set the value of one or more target attributes. +.TP +.B -set_grp_attr <group> -driver <driver> -target <target> -attributes <p=v,...> +Set the value of one or more initiator group attributes. +.TP +.B -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. +.TP +.B -set_ini_attr <ini> -driver <driver> -target <target> -group <group> -attributes <p=v,...> +Set the value of an initiator group attribute. +.TP +.B -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. +.TP +.B -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. +.TP +.B -rem_drv_attr <driver> -attributes <p=v,...> +Remove an (attribute, value) pair from the specified target driver. +.TP +.B -rem_tgt_attr <target> -driver <driver> -attributes <p=v,...> +Remove an (attribute, value) pair from the specified target. +.TP +.B -open_dev <device> -handler <handler> -attributes <p=v,...> +Create a new SCST device using the specified device handler and attributes. +.TP +.B -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. +.TP +.B -close_dev <device> -handler <handler> +Remove the specified device from SCST. +.TP +.B -add_target <target> -driver <driver> +Add a target to a target driver. +.TP +.B -rem_target <target> -driver <driver> +Remove a target from a target driver. +.TP +.B -add_group <group> -driver <driver> -target <target> +Add an initiator group to the specified target. +.TP +.B -rem_group <group> -driver <driver> -target <target> +Remove an initiator group from the specified target. +.TP +.B -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. +.TP +.B -rem_init <user> -driver <driver> -target <target> -group <group> +Remove an initiator name or initiator name pattern from an initiator group. +.TP +.B -move_init <init> -driver <driver> -target <target> -group <group1> -to <group2> +Move an initiator or initiator name pattern from one initiator group to another. +.TP +.B -clear_inits -driver <driver> -target <target> -group <group> +Remove all initiators from an initiator group. +.TP +.B -add_lun <lun> -driver <driver> -target <target> [-group <group>] -device <device> -attributes <p=v,...> +Add a LUN to a target or initiator group. +.TP +.B -rem_lun <lun> -driver <driver> -target <target> [-group <group>] +Remove a LUN from a target or initiator group. +.TP +.B -replace_lun <lun> -driver <driver> -target <target> [-group <group>] -device <device> -attributes <p=v,...> +Replace the device associated with a LUN by another device. +.TP +.B -clear_luns -driver <driver> -target <target> [-group <group>] +Remove all LUNs from a target or initiator group. +.TP +.B -enable_target <target> -driver <driver> +Enable a target. +.TP +.B -disable_target <target> -driver <driver> +Disable a target. +.TP +.B -issue_lip [<target>] [-driver <driver>] +Issue a LIP (Loop Initialization Protocol, fibre channel) for a specific +target or for all drivers and targets. +.SH FILES +/etc/scst.conf +.SH "SEE ALSO" +scst.conf(5) diff --git a/scstadmin/scstadmin.sysfs/man5/scst.5 b/scstadmin/scstadmin.sysfs/man5/scst.5 new file mode 100644 index 0000000..7f0560f --- /dev/null +++ b/scstadmin/scstadmin.sysfs/man5/scst.5 @@ -0,0 +1,37 @@ +.\" -*- nroff -*- +.\" Copyright 2011 Bart Van Assche <bva...@ac...>. 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 5 "July 2011" "scstadmin 2.0.0" +.SH NAME +scst \- /etc/init.d/scst configuration file. +.SH DESCRIPTION +/etc/default/scst is a configuration file read by the SCST startup script +/etc/init.d/scst and that controls the behavior of that startup script. This +file contains zero or more lists of kernel module parameters that are passed +by the /etc/init.d/scst script to the appropriate kernel module when such a +kernel module is loaded. +.P +The format of the +.I scst +file is as follows: +.br +- Blank lines and lines starting with a hash sign (#) are ignored. +.br +- All other lines must contain a variable definition using the syntax +<target_driver>_parameters=<value>. If <value> contains blanks, it must be +surrounded with double quotes. <target_driver> is the name of an SCST target +driver kernel module. +.P +An example: +.IP +# Set the ib_srpt kernel module parameter srp_max_req_size to +.br +# 4200 bytes and the srpt_sq_size parameter to 2048 elements. +.br +ib_srpt_parameters="srp_max_req_size=4200 srpt_sq_size=2048" +.SH FILES +.IP /etc/default/scst +Configuration file interpret and applied by /etc/init.d/scst. +.SH "SEE ALSO" +scstadmin(1), scst.conf(5) diff --git a/scstadmin/scstadmin.sysfs/man5/scst.conf.5 b/scstadmin/scstadmin.sysfs/man5/scst.conf.5 new file mode 100644 index 0000000..81edd73 --- /dev/null +++ b/scstadmin/scstadmin.sysfs/man5/scst.conf.5 @@ -0,0 +1,200 @@ +.\" -*- nroff -*- +.\" Copyright 2011 Bart Van Assche <bva...@ac...>. 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 and LUNs. 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 (#) 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: +.IP "HANDLER <handler>" +<handler> is the name of an SCST device handler. +.IP "DEVICE <name>" +<name> is either a H:C:I:L quadruplet referring to a local SCSI device +or an SCST device name. +.IP "TARGET_DRIVER <driver>" +<driver> is the name of an SCST target driver. +.IP "TARGET <target>" +<target> is the name of an SCST target. +.IP "LUN <number>" +.IP "GROUP <group>" +<group> is the name of an SCST initiator group. +.IP "INITIATOR <ini>" +<ini> is either an initiator name or a wildcard pattern matching zero or more +initiator names. The supported wildcard characters are: +.BR ! ", " * " and " ? . +.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 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 +.br + session_name scst_local_host1 +.IP + LUN 0 disk1 +.br + } +.br +} +.IP +TARGET_DRIVER qla2x00t { +.br + TARGET 25:00:00:f0:98:87:92:f3 { +.br + 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 + } +.IP + enabled 1 +.br + } +.IP + TARGET 25:00:00:f0:98:87:92:f4 { +.br + } +.br +} +.IP +TARGET_DRIVER iscsi { +.br + IncomingUser "joe 12charsecret" +.IP + TARGET iqn.2006-10.net.vlnb:tgt { +.br + IncomingUser "joe 12charsecret" +.br + IncomingUser "fred 12charsecret2" +.br + IncomingUser "jonas 12charsecret3" +.br + HeaderDigest CRC32C,None +.IP + LUN 0 disk1 +.br + LUN 1 disk2 +.br + LUN 2 blockio1 { +.br + read_only 1 +.br + } +.IP + enabled 1 +.br + } +.IP + enabled 1 +.br +} +.SH FILES +.IP "/etc/scst.conf" +The configuration file read by +.BR scstadmin (1). +.SH "SEE ALSO" +scstadmin(1), scst(5) -- 1.7.3.4 |
From: Mark B. <mar...@gm...> - 2011-07-19 16:47:51
|
Hi On Mon, Jul 18, 2011 at 12:24 PM, Bart Van Assche <bva...@ac...>wrote: > Several Linux distributions require having man pages available before a > software package can be considered for inclusion. Hence the patch below, > which adds man pages for the scstadmin command and the /etc/scst.conf > and /etc/default.scst configuration files. Also, the sysfs scstadmin > example > is moved to the scst.conf man page and scstadmin/Makefile has been > modified such that the man pages are installed in the proper location. > > Signed-off-by: Bart Van Assche <bva...@ac...> > > --- > scstadmin/Makefile | 7 + > scstadmin/examples/scst.conf.sysfs | 82 ---------- > scstadmin/scstadmin.sysfs/man1/scstadmin.1 | 226 > ++++++++++++++++++++++++++++ > scstadmin/scstadmin.sysfs/man5/scst.5 | 37 +++++ > scstadmin/scstadmin.sysfs/man5/scst.conf.5 | 200 ++++++++++++++++++++++++ > 5 files changed, 470 insertions(+), 82 deletions(-) > delete mode 100644 scstadmin/examples/scst.conf.sysfs > create mode 100644 scstadmin/scstadmin.sysfs/man1/scstadmin.1 > create mode 100644 scstadmin/scstadmin.sysfs/man5/scst.5 > create mode 100644 scstadmin/scstadmin.sysfs/man5/scst.conf.5 > > diff --git a/scstadmin/Makefile b/scstadmin/Makefile > index 4948a11..600c6ca 100644 > --- a/scstadmin/Makefile > +++ b/scstadmin/Makefile > @@ -1,5 +1,6 @@ > SCSTADMIN_DIR = scstadmin > > +MANDIR := $(DESTDIR)$(PREFIX)/usr/local/man/ > INITDIR := $(shell if [ -f /etc/slackware-version ]; then \ > echo $(PREFIX)/etc/rc.d; \ > else \ > @@ -35,6 +36,9 @@ install: > "Scientific Linux, Fedora) or insserv (SLES, openSUSE) package must" > \ > "be installed first"; false; fi > cd $(SCSTADMIN_DIR) && $(MAKE) $@ > + for m in scstadmin/man*/*.[1-9]; do \ > + install -m 644 $$m $(MANDIR)$$(basename $$(dirname $$m)); \ > + done > install -d $(DESTDIR)$(INITDIR) > install -m 755 init.d/scst $(DESTDIR)$(INITDIR) > if [ ! -e $(DESTDIR)$(DEFAULTDIR)/scst ]; then \ > @@ -63,6 +67,9 @@ uninstall: > fi; \ > rm -f $(DESTDIR)$(INITDIR)/scst; \ > fi > + for m in scstadmin/man*/*.[1-9]; do \ > + rm -f $(MANDIR)$$(basename $$(dirname $$m)); \ > + done > cd $(SCSTADMIN_DIR) && $(MAKE) $@ > > perl-module: > diff --git a/scstadmin/examples/scst.conf.sysfs > b/scstadmin/examples/scst.conf.sysfs > deleted file mode 100644 > index 0a575ce..0000000 > --- a/scstadmin/examples/scst.conf.sysfs > +++ /dev/null > @@ -1,82 +0,0 @@ > -# 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 vcdrom { > - DEVICE cdrom1 { > - filename /cdrom1.iso > - } > -} > - > -TARGET_DRIVER scst_local { > - TARGET scst_local_tgt { > - session_name scst_local_host > - session_name scst_local_host1 > - > - LUN 0 disk1 > - } > -} > - > -TARGET_DRIVER qla2x00t { > - TARGET 25:00:00:f0:98:87:92:f3 { > - 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 > - } > - > - enabled 1 > - } > - > - TARGET 25:00:00:f0:98:87:92:f4 { > - } > -} > - > -TARGET_DRIVER iscsi { > - IncomingUser "joe 12charsecret" > - > - TARGET iqn.2006-10.net.vlnb:tgt { > - IncomingUser "joe 12charsecret" > - HeaderDigest CRC32C,None > - > - LUN 0 disk1 > - LUN 1 disk2 > - LUN 2 blockio1 { > - read_only 1 > - } > - > - enabled 1 > - } > - > - enabled 1 > -} > - > diff --git a/scstadmin/scstadmin.sysfs/man1/scstadmin.1 > b/scstadmin/scstadmin.sysfs/man1/scstadmin.1 > new file mode 100644 > index 0000000..7242573 > --- /dev/null > +++ b/scstadmin/scstadmin.sysfs/man1/scstadmin.1 > @@ -0,0 +1,226 @@ > +.\" -*- nroff -*- > +.\" Copyright 2011 Bart Van Assche <bva...@ac...>. 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 scstadmin 1 "July 2011" "scstadmin 2.0.0" > +.SH NAME > +scstadmin \- administer the configuration of SCST > +.SH SYNOPSIS > +.B scstadmin > +[<OPTION>]* <COMMAND> > +.SH 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. > +.SH OPTIONS > +.PP > +<OPTION> is one of: > +.TP > +.B -debug > +For commands that modify the SCST state, let scstadmin show which SCST > state > +information would be modified instead of performing these modifications. > +.TP > +.B -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. > +.TP > +.B -nonkey > +When writing a config file or listing attributes, include non-key > attributes. > +.TP > +.B -noprompt > +Do not prompt for confirmation before modifying the SCST state. > +.PP > +<COMMAND> is one of: > +.TP > +.B -h > +Show usage information. > +.TP > +.B -help > +Identical to -h. > +.TP > +.B -config <file> > +Read and apply the specified configuration file. > +.TP > +.B -check_config <file> > +Verify the syntax of the specified configuration file. > +.TP > +.B -write_config <file> > +Save the current configuration to the specified file. > +.TP > +.B -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. > +.TP > +.B -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. > +.TP > +.B -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. > +.TP > +.B -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. > +.TP > +.B -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. > +.TP > +.B -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. > +.TP > +.B -list_scst_attr > +Show name and value of all SCST core attributes. > +.TP > +.B -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. > +.TP > +.B -list_dev_attr <device> > +Show name and value of all attributes of the specified device. > +.TP > +.B -list_drv_attr <driver> > +Show name and value of all attributes of the specified target driver. > +.TP > +.B -list_tgt_attr <target> -driver <driver> > +Show name and value of all attributes of the specified target. > +.TP > +.B -list_grp_attr <group> -target <target> -driver <driver> > +Show name and value of all attributes of the specified initiator group. > +.TP > +.B -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. > +.TP > +.B -list_ini_attr <ini> -driver <driver> -target <target> -group <group> > +Show name and value of all attributes of the specified initiator. > +.TP > +.B -list_sessions > +Show all active sessions for all targets. > +.TP > +.B -set_scst_attr -attributes <p=v,...> > +Set the value of one or more SCST core attributes. > +.TP > +.B -set_hnd_attr <handler> -attributes <p=v,...> > +Set the value of one or more device handler attributes. > +.TP > +.B -set_dev_attr <device> -attributes <p=v,...> > +Set the value of one or more device attributes. > +.TP > +.B -set_drv_attr <driver> -attributes <p=v,...> > +Set the value of one or more target driver attributes. > +.TP > +.B -set_tgt_attr <target> -driver <driver> -attributes <p=v,...> > +Set the value of one or more target attributes. > +.TP > +.B -set_grp_attr <group> -driver <driver> -target <target> -attributes > <p=v,...> > +Set the value of one or more initiator group attributes. > +.TP > +.B -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. > +.TP > +.B -set_ini_attr <ini> -driver <driver> -target <target> -group <group> > -attributes <p=v,...> > +Set the value of an initiator group attribute. > +.TP > +.B -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. > +.TP > +.B -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. > +.TP > +.B -rem_drv_attr <driver> -attributes <p=v,...> > +Remove an (attribute, value) pair from the specified target driver. > +.TP > +.B -rem_tgt_attr <target> -driver <driver> -attributes <p=v,...> > +Remove an (attribute, value) pair from the specified target. > +.TP > +.B -open_dev <device> -handler <handler> -attributes <p=v,...> > +Create a new SCST device using the specified device handler and > attributes. > +.TP > +.B -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. > +.TP > +.B -close_dev <device> -handler <handler> > +Remove the specified device from SCST. > +.TP > +.B -add_target <target> -driver <driver> > +Add a target to a target driver. > +.TP > +.B -rem_target <target> -driver <driver> > +Remove a target from a target driver. > +.TP > +.B -add_group <group> -driver <driver> -target <target> > +Add an initiator group to the specified target. > +.TP > +.B -rem_group <group> -driver <driver> -target <target> > +Remove an initiator group from the specified target. > +.TP > +.B -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. > +.TP > +.B -rem_init <user> -driver <driver> -target <target> -group <group> > +Remove an initiator name or initiator name pattern from an initiator > group. > +.TP > +.B -move_init <init> -driver <driver> -target <target> -group <group1> -to > <group2> > +Move an initiator or initiator name pattern from one initiator group to > another. > +.TP > +.B -clear_inits -driver <driver> -target <target> -group <group> > +Remove all initiators from an initiator group. > +.TP > +.B -add_lun <lun> -driver <driver> -target <target> [-group <group>] > -device <device> -attributes <p=v,...> > +Add a LUN to a target or initiator group. > +.TP > +.B -rem_lun <lun> -driver <driver> -target <target> [-group <group>] > +Remove a LUN from a target or initiator group. > +.TP > +.B -replace_lun <lun> -driver <driver> -target <target> [-group <group>] > -device <device> -attributes <p=v,...> > +Replace the device associated with a LUN by another device. > +.TP > +.B -clear_luns -driver <driver> -target <target> [-group <group>] > +Remove all LUNs from a target or initiator group. > +.TP > +.B -enable_target <target> -driver <driver> > +Enable a target. > +.TP > +.B -disable_target <target> -driver <driver> > +Disable a target. > +.TP > +.B -issue_lip [<target>] [-driver <driver>] > +Issue a LIP (Loop Initialization Protocol, fibre channel) for a specific > +target or for all drivers and targets. > +.SH FILES > +/etc/scst.conf > +.SH "SEE ALSO" > +scst.conf(5) > diff --git a/scstadmin/scstadmin.sysfs/man5/scst.5 > b/scstadmin/scstadmin.sysfs/man5/scst.5 > new file mode 100644 > index 0000000..7f0560f > --- /dev/null > +++ b/scstadmin/scstadmin.sysfs/man5/scst.5 > @@ -0,0 +1,37 @@ > +.\" -*- nroff -*- > +.\" Copyright 2011 Bart Van Assche <bva...@ac...>. 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 5 "July 2011" "scstadmin 2.0.0" > +.SH NAME > +scst \- /etc/init.d/scst configuration file. > +.SH DESCRIPTION > +/etc/default/scst is a configuration file read by the SCST startup script > +/etc/init.d/scst and that controls the behavior of that startup script. > This > +file contains zero or more lists of kernel module parameters that are > passed > +by the /etc/init.d/scst script to the appropriate kernel module when such > a > +kernel module is loaded. > +.P > +The format of the > +.I scst > +file is as follows: > +.br > +- Blank lines and lines starting with a hash sign (#) are ignored. > +.br > +- All other lines must contain a variable definition using the syntax > +<target_driver>_parameters=<value>. If <value> contains blanks, it must be > +surrounded with double quotes. <target_driver> is the name of an SCST > target > +driver kernel module. > +.P > +An example: > +.IP > +# Set the ib_srpt kernel module parameter srp_max_req_size to > +.br > +# 4200 bytes and the srpt_sq_size parameter to 2048 elements. > +.br > +ib_srpt_parameters="srp_max_req_size=4200 srpt_sq_size=2048" > +.SH FILES > +.IP /etc/default/scst > +Configuration file interpret and applied by /etc/init.d/scst. > +.SH "SEE ALSO" > +scstadmin(1), scst.conf(5) > diff --git a/scstadmin/scstadmin.sysfs/man5/scst.conf.5 > b/scstadmin/scstadmin.sysfs/man5/scst.conf.5 > new file mode 100644 > index 0000000..81edd73 > --- /dev/null > +++ b/scstadmin/scstadmin.sysfs/man5/scst.conf.5 > @@ -0,0 +1,200 @@ > +.\" -*- nroff -*- > +.\" Copyright 2011 Bart Van Assche <bva...@ac...>. 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 and LUNs. 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 (#) 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: > +.IP "HANDLER <handler>" > +<handler> is the name of an SCST device handler. > +.IP "DEVICE <name>" > +<name> is either a H:C:I:L quadruplet referring to a local SCSI device > +or an SCST device name. > +.IP "TARGET_DRIVER <driver>" > +<driver> is the name of an SCST target driver. > +.IP "TARGET <target>" > +<target> is the name of an SCST target. > +.IP "LUN <number>" > +.IP "GROUP <group>" > +<group> is the name of an SCST initiator group. > +.IP "INITIATOR <ini>" > +<ini> is either an initiator name or a wildcard pattern matching zero or > more > +initiator names. The supported wildcard characters are: > +.BR ! ", " * " and " ? . > +.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 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 > +.br > + session_name scst_local_host1 > +.IP > + LUN 0 disk1 > +.br > + } > +.br > +} > +.IP > +TARGET_DRIVER qla2x00t { > +.br > + TARGET 25:00:00:f0:98:87:92:f3 { > +.br > + 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 > + } > +.IP > + enabled 1 > +.br > + } > +.IP > + TARGET 25:00:00:f0:98:87:92:f4 { > +.br > + } > +.br > +} > +.IP > +TARGET_DRIVER iscsi { > +.br > + IncomingUser "joe 12charsecret" > +.IP > + TARGET iqn.2006-10.net.vlnb:tgt { > +.br > + IncomingUser "joe 12charsecret" > +.br > + IncomingUser "fred 12charsecret2" > +.br > + IncomingUser "jonas 12charsecret3" > +.br > + HeaderDigest CRC32C,None > +.IP > + LUN 0 disk1 > +.br > + LUN 1 disk2 > +.br > + LUN 2 blockio1 { > +.br > + read_only 1 > +.br > + } > +.IP > + enabled 1 > +.br > + } > +.IP > + enabled 1 > +.br > +} > +.SH FILES > +.IP "/etc/scst.conf" > +The configuration file read by > +.BR scstadmin (1). > +.SH "SEE ALSO" > +scstadmin(1), scst(5) > -- > 1.7.3.4 > > > > ------------------------------------------------------------------------------ > AppSumo Presents a FREE Video for the SourceForge Community by Eric > Ries, the creator of the Lean Startup Methodology on "Lean Startup > Secrets Revealed." This video shows you how to validate your ideas, > optimize your ideas and identify your business strategy. > http://p.sf.net/sfu/appsumosfdev2dev > _______________________________________________ > Scst-devel mailing list > https://lists.sourceforge.net/lists/listinfo/scst-devel > > Bart, thanks for the documentation. Very good idea. Can you add a BUGS section for bug reporting to this list as well an AUTHORS section? Thanks, Mark. |
From: Richard W. <Ric...@ar...> - 2011-07-19 16:56:20
|
Good thing you included the entire patch in your email - and posted at the bottom so that we would have the proper context to know what it was regarding. Richard Williams On Jul 19, 2011, at 12:47 PM, Mark Buechler <mar...@gm...> wrote: > Hi > > On Mon, Jul 18, 2011 at 12:24 PM, Bart Van Assche <bva...@ac...> wrote: > Several Linux distributions require having man pages available before a > software package can be considered for inclusion. Hence the patch below, > which adds man pages for the scstadmin command and the /etc/scst.conf > and /etc/default.scst configuration files. Also, the sysfs scstadmin example > is moved to the scst.conf man page and scstadmin/Makefile has been > modified such that the man pages are installed in the proper location. > > Signed-off-by: Bart Van Assche <bva...@ac...> > > --- > scstadmin/Makefile | 7 + > scstadmin/examples/scst.conf.sysfs | 82 ---------- > scstadmin/scstadmin.sysfs/man1/scstadmin.1 | 226 ++++++++++++++++++++++++++++ > scstadmin/scstadmin.sysfs/man5/scst.5 | 37 +++++ > scstadmin/scstadmin.sysfs/man5/scst.conf.5 | 200 ++++++++++++++++++++++++ > 5 files changed, 470 insertions(+), 82 deletions(-) > delete mode 100644 scstadmin/examples/scst.conf.sysfs > create mode 100644 scstadmin/scstadmin.sysfs/man1/scstadmin.1 > create mode 100644 scstadmin/scstadmin.sysfs/man5/scst.5 > create mode 100644 scstadmin/scstadmin.sysfs/man5/scst.conf.5 > > diff --git a/scstadmin/Makefile b/scstadmin/Makefile > index 4948a11..600c6ca 100644 > --- a/scstadmin/Makefile > +++ b/scstadmin/Makefile > @@ -1,5 +1,6 @@ > SCSTADMIN_DIR = scstadmin > > +MANDIR := $(DESTDIR)$(PREFIX)/usr/local/man/ > INITDIR := $(shell if [ -f /etc/slackware-version ]; then \ > echo $(PREFIX)/etc/rc.d; \ > else \ > @@ -35,6 +36,9 @@ install: > "Scientific Linux, Fedora) or insserv (SLES, openSUSE) package must" \ > "be installed first"; false; fi > cd $(SCSTADMIN_DIR) && $(MAKE) $@ > + for m in scstadmin/man*/*.[1-9]; do \ > + install -m 644 $$m $(MANDIR)$$(basename $$(dirname $$m)); \ > + done > install -d $(DESTDIR)$(INITDIR) > install -m 755 init.d/scst $(DESTDIR)$(INITDIR) > if [ ! -e $(DESTDIR)$(DEFAULTDIR)/scst ]; then \ > @@ -63,6 +67,9 @@ uninstall: > fi; \ > rm -f $(DESTDIR)$(INITDIR)/scst; \ > fi > + for m in scstadmin/man*/*.[1-9]; do \ > + rm -f $(MANDIR)$$(basename $$(dirname $$m)); \ > + done > cd $(SCSTADMIN_DIR) && $(MAKE) $@ > > perl-module: > diff --git a/scstadmin/examples/scst.conf.sysfs b/scstadmin/examples/scst.conf.sysfs > deleted file mode 100644 > index 0a575ce..0000000 > --- a/scstadmin/examples/scst.conf.sysfs > +++ /dev/null > @@ -1,82 +0,0 @@ > -# 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 vcdrom { > - DEVICE cdrom1 { > - filename /cdrom1.iso > - } > -} > - > -TARGET_DRIVER scst_local { > - TARGET scst_local_tgt { > - session_name scst_local_host > - session_name scst_local_host1 > - > - LUN 0 disk1 > - } > -} > - > -TARGET_DRIVER qla2x00t { > - TARGET 25:00:00:f0:98:87:92:f3 { > - 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 > - } > - > - enabled 1 > - } > - > - TARGET 25:00:00:f0:98:87:92:f4 { > - } > -} > - > -TARGET_DRIVER iscsi { > - IncomingUser "joe 12charsecret" > - > - TARGET iqn.2006-10.net.vlnb:tgt { > - IncomingUser "joe 12charsecret" > - HeaderDigest CRC32C,None > - > - LUN 0 disk1 > - LUN 1 disk2 > - LUN 2 blockio1 { > - read_only 1 > - } > - > - enabled 1 > - } > - > - enabled 1 > -} > - > diff --git a/scstadmin/scstadmin.sysfs/man1/scstadmin.1 b/scstadmin/scstadmin.sysfs/man1/scstadmin.1 > new file mode 100644 > index 0000000..7242573 > --- /dev/null > +++ b/scstadmin/scstadmin.sysfs/man1/scstadmin.1 > @@ -0,0 +1,226 @@ > +.\" -*- nroff -*- > +.\" Copyright 2011 Bart Van Assche <bva...@ac...>. 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 scstadmin 1 "July 2011" "scstadmin 2.0.0" > +.SH NAME > +scstadmin \- administer the configuration of SCST > +.SH SYNOPSIS > +.B scstadmin > +[<OPTION>]* <COMMAND> > +.SH 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. > +.SH OPTIONS > +.PP > +<OPTION> is one of: > +.TP > +.B -debug > +For commands that modify the SCST state, let scstadmin show which SCST state > +information would be modified instead of performing these modifications. > +.TP > +.B -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. > +.TP > +.B -nonkey > +When writing a config file or listing attributes, include non-key attributes. > +.TP > +.B -noprompt > +Do not prompt for confirmation before modifying the SCST state. > +.PP > +<COMMAND> is one of: > +.TP > +.B -h > +Show usage information. > +.TP > +.B -help > +Identical to -h. > +.TP > +.B -config <file> > +Read and apply the specified configuration file. > +.TP > +.B -check_config <file> > +Verify the syntax of the specified configuration file. > +.TP > +.B -write_config <file> > +Save the current configuration to the specified file. > +.TP > +.B -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. > +.TP > +.B -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. > +.TP > +.B -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. > +.TP > +.B -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. > +.TP > +.B -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. > +.TP > +.B -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. > +.TP > +.B -list_scst_attr > +Show name and value of all SCST core attributes. > +.TP > +.B -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. > +.TP > +.B -list_dev_attr <device> > +Show name and value of all attributes of the specified device. > +.TP > +.B -list_drv_attr <driver> > +Show name and value of all attributes of the specified target driver. > +.TP > +.B -list_tgt_attr <target> -driver <driver> > +Show name and value of all attributes of the specified target. > +.TP > +.B -list_grp_attr <group> -target <target> -driver <driver> > +Show name and value of all attributes of the specified initiator group. > +.TP > +.B -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. > +.TP > +.B -list_ini_attr <ini> -driver <driver> -target <target> -group <group> > +Show name and value of all attributes of the specified initiator. > +.TP > +.B -list_sessions > +Show all active sessions for all targets. > +.TP > +.B -set_scst_attr -attributes <p=v,...> > +Set the value of one or more SCST core attributes. > +.TP > +.B -set_hnd_attr <handler> -attributes <p=v,...> > +Set the value of one or more device handler attributes. > +.TP > +.B -set_dev_attr <device> -attributes <p=v,...> > +Set the value of one or more device attributes. > +.TP > +.B -set_drv_attr <driver> -attributes <p=v,...> > +Set the value of one or more target driver attributes. > +.TP > +.B -set_tgt_attr <target> -driver <driver> -attributes <p=v,...> > +Set the value of one or more target attributes. > +.TP > +.B -set_grp_attr <group> -driver <driver> -target <target> -attributes <p=v,...> > +Set the value of one or more initiator group attributes. > +.TP > +.B -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. > +.TP > +.B -set_ini_attr <ini> -driver <driver> -target <target> -group <group> -attributes <p=v,...> > +Set the value of an initiator group attribute. > +.TP > +.B -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. > +.TP > +.B -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. > +.TP > +.B -rem_drv_attr <driver> -attributes <p=v,...> > +Remove an (attribute, value) pair from the specified target driver. > +.TP > +.B -rem_tgt_attr <target> -driver <driver> -attributes <p=v,...> > +Remove an (attribute, value) pair from the specified target. > +.TP > +.B -open_dev <device> -handler <handler> -attributes <p=v,...> > +Create a new SCST device using the specified device handler and attributes. > +.TP > +.B -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. > +.TP > +.B -close_dev <device> -handler <handler> > +Remove the specified device from SCST. > +.TP > +.B -add_target <target> -driver <driver> > +Add a target to a target driver. > +.TP > +.B -rem_target <target> -driver <driver> > +Remove a target from a target driver. > +.TP > +.B -add_group <group> -driver <driver> -target <target> > +Add an initiator group to the specified target. > +.TP > +.B -rem_group <group> -driver <driver> -target <target> > +Remove an initiator group from the specified target. > +.TP > +.B -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. > +.TP > +.B -rem_init <user> -driver <driver> -target <target> -group <group> > +Remove an initiator name or initiator name pattern from an initiator group. > +.TP > +.B -move_init <init> -driver <driver> -target <target> -group <group1> -to <group2> > +Move an initiator or initiator name pattern from one initiator group to another. > +.TP > +.B -clear_inits -driver <driver> -target <target> -group <group> > +Remove all initiators from an initiator group. > +.TP > +.B -add_lun <lun> -driver <driver> -target <target> [-group <group>] -device <device> -attributes <p=v,...> > +Add a LUN to a target or initiator group. > +.TP > +.B -rem_lun <lun> -driver <driver> -target <target> [-group <group>] > +Remove a LUN from a target or initiator group. > +.TP > +.B -replace_lun <lun> -driver <driver> -target <target> [-group <group>] -device <device> -attributes <p=v,...> > +Replace the device associated with a LUN by another device. > +.TP > +.B -clear_luns -driver <driver> -target <target> [-group <group>] > +Remove all LUNs from a target or initiator group. > +.TP > +.B -enable_target <target> -driver <driver> > +Enable a target. > +.TP > +.B -disable_target <target> -driver <driver> > +Disable a target. > +.TP > +.B -issue_lip [<target>] [-driver <driver>] > +Issue a LIP (Loop Initialization Protocol, fibre channel) for a specific > +target or for all drivers and targets. > +.SH FILES > +/etc/scst.conf > +.SH "SEE ALSO" > +scst.conf(5) > diff --git a/scstadmin/scstadmin.sysfs/man5/scst.5 b/scstadmin/scstadmin.sysfs/man5/scst.5 > new file mode 100644 > index 0000000..7f0560f > --- /dev/null > +++ b/scstadmin/scstadmin.sysfs/man5/scst.5 > @@ -0,0 +1,37 @@ > +.\" -*- nroff -*- > +.\" Copyright 2011 Bart Van Assche <bva...@ac...>. 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 5 "July 2011" "scstadmin 2.0.0" > +.SH NAME > +scst \- /etc/init.d/scst configuration file. > +.SH DESCRIPTION > +/etc/default/scst is a configuration file read by the SCST startup script > +/etc/init.d/scst and that controls the behavior of that startup script. This > +file contains zero or more lists of kernel module parameters that are passed > +by the /etc/init.d/scst script to the appropriate kernel module when such a > +kernel module is loaded. > +.P > +The format of the > +.I scst > +file is as follows: > +.br > +- Blank lines and lines starting with a hash sign (#) are ignored. > +.br > +- All other lines must contain a variable definition using the syntax > +<target_driver>_parameters=<value>. If <value> contains blanks, it must be > +surrounded with double quotes. <target_driver> is the name of an SCST target > +driver kernel module. > +.P > +An example: > +.IP > +# Set the ib_srpt kernel module parameter srp_max_req_size to > +.br > +# 4200 bytes and the srpt_sq_size parameter to 2048 elements. > +.br > +ib_srpt_parameters="srp_max_req_size=4200 srpt_sq_size=2048" > +.SH FILES > +.IP /etc/default/scst > +Configuration file interpret and applied by /etc/init.d/scst. > +.SH "SEE ALSO" > +scstadmin(1), scst.conf(5) > diff --git a/scstadmin/scstadmin.sysfs/man5/scst.conf.5 b/scstadmin/scstadmin.sysfs/man5/scst.conf.5 > new file mode 100644 > index 0000000..81edd73 > --- /dev/null > +++ b/scstadmin/scstadmin.sysfs/man5/scst.conf.5 > @@ -0,0 +1,200 @@ > +.\" -*- nroff -*- > +.\" Copyright 2011 Bart Van Assche <bva...@ac...>. 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 and LUNs. 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 (#) 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: > +.IP "HANDLER <handler>" > +<handler> is the name of an SCST device handler. > +.IP "DEVICE <name>" > +<name> is either a H:C:I:L quadruplet referring to a local SCSI device > +or an SCST device name. > +.IP "TARGET_DRIVER <driver>" > +<driver> is the name of an SCST target driver. > +.IP "TARGET <target>" > +<target> is the name of an SCST target. > +.IP "LUN <number>" > +.IP "GROUP <group>" > +<group> is the name of an SCST initiator group. > +.IP "INITIATOR <ini>" > +<ini> is either an initiator name or a wildcard pattern matching zero or more > +initiator names. The supported wildcard characters are: > +.BR ! ", " * " and " ? . > +.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 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 > +.br > + session_name scst_local_host1 > +.IP > + LUN 0 disk1 > +.br > + } > +.br > +} > +.IP > +TARGET_DRIVER qla2x00t { > +.br > + TARGET 25:00:00:f0:98:87:92:f3 { > +.br > + 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 > + } > +.IP > + enabled 1 > +.br > + } > +.IP > + TARGET 25:00:00:f0:98:87:92:f4 { > +.br > + } > +.br > +} > +.IP > +TARGET_DRIVER iscsi { > +.br > + IncomingUser "joe 12charsecret" > +.IP > + TARGET iqn.2006-10.net.vlnb:tgt { > +.br > + IncomingUser "joe 12charsecret" > +.br > + IncomingUser "fred 12charsecret2" > +.br > + IncomingUser "jonas 12charsecret3" > +.br > + HeaderDigest CRC32C,None > +.IP > + LUN 0 disk1 > +.br > + LUN 1 disk2 > +.br > + LUN 2 blockio1 { > +.br > + read_only 1 > +.br > + } > +.IP > + enabled 1 > +.br > + } > +.IP > + enabled 1 > +.br > +} > +.SH FILES > +.IP "/etc/scst.conf" > +The configuration file read by > +.BR scstadmin (1). > +.SH "SEE ALSO" > +scstadmin(1), scst(5) > -- > 1.7.3.4 > > > ------------------------------------------------------------------------------ > AppSumo Presents a FREE Video for the SourceForge Community by Eric > Ries, the creator of the Lean Startup Methodology on "Lean Startup > Secrets Revealed." This video shows you how to validate your ideas, > optimize your ideas and identify your business strategy. > http://p.sf.net/sfu/appsumosfdev2dev > _______________________________________________ > Scst-devel mailing list > https://lists.sourceforge.net/lists/listinfo/scst-devel > > > Bart, thanks for the documentation. Very good idea. > > Can you add a BUGS section for bug reporting to this list as well an AUTHORS section? > > Thanks, Mark. > t;Lean Startup > Secrets Revealed." This video shows you how to validate your ideas, > optimize your ideas and identify your business strategy. > http://p.sf.net/sfu/appsumosfdev2dev > _______________________________________________ > Scst-devel mailing list > https://lists.sourceforge.net/lists/listinfo/scst-devel > > > Bart, thanks for the documentation. Very good idea. > > Can you add a BUGS section for bug reporting to this list as well an AUTHORS section? > > Thanks, Mark. > ------------------------------------------------------------------------------ > Magic Quadrant for Content-Aware Data Loss Prevention > Research study explores the data loss prevention market. Includes in-depth > analysis on the changes within the DLP market, and the criteria used to > evaluate the strengths and weaknesses of these DLP solutions. > http://www.accelacomm.com/jaw/sfnl/114/51385063/ > _______________________________________________ > Scst-devel mailing list > https://lists.sourceforge.net/lists/listinfo/scst-devel |
From: Richard W. <Ric...@ar...> - 2011-07-19 17:34:11
|
Just wanted to point out that I was joking (maybe some will find it funny) and that my humor is not endorsed by any official political party or mailing list authority. -end transmission- Richard Williams On Jul 19, 2011, at 12:54 PM, Richard Williams <Ric...@ar...> wrote: > Good thing you included the entire patch in your email - and posted at the bottom so that we would have the proper context to know what it was regarding. > > Richard Williams > > > > On Jul 19, 2011, at 12:47 PM, Mark Buechler <mar...@gm...> wrote: > >> Hi >> >> On Mon, Jul 18, 2011 at 12:24 PM, Bart Van Assche <bva...@ac...> wrote: >> Several Linux distributions require having man pages available before a >> software package can be considered for inclusion. Hence the patch below, >> which adds man pages for the scstadmin command and the /etc/scst.conf >> and /etc/default.scst configuration files. Also, the sysfs scstadmin example >> is moved to the scst.conf man page and scstadmin/Makefile has been >> modified such that the man pages are installed in the proper location. >> >> Signed-off-by: Bart Van Assche <bva...@ac...> >> >> --- >> scstadmin/Makefile | 7 + >> scstadmin/examples/scst.conf.sysfs | 82 ---------- >> scstadmin/scstadmin.sysfs/man1/scstadmin.1 | 226 ++++++++++++++++++++++++++++ >> scstadmin/scstadmin.sysfs/man5/scst.5 | 37 +++++ >> scstadmin/scstadmin.sysfs/man5/scst.conf.5 | 200 ++++++++++++++++++++++++ >> 5 files changed, 470 insertions(+), 82 deletions(-) >> delete mode 100644 scstadmin/examples/scst.conf.sysfs >> create mode 100644 scstadmin/scstadmin.sysfs/man1/scstadmin.1 >> create mode 100644 scstadmin/scstadmin.sysfs/man5/scst.5 >> create mode 100644 scstadmin/scstadmin.sysfs/man5/scst.conf.5 >> >> diff --git a/scstadmin/Makefile b/scstadmin/Makefile >> index 4948a11..600c6ca 100644 >> --- a/scstadmin/Makefile >> +++ b/scstadmin/Makefile >> @@ -1,5 +1,6 @@ >> SCSTADMIN_DIR = scstadmin >> >> +MANDIR := $(DESTDIR)$(PREFIX)/usr/local/man/ >> INITDIR := $(shell if [ -f /etc/slackware-version ]; then \ >> echo $(PREFIX)/etc/rc.d; \ >> else \ >> @@ -35,6 +36,9 @@ install: >> "Scientific Linux, Fedora) or insserv (SLES, openSUSE) package must" \ >> "be installed first"; false; fi >> cd $(SCSTADMIN_DIR) && $(MAKE) $@ >> + for m in scstadmin/man*/*.[1-9]; do \ >> + install -m 644 $$m $(MANDIR)$$(basename $$(dirname $$m)); \ >> + done >> install -d $(DESTDIR)$(INITDIR) >> install -m 755 init.d/scst $(DESTDIR)$(INITDIR) >> if [ ! -e $(DESTDIR)$(DEFAULTDIR)/scst ]; then \ >> @@ -63,6 +67,9 @@ uninstall: >> fi; \ >> rm -f $(DESTDIR)$(INITDIR)/scst; \ >> fi >> + for m in scstadmin/man*/*.[1-9]; do \ >> + rm -f $(MANDIR)$$(basename $$(dirname $$m)); \ >> + done >> cd $(SCSTADMIN_DIR) && $(MAKE) $@ >> >> perl-module: >> diff --git a/scstadmin/examples/scst.conf.sysfs b/scstadmin/examples/scst.conf.sysfs >> deleted file mode 100644 >> index 0a575ce..0000000 >> --- a/scstadmin/examples/scst.conf.sysfs >> +++ /dev/null >> @@ -1,82 +0,0 @@ >> -# 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 vcdrom { >> - DEVICE cdrom1 { >> - filename /cdrom1.iso >> - } >> -} >> - >> -TARGET_DRIVER scst_local { >> - TARGET scst_local_tgt { >> - session_name scst_local_host >> - session_name scst_local_host1 >> - >> - LUN 0 disk1 >> - } >> -} >> - >> -TARGET_DRIVER qla2x00t { >> - TARGET 25:00:00:f0:98:87:92:f3 { >> - 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 >> - } >> - >> - enabled 1 >> - } >> - >> - TARGET 25:00:00:f0:98:87:92:f4 { >> - } >> -} >> - >> -TARGET_DRIVER iscsi { >> - IncomingUser "joe 12charsecret" >> - >> - TARGET iqn.2006-10.net.vlnb:tgt { >> - IncomingUser "joe 12charsecret" >> - HeaderDigest CRC32C,None >> - >> - LUN 0 disk1 >> - LUN 1 disk2 >> - LUN 2 blockio1 { >> - read_only 1 >> - } >> - >> - enabled 1 >> - } >> - >> - enabled 1 >> -} >> - >> diff --git a/scstadmin/scstadmin.sysfs/man1/scstadmin.1 b/scstadmin/scstadmin.sysfs/man1/scstadmin.1 >> new file mode 100644 >> index 0000000..7242573 >> --- /dev/null >> +++ b/scstadmin/scstadmin.sysfs/man1/scstadmin.1 >> @@ -0,0 +1,226 @@ >> +.\" -*- nroff -*- >> +.\" Copyright 2011 Bart Van Assche <bva...@ac...>. 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 scstadmin 1 "July 2011" "scstadmin 2.0.0" >> +.SH NAME >> +scstadmin \- administer the configuration of SCST >> +.SH SYNOPSIS >> +.B scstadmin >> +[<OPTION>]* <COMMAND> >> +.SH 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. >> +.SH OPTIONS >> +.PP >> +<OPTION> is one of: >> +.TP >> +.B -debug >> +For commands that modify the SCST state, let scstadmin show which SCST state >> +information would be modified instead of performing these modifications. >> +.TP >> +.B -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. >> +.TP >> +.B -nonkey >> +When writing a config file or listing attributes, include non-key attributes. >> +.TP >> +.B -noprompt >> +Do not prompt for confirmation before modifying the SCST state. >> +.PP >> +<COMMAND> is one of: >> +.TP >> +.B -h >> +Show usage information. >> +.TP >> +.B -help >> +Identical to -h. >> +.TP >> +.B -config <file> >> +Read and apply the specified configuration file. >> +.TP >> +.B -check_config <file> >> +Verify the syntax of the specified configuration file. >> +.TP >> +.B -write_config <file> >> +Save the current configuration to the specified file. >> +.TP >> +.B -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. >> +.TP >> +.B -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. >> +.TP >> +.B -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. >> +.TP >> +.B -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. >> +.TP >> +.B -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. >> +.TP >> +.B -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. >> +.TP >> +.B -list_scst_attr >> +Show name and value of all SCST core attributes. >> +.TP >> +.B -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. >> +.TP >> +.B -list_dev_attr <device> >> +Show name and value of all attributes of the specified device. >> +.TP >> +.B -list_drv_attr <driver> >> +Show name and value of all attributes of the specified target driver. >> +.TP >> +.B -list_tgt_attr <target> -driver <driver> >> +Show name and value of all attributes of the specified target. >> +.TP >> +.B -list_grp_attr <group> -target <target> -driver <driver> >> +Show name and value of all attributes of the specified initiator group. >> +.TP >> +.B -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. >> +.TP >> +.B -list_ini_attr <ini> -driver <driver> -target <target> -group <group> >> +Show name and value of all attributes of the specified initiator. >> +.TP >> +.B -list_sessions >> +Show all active sessions for all targets. >> +.TP >> +.B -set_scst_attr -attributes <p=v,...> >> +Set the value of one or more SCST core attributes. >> +.TP >> +.B -set_hnd_attr <handler> -attributes <p=v,...> >> +Set the value of one or more device handler attributes. >> +.TP >> +.B -set_dev_attr <device> -attributes <p=v,...> >> +Set the value of one or more device attributes. >> +.TP >> +.B -set_drv_attr <driver> -attributes <p=v,...> >> +Set the value of one or more target driver attributes. >> +.TP >> +.B -set_tgt_attr <target> -driver <driver> -attributes <p=v,...> >> +Set the value of one or more target attributes. >> +.TP >> +.B -set_grp_attr <group> -driver <driver> -target <target> -attributes <p=v,...> >> +Set the value of one or more initiator group attributes. >> +.TP >> +.B -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. >> +.TP >> +.B -set_ini_attr <ini> -driver <driver> -target <target> -group <group> -attributes <p=v,...> >> +Set the value of an initiator group attribute. >> +.TP >> +.B -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. >> +.TP >> +.B -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. >> +.TP >> +.B -rem_drv_attr <driver> -attributes <p=v,...> >> +Remove an (attribute, value) pair from the specified target driver. >> +.TP >> +.B -rem_tgt_attr <target> -driver <driver> -attributes <p=v,...> >> +Remove an (attribute, value) pair from the specified target. >> +.TP >> +.B -open_dev <device> -handler <handler> -attributes <p=v,...> >> +Create a new SCST device using the specified device handler and attributes. >> +.TP >> +.B -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. >> +.TP >> +.B -close_dev <device> -handler <handler> >> +Remove the specified device from SCST. >> +.TP >> +.B -add_target <target> -driver <driver> >> +Add a target to a target driver. >> +.TP >> +.B -rem_target <target> -driver <driver> >> +Remove a target from a target driver. >> +.TP >> +.B -add_group <group> -driver <driver> -target <target> >> +Add an initiator group to the specified target. >> +.TP >> +.B -rem_group <group> -driver <driver> -target <target> >> +Remove an initiator group from the specified target. >> +.TP >> +.B -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. >> +.TP >> +.B -rem_init <user> -driver <driver> -target <target> -group <group> >> +Remove an initiator name or initiator name pattern from an initiator group. >> +.TP >> +.B -move_init <init> -driver <driver> -target <target> -group <group1> -to <group2> >> +Move an initiator or initiator name pattern from one initiator group to another. >> +.TP >> +.B -clear_inits -driver <driver> -target <target> -group <group> >> +Remove all initiators from an initiator group. >> +.TP >> +.B -add_lun <lun> -driver <driver> -target <target> [-group <group>] -device <device> -attributes <p=v,...> >> +Add a LUN to a target or initiator group. >> +.TP >> +.B -rem_lun <lun> -driver <driver> -target <target> [-group <group>] >> +Remove a LUN from a target or initiator group. >> +.TP >> +.B -replace_lun <lun> -driver <driver> -target <target> [-group <group>] -device <device> -attributes <p=v,...> >> +Replace the device associated with a LUN by another device. >> +.TP >> +.B -clear_luns -driver <driver> -target <target> [-group <group>] >> +Remove all LUNs from a target or initiator group. >> +.TP >> +.B -enable_target <target> -driver <driver> >> +Enable a target. >> +.TP >> +.B -disable_target <target> -driver <driver> >> +Disable a target. >> +.TP >> +.B -issue_lip [<target>] [-driver <driver>] >> +Issue a LIP (Loop Initialization Protocol, fibre channel) for a specific >> +target or for all drivers and targets. >> +.SH FILES >> +/etc/scst.conf >> +.SH "SEE ALSO" >> +scst.conf(5) >> diff --git a/scstadmin/scstadmin.sysfs/man5/scst.5 b/scstadmin/scstadmin.sysfs/man5/scst.5 >> new file mode 100644 >> index 0000000..7f0560f >> --- /dev/null >> +++ b/scstadmin/scstadmin.sysfs/man5/scst.5 >> @@ -0,0 +1,37 @@ >> +.\" -*- nroff -*- >> +.\" Copyright 2011 Bart Van Assche <bva...@ac...>. 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 5 "July 2011" "scstadmin 2.0.0" >> +.SH NAME >> +scst \- /etc/init.d/scst configuration file. >> +.SH DESCRIPTION >> +/etc/default/scst is a configuration file read by the SCST startup script >> +/etc/init.d/scst and that controls the behavior of that startup script. This >> +file contains zero or more lists of kernel module parameters that are passed >> +by the /etc/init.d/scst script to the appropriate kernel module when such a >> +kernel module is loaded. >> +.P >> +The format of the >> +.I scst >> +file is as follows: >> +.br >> +- Blank lines and lines starting with a hash sign (#) are ignored. >> +.br >> +- All other lines must contain a variable definition using the syntax >> +<target_driver>_parameters=<value>. If <value> contains blanks, it must be >> +surrounded with double quotes. <target_driver> is the name of an SCST target >> +driver kernel module. >> +.P >> +An example: >> +.IP >> +# Set the ib_srpt kernel module parameter srp_max_req_size to >> +.br >> +# 4200 bytes and the srpt_sq_size parameter to 2048 elements. >> +.br >> +ib_srpt_parameters="srp_max_req_size=4200 srpt_sq_size=2048" >> +.SH FILES >> +.IP /etc/default/scst >> +Configuration file interpret and applied by /etc/init.d/scst. >> +.SH "SEE ALSO" >> +scstadmin(1), scst.conf(5) >> diff --git a/scstadmin/scstadmin.sysfs/man5/scst.conf.5 b/scstadmin/scstadmin.sysfs/man5/scst.conf.5 >> new file mode 100644 >> index 0000000..81edd73 >> --- /dev/null >> +++ b/scstadmin/scstadmin.sysfs/man5/scst.conf.5 >> @@ -0,0 +1,200 @@ >> +.\" -*- nroff -*- >> +.\" Copyright 2011 Bart Van Assche <bva...@ac...>. 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 and LUNs. 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 (#) 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: >> +.IP "HANDLER <handler>" >> +<handler> is the name of an SCST device handler. >> +.IP "DEVICE <name>" >> +<name> is either a H:C:I:L quadruplet referring to a local SCSI device >> +or an SCST device name. >> +.IP "TARGET_DRIVER <driver>" >> +<driver> is the name of an SCST target driver. >> +.IP "TARGET <target>" >> +<target> is the name of an SCST target. >> +.IP "LUN <number>" >> +.IP "GROUP <group>" >> +<group> is the name of an SCST initiator group. >> +.IP "INITIATOR <ini>" >> +<ini> is either an initiator name or a wildcard pattern matching zero or more >> +initiator names. The supported wildcard characters are: >> +.BR ! ", " * " and " ? . >> +.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 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 >> +.br >> + session_name scst_local_host1 >> +.IP >> + LUN 0 disk1 >> +.br >> + } >> +.br >> +} >> +.IP >> +TARGET_DRIVER qla2x00t { >> +.br >> + TARGET 25:00:00:f0:98:87:92:f3 { >> +.br >> + 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 >> + } >> +.IP >> + enabled 1 >> +.br >> + } >> +.IP >> + TARGET 25:00:00:f0:98:87:92:f4 { >> +.br >> + } >> +.br >> +} >> +.IP >> +TARGET_DRIVER iscsi { >> +.br >> + IncomingUser "joe 12charsecret" >> +.IP >> + TARGET iqn.2006-10.net.vlnb:tgt { >> +.br >> + IncomingUser "joe 12charsecret" >> +.br >> + IncomingUser "fred 12charsecret2" >> +.br >> + IncomingUser "jonas 12charsecret3" >> +.br >> + HeaderDigest CRC32C,None >> +.IP >> + LUN 0 disk1 >> +.br >> + LUN 1 disk2 >> +.br >> + LUN 2 blockio1 { >> +.br >> + read_only 1 >> +.br >> + } >> +.IP >> + enabled 1 >> +.br >> + } >> +.IP >> + enabled 1 >> +.br >> +} >> +.SH FILES >> +.IP "/etc/scst.conf" >> +The configuration file read by >> +.BR scstadmin (1). >> +.SH "SEE ALSO" >> +scstadmin(1), scst(5) >> -- >> 1.7.3.4 >> >> >> ------------------------------------------------------------------------------ >> AppSumo Presents a FREE Video for the SourceForge Community by Eric >> Ries, the creator of the Lean Startup Methodology on "Lean Startup >> Secrets Revealed." This video shows you how to validate your ideas, >> optimize your ideas and identify your business strategy. >> http://p.sf.net/sfu/appsumosfdev2dev >> _______________________________________________ >> Scst-devel mailing list >> https://lists.sourceforge.net/lists/listinfo/scst-devel >> >> >> Bart, thanks for the documentation. Very good idea. >> >> Can you add a BUGS section for bug reporting to this list as well an AUTHORS section? >> >> Thanks, Mark. >> t;Lean Startup >> Secrets Revealed." This video shows you how to validate your ideas, >> optimize your ideas and identify your business strategy. >> http://p.sf.net/sfu/appsumosfdev2dev >> _______________________________________________ >> Scst-devel mailing list >> https://lists.sourceforge.net/lists/listinfo/scst-devel >> >> >> Bart, thanks for the documentation. Very good idea. >> >> Can you add a BUGS section for bug reporting to this list as well an AUTHORS section? >> >> Thanks, Mark. >> ------------------------------------------------------------------------------ >> Magic Quadrant for Content-Aware Data Loss Prevention >> Research study explores the data loss prevention market. Includes in-depth >> analysis on the changes within the DLP market, and the criteria used to >> evaluate the strengths and weaknesses of these DLP solutions. >> http://www.accelacomm.com/jaw/sfnl/114/51385063/ >> _______________________________________________ >> Scst-devel mailing list >> https://lists.sourceforge.net/lists/listinfo/scst-devel > > ------------------------------------------------------------------------------ > Magic Quadrant for Content-Aware Data Loss Prevention > Research study explores the data loss prevention market. Includes in-depth > analysis on the changes within the DLP market, and the criteria used to > evaluate the strengths and weaknesses of these DLP solutions. > http://www.accelacomm.com/jaw/sfnl/114/51385063/ > _______________________________________________ > Scst-devel mailing list > https://lists.sourceforge.net/lists/listinfo/scst-devel |
From: Mark B. <mar...@gm...> - 2011-07-19 17:42:19
|
The point was valid, if only intended as a joke. - Mark. On Tue, Jul 19, 2011 at 1:33 PM, Richard Williams < Ric...@ar...> wrote: > Just wanted to point out that I was joking (maybe some will find it funny) > and that my humor is not endorsed by any official political party or mailing > list authority. -end transmission- > > Richard Williams > > > > On Jul 19, 2011, at 12:54 PM, Richard Williams < > Ric...@ar...> wrote: > > Good thing you included the entire patch in your email - and posted at the > bottom so that we would have the proper context to know what it was > regarding. > > Richard Williams > > > > On Jul 19, 2011, at 12:47 PM, Mark Buechler < <mar...@gm...> > mar...@gm...> wrote: > > Hi > > On Mon, Jul 18, 2011 at 12:24 PM, Bart Van Assche < <bva...@ac...><bva...@ac...> > bva...@ac...> wrote: > >> Several Linux distributions require having man pages available before a >> software package can be considered for inclusion. Hence the patch below, >> which adds man pages for the scstadmin command and the /etc/scst.conf >> and /etc/default.scst configuration files. Also, the sysfs scstadmin >> example >> is moved to the scst.conf man page and scstadmin/Makefile has been >> modified such that the man pages are installed in the proper location. >> >> Signed-off-by: Bart Van Assche < <bva...@ac...><bva...@ac...> >> bva...@ac...> >> >> --- >> scstadmin/Makefile | 7 + >> scstadmin/examples/scst.conf.sysfs | 82 ---------- >> scstadmin/scstadmin.sysfs/man1/scstadmin.1 | 226 >> ++++++++++++++++++++++++++++ >> scstadmin/scstadmin.sysfs/man5/scst.5 | 37 +++++ >> scstadmin/scstadmin.sysfs/man5/scst.conf.5 | 200 >> ++++++++++++++++++++++++ >> 5 files changed, 470 insertions(+), 82 deletions(-) >> delete mode 100644 scstadmin/examples/scst.conf.sysfs >> create mode 100644 scstadmin/scstadmin.sysfs/man1/scstadmin.1 >> create mode 100644 scstadmin/scstadmin.sysfs/man5/scst.5 >> create mode 100644 scstadmin/scstadmin.sysfs/man5/scst.conf.5 >> >> diff --git a/scstadmin/Makefile b/scstadmin/Makefile >> index 4948a11..600c6ca 100644 >> --- a/scstadmin/Makefile >> +++ b/scstadmin/Makefile >> @@ -1,5 +1,6 @@ >> SCSTADMIN_DIR = scstadmin >> >> +MANDIR := $(DESTDIR)$(PREFIX)/usr/local/man/ >> INITDIR := $(shell if [ -f /etc/slackware-version ]; then \ >> echo $(PREFIX)/etc/rc.d; \ >> else \ >> @@ -35,6 +36,9 @@ install: >> "Scientific Linux, Fedora) or insserv (SLES, openSUSE) package >> must" \ >> "be installed first"; false; fi >> cd $(SCSTADMIN_DIR) && $(MAKE) $@ >> + for m in scstadmin/man*/*.[1-9]; do \ >> + install -m 644 $$m $(MANDIR)$$(basename $$(dirname $$m)); \ >> + done >> install -d $(DESTDIR)$(INITDIR) >> install -m 755 init.d/scst $(DESTDIR)$(INITDIR) >> if [ ! -e $(DESTDIR)$(DEFAULTDIR)/scst ]; then \ >> @@ -63,6 +67,9 @@ uninstall: >> fi; \ >> rm -f $(DESTDIR)$(INITDIR)/scst; \ >> fi >> + for m in scstadmin/man*/*.[1-9]; do \ >> + rm -f $(MANDIR)$$(basename $$(dirname $$m)); \ >> + done >> cd $(SCSTADMIN_DIR) && $(MAKE) $@ >> >> perl-module: >> diff --git a/scstadmin/examples/scst.conf.sysfs >> b/scstadmin/examples/scst.conf.sysfs >> deleted file mode 100644 >> index 0a575ce..0000000 >> --- a/scstadmin/examples/scst.conf.sysfs >> +++ /dev/null >> @@ -1,82 +0,0 @@ >> -# 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 vcdrom { >> - DEVICE cdrom1 { >> - filename /cdrom1.iso >> - } >> -} >> - >> -TARGET_DRIVER scst_local { >> - TARGET scst_local_tgt { >> - session_name scst_local_host >> - session_name scst_local_host1 >> - >> - LUN 0 disk1 >> - } >> -} >> - >> -TARGET_DRIVER qla2x00t { >> - TARGET 25:00:00:f0:98:87:92:f3 { >> - 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 >> - } >> - >> - enabled 1 >> - } >> - >> - TARGET 25:00:00:f0:98:87:92:f4 { >> - } >> -} >> - >> -TARGET_DRIVER iscsi { >> - IncomingUser "joe 12charsecret" >> - >> - TARGET iqn.2006-10.net.vlnb:tgt { >> - IncomingUser "joe 12charsecret" >> - HeaderDigest CRC32C,None >> - >> - LUN 0 disk1 >> - LUN 1 disk2 >> - LUN 2 blockio1 { >> - read_only 1 >> - } >> - >> - enabled 1 >> - } >> - >> - enabled 1 >> -} >> - >> diff --git a/scstadmin/scstadmin.sysfs/man1/scstadmin.1 >> b/scstadmin/scstadmin.sysfs/man1/scstadmin.1 >> new file mode 100644 >> index 0000000..7242573 >> --- /dev/null >> +++ b/scstadmin/scstadmin.sysfs/man1/scstadmin.1 >> @@ -0,0 +1,226 @@ >> +.\" -*- nroff -*- >> +.\" Copyright 2011 Bart Van Assche < <bva...@ac...><bva...@ac...> >> bva...@ac...>. 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 scstadmin 1 "July 2011" "scstadmin 2.0.0" >> +.SH NAME >> +scstadmin \- administer the configuration of SCST >> +.SH SYNOPSIS >> +.B scstadmin >> +[<OPTION>]* <COMMAND> >> +.SH 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. >> +.SH OPTIONS >> +.PP >> +<OPTION> is one of: >> +.TP >> +.B -debug >> +For commands that modify the SCST state, let scstadmin show which SCST >> state >> +information would be modified instead of performing these modifications. >> +.TP >> +.B -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. >> +.TP >> +.B -nonkey >> +When writing a config file or listing attributes, include non-key >> attributes. >> +.TP >> +.B -noprompt >> +Do not prompt for confirmation before modifying the SCST state. >> +.PP >> +<COMMAND> is one of: >> +.TP >> +.B -h >> +Show usage information. >> +.TP >> +.B -help >> +Identical to -h. >> +.TP >> +.B -config <file> >> +Read and apply the specified configuration file. >> +.TP >> +.B -check_config <file> >> +Verify the syntax of the specified configuration file. >> +.TP >> +.B -write_config <file> >> +Save the current configuration to the specified file. >> +.TP >> +.B -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. >> +.TP >> +.B -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. >> +.TP >> +.B -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. >> +.TP >> +.B -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. >> +.TP >> +.B -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. >> +.TP >> +.B -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. >> +.TP >> +.B -list_scst_attr >> +Show name and value of all SCST core attributes. >> +.TP >> +.B -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. >> +.TP >> +.B -list_dev_attr <device> >> +Show name and value of all attributes of the specified device. >> +.TP >> +.B -list_drv_attr <driver> >> +Show name and value of all attributes of the specified target driver. >> +.TP >> +.B -list_tgt_attr <target> -driver <driver> >> +Show name and value of all attributes of the specified target. >> +.TP >> +.B -list_grp_attr <group> -target <target> -driver <driver> >> +Show name and value of all attributes of the specified initiator group. >> +.TP >> +.B -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. >> +.TP >> +.B -list_ini_attr <ini> -driver <driver> -target <target> -group <group> >> +Show name and value of all attributes of the specified initiator. >> +.TP >> +.B -list_sessions >> +Show all active sessions for all targets. >> +.TP >> +.B -set_scst_attr -attributes <p=v,...> >> +Set the value of one or more SCST core attributes. >> +.TP >> +.B -set_hnd_attr <handler> -attributes <p=v,...> >> +Set the value of one or more device handler attributes. >> +.TP >> +.B -set_dev_attr <device> -attributes <p=v,...> >> +Set the value of one or more device attributes. >> +.TP >> +.B -set_drv_attr <driver> -attributes <p=v,...> >> +Set the value of one or more target driver attributes. >> +.TP >> +.B -set_tgt_attr <target> -driver <driver> -attributes <p=v,...> >> +Set the value of one or more target attributes. >> +.TP >> +.B -set_grp_attr <group> -driver <driver> -target <target> -attributes >> <p=v,...> >> +Set the value of one or more initiator group attributes. >> +.TP >> +.B -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. >> +.TP >> +.B -set_ini_attr <ini> -driver <driver> -target <target> -group <group> >> -attributes <p=v,...> >> +Set the value of an initiator group attribute. >> +.TP >> +.B -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. >> +.TP >> +.B -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. >> +.TP >> +.B -rem_drv_attr <driver> -attributes <p=v,...> >> +Remove an (attribute, value) pair from the specified target driver. >> +.TP >> +.B -rem_tgt_attr <target> -driver <driver> -attributes <p=v,...> >> +Remove an (attribute, value) pair from the specified target. >> +.TP >> +.B -open_dev <device> -handler <handler> -attributes <p=v,...> >> +Create a new SCST device using the specified device handler and >> attributes. >> +.TP >> +.B -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. >> +.TP >> +.B -close_dev <device> -handler <handler> >> +Remove the specified device from SCST. >> +.TP >> +.B -add_target <target> -driver <driver> >> +Add a target to a target driver. >> +.TP >> +.B -rem_target <target> -driver <driver> >> +Remove a target from a target driver. >> +.TP >> +.B -add_group <group> -driver <driver> -target <target> >> +Add an initiator group to the specified target. >> +.TP >> +.B -rem_group <group> -driver <driver> -target <target> >> +Remove an initiator group from the specified target. >> +.TP >> +.B -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. >> +.TP >> +.B -rem_init <user> -driver <driver> -target <target> -group <group> >> +Remove an initiator name or initiator name pattern from an initiator >> group. >> +.TP >> +.B -move_init <init> -driver <driver> -target <target> -group <group1> >> -to <group2> >> +Move an initiator or initiator name pattern from one initiator group to >> another. >> +.TP >> +.B -clear_inits -driver <driver> -target <target> -group <group> >> +Remove all initiators from an initiator group. >> +.TP >> +.B -add_lun <lun> -driver <driver> -target <target> [-group <group>] >> -device <device> -attributes <p=v,...> >> +Add a LUN to a target or initiator group. >> +.TP >> +.B -rem_lun <lun> -driver <driver> -target <target> [-group <group>] >> +Remove a LUN from a target or initiator group. >> +.TP >> +.B -replace_lun <lun> -driver <driver> -target <target> [-group <group>] >> -device <device> -attributes <p=v,...> >> +Replace the device associated with a LUN by another device. >> +.TP >> +.B -clear_luns -driver <driver> -target <target> [-group <group>] >> +Remove all LUNs from a target or initiator group. >> +.TP >> +.B -enable_target <target> -driver <driver> >> +Enable a target. >> +.TP >> +.B -disable_target <target> -driver <driver> >> +Disable a target. >> +.TP >> +.B -issue_lip [<target>] [-driver <driver>] >> +Issue a LIP (Loop Initialization Protocol, fibre channel) for a specific >> +target or for all drivers and targets. >> +.SH FILES >> +/etc/scst.conf >> +.SH "SEE ALSO" >> +scst.conf(5) >> diff --git a/scstadmin/scstadmin.sysfs/man5/scst.5 >> b/scstadmin/scstadmin.sysfs/man5/scst.5 >> new file mode 100644 >> index 0000000..7f0560f >> --- /dev/null >> +++ b/scstadmin/scstadmin.sysfs/man5/scst.5 >> @@ -0,0 +1,37 @@ >> +.\" -*- nroff -*- >> +.\" Copyright 2011 Bart Van Assche < <bva...@ac...><bva...@ac...> >> bva...@ac...>. 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 5 "July 2011" "scstadmin 2.0.0" >> +.SH NAME >> +scst \- /etc/init.d/scst configuration file. >> +.SH DESCRIPTION >> +/etc/default/scst is a configuration file read by the SCST startup script >> +/etc/init.d/scst and that controls the behavior of that startup script. >> This >> +file contains zero or more lists of kernel module parameters that are >> passed >> +by the /etc/init.d/scst script to the appropriate kernel module when such >> a >> +kernel module is loaded. >> +.P >> +The format of the >> +.I scst >> +file is as follows: >> +.br >> +- Blank lines and lines starting with a hash sign (#) are ignored. >> +.br >> +- All other lines must contain a variable definition using the syntax >> +<target_driver>_parameters=<value>. If <value> contains blanks, it must >> be >> +surrounded with double quotes. <target_driver> is the name of an SCST >> target >> +driver kernel module. >> +.P >> +An example: >> +.IP >> +# Set the ib_srpt kernel module parameter srp_max_req_size to >> +.br >> +# 4200 bytes and the srpt_sq_size parameter to 2048 elements. >> +.br >> +ib_srpt_parameters="srp_max_req_size=4200 srpt_sq_size=2048" >> +.SH FILES >> +.IP /etc/default/scst >> +Configuration file interpret and applied by /etc/init.d/scst. >> +.SH "SEE ALSO" >> +scstadmin(1), scst.conf(5) >> diff --git a/scstadmin/scstadmin.sysfs/man5/scst.conf.5 >> b/scstadmin/scstadmin.sysfs/man5/scst.conf.5 >> new file mode 100644 >> index 0000000..81edd73 >> --- /dev/null >> +++ b/scstadmin/scstadmin.sysfs/man5/scst.conf.5 >> @@ -0,0 +1,200 @@ >> +.\" -*- nroff -*- >> +.\" Copyright 2011 Bart Van Assche < <bva...@ac...><bva...@ac...> >> bva...@ac...>. 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 and LUNs. 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 (#) 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: >> +.IP "HANDLER <handler>" >> +<handler> is the name of an SCST device handler. >> +.IP "DEVICE <name>" >> +<name> is either a H:C:I:L quadruplet referring to a local SCSI device >> +or an SCST device name. >> +.IP "TARGET_DRIVER <driver>" >> +<driver> is the name of an SCST target driver. >> +.IP "TARGET <target>" >> +<target> is the name of an SCST target. >> +.IP "LUN <number>" >> +.IP "GROUP <group>" >> +<group> is the name of an SCST initiator group. >> +.IP "INITIATOR <ini>" >> +<ini> is either an initiator name or a wildcard pattern matching zero or >> more >> +initiator names. The supported wildcard characters are: >> +.BR ! ", " * " and " ? . >> +.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 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 >> +.br >> + session_name scst_local_host1 >> +.IP >> + LUN 0 disk1 >> +.br >> + } >> +.br >> +} >> +.IP >> +TARGET_DRIVER qla2x00t { >> +.br >> + TARGET 25:00:00:f0:98:87:92:f3 { >> +.br >> + 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 >> + } >> +.IP >> + enabled 1 >> +.br >> + } >> +.IP >> + TARGET 25:00:00:f0:98:87:92:f4 { >> +.br >> + } >> +.br >> +} >> +.IP >> +TARGET_DRIVER iscsi { >> +.br >> + IncomingUser "joe 12charsecret" >> +.IP >> + TARGET iqn.2006-10.net.vlnb:tgt { >> +.br >> + IncomingUser "joe 12charsecret" >> +.br >> + IncomingUser "fred 12charsecret2" >> +.br >> + IncomingUser "jonas 12charsecret3" >> +.br >> + HeaderDigest CRC32C,None >> +.IP >> + LUN 0 disk1 >> +.br >> + LUN 1 disk2 >> +.br >> + LUN 2 blockio1 { >> +.br >> + read_only 1 >> +.br >> + } >> +.IP >> + enabled 1 >> +.br >> + } >> +.IP >> + enabled 1 >> +.br >> +} >> +.SH FILES >> +.IP "/etc/scst.conf" >> +The configuration file read by >> +.BR scstadmin (1). >> +.SH "SEE ALSO" >> +scstadmin(1), scst(5) >> -- >> 1.7.3.4 >> >> >> >> ------------------------------------------------------------------------------ >> AppSumo Presents a FREE Video for the SourceForge Community by Eric >> Ries, the creator of the Lean Startup Methodology on "Lean Startup >> Secrets Revealed." This video shows you how to validate your ideas, >> optimize your ideas and identify your business strategy. >> <http://p.sf.net/sfu/appsumosfdev2dev><http://p.sf.net/sfu/appsumosfdev2dev> >> http://p.sf.net/sfu/appsumosfdev2dev >> _______________________________________________ >> Scst-devel mailing list >> <https://lists.sourceforge.net/lists/listinfo/scst-devel><https://lists.sourceforge.net/lists/listinfo/scst-devel> >> https://lists.sourceforge.net/lists/listinfo/scst-devel >> >> > Bart, thanks for the documentation. Very good idea. > > Can you add a BUGS section for bug reporting to this list as well an > AUTHORS section? > > Thanks, Mark. > t;Lean Startup > Secrets Revealed." This video shows you how to validate your ideas, > optimize your ideas and identify your business strategy. > <http://p.sf.net/sfu/appsumosfdev2dev><http://p.sf.net/sfu/appsumosfdev2dev> > http://p.sf.net/sfu/appsumosfdev2dev > _______________________________________________ > Scst-devel mailing list > <https://lists.sourceforge.net/lists/listinfo/scst-devel><https://lists.sourceforge.net/lists/listinfo/scst-devel> > https://lists.sourceforge.net/lists/listinfo/scst-devel > > > Bart, thanks for the documentation. Very good idea. > > Can you add a BUGS section for bug reporting to this list as well an > AUTHORS section? > > Thanks, Mark. > > > ------------------------------------------------------------------------------ > Magic Quadrant for Content-Aware Data Loss Prevention > Research study explores the data loss prevention market. Includes in-depth > analysis on the changes within the DLP market, and the criteria used to > evaluate the strengths and weaknesses of these DLP solutions. > <http://www.accelacomm.com/jaw/sfnl/114/51385063/> > http://www.accelacomm.com/jaw/sfnl/114/51385063/ > > _______________________________________________ > Scst-devel mailing list > <https://lists.sourceforge.net/lists/listinfo/scst-devel> > https://lists.sourceforge.net/lists/listinfo/scst-devel > > > ------------------------------------------------------------------------------ > Magic Quadrant for Content-Aware Data Loss Prevention > Research study explores the data loss prevention market. Includes in-depth > analysis on the changes within the DLP market, and the criteria used to > evaluate the strengths and weaknesses of these DLP solutions. > http://www.accelacomm.com/jaw/sfnl/114/51385063/ > _______________________________________________ > Scst-devel mailing list > https://lists.sourceforge.net/lists/listinfo/scst-devel > > > > ------------------------------------------------------------------------------ > Magic Quadrant for Content-Aware Data Loss Prevention > Research study explores the data loss prevention market. Includes in-depth > analysis on the changes within the DLP market, and the criteria used to > evaluate the strengths and weaknesses of these DLP solutions. > http://www.accelacomm.com/jaw/sfnl/114/51385063/ > _______________________________________________ > Scst-devel mailing list > https://lists.sourceforge.net/lists/listinfo/scst-devel > > |
From: Bart V. A. <bva...@ac...> - 2011-07-19 17:59:30
|
On Tue, Jul 19, 2011 at 6:47 PM, Mark Buechler <mar...@gm...>wrote: > Bart, thanks for the documentation. Very good idea. > > Can you add a BUGS section for bug reporting to this list as well an > AUTHORS section? > Hello Mark, Good that you are back. Some people might have been wondering during the past few months where you were since it's some time ago since you participated in discussions about scstadmin. Regarding the BUGS and AUTHORS sections: I'll make sure that such sections get added to the man pages. Regards, Bart. |
From: Mark B. <mar...@gm...> - 2011-07-19 18:15:39
|
Hi On Tue, Jul 19, 2011 at 1:59 PM, Bart Van Assche <bva...@ac...> wrote: > On Tue, Jul 19, 2011 at 6:47 PM, Mark Buechler <mar...@gm...>wrote: > >> Bart, thanks for the documentation. Very good idea. >> >> Can you add a BUGS section for bug reporting to this list as well an >> AUTHORS section? >> > > Hello Mark, > > Good that you are back. Some people might have been wondering during the > past few months where you were since it's some time ago since you > participated in discussions about scstadmin. > > Regarding the BUGS and AUTHORS sections: I'll make sure that such sections > get added to the man pages. > > Regards, > > Bart. > I have my email client configured to put scst emails in a different folder. I don't look at that folder often. If you address something directly to me, however, I'll see it. As for discussing scst, it's one of those things that just works (for me, anyway). It's a kin to the old story of the Novel box walled into an old closet everybody forgot about because it "just worked". - Mark. |
From: Matteo T. <ma...@RM...> - 2011-07-19 19:27:05
|
Hi there Mark, just reminding you that few weeks ago I and Bart discovered a strange bug where scstadmin end in: Driver '' not found. Can I bother you again with that issue? Can Bart comment on this? Kind regards, -- matteo ----- Messaggio originale ----- Da: "Mark Buechler" <mar...@gm...> A: "Bart Van Assche" <bva...@ac...> Cc: scs...@li..., "Vladislav Bolkhovitin" <vs...@vl...> Inviato: Martedì, 19 luglio 2011 20:15:32 Oggetto: Re: [Scst-devel] [PATCH] Add man pages for scstadmin, /etc/scst.conf and /etc/default.scst Hi On Tue, Jul 19, 2011 at 1:59 PM, Bart Van Assche < bva...@ac... > wrote: On Tue, Jul 19, 2011 at 6:47 PM, Mark Buechler < mar...@gm... > wrote: Bart, thanks for the documentation. Very good idea. Can you add a BUGS section for bug reporting to this list as well an AUTHORS section? Hello Mark, Good that you are back. Some people might have been wondering during the past few months where you were since it's some time ago since you participated in discussions about scstadmin. Regarding the BUGS and AUTHORS sections: I'll make sure that such sections get added to the man pages. Regards, Bart. I have my email client configured to put scst emails in a different folder. I don't look at that folder often. If you address something directly to me, however, I'll see it. As for discussing scst, it's one of those things that just works (for me, anyway). It's a kin to the old story of the Novel box walled into an old closet everybody forgot about because it "just worked". - Mark. ------------------------------------------------------------------------------ Magic Quadrant for Content-Aware Data Loss Prevention Research study explores the data loss prevention market. Includes in-depth analysis on the changes within the DLP market, and the criteria used to evaluate the strengths and weaknesses of these DLP solutions. http://www.accelacomm.com/jaw/sfnl/114/51385063/ _______________________________________________ Scst-devel mailing list https://lists.sourceforge.net/lists/listinfo/scst-devel |
From: Mark B. <mar...@gm...> - 2011-07-19 20:15:08
|
I'll take a look. - Mark. On Tue, Jul 19, 2011 at 3:10 PM, Matteo Tescione <ma...@rm...> wrote: > Hi there Mark, > > just reminding you that few weeks ago I and Bart discovered a strange bug > where scstadmin end in: Driver '' not found. Can I bother you again with > that issue? Can Bart comment on this? > Kind regards, > -- > matteo > > ----- Messaggio originale ----- > Da: "Mark Buechler" <mar...@gm...> > A: "Bart Van Assche" <bva...@ac...> > Cc: scs...@li..., "Vladislav Bolkhovitin" < > vs...@vl...> > Inviato: Martedì, 19 luglio 2011 20:15:32 > Oggetto: Re: [Scst-devel] [PATCH] Add man pages for scstadmin, > /etc/scst.conf and /etc/default.scst > > > Hi > > > On Tue, Jul 19, 2011 at 1:59 PM, Bart Van Assche < bva...@ac... > > wrote: > > > > On Tue, Jul 19, 2011 at 6:47 PM, Mark Buechler < mar...@gm... > > wrote: > > > > > Bart, thanks for the documentation. Very good idea. > > > Can you add a BUGS section for bug reporting to this list as well an > AUTHORS section? > Hello Mark, > > Good that you are back. Some people might have been wondering during the > past few months where you were since it's some time ago since you > participated in discussions about scstadmin. > > Regarding the BUGS and AUTHORS sections: I'll make sure that such sections > get added to the man pages. > > Regards, > > Bart. > > > I have my email client configured to put scst emails in a different folder. > I don't look at that folder often. If you address something directly to me, > however, I'll see it. > > > As for discussing scst, it's one of those things that just works (for me, > anyway). It's a kin to the old story of the Novel box walled into an old > closet everybody forgot about because it "just worked". > > > - Mark. > > ------------------------------------------------------------------------------ > Magic Quadrant for Content-Aware Data Loss Prevention > Research study explores the data loss prevention market. Includes in-depth > analysis on the changes within the DLP market, and the criteria used to > evaluate the strengths and weaknesses of these DLP solutions. > http://www.accelacomm.com/jaw/sfnl/114/51385063/ > _______________________________________________ > Scst-devel mailing list > https://lists.sourceforge.net/lists/listinfo/scst-devel > |
From: Vladislav B. <vs...@vl...> - 2011-07-21 01:45:43
|
Bart Van Assche, on 07/18/2011 12:24 PM wrote: > Several Linux distributions require having man pages available before a > software package can be considered for inclusion. Hence the patch below, > which adds man pages for the scstadmin command and the /etc/scst.conf > and /etc/default.scst configuration files. Also, the sysfs scstadmin example > is moved to the scst.conf man page and scstadmin/Makefile has been > modified such that the man pages are installed in the proper location. It looks very good. I think you can commit it after update for the Mark's comments. I'm only not sure that deleting of the example scst.conf is a good idea. Thanks, Vlad |
From: Ruben L. <r....@is...> - 2011-07-21 08:56:16
|
Good job on the effort. One minor comment though: On Monday 18 July 2011 at 18:24 (CET), Bart Van Assche wrote: > +MANDIR := $(DESTDIR)$(PREFIX)/usr/local/man/ Having /usr/local/ in there just doesn't look right me. Regards, Ruben Laban |
From: Bart V. A. <bva...@ac...> - 2011-07-21 09:15:43
|
On Thu, Jul 21, 2011 at 10:56 AM, Ruben Laban <r....@is...> wrote: > Good job on the effort. One minor comment though: > > On Monday 18 July 2011 at 18:24 (CET), Bart Van Assche wrote: > > +MANDIR := $(DESTDIR)$(PREFIX)/usr/local/man/ > > Having /usr/local/ in there just doesn't look right me. > That line was based on the following line in scstadmin/scstadmin.sysfs/Makefile: SBINDIR := $(PREFIX)/usr/local/sbin How about setting PREFIX to /usr, replacing $(PREFIX)/usr/local by $(PREFIX) and making the value PREFIX overridable via the make command line ? Bart. |
From: Ruben L. <r....@is...> - 2011-07-21 09:27:56
|
On Thursday 21 July 2011 at 11:15 (CET), Bart Van Assche wrote: > On Thu, Jul 21, 2011 at 10:56 AM, Ruben Laban <r....@is...> wrote: > > Good job on the effort. One minor comment though: > > > > On Monday 18 July 2011 at 18:24 (CET), Bart Van Assche wrote: > > > +MANDIR := $(DESTDIR)$(PREFIX)/usr/local/man/ > > > > Having /usr/local/ in there just doesn't look right me. > > That line was based on the following line in > scstadmin/scstadmin.sysfs/Makefile: > > SBINDIR := $(PREFIX)/usr/local/sbin > > How about setting PREFIX to /usr, replacing $(PREFIX)/usr/local by > $(PREFIX) and making the value PREFIX overridable via the make command > line ? A more sane default for $PREFIX tends to be /usr/local/ though, no need to go with just /usr/ there. But other than that, your suggestion looks good to me. Ideally all hardcoded paths (or parts thereof) should be kept to a minimal imo. Regards, Ruben Laban |
From: Bart V. A. <bva...@ac...> - 2011-07-21 11:28:52
|
On Thu, Jul 21, 2011 at 11:27 AM, Ruben Laban <r....@is...> wrote: > On Thursday 21 July 2011 at 11:15 (CET), Bart Van Assche wrote: > > How about setting PREFIX to /usr, replacing $(PREFIX)/usr/local by > > $(PREFIX) and making the value PREFIX overridable via the make command > > line ? > > A more sane default for $PREFIX tends to be /usr/local/ though, no need to > go > with just /usr/ there. But other than that, your suggestion looks good to > me. > Ideally all hardcoded paths (or parts thereof) should be kept to a minimal > imo. > The patch below should do that: diff --git a/scstadmin/Makefile b/scstadmin/Makefile index 7c5c428..1e62a22 100644 --- a/scstadmin/Makefile +++ b/scstadmin/Makefile @@ -1,10 +1,13 @@ +# Prefix for /sbin and /man destination paths. +PREFIX ?= /usr/local + SCSTADMIN_DIR = scstadmin -MANDIR := $(DESTDIR)$(PREFIX)/usr/local/man/ +MANDIR := $(DESTDIR)$(PREFIX)/man INITDIR := $(shell if [ -f /etc/slackware-version ]; then \ - echo $(PREFIX)/etc/rc.d; \ + echo /etc/rc.d; \ else \ - echo $(PREFIX)/etc/init.d; \ + echo /etc/init.d; \ fi) INSTALL_INITD_CMD := $(shell if [ -f /etc/gentoo-release ]; then \ echo rc-update add; \ @@ -21,7 +24,7 @@ REMOVE_INITD_CMD := $(shell if [ -f /etc/gentoo-release ]; then \ else \ echo /usr/lib/lsb/remove_initd; \ fi) -DEFAULTDIR := $(PREFIX)/etc/default +DEFAULTDIR := /etc/default all: cd $(SCSTADMIN_DIR) && $(MAKE) $@ @@ -38,7 +41,7 @@ install: cd $(SCSTADMIN_DIR) && $(MAKE) $@ for m in scstadmin/man*/*.[1-9]; do \ if [ -e $$m ]; then \ - d=$(MANDIR)$$(basename $$(dirname $$m)); \ + d=$(MANDIR)/$$(basename $$(dirname $$m)); \ if install -d $$d; then \ install -m 644 $$m $$d; \ fi \ @@ -74,7 +77,7 @@ uninstall: fi for m in scstadmin/man*/*.[1-9]; do \ if [ -e $$m ]; then \ - d=$(MANDIR)$$(basename $$(dirname $$m)); \ + d=$(MANDIR)/$$(basename $$(dirname $$m)); \ rm -f $$d/$$(basename $$m); \ fi \ done diff --git a/scstadmin/scstadmin.sysfs/Makefile b/scstadmin/scstadmin.sysfs/Makefile index b2c810c..b2db83d 100644 --- a/scstadmin/scstadmin.sysfs/Makefile +++ b/scstadmin/scstadmin.sysfs/Makefile @@ -1,7 +1,7 @@ MODULE_VERSION = 0.9.00 TOOL = scstadmin -SBINDIR := $(PREFIX)/usr/local/sbin +SBINDIR := $(PREFIX)/sbin all: perl-module |