Re: Amanda and multi-drive autoloaders?
On Sun, 19 Aug 2001, Patrick J. LoPresti wrote: We recently acquired a large Sun tape library, and I have been tasked with configuring Amanda to use it. This library holds around 100 DLT tapes and has a single robotic arm which serves four drives. The arm and each drive are distinct devices on the SCSI bus. The autoloader also has a bar code reader. I am thinking I will create four distinct Amanda configurations, one for each tape drive, which just happen to share a changerdev. I am hoping multiple concurrent attempts to use the changer will get queued, as opposed to just failing... I am also hoping to use the mtx from Sourceforge plus a recent version of Amanda (with chg-zd-mtx) to make use of the bar codes. Questions: Is anybody else using Amanda on similar hardware? If so, what does your configuration look like? Similar in the sense of number of tapes and drives. Make sure you have the tapedev set to each drive's no-rewind device in each of the 4 configs. Is the barcode-to-Amanda-label database robust against multiple concurrent readers? What about multiple concurrent writers? And is it this support documented somewhere yet :-) ? Since you'll have 4 amanda configs, you'll have 4 separate barcode databases. Since this all relies on the scsi bus and how it handles multiple requests, I'm not sure of the answer to the last questions. I run all 4 jobs at the same time, if that's what you mean. Thanks! - Pat -- Jason Hollinden MH5 Systems Admin Yes, I am an agent of Satan, but my duties are largely ceremonial.
Re: amtape show
Just to check, be sure you have the 'changerfile' set to something like /path-to/amanda-config/Changer, and have a file called /path-to/amanda-config/Changer.conf. Look inside the chg-zd-mtx script itself for what to put in it. It will be like this (this is mine): firstslot=17 1st tape slot lastslot=30 Last tape slot cleanslot=1 Slot with cleaner tape # Do you want to clean the drive after a certain number of accesses? # NOTE - This is unreliable, since 'accesses' aren't 'uses', and we #have no reliable way to count this. A single amcheck could #generate as many accesses as slots you have, plus 1. # ALSO NOTE - many modern tape loaders handle this automatically. AUTOCLEAN=0 Set to '1' or greater to enable autocleancount=99 Number of access before a clean. havereader=1 If you have a barcode reader, set to 1. offlinestatus=1 Set to 0 if 'mt status' gives an offline when drive is offline. Set to 1 or greater if 'mt status' doesn't give and offline, rather an ONLINE when drive is online. OFFLINE_BEFORE_UNLOAD=0 Does your tape driver require a 'mt offline' before mtx unload? On Tue, 24 Jul 2001, Pamela Miller wrote: Hi, chg-zd-mtx script that comes with Amanda works with mtx 1.2.10 or later, so I would think it would work with what you have (1.2.13). And it certainly gets more use/attention/maintenance than the older chg-mtx. When I set tpchanger in amanda.conf to chg-zd-mtx, I get errors. For example: $ ../sbin/amtape full slot next changer: got exit: 2 str: error /dev/rmt/0n (got signal 10) could not load slot error: /dev/rmt/0n (got signal 10) (But, the robot does in fact move the next tape into the tape drive.) Since chg-zd-mtx is better maintained, I'd pefer to use it. But I'm not sure what's wrong with it. Thanks, Pam -- Jason Hollinden MH5 Systems Admin
Re: RE Dell Powervault 120T DLT 7000 Autoloader
Well, since I was fingered below ;) here's what I intended to be a config, in case you don't have it working yet. I am working out of the directory /etc/amanda/SMGDR0, with an ADIC SC100. Comments below... /etc/amanda/SMGDR0/amanda.conf (important stuff): ==8 tpchanger chg-zd-mtx tapedev /dev/nst0 (Or whatever no-rewind device you use) changerfile /etc/amanda/SMGDR0/ADIC (I named it ADIC, but can be anything) changerdev /dev/sg2 (whatever scsi-generic device the changer is) ==8 The changerfile is just a word that is used to name files. Chg-zd-mtx will create files as such (using above ADIC example): ADIC-access ADIC-barcodes ADIC-clean ADIC-slot You will need to create an ADIC.conf (again, ADIC is an example). There is a template located _within_ chg-zd-mtx (I'm not sure if the general Amanda documentation has this added yet?), but it will look like this: /etc/amanda/SMGDR0/ADIC.conf ==8 firstslot=2 1st tape slot lastslot=15 Last tape slot cleanslot=1 Slot with cleaner tape # Do you want to clean the drive after a certain number of accesses? # NOTE - This is unreliable, since 'accesses' aren't 'uses', and we #have no reliable way to count this. A single amcheck could #generate as many accesses as slots you have, plus 1. # ALSO NOTE - many modern tape loaders handle this automatically. AUTOCLEAN=0 Set to '1' or greater to enable autocleancount=99 Number of access before a clean. havereader=1 If you have a barcode reader, set to 1. offlinestatus=1 Set to 0 if 'mt status' gives an offline when drive is offline. Set to 1 or greater if 'mt status' doesn't give and offline, rather an ONLINE when drive is online. OFFLINE_BEFORE_UNLOAD=0 Does your tape driver require a 'mt offline' before mtx unload? ==8 All the items are needed, cause I'm a sucky programmer. ;) The cleanslot can be anything, and it doesn't have to be outside the firstslot - lastslot range. All that it means is if a cleaning operation is called, where would the tape be. If you only do the cleaning manually, you can otherwise use that slot for a regular tape, and swap it manually before calling the cleaning job, or whatnot. Mine is set to 1, which is my mailslot, so I can feed it in without disturbing any tapes. Hope this helps... On Tue, 26 Jun 2001, John R. Jackson wrote: ... When I try to run amtape show I get errors. Below is a dump of the logs from /tmp. Any thoughts from anyone? The currently loaded slot = -1 seems to imply no tape is currently loaded, which -slot current does not appear to be handling. In theory, it should have seen the -1 and used firstslot from your config file. The chg-zd-mtx script went through a large revision not long ago, so it's hard to know exactly what version you have. The debug file you quoted implies 2.4.2p2, but you said you were using 2.4.2. Here are a couple of suggestions: * See if you have this line in the comments at the start of the file: Modified by Jason Hollinden [EMAIL PROTECTED] on 13-Feb-2001 That would indicate you have the latest version. If you don't have this version, get 2.4.2p2 from SourceForge and unpack it, then copy just the chg-zd-mtx.sh.in file from it into whatever sources you're working from (you might want to save the original, just in case :-). Then make and make install to put it in place. * Try amtape DailySet1 reset and look at the changer debug file. It should have a message like this: RESET - loading tape from 1st slot ($firstslot) to $tape so you'll be able to see what firstslot is set to inside the script. BTW, you probably should *not* put that trailing slash on the config name. It's not needed, and I've seen cases (can't remember where) recently where using the trailing slash on a directory name led to problems. * Add these lines at the start of the script: exec 2 /tmp/chg-zd-mtx.$$ set -x Find the loadslot() function and add the set -x to it as well. This will log a trace of all the statements to the file in /tmp and hopefully we can see which one caused the unary operator expected error, although I suspect it's related to the firstslot problem. And changer.conf firstslot=0 1st tape slot lastslot=7 Last tape slot cleanslot=7
Re: Overland AIT and chg-zd-mtx
I'm thinking it is becuase you don't have cleanslot and autocleancount set to something. I just set mine to cleanslot=0 and autocleancount=99 as I do not use the autoclean feature myself. All the variable cleanslot is doing is asking where the tape might be located. Since you're not using the autoclean, it will never ask for the cleaning tape anyways. It's been quite a bit since I updated that script, so I'm not 100% sure of the above. Also, just to be sure, the MT MTF and MTX are not pulled from that file. I'm assuming you have tem set in the actual chg-zd-mtx? On Fri, 01 Jun 2001, Grant Schofield wrote: I seem to be having some problems with my Overland AIT library and chnaging tapes. It appears I am missing some things in changer.conf or amanda.conf. What it comes down to is whenever I try to run something like: amlabel -f DailySet1 tape123212 slot 7 I get the response of: labeling tape in slot /usr/local/libexec/chg-zd-mtx: ([: 7: unary operator expected): rewinding amlabel: no tape online But if I run the same command again it works because the tape is in the drive. Here is my changer.conf: firstslot=1 lastslot=18 AUTOCLEAN=0 offlinestatus=1 havereader=1 OFFLINE_BEFORE_UNLOAD=0 MT=/bin/mt MTF=-f MTX=/usr/local/sbin/mtx Here is the output of the above command in changer.debug: Fri Jun 1 09:38:54 EDT 2001 Invoked with args '-slot 7' STATUS - currently loaded slot = -1 LOADSLOT - load tape from slot 7 - loading tape from slot 7 to /dev/nst0 - status 0, result '' - readyStatus = SCSI 2 tape drive: File number=0, block number=0, partition=0. Tape block size 512 bytes. Density code 0x31 (unknown to this mt). Soft error count since last status=0 General status bits on (4101): BOT ONLINE IM_REP_EN - rewind 7 I think it must be something really minor in chg-zd-mtx, but I am lost on where to tweak it to work correctly. Any help you could provide would be great. Thanks, Grant Schofield ITA Software -- Jason Hollinden MH5 Systems Admin
Re: changer questions
On Mon, 04 Jun 2001, Sandra Panesso wrote: Hi everybody: I have a HP surestore 24X6 autoloader and I using chg-zd-mtx configuration file with dev /dev/nst0 scsitapedev /dev/sgb startuse 0 enduse5 statfile /usr/local/etc/amanda/miro_daily/tape0-slot the thing is that I have three files on /usr/local/etc/amanda/miro_daily that really I don't know what they are mean. the files are: changer.conf-access Tries to count how many times the drive is accessed. Once a certain number is reached, the cleaning process should kick in. Only matters if AUTOCLEAN is turned on. changer.conf-clean Tells which slot the cleaning tape is in. Since I don't have one either, I had set in my config for it to be 0. Again, only matters if AUTOCLEAN is on. changer.conf-slot It is an indicator of what the next slot to be loaded will be. the true is that I don't have my tape cleaner yet so I don't know if it is a big deal. Please any explanation, I would really appreciated Sandra -- Jason Hollinden MH5 Systems Admin
Re: custom barcode labels
When you tape them, are you covering over the barcode as well? I'm not sure about all barcodes, but the one on my ADIC will not read one that has tape over it. You may want to check the docs with your reader, which should give the requirements for barcodes it needs. On Mon, 23 Apr 2001, Ron Snyder wrote: For those of you with tape changers and barcode readers: are any of you using any software to generate your own custom barcodes? It seems like it might be a bit nicer (for locating/moving tapes around) if the barcode label could match what the tape label has. I've only tried two pieces of software so far (BarCode Maker 3.0) and something called barcode 97 for windows 3.1. They both create barcodes OK, but for some reason my Qualstar tape library won't read them. (Maybe I'm doing something wrong, though-- I'm printing them out on regular paper, and then taping them to a test tape to see if the bar code reader can scan it. Ideas? -ron -- Jason Hollinden SMG Systems Admin
Re: Yet another Insecure Port ...
The ports that worked best for me were: --with-portrange=2064,2320 --with-udpportrange=830,870 Also, some other firewall wierdness I've had (with RedHat6.2's ipchains) was once in a while a fragmented packet is sent, for whatever reason. My amanda client's firewall log would show 3 denied packets from the tape server, with source and destination ports of 65535. To get around this, you need a rule that allows fragmented packets, such as this: -A input -s server_ip/32 -d client_ip/32 -f -j ACCEPT On Wed, 04 Apr 2001, Doug Silver wrote: Brand new build of amanda 2.4.2p2 server config build: /configure --with-gnutar=/usr/local/bin/tar --with-portrange=900,950 --with-udpportrange=900,950 (etc) client config build: ./configure --with-gtar=/usr/local/bin/gtar --without-server --with-portrange=900,950 --with-udpportrange=900,950 Server binaries: -rwsr-x--- 1 root wheel 68759 Apr 4 15:46 /usr/local/libexec/calcsize* -rwsr-x--- 1 root wheel 231765 Apr 4 15:47 /usr/local/libexec/dumper* -rwsr-x--- 1 root wheel 58227 Apr 4 15:46 /usr/local/libexec/killpgrp* -rwsr-x--- 1 root wheel 309711 Apr 4 15:47 /usr/local/libexec/planner* -rwsr-x--- 1 root wheel 56004 Apr 4 15:46 /usr/local/libexec/rundump* -rwsr-x--- 1 root wheel 56761 Apr 4 15:46 /usr/local/libexec/runtar* -rwsr-x--- 1 root wheel 322122 Apr 4 15:47 /usr/local/sbin/amcheck* Client: ls: /usr/local/libexec/dumper: No such file or directory ls: /usr/local/libexec/planner: No such file or directory -rwsr-x--- 1 root wheel 71756 Apr 4 17:22 /usr/local/libexec/calcsize* -rwsr-x--- 1 root wheel 62521 Apr 4 17:22 /usr/local/libexec/killpgrp* -rwsr-x--- 1 root wheel 60112 Apr 4 17:22 /usr/local/libexec/rundump* -rwsr-x--- 1 root wheel 60905 Apr 4 17:22 /usr/local/libexec/runtar* amcheck -c test Amanda Backup Client Hosts Check ERROR: frog.hoop-t.net: [host cat.hoop-t.net: port 62870 not secure] Client check: 1 host checked in 0.076 seconds, 1 problem found I'm not seeing any errors through the firewall, so I'm not sure how to further debug this. Any suggestions? Has anyone got Amanda to work using the udpportrange/portrange options through a firewall? Thanks! ~ Doug Silver 619 235-2665 Quantified Systems, Inc ~ Here's the client amandad.debug packet stuff: sending ack: Amanda 2.4 ACK HANDLE 000-00300D08 SEQ 986430352 amandad: sending REP packet: Amanda 2.4 REP HANDLE 000-00300D08 SEQ 986430352 ERROR [host cat.hoop-t.net: port 62870 not secure] amandad: got packet: Amanda 2.4 ACK HANDLE 000-00300D08 SEQ 986430352 amandad: pid 56308 finish time Wed Apr 4 17:25:53 2001 -- Jason Hollinden SMG Systems Admin
Re: Configuring ADIC-1200D autochanger with integral Sony SDT-5000 drive
One that I know of it to be sure and grap the newest CVS version of chg-zd-mtx.sh.in, as the one that ships with 2.4.2p1 will not handle more than 9 tapes. On Fri, 23 Mar 2001, Craig Dewick wrote: Hi everyone, I've obtained an ADIC 1200D 12-tape autochanger which has an integral Sony SDT-5000 DDS-2 drive. I'm about to try to set up amanda-2.4.2p1 to work with it using chg-zd-mtx as the tape changer type. I have mtx-1.2.9 here but there's probably a newer version by now. Are there any known caveats with the ADIC DAT autochangers that I should be aware of? I'll soon be replacing the SDT-5000 with an SDT-9000 (DDS-3 drive)... BTW, I'm going to see if can get it all to work using Sun's 'sgen' driver instead of using the 'sst' driver code supplied with the amanda source. I've configure 'sgen.conf' so that when I reboot the device links are set up. Fingers crossed that it works! Regards, Craig. -- Craig Dewick. Send email to "[EMAIL PROTECTED]" Point a web browser at 'http://lios.apana.org.au/~cdewick/sun_shack.html' to access my archive of Sun information and links to other places. For info about Sun Ripened Kernels, go to "http://www.sunrk.com.au" -- Jason Hollinden SMG Systems Admin
Re: Complete restore of a host with many partitions
You may want to check the amanda-hackers list archive. The 3rd (or so) to last message talks about a program called "amclone" that is supposed to take all the scattered parts of a machine from many tapes and consolidate it to one tape. It looks to be the 1st release of itv though, but you never know... On Fri, 23 Mar 2001, Jens Bech Madsen wrote: I have to do a complete restore of a host that has many partitions (~60). My dump cycle is 20 days, so if I use amrecover, which only allows one partition per extraction, I have to change tapes a lot of times. What I would like to do is going through all the tapes in the last dump cycle one by one and extract the relevant partitions from each tape, so I only have to change tapes 20 times. Does anyone have a good solution for this problem? Thanks in advance Jens Bech Madsen -- Jens Bech Madsen The Stibo Group -- Jason Hollinden SMG Systems Admin
Re: Thanks John,
You know what's sad is, the more sarcasm added to a tech story, the more _believable_ it becomes... On Thu, 22 Mar 2001, John R. Jackson wrote: You are always such a great help in this mailing list, do you have a pay pal account? ... No (don't even know what that is). I'd like to buy you a drink or a pizza or at least send you the money for one :) Thanks. I don't happen to drink (just a personal choice), my waistline doesn't tolerate pizza like it did 25 years ago (which really sucks :-), and Purdue pays me pretty well, but I appreciate the sentiment. Tell you what -- next time you're out and blissfully ignoring backups because you know they're running well due to Amanda, have a drink or pizza or whatever for me. Just don't blame me for the panic attack that happens when, right after you finish the pizza, you get a phone call: Operations: "Was there anything very important on the even numbered backup tapes?" You:(lengthy pause) "Why would you ask that?" Operations: "Well, you see, someone brought in this cool magnet. It's really small and you wouldn't believe the pull that thing has ..." You: "Yeah, yeah, but what about the tapes?" Operations: "Ummm, there was this little incident. Well, hardly an incident, just kind of a tiny problem. Well, maybe not really a problem, more like ..." You: "GET ON WITH IT!" Operations: "Oh! Well, see, one of the other Operators (NOT ME!) was walking around with the magnet and they got near the Pepsi machine -- we could have sworn that thing was bolted down -- and there was this big jar of molasses on top of it and the tapes were sitting next to it and, well, anyway ..." "Sorry." You:(dead silence -- literally) Operations: "Oh, by the way, the boss just accidentally removed all the files on one of the main servers, then went to two others to see if the rm command he just read about worked the same way everywhere. He left to get to the golf course for tee time, but says you need to restore those machines right away." At which point you realize that ignoring backups because you know they're running well is a really terrible idea, no matter how good the pizza. :-) Jeff Bearer John R. Jackson, Technical Software Specialist, [EMAIL PROTECTED] -- Jason Hollinden SMG Systems Admin
Re: amlabel
You put the directory name as the config name: su amanda amlabel -f DailySet1 DailySet1-000 ^ On Thu, 15 Mar 2001, Bernd Zimmermann wrote: hi all, i 'm a Amanda Newbie using amanda-2.4.2, executing: su amanda amlabel -f amanda.conf DailySet1-000 getting the error message: amlabel: amlabel: cannot execute binary file I don't know what i did wrong... i had compiled all those nice stuff on my Solaris8i386 maschine. ich had create: /usr/local/etc/amanda/DailySet1 stored there: -rw-r--r-- 1 amanda backup 19892 Mar 15 09:52 amanda.conf drwxr-xr-x 2 amanda backup 512 Mar 13 16:38 config -rw-r--r-- 1 amanda backup 14498 Mar 14 11:10 config.site -rw-r--r-- 1 amanda backup 144 Mar 15 11:23 disklist -rw-r--r-- 1 amanda backup 161 Mar 15 09:54 tapelist is this right too? many thanx fore some good answeres! Bernd Zimmermann -- Jason Hollinden SMG Systems Admin
Re: chg-zd-mtx problem
Get the newest chg.zd.mtx.sh.in from CVS, as it's fixed there. On Wed, 14 Mar 2001, Mark L. Chang wrote: in loadslot() we have code that picks the slot source/destination: [${firstslot}-${lastslot}]) loadslot=$1 ;; clean) loadslot=$cleanslot ;; *) echo "0 illegal request" exit 1 ;; works great if you have _single digit_ $firstslot and $lastslot. Well, I don't. $lastslot=21 and $firstslot=1 ... any /bin/sh gurus fix this for me? or, am I just not using the latest and greatest chg-zd-mtx? Mark -- http://www.mchang.org/ http://decss.zoy.org/ -- Jason Hollinden SMG Systems Admin
Re: A question about chg-zd-mtx
Here is a patch for the current CVS version of chg-zd-mtx.sh.in that changes the $TAPE variable to $CHANGER. It was only used 3 times, so it was pretty painless. On Thu, 01 Mar 2001, Joe Rhett wrote: As others have said, it uses the TAPE environment variable. I wish we could convince the maintainer to use CHANGER instead, so it doesn't conflict with mt's TAPE environment variable sigh Anyway, make sure you are using either the version we made http://www.noc.isite.net/?Projects or the version someone else did which supports barcodes. The version distributed with Amanda doesn't work with modern versions of mtx and has numerous bugs. On Wed, Feb 28, 2001 at 01:24:12PM -0500, Stan Brown wrote: I'm trying to get my first tape changer working, and I'm a little confused. It appears that I need to use the chg-zd-mtx scriptm but the version of mtx that I have is used like this: mtx -f /dev/sg0 next for instance. Now it appears to me that chg-zd-mtx just runs mtx like this: mtx next That is wihtout the device specifier. Now it is possible for my version of mtx to use the CHANGER environment variable, instead of the -f argument, but I can't see anywhere that gets set in chg-zd-mtx either, and since this will ultimatley be run fron cron, and thus potentialy be somewhat "environmently chalenged", I am wondering how this is usually handled? -- Stan Brown [EMAIL PROTECTED]843-745-3154 Charleston SC. -- Windows 98: n. useless extension to a minor patch release for 32-bit extensions and a graphical shell for a 16-bit patch to an 8-bit operating system originally coded for a 4-bit microprocessor, written by a 2-bit company that can't stand for 1 bit of competition. - (c) 2000 Stan Brown. Redistribution via the Microsoft Network is prohibited. -- Joe Rhett Chief Technology Officer [EMAIL PROTECTED] ISite Services, Inc. PGP keys and contact information: http://www.noc.isite.net/Staff/ -- Jason Hollinden SMG Systems Admin --- chg-zd-mtx.sh.in.20010302 Fri Mar 2 08:57:17 2001 +++ chg-zd-mtx.sh.inFri Mar 2 09:00:39 2001 @@ -88,8 +88,8 @@ myname=$0 tape=`amgetconf$SUF tapedev` -TAPE=`amgetconf$SUF changerdev`; export TAPE # for mtx command -if [ "$tape" = "/dev/null" -o "$TAPE" = "/dev/null" ]; then +CHANGER=`amgetconf$SUF changerdev`; export CHANGER # for mtx command +if [ "$tape" = "/dev/null" -o "$CHANGER" = "/dev/null" ]; then echo "Both tapedev and changerdev must be specified in config file"; exit 2; fi
Re: Thanks for all the tape changer help!
On Fri, 02 Mar 2001, Stan Brown wrote: Oh, and since the magazine only holds 6 tapes, and i am used to having a much larger tape set (24 or so) that than, has anyoone got any ideas on using multiple magazines? Maybe an email to prompt to change magazines after heting the last (cleanng) tape? You could put this (or some equivalent) at the end of the readstatus() section: if [ $usedslot -eq $lastslot ]; then `echo "Time to change the magazine." | $mailer -s "Magazine change request on \`date\`" $email` fi -- Jason Hollinden SMG Systems Admin
Re: A question about chg-zd-mtx
Now I'm more confused. :) The docs for mtx-1.2.10 say to use CHANGER, while the older versions seemed to use TAPE. I assume that's why the chg-zd-mtx was written with the $TAPE variable. 1.2.10 also will honor TAPE or CHANGER, which was why I had never changed it before. If if it doesn't matter if it's called TAPE or CHANGER, I'd like to have it as CHANGER, since that what their docs now suggest. Thoughts? On Fri, 02 Mar 2001, Joe Rhett wrote: Sorry - wrong maintainer. The problem isn't chg-zd-mtx, it's the 'mtx' program itself which uses the $TAPE environment variable. Sorry for the confusion. On Fri, Mar 02, 2001 at 09:22:44AM -0500, Jason Hollinden wrote: Here is a patch for the current CVS version of chg-zd-mtx.sh.in that changes the $TAPE variable to $CHANGER. It was only used 3 times, so it was pretty painless. On Thu, 01 Mar 2001, Joe Rhett wrote: As others have said, it uses the TAPE environment variable. I wish we could convince the maintainer to use CHANGER instead, so it doesn't conflict with mt's TAPE environment variable sigh Anyway, make sure you are using either the version we made http://www.noc.isite.net/?Projects or the version someone else did which supports barcodes. The version distributed with Amanda doesn't work with modern versions of mtx and has numerous bugs. On Wed, Feb 28, 2001 at 01:24:12PM -0500, Stan Brown wrote: I'm trying to get my first tape changer working, and I'm a little confused. It appears that I need to use the chg-zd-mtx scriptm but the version of mtx that I have is used like this: mtx -f /dev/sg0 next for instance. Now it appears to me that chg-zd-mtx just runs mtx like this: mtx next That is wihtout the device specifier. Now it is possible for my version of mtx to use the CHANGER environment variable, instead of the -f argument, but I can't see anywhere that gets set in chg-zd-mtx either, and since this will ultimatley be run fron cron, and thus potentialy be somewhat "environmently chalenged", I am wondering how this is usually handled? -- Stan Brown [EMAIL PROTECTED]843-745-3154 Charleston SC. -- Windows 98: n. useless extension to a minor patch release for 32-bit extensions and a graphical shell for a 16-bit patch to an 8-bit operating system originally coded for a 4-bit microprocessor, written by a 2-bit company that can't stand for 1 bit of competition. - (c) 2000 Stan Brown. Redistribution via the Microsoft Network is prohibited. -- Joe Rhett Chief Technology Officer [EMAIL PROTECTED] ISite Services, Inc. PGP keys and contact information: http://www.noc.isite.net/Staff/ -- Jason Hollinden SMG Systems Admin --- chg-zd-mtx.sh.in.20010302 Fri Mar 2 08:57:17 2001 +++ chg-zd-mtx.sh.inFri Mar 2 09:00:39 2001 @@ -88,8 +88,8 @@ myname=$0 tape=`amgetconf$SUF tapedev` -TAPE=`amgetconf$SUF changerdev`; export TAPE # for mtx command -if [ "$tape" = "/dev/null" -o "$TAPE" = "/dev/null" ]; then +CHANGER=`amgetconf$SUF changerdev`; export CHANGER # for mtx command +if [ "$tape" = "/dev/null" -o "$CHANGER" = "/dev/null" ]; then echo "Both tapedev and changerdev must be specified in config file"; exit 2; fi -- Joe Rhett Chief Technology Officer [EMAIL PROTECTED] ISite Services, Inc. PGP keys and contact information: http://www.noc.isite.net/Staff/ -- Jason Hollinden SMG Systems Admin
Re: A question about chg-zd-mtx
I'll change it in the chg-zd-mtx.sh.in tomorrow, and post a patch against the current CVS tree to here and amanda-hackers. The last one I posted was based off the one you listed below, and I did my best not to alter how it worked with non-barcode drives and whatnot. If you want to build off of it instead, you're more than welcome, as I'm not too sure how much time I'll have in the future for upkeep on it. Thanks... On Thu, 01 Mar 2001, Joe Rhett wrote: As others have said, it uses the TAPE environment variable. I wish we could convince the maintainer to use CHANGER instead, so it doesn't conflict with mt's TAPE environment variable sigh Anyway, make sure you are using either the version we made http://www.noc.isite.net/?Projects or the version someone else did which supports barcodes. The version distributed with Amanda doesn't work with modern versions of mtx and has numerous bugs. On Wed, Feb 28, 2001 at 01:24:12PM -0500, Stan Brown wrote: I'm trying to get my first tape changer working, and I'm a little confused. It appears that I need to use the chg-zd-mtx scriptm but the version of mtx that I have is used like this: mtx -f /dev/sg0 next for instance. Now it appears to me that chg-zd-mtx just runs mtx like this: mtx next That is wihtout the device specifier. Now it is possible for my version of mtx to use the CHANGER environment variable, instead of the -f argument, but I can't see anywhere that gets set in chg-zd-mtx either, and since this will ultimatley be run fron cron, and thus potentialy be somewhat "environmently chalenged", I am wondering how this is usually handled? -- Stan Brown [EMAIL PROTECTED]843-745-3154 Charleston SC. -- Windows 98: n. useless extension to a minor patch release for 32-bit extensions and a graphical shell for a 16-bit patch to an 8-bit operating system originally coded for a 4-bit microprocessor, written by a 2-bit company that can't stand for 1 bit of competition. - (c) 2000 Stan Brown. Redistribution via the Microsoft Network is prohibited. -- Joe Rhett Chief Technology Officer [EMAIL PROTECTED] ISite Services, Inc. PGP keys and contact information: http://www.noc.isite.net/Staff/ -- Jason Hollinden SMG Systems Admin
Re: How do I run changer scripts for testing?
Just noticed that the barcode enabled chg-zd-mtx.sh.in has been added to the CVS tree, so if you can test it sometime soon, I'll post any errors you find along with the $TAPE - $CHANGER naming from the last message. The drive I had to test with worked with or without the barcode, but better safe than sorry. Thanks... On Thu, 01 Mar 2001, Joe Rhett wrote: See my other e-mail -- the shipping version of chg-zd-mtx doesn't work with modern versions of mtx. Use either the barcode-enabled version someone posted, or the version at http://www.noc.isite.net/?Projects I keep meaning to integrate the two versions into one, but just haven't had time to test. On Thu, Mar 01, 2001 at 10:56:09AM -0500, Stan Brown wrote: I'm trying to get chg-zd-mtx to work with my HP tapechanger. I't not working and I am trying to debug where the problem lies. I would like to just run the changer script by hand, and see what results I get. Unfortuantely I can't seem to figure out how to do this. I would have thought oone of the following would have worked: chg-zd-mtx /dev/sg0 -next or chg-zd-mtx DailyDump /dev/sg0 -next Tending to think that the later would eb correct as the script appears to use amgetconf to pick up some paramteres. What am I doing wrong? -- Stan Brown [EMAIL PROTECTED]843-745-3154 Charleston SC. -- Windows 98: n. useless extension to a minor patch release for 32-bit extensions and a graphical shell for a 16-bit patch to an 8-bit operating system originally coded for a 4-bit microprocessor, written by a 2-bit company that can't stand for 1 bit of competition. - (c) 2000 Stan Brown. Redistribution via the Microsoft Network is prohibited. -- Joe Rhett Chief Technology Officer [EMAIL PROTECTED] ISite Services, Inc. PGP keys and contact information: http://www.noc.isite.net/Staff/ -- Jason Hollinden SMG Systems Admin
Re: A question about chg-zd-mtx
Inside the chg-zd-mtx, it sets the TAPE environment variable, which works the same as the CHANGER that's listed in the mtx docs. On Wed, 28 Feb 2001, Stan Brown wrote: I'm trying to get my first tape changer working, and I'm a little confused. It appears that I need to use the chg-zd-mtx scriptm but the version of mtx that I have is used like this: mtx -f /dev/sg0 next for instance. Now it appears to me that chg-zd-mtx just runs mtx like this: mtx next That is wihtout the device specifier. Now it is possible for my version of mtx to use the CHANGER environment variable, instead of the -f argument, but I can't see anywhere that gets set in chg-zd-mtx either, and since this will ultimatley be run fron cron, and thus potentialy be somewhat "environmently chalenged", I am wondering how this is usually handled? -- Stan Brown [EMAIL PROTECTED]843-745-3154 Charleston SC. -- Windows 98: n. useless extension to a minor patch release for 32-bit extensions and a graphical shell for a 16-bit patch to an 8-bit operating system originally coded for a 4-bit microprocessor, written by a 2-bit company that can't stand for 1 bit of competition. - (c) 2000 Stan Brown. Redistribution via the Microsoft Network is prohibited. -- Jason Hollinden SMG Systems Admin
Amtape not reqinding after a label lookup
I've found a message in teh archives (# 25664) that describes my problem, but it doesn't seem to be answered there. When doing an amrecover, I load a tape using 'amtape conf label tapelabel' which loads the tape fine, then this happens: Load tape SMGDR1-06 now Continue? [Y/n]: Y EOF, check amidxtaped.debug file on my hostname removed. amrecover: short block 0 bytes UNKNOWN file amrecover: Can't read file header extract_list - child returned non-zero status: 1 I checked the amidxtaped.debug, and I've figured out what the problem is. After amtape is called with either the 'label blah' or 'current' or any other where it returns the amlabel of the tape, amtape does not rewind the tape when it's finished reading the amlabel. 'mt -f /dev/nst1 status' shows the tape like this for me: SCSI 2 tape drive: File number=0, block number=1, partition=0. Tape block size 0 bytes. Density code 0x41 (unknown to this mt). Soft error count since last status=0 General status bits on (101): ONLINE IM_REP_EN Which means that it's forwarded in to where the amlabel was read. If I do an 'mt -f /dev/nst0 rewind', the status will then look like this for me: SCSI 2 tape drive: File number=0, block number=0, partition=0. Tape block size 0 bytes. Density code 0x41 (unknown to this mt). Soft error count since last status=0 General status bits on (4101): BOT ONLINE IM_REP_EN If I do a manual rewind like that after amtape is finished doing it's business loading the appropriate tape, then amrecover works fine. Is there a way to have amtape automatically do the rewind after an amlabel check? If it's a matter of modifying amtape, I can give it a try, but I'm not great at C code. Thanks... -- Jason Hollinden SMG Systems Admin
Re: Submitting a chg-zd-mtx, with barcode support, and 9 slot support
This is my latest update to chg-zd-mtx, and most likely my last, barring any bugs in this one. It incorporates all bugfixes posted to me in the last week (thank you). Changes: - moved 'all' user set variables to a separate config file called 'changerfile'.conf. By this, I mean if you have this in amanda.conf changerfile "/etc/amanda/DailySet1/something" then your config file will be /etc/amanda/DailySet1/something.conf. I have included mine ADIC.conf as an example of _all_ the variables that are to be set in it. Set up in amanda.conf has not changed. - added a new internal variable: $drivenum - returns the /dev/nst# number. Whould work with other device names also. The above 2 changes gives this chg-zd-mtx the ability to work on multiple drives at the same time, instead of having multiple copies of it for each Amanda config. Bugs: I don't believe it is a bug with this script, but rather amtape. Some times when running 'amtape update', it will cycle through the tapelist multiple times. I had this happen a few times before the above changes also, but maybe only once or twice (I don't run update that often, since 30 DLT's take for ever.) However, if someone sees what's causing it, I appreciate it. -- Jason Hollinden SMG Systems Admin chgzdmtx.tar.gz
Re: Scripting question -- readstatus
I used this: \([1-9][0-9]*\) instead of: \(.\) It will give any number = 1. On Thu, 15 Feb 2001, Joseph Del Corso wrote: First I'd like to thank everyone for their help with scripts, I recieved quite a few that were all excellent resources for creating my own. I have a tape rack that holds 35 tapes, and an robotic arm tape changer that picks up the tapes and sticks them in the tape drive(s). I modified chg-zd-mtx, specifically the readstatus line, to read like: usedslot=`$MTX -f /dev/sg3 status | sed -n 's/Data Transfer Element 0:Empty/-1/p;s/Data Transfer Element 0:Full (Storage Element \(.\) Loaded):VolumeTag = DNR\(.\)\(.\)\(.\)/\1/p'` This worked great!! For the first 9 tapes... and I realized why. In the previous line the number after Storage Element is read into ?variable? \(.\) - This represents one number. In order to go higher than 9 though I had to add a second \(.\) and a \2 so that it looks like: usedslot=`$MTX -f /dev/sg3 status | sed -n 's/Data Transfer Element 0:Empty/-1/p;s/Data Transfer Element 0:Full (Storage Element \(.\)\(.\) Loaded):VolumeTag = DNR\(.\)\(.\)\(.\)/\1\2/p'` My question is, is there a more elegant way (without scraping the whole script and trying a completely new one -- leading to more headaches and troubleshooting) to do what I'm trying to do? (i.e.-- read higher than one digit numbers, and possibly two digit -- though honestly I'm not at that point yet) As soon as I try and use this script to do any amcheck or dumping to the first 9 tapes, I'll have to revert everything back. Hope I explained this clearly enough, and that someone out there with more intelligence than I in scripting can help out. Joe -- Jason Hollinden SMG Systems Admin
Re: Sorry, another question -- eject
This is from the FAQ that comes with mtx. It looks like the eject is for ejecting magazines from certain autoloaders, not tapes from drives. May be why it's only working some of the time. Does 'mtx -f /dev/sg4 unload slotnumber drive number' work? 8- Q: How do I eject the magazine of my autoloader? A: Many low-end DAT autoloaders support the removable media 'EJECT' command sent to the robotics device, even though it's not documented (or required) in the SCSI standards. If the loader is at /dev/sgb, simply do 'mtx -f /dev/sgb eject' and see what happens. (If nothing happens, your autoloader doesn't support 'eject'). Some high-end libraries have their own proprietary way for ejecting magazine trays, generally involving abuse of the 'transfer' command and 'eepos' addendums, but this is totally non-standard and undocumented. On Thu, 15 Feb 2001, Joseph Del Corso wrote: I'm also curious if there is a way to get around a problem I seem to have every now and then. Specifically, I can issue the mtx -f /dev/sg4 eject (sg4 being the first tape drive) and I will randomly get an error like this: [operator@lycan:/usr/local/etc/amanda/DailySet1]# mtx -f /dev/sg4 eject mtx:eject failed Now I can simply submit the eject command again and it will work, but I'm worried about trying to automate anything now because I'm not sure if I'll have problems with the eject command. Any thoughts? Joe -- Jason Hollinden SMG Systems Admin
Re: Submitting a chg-zd-mtx, with barcode support, and 9 slot support
Ok, I've changed over to the new version that was suggested, and I have also incorporated the suggestions of several people who's name escape me (sorry). This now has the 'mt offline' variable of the newest chg-zd-mtx, and tests whether your drives provides an 'offline', or an 'ONLINE' when changing from offline to online. It is also in chg-zd-mtx.sh.in form, so it can be linked in with the configure step. I would appreciate it if some people can test this, both with a large barcode reader, and also some more standard 10 slot drives. I want to be sure that I didn't break a working script just to add my parts. Thanks... -- Jason Hollinden SMG Systems Admin #!/bin/sh # # Exit Status: # 0 Alles Ok # 1 Illegal Request # 2 Fatal Error # # Contributed by Eric DOUTRELEAU [EMAIL PROTECTED] # This is supposed to work with Zubkoff/Dandelion version of mtx # # Modified by Joe Rhett [EMAIL PROTECTED] # to work with MTX 1.2.9 by Eric Lee Green http://mtx.sourceforge.net # # Modified by Jason Hollinden [EMAIL PROTECTED] on 13-Feb-2001 # to work with MTX 1.2.10, 9 slots, and added barcode support. # NOTE: Only tested the 2 additions with an ADIC Scalar 100. # All my additions have a ' Comment' close by. ## # You may need to customize these things MT=@MT@ MTF=@MT_FILE_FLAG@ MTX=@MTX@ firstslot=1 lastslot=7 # Don't forget to leave out the cleaning tape. cleanslot=8 # Which slot contains your cleaning tape? OFFLINE_BEFORE_UNLOAD=0 # Does your tape driver require a # 'mt offline' before mtx unload? # Do you want to clean the drive after a certain number of accesses? # NOTE - This is unreliable, since 'accesses' aren't 'uses', and we #have no reliable way to count this. A single amcheck could #generate as many accesses as slots you have, plus 1. # ALSO NOTE - many modern tape loaders handle this automatically. AUTOCLEAN=0 # Set to '1' or greater to enable autocleancount=99 havereader=0 If you have a barcode reader, set to 1. offlinestatus=0 Set to 0 if 'mt status' gives an "offline" when drive is offline. Set to 1 or greater if 'mt status' doesn't give and offline, rather an "ONLINE" when drive is online. Check the 'readyError' section if mt acts differently for you as stated below. See the 'readstatus' section below if using a different drive than 0. ## # No user-level customized required beyond this point. # Paths prefix=@prefix@ exec_prefix=@exec_prefix@ sbindir=@sbindir@ libexecdir=@libexecdir@ # try to hit all the possibilities here PATH=$sbindir:$libexecdir:/usr/bin:/bin:/usr/sbin:/sbin:/usr/ucb:/usr/local/bin export PATH email=`amgetconf$SUF mailto` mailer=@MAILER@ if [ -d "@AMANDA_DBGDIR@" ]; then DBGFILE=@AMANDA_DBGDIR@/changer.debug else DBGFILE=/dev/null fi USE_VERSION_SUFFIXES="@USE_VERSION_SUFFIXES@" if test "$USE_VERSION_SUFFIXES" = "yes"; then SUF="-@VERSION@" else SUF= fi myname=$0 tape=`amgetconf$SUF tapedev` TAPE=`amgetconf$SUF changerdev`; export TAPE # for mtx command if [ "$tape" = "/dev/null" -o "$TAPE" = "/dev/null" ]; then echo "Both tapedev and changerdev must be specified in config file"; exit 2; fi changerfile=`amgetconf$SUF changerfile` cleanfile=$changerfile-clean accessfile=$changerfile-access slotfile=$changerfile-slot labelfile=$changerfile-barcodes [ ! -f $cleanfile ] echo 0 $cleanfile [ ! -f $accessfile ] echo 0 $accessfile [ ! -f $slotfile ] echo 0 $slotfile [ ! -f $labelfile ] echo 0 $labelfile cleancount=`cat $cleanfile` accesscount=`cat $accessfile` # Routines start here If using a different drive than /dev/nst0 (or whatever your OS calls the 0'th drive) change the 'Data Transfer Element 0' (there are 6 below, and 1 in searchtape().) to 'Data Transfer Element #' where # = /dev/nst# (or whatever for your OS). readstatus() { if [ $havereader -eq 1 ]; then tmpslot=`$MTX status | grep "Data Transfer Element 0"` usedslot=`echo $tmpslot | sed -n 's/Data Transfer Element 0:Empty/-1/p;s/Data Transfer Element 0:Full (Storage Element \([1-9][0-9]*\) Loaded)\(.*\)/\1/p'` barcode=`echo $tmpslot | sed -n 's/Data Transfer Element 0:Empty/-1/p;s/Data Tr
Re: Submitting a chg-zd-mtx, with barcode support, and 9 slot support
I didn't since there wasn't anything in the changelog for 2.4.2p1 that said it was updated, and since it errored out for me in the same fashion as the one I used, I assumed it hadn't changed. My bad for assuming, I guess. I will migrate mine to the newer version this coming week. By the way, what was the First of which? On Sun, 11 Feb 2001, Joe Rhett wrote: Second of which, why don't you match this patch relative to the latest version of chg-zd-mtx, which fixes lots of the error handling. Your script retains 90% of the bugs of the original version. An updated version of the .sh.in file is at http://www.noc.isite.net/?Projects On Fri, Feb 09, 2001 at 11:38:45AM -0500, Jason Hollinden wrote: Note: This has only been tested on an ADIC Scalar 100. If you find something broken, or not clearly commented, tell me. Also, this is my 1st public showing of any code, so please, be gentle... ;) The attached file is a replacement for chg-zd-mtx. I have added support for barcode readers, and also for libraries between 1-999 slots (I would so love to hear from someone that has a honking big library like that say it works). All amanda utils can work with this for barcode database lookups (amcheck can load the appropriate tape all by itself, etc.) The main thing to do it be sure to update the barcode database after any new tapes are added, or removed from cycle. To do this, make a backup of the old barcodes file, then run 'amtape conf update'. This will cycle through all your tape slots, and put them in your barcodes file like this: tape amlabel barcode Be sure to modify the top part of the script to fit your needs, and also check out the comments on what 'mt status' should return for your tape device. Some changes to come: - make it completely independent of what slot the tapes are in, since certain loaders may unload to the wrong slot depending on circumstances. - Better error handling, which right now is crappy to say the least. - Anything brought ot my attention by you peoples Enjoy... -- Jason Hollinden SMG Systems Admin #!/bin/sh # # Exit Status: # 0 Alles Ok # 1 Illegal Request # 2 Fatal Error # # Contributed by Eric DOUTRELEAU [EMAIL PROTECTED] # This is supposed to work with Zubkoff/Dandelion version of mtx # # Modified by Joe Rhett [EMAIL PROTECTED] # to work with MTX 1.2.9 by Eric Lee Green http://mtx.sourceforge.net # # Modified by Jason Hollinden [EMAIL PROTECTED] on 6-Feb-2001 # to work with MTX 1.2.10, up to 999 slots, and added barcode support. # NOTE: Only tested the 2 additions with an ADIC Scalar 100. # All my additions have a ' Comment' close by. # You may need to customize these things MT=/bin/mt MTF=-f MTX=/sbin/mtx DD=/bin/dd firstslot=2 lastslot=9 Clean function just loads the tape, and may not necessarily eject it. If not, just issue an eject afterwards. cleanslot=31 accessbeforeclean=119 If you have a barcode reader, set to 1. Otherwise set to 0. havereader=1 Email of who should get severe library errors, and mailer to use. All other errors are in the $DBGFILE. [EMAIL PROTECTED] mailer=/bin/mail Check the 'readyError' section if mt acts differently for you as stated below. See the 'readstatus' section below if using a different drive than 0. ## No (hopefully) user-level customized required beyond this point. # try to hit all the possibilities here prefix=/opt/amanda exec_prefix=${prefix} sbindir=${exec_prefix}/sbin libexecdir=${exec_prefix}/libexec PATH=$sbindir:$libexecdir:/usr/bin:/bin:/usr/sbin:/sbin:/usr/ucb:/usr/local/bin export PATH if [ -d "/tmp/amanda" ]; then DBGFILE=/tmp/amanda/changer.debug else DBGFILE=/dev/null fi USE_VERSION_SUFFIXES="no" if test "$USE_VERSION_SUFFIXES" = "yes"; then SUF="-2.4.2b2" else SUF= fi myname=$0 tape=`amgetconf$SUF tapedev` TAPE=`amgetconf$SUF changerdev`; export TAPE # for mtx command if [ "$tape" = "/dev/null" -o "$TAPE" = "/dev/null" ]; then echo "Both tapedev and changerdev must be specified in config file"; exit 2; fi changerfile=`amgetconf$SUF changerfile` cleanfile=$changerfile-clean accessfile=$changerfile-access slotfile=$changerfile-slot labelfile=$changerfile-barcodes [ ! -f $cleanfile ] echo 0 $cleanfile [ ! -f $accessfile ] echo 0 $accessfile [ ! -f $slotfile ] echo 0 $slotfile [ ! -f $labelfile ] echo 0 $labelfile cleancount=`cat $cleanfile` accesscount=`cat $accessfile` # Routines start here If using a different drive than /dev/nst0 (or whatever your OS calls the 0'th drive) change t
Re: Can someone please help?
A couple things I see, commented below: On Fri, 09 Feb 2001, Joseph Del Corso wrote: I should preface what I'm about to say with: I searched through a decent amount of the archive before giving up. I ran amcheck with the following results: Amanda Tape Server Host Check - /opt/tmp: 34743152 KB disk space available, that's plenty. ERROR: /dev/sg4: Permission denied (expecting a new tape) Make sure that the amanda user is in the group that has permission to this device. On mine, the tape dev looks like this: bash-2.03$ ls -l /dev/nst0 crw-rw1 root disk 9, 128 May 5 1998 /dev/nst0 And /etc/group has: disk:x:6:root,amanda Also, but I'm not 100% sure on this, scsi tape devices in linux are listed as /dev/st#, and as /dev/nst# for the non-rewinding. So your 2 drives 'should' be /dev/nst0 and /dev/nst1. The amanda.conf file that *I BELIEVE* is being used has the following attributes set: --- runtapes 1 # number of tapes to be used in a single run of amdump #tpchanger "chg-zd-mtx" # the tape-changer glue script tapedev "/dev/sg4" # the no-rewind tape device to be used See above guess about /dev/nst0 being the 1st no-rewind device. #rawtapedev "/dev/sg5 # the raw device to be used (ftape only) #changerfile "/var/lib/amanda/DailySet1/changer" #changerfile "/var/lib/amanda/DailySet1/changer-status" #changerfile "/etc/amanda/changer.conf" changerdev "/dev/sg3" The reason it didn't work as a single drive was the changerdev line. If you comment that out, or use tpchanger "chg-manual", it should go. I guess I'm having trouble understanding the following: I'm using an ATL 7100 series tape backup system with a robotic arm and two tape drives on scsi id 1, where the robotic arm I can control via mtx (mtx -f /dev/sg3 etc etc etc) and the tape drives are /dev/sg4 and sg5... I initially tried to use the tpchanger "chg-zd-mtx" but would get the following results from amcheck DailySet1 (obviously the line tpchanger, see above, would be uncommented when I tried this) [operator@lycan:/etc/amanda/DailySet1]# amcheck DailySet1 Amanda Tape Server Host Check - /opt/tmp: 34743152 KB disk space available, that's plenty. amcheck-server: could not get changer info: /usr/adm/amanda/changer-status-clean: No such file or directory In amanda.conf, if you set the 'changerfile "/somedir/something"' all the files used in chg-zd-mtx will be set to things like: /somedir/something-status-clean /somedir/something-access Changerfile gives the script something to append it's file names to. Since you have all 3 examples commented out in your amanda.conf, I assume it just went to some default value. I just went through the 'mini-nightmare' trying to figure out the same problem about a month ago, so I understand. ;) After this email, I am submitting a modified chg-zd-mtx script that has support for barcodes (currently, only chg-scsi has that) and can also support 9 tape slots. It may come in handy for you. -- Jason Hollinden SMG Systems Admin
Re: amanda mailing list
On Fri, 09 Feb 2001, Ryan Williams wrote: Perhaps it would help the two of you. Perhaps you can explain why the rest of us should be inconvenienced because you can't spare the time to learn to use the right tool for the right job? 200 m/day might be a burden for you. For many of us that's a light day. The list messages are already tagged in the Sender: header. Please learn to use it. Who is to say that we would be the ones inconveniencing others. If everyone but you wants this, you would be inconveniencing us to ask that it was not done. I was just placing out an idea when I suggested this just to get some feed back and to see what other people thought about this. We all know your opinion about the matter now how about we hear some other peoples opinions. I can see where it would help if you didn't have some way to filter mail, but mostly the Sender: header is correct. The only times I have trouble with that is when an email is sent directly to me, and not the list. Also, just to note, I would like (hope, pray, etc.) that Subjects become more descriptive of what's in the message. Wading through 100's of "Question:" or "ARGH! HELP ME" messages for something useful is difficult to say the least. -- Jason Hollinden SMG Systems Admin
Re: Adic Scalar 1000
I'm in the last stage of testing a script I wrote to use a Scalar 100 with Amanda. I would assume the hardware will respond in a similar fashion. I plan to post it to amanda-users tomorrow (need to comment some things better, etc). In the mean time, can you use the 'mtx status' program (ver. 1.2.10) and see if it shows output something like this: [root@reubens /root]# mtx -f /dev/sg2 status Storage Changer /dev/sg2:2 Drives, 31 Slots ( 1 Import/Export ) Data Transfer Element 0:Empty Data Transfer Element 1:Empty Storage Element 1 IMPORT/EXPORT:Empty Storage Element 2:Full :VolumeTag=01 Storage Element 3:Full :VolumeTag=02 Storage Element 4:Full :VolumeTag=03 Storage Element 5:Full :VolumeTag=04 Storage Element 6:Full :VolumeTag=05 Storage Element 7:Full :VolumeTag=06 Storage Element 8:Full :VolumeTag=07 Storage Element 9:Full :VolumeTag=08 Storage Element 10:Empty Storage Element 11:Empty Storage Element 12:Empty Storage Element 13:Empty Storage Element 14:Empty Storage Element 15:Empty Storage Element 16:Empty Storage Element 17:Empty Storage Element 18:Empty Storage Element 19:Empty Storage Element 20:Empty Storage Element 21:Empty Storage Element 22:Empty Storage Element 23:Empty Storage Element 24:Empty Storage Element 25:Empty Storage Element 26:Empty Storage Element 27:Empty Storage Element 28:Empty Storage Element 29:Empty Storage Element 30:Empty Storage Element 31:Full :VolumeTag=31 If it does, then hopefully with the chg-zd-mtx script I'm finishing up you will have full barcode support. That (and a 9 slot capacity) is what I had to modify. Let me know what you find... On Thu, 08 Feb 2001, Adrian Oneil wrote: Just wondering if anyone has ever used Amanda with Adic's Scalar 1000 unit. The Adic uses DLT 8000 tapes. Server OS does not matter to me, I can use whatever flavor of Unix -Adrian -- Jason Hollinden SMG Systems Admin
Re: Barcode support outside of chg-scsi
Ok, I'm a few steps closer to adding barcode support to a modified chg-zd-mtx script. I have a two questions for some people in the know. chg-scsi has the following params: ./chg-scsi-slot param ./chg-scsi-info ./chg-scsi-reset ./chg-scsi-eject ./chg-scsi-clean ./chg-scsi-label param ./chg-scsi-search param ./chg-scsi-status param ./chg-scsi-trace param I know the first 4, as they are documented in the TAPE.CHANGERS file. I've mostly figured out what -label param does, but to be sure I'm pretending to not. My question is, what do the last 5 items do? By that I mean, what do they pass to the changer script, and what do they expect as return values. For instance, I "believe" that -label's param is the amlabel of the current tape. The changer script puts that, and the barcode, into a file, then returns "0 0 0" if it worked. If it fails, it returns the slot, and the tape device. Also, what is the format that amtape needs the barcode file to be in? Just for testing I have it as: amlabel1 barcode1 amlabel2 barcode2 amlabel3 barcode3 ... Thanks... -- Jason Hollinden SMG Systems Admin
Re: Barcode support outside of chg-scsi
offline readyError="offline" while [ -n "$readyError" ]; do readyStatus=`$MT $MTF $tape status 21` echo " - readyStatus = $readyStatus" $DBGFILE readyError=`echo $readyStatus | grep "offline"` done # Now rewind and check echo " - rewind $loadslot" $DBGFILE echo " - sleeping TIMEOUT: $TIMEOUT seconds..." $DBGFILE sleep $TIMEOUT echo " - rewind..." $DBGFILE $MT $MTF $tape rewind echo "$loadslot" $slotfile echo "$loadslot $tape" exit 0 fi } info() { readstatus echo "INFO - current slot $usedslot, last slot $lastslot, can go backwards 1" $DBGFILE if [ $usedslot -lt 0 ]; then echo "0 $lastslot 1" else echo "$usedslot $lastslot 1" fi exit 0 } # Program invocation begins here echo "\n`date` Invoked with args '$@'" $DBGFILE while [ $# -ge 1 ];do case $1 in -slot) shift loadslot $* ;; -info) shift info ;; -reset) shift reset ;; -eject) shift eject ;; *) echo "Unknown option $1" exit 2 ;; esac done At 04:15 PM 2/1/2001 -0500, Jason Hollinden wrote: After several days of searching, reading, and cussing, I am posting my woes in the hopes someone has some insight to using barcodes. Just for background, I have a Dell Poweredge-2400 with RedHat 6.2, running amanda-2.4.2p1. My tape library is an ADIC Scalar 100 hanging off a dedicated Adaptec 2944UW. All my tapes have been labeled using amlabel. I only have 8 tapes (and a cleaning tape resting in the last slot), as you will see in the attached configs, as it takes way too long to index 30 tapes. That said, I'm having trouble with several different paths. I have about 60% sucess with chg-scsi, and 90% success with chg-zd-mtx (using mtx-1.2.10-1). chg-scsi problems: Using this glue script, I can do all of the "tape movement only" functions, such as amtape's eject, reset, and slot command or #. Where it fails is any activity where it has to load tapes and 'quickly' read from them, such as amtape's update, label, and show commands. The problem is that amtape is not giving my library enough time to load up the tape, despite whatever the sleep setting in my chg-scsi.conf file is set to. I've pretty much confirmed this with the fact that I can run the same command again after the tape is completely loaded, and the amlabel shows up fine. Here's an example: ### Ran with no tape in the drive bash-2.03$ /usr/sbin/amtape Reubens current amtape: scanning current slot in tape-changer rack: slot 0: rewinding tape: Input/output error ### This loads a tape from slot 0, but doesn't wait for it to finish winding ### Next is the exact same command, after it's done winding bash-2.03$ /usr/sbin/amtape Reubens current amtape: scanning current slot in tape-changer rack: slot 0: date Xlabel Reubens01 ### Because of this, I can't get the bardcodes from the tapes to do much of anything. Chg-scsi will populate my barcode file with just the tape loaded, but when I need to index all the tapes with 'amtape Reubens update' it has no data, since it doesn't sleep until the tape is ready. My sleep statement has been everything from 120 - 1200 sec. but I don't believe that is what it is supposed to do, anyways. chg-zd-mtx problems: Actually, I have very few problems with this, except that there is no barcode work done with it. I had to modify it to work with 9 slots, and can post that if someone wants. The main problem is no barcode support. The version of mtx I have reports the barcodes, so modifying this glue script some more to use them shouldn't be too much trouble. This is where I finally start getting to my point... How does Amanda utilize barcodes? Are there any Amanda commands that directly mess with barcodes, or is the only thing that has anything to do with them the changer glue script, and it just so happens that only chg-scsi looks at them right now? If it's the second, I'm about a few days away from writing