I have a somewhat strage problem with chg-scsi under linux and I
would dearly like som help. The setup is as follows:

I have a Exabyte EXB-480 gismo with 4 Exabyte Mammoth EXB-8900
tapedrives in it. Now if I use Eric Lee Green's mtx (1.2.12) the whole
thing works just great. I can load and unload tapes and get a nice
status of the robot just fine. But in my test-setup of amanda (version
2.4.2) I get a rather strange error when I use chg-scsi. Amcheck tells
me this:

=================================================================
rane > ./sbin/amcheck Home
Amanda Tape Server Host Check
-----------------------------
Holding disk /usr/local/opt/amanda/hold: 7660808 KB disk space
available, that's plenty
amcheck-server: could not get changer info: requested drive number (0)
greater than number of supported drives (-1)

Amanda Backup Client Hosts Check
--------------------------------
Client check: 1 host checked in 0.177 seconds, 0 problems found

(brought to you by Amanda 2.4.2)
rane > 
=================================================================


In /tmp/amanda/chg-scsi.debug my exb-480 (/dev/sgf) is recognised just
fine and the one tapedrive I tried to configure (/dev/nst0) is also
recognised just fine. But right at the bottom of
/tmp/amanda/chg-scsi.debug I found the following:

=================================================================
##### START SenseHandler
Ident = [EXB-480], function = [generic]
##### START GenericSenseHandler
##### START DecodeSense
GenericSenseHandler : Sense Keys
        ErrorCode                     02
        Valid                         0
        ASC                           46
        ASCQ                          00
        Sense key                     00
                No Sense
GenericSenseHandler : Unknow 0 ASC = 46 ASCQ = 0
#### STOP SenseHandler
chg-scsi: requested drive number (0) greater than number of supported
drives (-1)
=================================================================

I don't know if this is the cause, but it sure looks like it to me.

1) Does anybody know what this means?  

2) Does anybody know how I can get amanda running with my robot. 




My amanda.conf looks like this:
=================================================================

org "DIKU"
mailto "hall"
dumpuser "alexbkup"

inparallel 4
netusage  600 Kbps

dumpcycle 1 weeks
runspercycle 5 
tapecycle 10 tapes

bumpsize 20 Mb
bumpdays 1
bumpmult 4

etimeout 300
dtimeout 1800

tapebufs 20

runtapes 1
tpchanger "chg-scsi"
tapedev "0"
changerfile "/usr/local/opt/amanda/etc/amanda/Home/chg-scsi.conf"
changerdev "/dev/sgf"

tapetype EXB-8900
labelstr "^Home[0-9][0-9]*$"

holdingdisk hd1 {
    comment "main holding disk"
    directory "/usr/local/opt/amanda/hold"      # where the holding disk is
    use 2 Gb            # how much space can we use on it
                        # a negative value mean:
                        #        use all space except that value
    chunksize 1Gb       # size of chunk if you want big dump to be
                        # dumped on multiple files on holding disks
                        #  N Kb/Mb/Gb split images in chunks of size N
                        #  0          same as INT_MAX bytes
                        # -1          same as -INT_MAX bytes
                        # -N Kb/Mb/Gb dont split, dump images larger than
                        #             N directly to tape (example: -2 Gb)
}

infofile "/usr/local/opt/amanda/etc/amanda/Home/curinfo"        # database DIRECTORY
logdir   "/usr/local/opt/amanda/etc/amanda/Home/logs"           # log directory
indexdir "/usr/local/opt/amanda/etc/amanda/Home/index"  # index directory
#tapelist "/usr/adm/amanda/DailySet1/tapelist"  # list of used tapes
# tapelist is stored, by default, in the directory that contains amanda.conf


define tapetype EXB-8900 {
    comment "Exabyte 8900 Mammoth"
    length 18920 mbytes
    filemark 694 kbytes
    speed 2974 kbytes
}


# dumptypes
#
# These are referred to by the disklist file.  The dumptype specifies
# certain parameters for dumping including:
#   auth        - authentication scheme to use between server and client.
#                 Valid values are "bsd" and "krb4".  Default: [auth bsd]
#   comment     - just a comment string
#   comprate    - set default compression rate.  Should be followed by one or
#                 two numbers, optionally separated by a comma.  The 1st is
#                 the full compression rate; the 2nd is the incremental rate.
#                 If the second is omitted, it is assumed equal to the first.
#                 The numbers represent the amount of the original file the
#                 compressed file is expected to take up.
#                 Default: [comprate 0.50, 0.50]
#   compress    - specify compression of the backed up data.  Valid values are:
#                 "none"        - don't compress the dump output.
#                 "client best" - compress on the client using the best (and
#                                 probably slowest) algorithm.
#                 "client fast" - compress on the client using fast algorithm.
#                 "server best" - compress on the tape host using the best (and
#                                 probably slowest) algorithm.
#                 "server fast" - compress on the tape host using a fast
#                                 algorithm.  This may be useful when a fast
#                                 tape host is backing up slow clients.
#                 Default: [compress client fast]
#   dumpcycle   - set the number of days in the dump cycle, ie, set how often a
#                 full dump should be performed.  Default: from DUMPCYCLE above
#   exclude     - specify files and directories to be excluded from the dump.
#                 Useful with gnutar only; silently ignored by dump and samba.
#                 Valid values are:
#                 "pattern"       - a shell glob pattern defining which files
#                                   to exclude.
#                                   gnutar gets --exclude="pattern"
#                 list "filename" - a file (on the client!) containing patterns
#                                   re's (1 per line) defining which files to
#                                   exclude.
#                                   gnutar gets --exclude-from="filename"
#                 Note that the `full pathname' of a file within its
#                 filesystem starts with `./', because of the way amanda runs
#                 gnutar: `tar -C $mountpoint -cf - --lots-of-options .' (note
#                 the final dot!)  Thus, if you're backing up `/usr' with a
#                 diskfile entry like ``host /usr gnutar-root', but you don't
#                 want to backup /usr/tmp, your exclude list should contain
#                 the pattern `./tmp', as this is relative to the `/usr' above.
#                 Please refer to the man-page of gnutar for more information.
#                 If a relative pathname is specified as the exclude list,
#                 it is searched from within the directory that is
#                 going to be backed up.
#                 Default: include all files
#   holdingdisk - should the holding disk be used for this dump.  Useful for
#                 dumping the holding disk itself.  Default: [holdingdisk yes]
#   ignore      - do not back this filesystem up.  Useful for sharing a single
#                 disklist in several configurations.
#   index       - keep an index of the files backed up.  Default: [index no]
#   kencrypt    - encrypt the data stream between the client and server.
#                 Default: [kencrypt no]
#   maxdumps    - max number of concurrent dumps to run on the client.
#                 Default: [maxdumps 1]
#   priority    - priority level of the dump.  Valid levels are "low", "medium"
#                 or "high".  These are really only used when Amanda has no
#                 tape to write to because of some error.  In that "degraded
#                 mode", as many incrementals as will fit on the holding disk
#                 are done, higher priority first, to insure the important
#                 disks are at least dumped.  Default: [priority medium]
#   program     - specify the dump system to use.  Valid values are "DUMP" and
#                 "GNUTAR".  Default: [program "DUMP"].
#   record      - record the dump in /etc/dumpdates.  Default: [record yes]
#   skip-full   - skip the disk when a level 0 is due, to allow full backups
#                 outside Amanda, eg when the machine is in single-user mode.
#   skip-incr   - skip the disk when the level 0 is NOT due.  This is used in
#                 archive configurations, where only full dumps are done and
#                 the tapes saved.
#   starttime   - delay the start of the dump?  Default: no delay
#   strategy    - set the dump strategy.  Valid strategies are currently:
#                 "standard" - the standard one.
#                 "nofull"   - do level 1 dumps every time.  This can be used,
#                              for example, for small root filesystems that
#                              only change slightly relative to a site-wide
#                              prototype.  Amanda then backs up just the
#                              changes.
#                 "noinc"    - do level 0 dumps every time.
#                              Unfortunately, this is not currently
#                              implemented.  Use `dumpcycle 0'
#                              instead.
#                 "skip"     - skip all dumps.  Useful for sharing a single
#                              disklist in several configurations.
#                 "incronly" - do only incremental dumps. This is similar
#                              to strategy 'nofull', but will increase
#                              the dump level as usual. Full dumps will
#                              only be performed when an 'amadmin force' 
#                              has been issued 
#                 Default: [strategy standard]
#
# Note that you may specify previously defined dumptypes as a shorthand way
# of defining parameters.

define dumptype global {
    comment "Global definitions"
    # This is quite useful for setting global parameters, so you don't have
    # to type them everywhere.  All dumptype definitions in this sample file
    # do include these definitions, either directly or indirectly.
    # There's nothing special about the name `global'; if you create any
    # dumptype that does not contain the word `global' or the name of any
    # other dumptype that contains it, these definitions won't apply.
    # Note that these definitions may be overridden in other
    # dumptypes, if the redefinitions appear *after* the `global'
    # dumptype name.
    # You may want to use this for globally enabling or disabling
    # indexing, recording, etc.  Some examples:
    # index yes
    # record no
}

define dumptype always-full {
    global
    comment "Full dump of this filesystem always"
    compress none
    priority high
    dumpcycle 0
}

define dumptype root-tar {
    global
    program "GNUTAR"
    comment "root partitions dumped with tar"
    compress none
    index
    exclude list "/usr/local/lib/amanda/exclude.gtar"
    priority low
}

define dumptype user-tar {
    root-tar
    comment "user partitions dumped with tar"
    priority medium
}

define dumptype high-tar {
    root-tar
    comment "partitions dumped with tar"
    priority high
}

define dumptype comp-root-tar {
    root-tar
    comment "Root partitions with compression"
    compress client fast
}

define dumptype comp-user-tar {
    user-tar
    compress client fast
}

define dumptype holding-disk {
    global
    comment "The master-host holding disk itself"
    holdingdisk no # do not use the holding disk
    priority medium
}

define dumptype comp-user {
    global
    comment "Non-root partitions on reasonably fast machines"
    compress client fast
    priority medium
}

define dumptype nocomp-user {
    comp-user
    comment "Non-root partitions on slow machines"
    compress none
}

define dumptype comp-root {
    global
    comment "Root partitions with compression"
    compress client fast
    priority low
}

define dumptype nocomp-root {
    comp-root
    comment "Root partitions without compression"
    compress none
}

define dumptype comp-high {
    global
    comment "very important partitions on fast machines"
    compress client best
    priority high
}

define dumptype nocomp-high {
    comp-high
    comment "very important partitions on slow machines"
    compress none
}

define dumptype nocomp-test {
    global
    comment "test dump without compression, no /etc/dumpdates recording"
    compress none
    record no
    priority medium
}

define dumptype comp-test {
    nocomp-test
    comment "test dump with compression, no /etc/dumpdates recording"
    compress client fast
}

# network interfaces
#
# These are referred to by the disklist file.  They define the attributes
# of the network interface that the remote machine is accessed through.
# Notes: - netusage above defines the attributes that are used when the
#          disklist entry doesn't specify otherwise.
#        - the values below are only samples.
#        - specifying an interface does not force the traffic to pass
#          through that interface.  Your OS routing tables do that.  This
#          is just a mechanism to stop Amanda trashing your network.
# Attributes are:
#       use             - bandwidth above which amanda won't start
#                         backups using this interface.  Note that if
#                         a single backup will take more than that,
#                         amanda won't try to make it run slower!

define interface local {
    comment "a local disk"
    use 1000 kbps
}

define interface eth0 {
    comment "100 Mbps ethernet"
    use 4000 kbps
}

# You may include other amanda configuration files, so you can share
# dumptypes, tapetypes and interface definitions among several
# configurations.

#includefile "/usr/local/amanda.conf.main"

=================================================================

and my chg-scsi.conf looks like this:

=================================================================

number_configs  1
eject           0
sleep           90
cleanmax        100
changerdev      /dev/sgf

# Next comes the data for drive 0
#
config          0
drivenum        0
dev             /dev/nst0
scsitapedev     /dev/sgb
startuse        12 
enduse          21 
statfile        /usr/local/opt/amanda/etc/amanda/Home/tape0-slot  
cleancart       5
cleanfile       /usr/local/opt/amanda/etc/amanda/Home/tape0-clean
usagecount     /usr/local/opt/amanda/etc/amanda/Home/totaltime
tapestatus     /usr/local/opt/amanda/etc/amanda/Home/tapestatus 
labelfile      /usr/local/opt/amanda/etc/amanda/Home/labelfile 
=================================================================


-- 
        Christoffer

Reply via email to