Blob Blame History Raw
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
                   "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"
[
  <!-- entities files to use -->
  <!ENTITY % global_entities SYSTEM 'global.entities'>
  %global_entities;
]>

<refentry id='amdevcheck.8'>

  <refmeta>
    <refentrytitle>amdevcheck</refentrytitle>
    <manvolnum>8</manvolnum>
    &rmi.source;
    &rmi.version;
    &rmi.manual.8;
  </refmeta>
  <refnamediv>
    <refname>amdevcheck</refname>
    <refpurpose>Validate an Amanda device and volume.</refpurpose>
  </refnamediv>
  <refentryinfo>
    &author.ian;
  </refentryinfo>
  <!-- body begins here -->
  <refsynopsisdiv>
    <cmdsynopsis>
      <command>amdevcheck</command>
      <group choice='opt'>
        <arg choice='plain'>--label</arg>
      </group>
      <group choice='opt'>
        <arg choice='plain'>-properties <replaceable>list</replaceable></arg>
      </group>
      &configoverride.synopsis;
      <arg choice='plain'><replaceable>config</replaceable></arg>
      <group choice='opt'>
        <arg choice='plain'><replaceable>device-name</replaceable></arg>
      </group>
    </cmdsynopsis>
  </refsynopsisdiv>

  <refsect1><title>DESCRIPTION</title>
    <para>
      <emphasis remap='B'>Amdevcheck</emphasis> provides a way to check that a
      particular Amanda device is accessible, whether or not it contains a volume,
      and whether or not that volume is labeled. Some devices can't distinguish
      between all of these cases; a missing volume and an unlabeled volume might
      generate the same error code, for example. In those cases, this tool
      reports all possible causes of the error. Optionally this tools lists the
      properties for the device.
    </para>

    <para>See the
      <manref name="amanda" vol="8"/>
      man page for more details about Amanda.  See
      <manref name="amanda-devices" vol="7"/>
      for more information on devices.
  </para>
  </refsect1>

  <refsect1><title>OPTIONS</title>
    <variablelist remap='TP'>
      <varlistentry>
        <term><replaceable>config</replaceable></term>
        <listitem>
          <para>
            Amanda configuration to use. Note that <command>amdevcheck</command>
            ignores any tape changer configuration.
          </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term><replaceable>device</replaceable></term>
        <listitem>
          <para>
            Amanda device to use. This option overrides any tapedev configuration
            specified in the configuration file.
          </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term><replaceable>--label</replaceable></term>
        <listitem>
          <para>
	    Get the device's label.  If this option is given, the usual check
	    output is omitted, and the label of the loaded volume is printed to stdout.
	    Returns with error if the label is not found.
	  </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term><replaceable>--properties [list]</replaceable></term>
        <listitem>
          <para>
	    List device properties.  If this option is given, the usual check
	    output is omitted, and property values are printed to stdout, one
	    per line, as a property name, followed by '=', followed by the
	    property value.
            Returns with error if properties are not available.
          </para>
          <para>
	    If <replaceable>list</replaceable> is given, it is treated as a
	    comma-separated list of properties to display.  If it is omitted,
	    all supported properties are displayed.
          </para>
        </listitem>
      </varlistentry>

      &configoverride.varlistentry;

    </variablelist>
  </refsect1>

  <refsect1><title>OUTPUT</title>
    <para><emphasis remap='B'>amdevcheck</emphasis> exit with code 0 if the device is working of if it get an expected error, look at the MESSAGE line for the error. It exit with code 1 if it get an unexpected error.</para>
    <para><emphasis remap='B'>Amdevcheck</emphasis> returns one or more of the following lines. If multiple lines appear, then at least one, but not necessarily all of
the messages apply.  This situation can occur when working with hardware or
operating systems which cannot distinguish, for example, between a
malfunctioning drive and a functional but unloaded drive.</para>
<!-- .RS -->
      <variablelist remap='TP'>
        <varlistentry>
   	  <term><emphasis remap='B'>SUCCESS</emphasis></term>
	    <listitem><para>A tape is ready.</para></listitem>
	</varlistentry>
        <varlistentry>
	  <term><emphasis remap='B'>DEVICE_ERROR</emphasis></term>
	    <listitem><para>A device error has occurred.</para></listitem>
	</varlistentry>
        <varlistentry>
          <term><emphasis remap='B'>DEVICE_BUSY</emphasis></term>
	    <listitem><para>The device is busy.</para></listitem>
	</varlistentry>
        <varlistentry>
          <term><emphasis remap='B'>VOLUME_MISSING</emphasis></term>
	    <listitem><para>No tape is loaded in the drive.</para></listitem>
	</varlistentry>
        <varlistentry>
          <term><emphasis remap='B'>VOLUME_UNLABELED</emphasis></term>
	    <listitem><para>The tape in the drive is unlabeled.</para></listitem>
	</varlistentry>
        <varlistentry>
	  <term><emphasis remap='B'>VOLUME_ERROR</emphasis></term>
	    <listitem><para>A volume error has occurred.</para></listitem>
	</varlistentry>
        <varlistentry>
	  <term><emphasis remap='B'>MESSAGE</emphasis> <emphasis remap='I'>text</emphasis></term>
	    <listitem><para>Where text provides a human-readable description of the problem.</para></listitem>
	</varlistentry>
       </variablelist>
  </refsect1>

<seealso>
<manref name="amanda-devices" vol="7"/>
</seealso>

</refentry>