SGMODE(8)SGMODE(8)NAMEsgmode - SCSI Mode Page utility
SYNOPSISsgmode [-aenrx -f modefile -m diskmodel]
DESCRIPTION
Sgmode is a program that uses the SCSI Generic interface to send spe‐
cific SCSI commands to read the device mode page configuration and also
write mode pages. The SCSI Generic interface requires that the kernel
.config file have CONFIG_CHR_DEV_SG set.
A log file, named sgmode.log is created in the /var/log directory which
logs the status of the functions and any errors. For information on
how to create new .mdf files for specific disk models, see the
/usr/share/scsirastools/UserGuide, section 3.1.
Below is the sequence of events for this utility:
* List each device on the system with firmware versions.
* User selects a device for mode page (automatic if using -m or
-a).
* Attempt to read the mode page file for the selected disk (see
option -f).
* Verify that the disk is present and ready.
* Write the mode pages via mode select (unless read-only is speci‐
fied).
* If the '-m' or '-a' option was used, repeat writing the pages
for each specified disk.
OPTIONS
Command line options are described below.
-? This option displays a summary of the commands accepted by
sgmode-a Causes the functions to be performed automatically on all con‐
nected SCSI devices.
-e Causes any file writes to be avoided, such as the log file.
Usually a log file is created and written to.
-f Specify this filename for the mode pages. Normally, this option
is not used and the filename is formed using the first 8 charac‐
ters of the model, with the ".mdf" extension. For example:
"st39173w.mdf". This utility will look for the mdf file first
in the current directory, then in the default directory
(/usr/share/scsirastools).
-i N Autorun for the device at Index N, as shown in the 'Num' column.
-m Automatically update all drives that match this model string.
-n Naming. By default, the device names are displayed as numeric
sequences (/dev/sg0). This option shows the device names as
alphabetic sequences (/dev/sga).
-o Allow it to overwrite the disk capacity, if different.
-r Read-only. Do not try to write any mode pages. By default, if
-a or -m is specified, the utility will attempt to open an .mdf
file for each drive, and write modepages if a matching file
exists.
-x Causes extra debug messages to be displayed.
SEE ALSOsgdefects(8)sgdiag(8)sgdskfl(8)WARNINGS
See http://sourceforge.net/projects/scsirastools/ for a bug list and
any later versions of this utility.
COPYRIGHT
Copyright (C) 2001-2002 Intel Corp.
sgmod is open source software. You can redistribute it and/or modify
it under the terms of the BSD License. See the COPYING file included
with this software package for more details regarding distribution.
sgmode is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY.
AUTHOR
Andy Cress <arcress@users.sourceforge.net>
Version 1.3: 08 May 2002 SGMODE(8)