Results 1 to 7 of 7

Thread: Perl error & "chg-robot" configuration

  1. #1
    Join Date
    Nov 2010
    Posts
    5

    Default Perl error & "chg-robot" configuration

    We've just upgraded to Amanda 3.2.0-1 and have been attempting to configure it to work with a Dell TL4000 tape changer (48 LT04 tapes, 4 tape drives) using the "chg-robot" changer and attempting to make use of the parallel taper writing capabilities of v3.2. Currently, I'm just attempting to perform a simple daily backup of a local disk.

    I'm having some trouble (undoubtedly configuration induced) with amcheck and amlabel. I've not yet gotten to the point of trying amdump.

    Whenever we attempt to run amcheck, the following message, with embedded Perl error, is returned:

    > amcheck daily
    Amanda Tape Server Host Check
    -----------------------------
    Holding disk /butemp: 2609 GB disk space available, using 2609 GB
    amcheck-device: Can't use string ("") as a subroutine ref while "strict refs" in use at /usr/lib/perl5/site_perl/5.8.8/Amanda/Changer.pm line 1007.

    NOTE: conf info dir /etc/amanda/daily/curinfo does not exist
    NOTE: it will be created on the next run.
    NOTE: index dir /etc/amanda/daily/index does not exist
    NOTE: it will be created on the next run.
    Server check took 35.951 seconds

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

    (brought to you by Amanda 3.2.0)


    Similarly, when running amlabel, we get:

    > amlabel -f daily Daily-001 slot 1
    Reading label...
    amlabel: Can't use string ("") as a subroutine ref while "strict refs" in use at /usr/lib/perl5/site_prel/5.8.8/Amanda/Changer.pm line 1007

    Any help or hints as how to correctly configure Amanda would be greatly appreciated. Thanks!!


    Our setup is as follows:
    - Amanda v3.2.0-1
    - RHEL 5.5, 64-bit
    - Dell TL4000 tape changer (48 slots/LT04 tapes, 4 tape drives)
    - amanda.conf (comments removed):
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    org "daily"
    dumpuser "amandabackup"
    mailto "[email protected]"
    dumpcycle 1week
    runspercycle 5
    tapecycle 48
    runtapes 4
    tapedev "Dell-TL4000"
    changerfile "/etc/amanda/chg-robot-sg13"
    tapetype "DELL-LT04-800"
    labelstr "^Daily-[0-9][0-9][0-9]*$"
    dumporder "BTBTBTBTBT"
    taperalgo first
    taper-parallel-write 4
    displayunit "g"
    bumpsize 20 Mb
    bumppercent 20
    bumpmult 4
    maxdumpsize -1
    amrecover_changer "changer"
    logdir "/etc/amanda/daily"
    indexdir "/etc/amanda/daily/index"
    holdingdisk butemp {
    directory "/butemp"
    use -100 Mb
    chunksize 1Gb
    }
    define interface local {
    use 8000 kbps
    }
    define dumptype global {
    auth "bsdtcp"
    }
    define dumptype "normaldump" {
    "global"
    program "GNUTAR"
    compress server fast
    priority high
    index yes
    allow-split true
    }
    define tapetype "DELL-LT04-800" {
    length 819282976 kbytes
    filemark 0 kbytes
    speed 50367 kps
    blocksize 32 kbytes
    }
    define changer "Dell-TL4000" {
    tpchanger "chg-robot:/dev/sg13"
    device-property "LEOM" "TRUE"
    property "tape-device" "0=tape:/dev/nst3"
    property append "tape-device" "1=tape:/dev/nst2"
    property append "tape-device" "2=tape:/dev/nst1"
    property append "tape-device" "3=tape:/dev/nst0"
    property "use-slots" "1-48"
    }
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    - disklist (comments removed):
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    fred.example.com /mnt/share/a-g /mnt/share {
    "normaldump"
    include optional "./[a-n]*" "./[A-N]*"
    } 2
    fred.example.com /mnt/share/rem /mnt/share {
    "normaldump"
    exclude optional "./[a-n]*" "./[A-N]*"
    } 2
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  2. #2
    Join Date
    Nov 2005
    Location
    Canada
    Posts
    1,049

    Default

    post de debug files.

  3. #3
    Join Date
    Nov 2005
    Location
    Canada
    Posts
    1,049

    Default

    Do the amanda user can read all the device /dev/nst0, /dev/nst1, /dev/nst2 and /dev/nst3?

    Try the attached patch.
    Attached Files Attached Files

  4. #4
    Join Date
    Nov 2010
    Posts
    5

    Default

    Thanks for the reply.

    1. The original debug files only contained some nominal status information, then repeated the Perl error message.

    2. I believe that the Amanda user can read all of the tape devices. The devices /dev/nst0 - nst3 are all owned by root:disk (user "amandabackup" is a member of group "disk"), and all of the devices have file permissions of 660. In addition, when logged in as the amandabackup user, I have no trouble issuing 'mtx' and 'mt' commands.

    3. Thank you for the patch. I've applied it and rerun amcheck with the following results:

    > amcheck daily
    Amanda Tape Server Host Check
    -----------------------------
    Holding disk /butemp: 2609 GB disk space available, using 2609 GB
    slot ?: Error setting 'leom' on device 'tape:/dev/nst3'
    ERROR: Error setting 'leom' on device 'tape:/dev/nst3'
    NOTE: conf info dir /etc/amanda/daily/curinfo does not exist
    NOTE: it will be created on the next run.
    NOTE: index dir /etc/amanda/daily/index does not exist
    NOTE: it will be created on the next run.
    Server check took 0.896 seconds

    Amanda Backhp Client Hosts Check
    --------------------------------
    Client check: 1 host checked in 7.076 seconds. 0 problems found.

    (brought to you by Amanda 3.2.0)
    The debug file /var/log/amanda/server/daily/amcheck-device.20101109<...>.debug then contained:
    Tue Nov 9 15:36:16 2010: amcheck-device: pid 11872 ruid 637 euid 637 version 3.2.0: start at Tue Nov 9 15:36:16 2010
    Tue Nov 9 15:36:16 2010: amcheck-device: pid 11872 ruid 637 euid 637 version 3.2.0: rename at Tue Nov 9 15:36:16 2010
    Tue Nov 9 15:36:16 2010: amcheck-device: chg-robot: using statfile '/var/amanda/chg-robot-dev-sg13'
    Tue Nov 9 15:36:16 2010: amcheck-device: Amanda::Taper::Scan::traditional stage 1: search for oldest reusable volume
    Tue Nov 9 15:36:16 2010: amcheck-device: Amanda::Taper::Scan::traditional no oldest reusable volume
    Tue Nov 9 15:36:16 2010: amcheck-device: Amanda::Taper::Scan::traditional stage 2: scan for any reusable volume
    Tue Nov 9 15:36:16 2010: amcheck-device: invoking /usr/sbin/mtx -f /dev/sg13 status
    Tue Nov 9 15:36:16 2010: amcheck-device: Dell-TL4000: updating state
    Tue Nov 9 15:36:16 2010: amcheck-device: Dell-TL4000: requested volume is already in drive 0
    Tue Nov 9 15:36:16 2010: amcheck-device: Dell-TL4000: polling 'tape:/dev/nst3' to see if it's ready
    Tue Nov 9 15:36:16 2010: amcheck-device: new Amanda::Changer::Error: type='fatal', message='Error setting 'leom' on device 'tape:/dev/nst3''
    Tue Nov 9 15:36:16 2010: amcheck-device: Amanda::Taper::Scan::traditional result: error=Error settting 'leom' on device 'tape:/dev/nst3'
    Tue Nov 9 15:36:16 2010: amcheck-device: pid 11872 finish time Tue Nov 9 15:36:16 2010
    BTW, "LEOM" is being set because the following note was appended to the results of amtapetype:
    ...
    # for this drive and kernel, LEOM is supported; add
    # device-property "LEOM" "TRUE"
    # for this device.
    Did I attempt to apply the LEOM property incorrectly?

  5. #5
    Join Date
    Nov 2005
    Location
    Canada
    Posts
    1,049

    Default

    Try this patch
    Attached Files Attached Files

  6. #6
    Join Date
    Nov 2010
    Posts
    5

    Default

    Since I originally installed Amanda from the pre-built Zmanda rpm, I've had to do the following in an attempt to install this patch:

    1. Uninstall (via yum) amanda-backup_server-3.2.0-1.rhel5.x86_64.rpm
    2. Installed (via rpm) amanda-3.2.0-1.rhel5.src.rpm
    3. Expanded (via tar) the tarball that rpm dropped in /usr/src/redhat/SOURCES
    4. Apply the patch to source file: /usr/src/redhat/SOURCES/amanda-3.2.0/device-src/tape-device.c
    5. Configure, make, and make install Amanda.
    6. Run (as user amandabackup): > amcheck daily

    This is where my current problems begin. If I take the default configuration, files are not placed where I and the RHEL5-default PATH expects them. I've also experienced some ownership and file permission (sticky bit) problems. And Perl is now complaining that it can't locate modules in the @INC list.

    In my most recent attempt, I used the following configuration options:
    > ./configure --with-user=amandabackup --with-group=disk --prefix=/usr --sysconfdir=/etc --localstatedir=/var/lib
    Can anyone please point me to a procedure or a set of configuration options that will install Amanda in a manner very similar to that which results from an install of the pre-built Zmanda RPMs? Alternatively, if I should be taking a different approach, I'd greatly appreciate some enlightenment.

    Thanks again!

  7. #7
    Join Date
    Nov 2010
    Posts
    5

    Default

    OK, both patches have finally been applied and all appears to be working with amcheck and amlabel as well as with amdump and amrecover! Thanks!!

    For the benefit of anyone else who stumbles upon this thread, I found the documentation at rpm.org to be invaluable for learning how to patch and rebuild a source RPM package with a minimum of fuss. Edward Bailey's book 'Maximum RPM', and the (curiously relevant) example provided in the 'Real-World Package Building' chapter, was especially helpful ([url]http://www.rpm.org/max-rpm[/url]).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •