Amanda-Users

Re: SCSI Autoloader setup

2003-02-05 00:07:15
Subject: Re: SCSI Autoloader setup
From: John Cunningham <johnw_cunningham AT yahoo DOT com>
To: gene_heskett AT iolinc DOT net
Date: Tue, 4 Feb 2003 20:32:12 -0800 (PST)
Gene (and anybody else who may be up),

I got this set up, but when running the label utility
I get the following:

sbin]$ ./amlabel Daily Daily-01 slot 0
amlabel: could not load slot "0": open: /dev/sg1: Bad
file descriptor

I'm going to keep playing, but in the meantime any
insight would be greatly appreciated...

-John

--- Gene Heskett <gene_heskett AT iolinc DOT net> wrote:
> On Tuesday 04 February 2003 10:33, John Cunningham
> wrote:
> 
> See the attached amanda.conf, and chg-scsi.conf
> files John.  You 
> have to adjust the devices maybe, and the total
> number of slots, 
> but it should otherwise work.  Let me know how you
> get along.
> 
> >Hello alll - I'm doing a first time setup (and I'm
> new at tape
> > drives in general) and ran in to some glitches -
> any help would
> > be greatly appreciated.
> >
> >I'm running a SCSI IBM DDS-4 120 / 240 6 tape
> changer on a RedHat
> > Linux 7.3 system.
> >
> >Here's the chain of events.  I set up the
> configuration script
> > using a standard chg-multi and got to the point
> where I was
> > labeling tapes (I'm moving through instructions in
> O'Reily's
> > "Unix Backup and Recovery") and realized that
> while I could read
> > and label the tapes, I had issues with
> auto-changing.  When slot
> > 1 was loaded and I attempted to run the labeling
> command for slot
> > 2, slot one would eject then the loader would just
> quit,
> > eventually resulting in an error with the amlabel
> program.
> >
> >So I though perhaps the problem lies in that I'm
> not using a
> > chg-scsi setup.  I grabbed the example
> chg-scsi-linux file and
> > edited it then pointed the configuration file to
> it.  Here's a
> > chunk from my amanda.conf file:
> >
> >runtapes 1              # number of tapes to be
> used in a single
> > run of amdump tpchanger
> "/dumps/amanda/chg-scsi.conf" # the
> > tape-changer glue script tapedev "/dev/sg1"      #
> the no-rewind
> > tape device to be used rawtapedev "/dev/nst0"  #
> the raw device
> > to be used (ftape only) #changerfile
> "/dumps/amanda/changer"
> >#changerfile "/dumps/amanda/changer-status"
> >#changerfile "/dumps/amanda/changer.conf"
> >changerfile "/dumps/amanda/changer.conf"
> >changerdev "/dev/sg2"
> >
> >Here's the setup from my chg-scsi file - the idea
> is clost 1-5 for
> > tapes and 6 for a cleaner:
> >
> >   UW PICO(tm) 4.2                                
> File:
> > /dumps/amanda/chg-scsi.conf
> >
> >#chg-scsi-linux.conf
> >
> >number_configs  1
> >eject           1       # Tapedrives need an eject
> command
> >sleep           90      # Seconds to wait until the
> tape gets
> > ready cleanmax        100     # How many times
> could a cleaning
> > tape get used changerdev      /dev/sg2
> >#
> ># Next comes the data for drive 0
> >#
> >config          0
> >drivenum        0
> >dev             /dev/nst0
> >scsitapedev     /dev/sg1
> >startuse        0       # The slots associated with
> the drive 0
> >enduse          5       #
> >statfile       
> /usr/local/etc/amanda/Daily/tape0-slot  # The file
> > where the actual slot is stored cleancart       6 
>      # the
> > slot where the cleaningcartridge for drive 0 is
> located cleanfile
> >       /usr/local/etc/amanda/Daily/tape0-clean #
> The file where
> > the cleanings are recorded usagecount     
> > /usr/local/etc/amanda/Daily/totaltime
> >tapestatus     
> /usr/local/etc/amanda/Daily/tapestatus # here will
> > some status infos be stored #labelfile     
> > /usr/local/etc/amanda/Daily/labelfile # Use this
> if you have an
> > barcode reader
> >
> >and lastly my changer.conf file....
> >
> >
> ># lines from chg-multi.com
> >
> >
> ># For changers that need an 'mt offline' to load
> the next tape
> >multieject 0
> >
> ># Is this a gravity stacker that can't go backwards
> or cycle ?  If
> ># yes, set gravity to 1.
> >gravity 0
> >
> ># Does this tape-changer need an explicit eject
> command before
> > loading # a new tape?  If you are using multiple
> drives as a tape
> > changer, you # don't want to do this, but if you
> are using an
> > auto-changer that # allows access to the slots
> through Unix tape
> > devices, it might block # the mount of a new slot
> until the old
> > is explicitly ejected.  In # that case, set
> needeject to 1.
> >needeject 0
> >
> ># On some machines there is a delay between when
> the eject command
> ># finishes and the next tape is ready to be
> accessed.  Set
> > ejectdelay # to the number of seconds to wait
> after an eject
> > command. This will # almost certainly be needed if
> multieject is
> > set, probably not if # needeject is used.
> >ejectdelay 0
> >
> ># Names a status file where the current ``changer''
> state is
> > stored. statefile
> /usr/adm/amanda/csd/changer-status
> >
> ># What are the slot numbers used in the tape rack?
> >firstslot 1
> >lastslot 6
> >
> ># Enumerate the device files that go with the
> particular tape
> > changer # slots. Don't forget to specify the
> no-rewind version of
> > the device. slot 1 /dev/sg2
> >slot 2 /dev/sg2
> >slot 3 /dev/sg2
> >slot 4 /dev/sg2
> >slot 5 /dev/sg2
> >slot 6 /dev/sg2
> >
> >When I run the labeler I get this error:
> >
> >amlabel: could not load slot "1": could not read
> result from
> > "/dumps/amanda/chg-scsi.conf"
> >
> >I'm sure the list of things I am doing wrong is
> long and humerous
> > - but any help would be greatly appreciated....
> >
> >-John
> >
> >
> >
> >---------------------------------
> >Do you Yahoo!?
> >Yahoo! Mail Plus - Powerful. Affordable. Sign up
> now
> 
> -- 
> Cheers, Gene
> AMD K6-III@500mhz 320M
> Athlon1600XP@1400mhz  512M
> 99.22% setiathome rank, not too shabby for a WV
hillbilly> #
> # amanda.conf - sample Amanda configuration file. 
> This started off life as
> #               the actual config file in use at
> CS.UMD.EDU.
> #
> # If your configuration is called, say, "csd", then
> this file normally goes
> # in /usr/local/etc/amanda/csd/amanda.conf.
> #
> 
> org "DailySet1"               # your organization name for
> reports
> mailto "root"         # space separated list of operators
> at your site
> dumpuser "amanda"     # the user to run dumps under
> 
> inparallel 4          # maximum dumpers that will run in
> parallel (max 63)
>                       # this maximum can be increased at compile-time,
>                       # modifying MAX_DUMPERS in server-src/driverio.h
> 
> netusage  800 Kbps    # maximum net bandwidth for
> Amanda, in KB per sec
> 
> dumpcycle 6 days      # the number of days in the normal
> dump cycle
> runspercycle 6          # the number of amdump runs
> in dumpcycle days
>                       # (4 weeks * 5 amdump runs per week -- just
> weekdays)
> tapecycle 28 tapes    # the number of tapes in rotation
>                       # 4 weeks (dumpcycle) times 5 tapes per week
> (just
>                       # the weekdays) plus a few to handle errors that
>                       # need amflush and so we do not overwrite the
> full
>                       # backups performed at the beginning of the
> previous
>                       # cycle
> autoflush yes
> 
> dumporder
> "SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS" #
> specify the priority order of each dumper
>                         #   s -> smallest size
>                         #   S -> biggest size
>                         #   t -> smallest time
>                         #   T -> biggest time
>                         #   b -> smallest bandwitdh
>                         #   B -> biggest bandwitdh
>                         # try "BTBTBTBTBTBT" if you
> are not holding
>                         # disk constrained
>                       # BUT, if you want streaming, start with the big
> ones and work down
> 
> ### ### ###
> # WARNING: don't use `inf' for tapecycle, it's
> broken!
> ### ### ###
> 
> bumpsize 20 Mb                # minimum savings (threshold) to
> bump level 1 -> 2
> bumpdays 1            # minimum days at each level
> bumpmult 2            # threshold = bumpsize *
> bumpmult^(level-1)
> 
> etimeout 600          # number of seconds per filesystem for
> estimates.
> #etimeout -600                # total number of seconds for
> estimates.
> # a positive number will be multiplied by the number
> of filesystems on
> # each host; a negative number will be taken as an
> absolute total time-out.
> # The default is 5 minutes per filesystem.
> 
> dtimeout 1800         # number of idle seconds before a
> dump is aborted.
> 
> ctimeout 5            # maximum number of seconds that amcheck
> waits
>                       # for each client host
>  
> tapebufs 80
> # A positive integer telling taper how many 32k
> buffers to allocate.
> # WARNING! If this is set too high, taper will not
> be able to allocate
> # the memory and will die.  The default is 20
> (640k).
> # I wonder what the limit might be, its been running
> at 60 for months
> # so try 80.
> 
> # Specify tape device and/or tape changer.  If you
> don't have a tape
> # changer, and you don't want to use more than one
> tape per run of
> # amdump, just comment out the definition of
> tpchanger.
> 
> # Some tape changers require tapedev to be defined;
> others will use
> # their own tape device selection mechanism.  Some
> use a separate tape
> # changer device (changerdev), others will simply
> ignore this
> # parameter.  Some rely on a configuration file
> (changerfile) to
> # obtain more information about tape devices, number
> of slots, etc;
> # others just need to store some data in files,
> whose names will start
> # with changerfile.  For more information about
> individual tape
> # changers, read docs/TAPE.CHANGERS.
> 
> # At most one changerfile entry must be defined;
> select the most
> # appropriate one for your configuration.  If you
> select man-changer,
> # keep the first one; if you decide not to use a
> tape changer, you may
> # comment them all out.
> 
> runtapes 1            # number of tapes to be used in a single
> run of amdump
> tpchanger     "chg-scsi"      # the tape-changer glue script
> tapedev               "0"     # the no-rewind tape device to be used
> changerfile
> "/usr/local/etc/amanda/DailySet1/chg-scsi.conf"
> 
> tapetype DDS2 # what kind of tape it is (see
> tapetypes below)
> labelstr "^DailySet1-[0-9][0-9]*$"    # label
> constraint regex: all tapes must match
> 
> amrecover_do_fsf yes            # amrecover will
> call amrestore with the
>                                 # -f flag for faster
> positioning of the tape.
> amrecover_check_label yes       # amrecover will
> call amrestore with the
>                                 # -l flag to check
> the label.
> amrecover_changer "/dev/nst0"   # amrecover will use
> the changer if you restore
>                                 # from this device.
> 
> # Specify holding disks.  These are used as a
> temporary staging area for
> # dumps before they are written to tape and are
> recommended for most sites.
> # The advantages include: tape drive is more likely
> to operate in streaming
> # mode (which reduces tape and drive wear, reduces
> total dump time); multiple
> # dumps can be done in parallel (which can
> dramatically reduce total dump time.
> # The main disadvantage is that dumps on the holding
> disk need to be flushed
> # (with amflush) to tape after an operating system
> crash or a tape failure.
> # If no holding disks are specified then all dumps
> will be written directly
> # to tape.  If a dump is too big to fit on the
> holding disk than it will be
> # written directly to tape.  If more than one
> holding disk is specified then
> # they will all be used based on activity and
> available space.
> 
> holdingdisk hd1 {
>     comment "main holding disk"
>     directory "/dumps"        # where the holding disk is
>     use -5000 Mb              # how much space can we use on it
>                       # a non-positive value means:
>                       #        use all space but 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
>                       #             The maximum value should be
>                       #             (MAX_FILE_SIZE - 1Mb)
>                       #  0          same as INT_MAX bytes
>     }
> #holdingdisk hd2 {
> #    directory "/dumps2/amanda"
> #    use 1000 Mb
> #    }
> #holdingdisk hd3 {
> #    directory "/mnt/disk4"
> #    use 1000 Mb
> #    }
> 
> 
> # If amanda cannot find a tape on which to store
> backups, it will run
> # as many backups as it can to the holding disks. 
> In 
=== message truncated ===> number_configs       1
> eject         0       # Tapedrives need an eject command
> sleep         13      # Seconds to wait until the tape gets
> ready
> cleanmax      100     # How many times could a cleaning tape
> get used
> changerdev    /dev/sg1
> #
> # Next comes the data for drive 0
> #
> config                0
> drivenum      0
> dev           /dev/nst0       # the device that is used for the
> tapedrive 0
> startuse      0       # The slots associated with the drive 0
> enduse                3       # 
> statfile      /usr/local/etc/amanda/tape-slot  # The
> file where the actual slot is stored
> #cleancart    3       # the slot where the cleaningcartridge
> for drive 0 is located
> #cleanfile    /usr/local/etc/amanda/tape-clean # The
> file where the cleanings are recorded
> usagecount    /usr/local/etc/amanda/totaltime
> 
> # This is the end
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

<Prev in Thread] Current Thread [Next in Thread>