SGDISKMON(8)SGDISKMON(8)NAME
sgdiskmon - SCSI Generic RAID Monitor
SYNOPSIS
sgdiskmon [-bermnx -t time]
DESCRIPTION
Sgdiskmon is a program that uses the SCSI Generic interface to monitor
SCSI devices which may be part of a software RAID, so that hot-removal
and hot-insertion events can be detected and acted upon. It also
queries the hot-swap backplane, if present, with SAF-TE commands to
detect hot-insertions. If an insertion or removal event occurs, this
utility invokes a script (/sbin/mdevt). For Insert, mdevt partitions
the new disk and remirrors the Linux partitions. The mdevt script can
be customized as desired. The SCSI Generic interface requires that the
kernel .config file have CONFIG_CHR_DEV_SG set.
A log file, named /var/log/sgdiskmon.log, is created which logs the
status of the sgdiskmon functions and any errors. A separate log file,
named /var/log/sgevents, logs messages and errors from the sgevt action
script.
OPTIONS
Command line options are described below.
-? This option displays a summary of the commands accepted by
sgdiskmon
-b Causes this utility to run in background as a daemon.
-e Causes any file writes to be avoided, such as the log file.
-m Max serial number length of 12 instead of 8 (default). This may
be needed if you have Fujistu drives.
-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).
-r Run once. By default, this utility runs in a continuous loop.
This option causes it to only run one pass.
-t Time interval. The default polling interval is 5 seconds. This
option can set the interval to a different number of seconds.
-x Causes extra debug messages to be displayed.
ERRORS
Please supply the contents of the /var/log/sgdiskmon.log and
/var/log/sgevents files with any problem report. Note that sgdiskmon
has an option for additional debug output (-x). See http://scsiras‐
tools.sourceforge.net for a bug list, ChangeLog, and any later versions
of sgdiskmon. There are some unique error codes defined in sgdiskmon
as follows:
-1 is an error from a generic system function, check errno value.
-2 means that the SCSI request returned a check condition (sense
error)
-3 means that the SCSI request failed while writing the command.
-4 means that the SCSI request failed while reading the response.
-5 means that the device did not respond to basic SCSI ioctl func‐
tions.
-6 means that the SCSI Inquiry returned an invalid size, so that
device may be an impostor (failed).
SEE ALSOsgdiag(8)sgdskfl(8)sgmode(8)sgraidmon(8)WARNINGS
See http://sourceforge.net/projects/scsirastools/ for a bug list and
any later versions of this utility.
COPYRIGHT
Copyright (C) 2006 Intel Corp.
sgdiskmon is open source software. You can redistribute it and/or mod‐
ify it under the terms of the BSD License. See the COPYING file
included with this software package for more details regarding distri‐
bution.
sgdiskmon is distributed in the hope that it will be useful, but WITH‐
OUT ANY WARRANTY.
AUTHOR
Andy Cress <arcress@users.sourceforge.net>
Version 1.3: 23 Oct 2003 SGDISKMON(8)