Re: [Bacula-users] Changing file-daemon hosts while keeping existing jobs, filesets without doing FULL backup
Keith Gunderson wrote: - Forwarded Message From: Keith Gunderson kr...@yahoo.com To: bacula-users@lists.sourceforge.net Sent: Tuesday, March 31, 2009 11:55:10 AM Subject: [Bacula-users] Changing file-daemon hosts while keeping existing jobs, filesets without doing FULL backup Hi There, I've been unsubscribed to bacula-users for a number of months... no issues is good, right? But my apologies if this has been asked a lot. I didn't find the answer by searching. I just did a some testing and figured it out for myself. Nothing that follows is recommended (by me) unless you're comfortable with db-admin tasks, sql, and probably C so that you can look into bacula source code to confirm your suspicions about how things work. But actually, doing what follows was pretty easy. We're running bacula 2.2.8 on Debian. I'd like to replace our main fileserver without having to do a full backup of the jobs immediately after the switch. Just to clarify, our fileserver is just computer running bacula-fd. We have about 25 TB of data on some FC disk arrays. Our filesystems are xfs and we use LVM for some nice flexibilty. We'll unplug our old server from the FC switch and plug our new server in. Mount the filesystems and go from there. This worked really well. Copying the /etc/lvm configuration from old to new is what's needed. What is my best bet for getting incrementals to work the next evening? 1) Alter the client table. (I.e. add a new client entry, immediately stop bacula, manually change the two client entries in database table so that the new server has the old servers clientID.) 2) Alter the jobs table (i.e. alter the clientID entry for every job row so that the new servers clientID is listed where the old server used to be.) 3) Buy new tapes dude, you're screwed. If so, why? Thanks! Keith Option 2 was the path I took. After backing up the bacula config and db to my hearts content, I configured the new client and ran a simple backup. Then I looked into the client table and saw what I wanted. Then I ran: update job set clientid = 14 where clientid = 2; (Your query may be different and involve more in the where clause depending on your setup.) Then I updated the jobs jobdefs so that the new fileserver replace the old fileserver. Now its like the old filesystems are on a new server, and I can do incremental backups immediately. If you want to do this, make sure you test it all yourself. Thanks! Keith From: Keith Gunderson kr...@yahoo.com To: bacula-users@lists.sourceforge.net Sent: Tuesday, March 31, 2009 11:55:10 AM Subject: [Bacula-users] Changing file-daemon hosts while keeping existing jobs, filesets without doing FULL backup Hi There, I've been unsubscribed to bacula-users for a number of months... no issues is good, right? But my apologies if this has been asked a lot. I didn't find the answer by searching. We're running bacula 2.2.8 on Debian. I'd like to replace our main fileserver without having to do a full backup of the jobs immediately after the switch. We have about 25 TB of data on some FC disk arrays. Our filesystems are xfs and we use LVM for some nice flexibilty. We'll unplug our old server from the FC switch and plug our new server in. Mount the filesystems and go from there. What is my best bet for getting incrementals to work the next evening? 1) Alter the client table. (I.e. add a new client entry, immediately stop bacula, manually change the two client entries in database table so that the new server has the old servers clientID.) 2) Alter the jobs table (i.e. alter the clientID entry for every job row so that the new servers clientID is listed where the old server used to be.) 3) Buy new tapes dude, you're screwed. If so, why? Thanks! Keith -- ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
[Bacula-users] Changing file-daemon hosts while keeping existing jobs, filesets without doing FULL backup
Hi There, I've been unsubscribed to bacula-users for a number of months... no issues is good, right? But my apologies if this has been asked a lot. I didn't find the answer by searching. We're running bacula 2.2.8 on Debian. I'd like to replace our main fileserver without having to do a full backup of the jobs immediately after the switch. We have about 25 TB of data on some FC disk arrays. Our filesystems are xfs and we use LVM for some nice flexibilty. We'll unplug our old server from the FC switch and plug our new server in. Mount the filesystems and go from there. What is my best bet for getting incrementals to work the next evening? 1) Alter the client table. (I.e. add a new client entry, immediately stop bacula, manually change the two client entries in database table so that the new server has the old servers clientID.) 2) Alter the jobs table (i.e. alter the clientID entry for every job row so that the new servers clientID is listed where the old server used to be.) 3) Buy new tapes dude, you're screwed. If so, why? Thanks! Keith -- ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] problems with Autochanger
It looks like sg3 should be the device name for your changer (sg2 is the drive device). Change your superload item in the sd.conf and try some more. Email me if you have more questions. Keith Christoph Buchli [EMAIL PROTECTED] wrote: Hy list I give up trying and start hoping... hoping someone here could help me... My problem is, that bacula (and even mtx) won't use my autochanger as it would be built for... mtx recognises it [1] but that's all. According to this, I set up my bacula-sd.conf: [2] Everything looks great so far, doesn't it? (I'm pretty shure that sg2 is the right device but although I tested with sg3: Same behaviour. The problem is now that bacula won't accept or even detect some Tapes. The 'label' command prints me some mtx-errors [3] and prints: Label command failed for Volume TestTape001. I have added some outputs of bconsole [4]... Confusing is, that the it seems that there is somewhere a tape labeled with Montag but it is not mounted although bconsole tells that it is mounted. The 'create' command responses with an error too that say something like: 'Pool Default already exists'. Why the hell is he trying the slots command on Drive-1, my archive-device [5]? I guess it's just a lack of understanding how this whole tape-thing works. Of corse I've read through the documentation an found a lot of helpful things but at the moment I can turn page about page but can't find anything... Thanks a lot in advice. sincerely, christoph __ [1] perl -e 'my @v = ( 0,1,2,3 ) ; foreach ( @v ) { my $cmd = `mtx -f /dev/sg$_ inquiry` ; print $cmd\r\r ; }' Product Type: Disk Drive Vendor ID: 'Areca ' Product ID: 'ARC-1260-VOL#00 ' Revision: 'R001' Attached Changer: No Product Type: Processor Vendor ID: 'Areca ' Product ID: 'RAID controller ' Revision: 'R001' Attached Changer: Yes Product Type: Tape Drive Vendor ID: 'CERTANCE' Product ID: 'ULTRIUM 3 ' Revision: '1856' Attached Changer: No Product Type: Medium Changer Vendor ID: 'QUANTUM ' Product ID: 'UHDL' Revision: '0031' Attached Changer: No [2] cat /usr/sepp/var-svn/bacula/srv-rhein/bacula-sd.conf | grep .. | grep -v ^\# [...] Autochanger { Name = Superloader Device = Drive-1 Changer Device = /dev/sg2 Changer Command = /usr/pack/bacula_mysql-2.0.3-rp/amd64-debian-linux3.1/scripts/mtx-changer %c %o %S %a %d } Device { Name = Drive-1 Drive Index = 0 Media Type = LTO-3 Archive Device = /dev/nst0# Normal archive device Minimum block size = 1024 Maximum blocksize = 1024 Autochanger = yes LabelMedia = no; AutomaticMount = yes; AlwaysOpen = yes; } [...] [3] root(cbu)@srv-rhein# mtx -f /dev/sg2 status mtx: Request Sense: 70 00 05 00 00 00 00 1E 00 00 00 00 20 00 00 00 00 00 00 00 READ ELEMENT STATUS Command Failed root(cbu)@srv-rhein# mtx -f /dev/sg3 status mtx: Request Sense: 70 00 02 00 00 00 00 1E 00 00 00 00 04 03 00 00 00 00 00 00 READ ELEMENT STATUS Command Failed root(cbu)@srv-rhein# mtx -f /dev/sg3 inventory mtx:inventory failed [4] bconsole * mount 2(Superloader) Slot:1 [...] 3001 Mounted Volume: Montag 3001 Device Drive-1 (/dev/nst0) is already mounted with Volume Montag * list pools Automatically selected Catalog: MyCatalog Using Catalog MyCatalog ++-+-+-+--+-+ | PoolId | Name| NumVols | MaxVols | PoolType | LabelFormat | ++-+-+-+--+-+ | 1 | Default | 1 | 0 | Backup | * | ++-+-+-+--+-+ *list volumes Pool: Default +-+--+---+-++--+--+-+--+---+---+-+ | MediaId | VolumeName | VolStatus | Enabled | VolBytes | VolFiles | VolRetention | Recycle | Slot | InChanger | MediaType | LastWritten | +-+--+---+-++--+--+-+--+---+---+-+ | 1 | TestVolumeTmp001 | Append| 1 | 18,513,823 |0 | 31,536,000 | 1 |0 | 1 | File | 2007-05-16 15:51:40 | +-+--+---+-++--+--+-+--+---+---+-+ [5] *update Update choice: 1: Volume parameters 2: Pool from resource 3: Slots from autochanger Choose catalog item to update (1-3): 3 The defined Storage resources are: 1: File 2: Superloader Select Storage resource (1-2): 2 Connecting to Storage daemon Superloader at srv-rhein:9103 ... 3306 Issuing autochanger slots command. Device Drive-1 has 0 slots. No slots in changer to scan. * - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the
Re: [Bacula-users] Unable to Connect fo File daemon. ERR:No Route to host
A little bit more detail, if you need it. See if iptables is blocking the port, after your host configs are done. You may want to do a quick test on the director and storage host. (Save the settings, stop iptables, test bacula, start iptables, then configure iptables correctly.) I won't make suggestions about the last step, but its probably documented somewhere. Steps 1,2, 4 are: /etc/init.d/iptables save /etc/init.d/iptables stop /etc/init.d/iptables start I don't suppose this is dangerous for a short testing period, but would anyone suggest that you not do this? Ralf Winkler [EMAIL PROTECTED] wrote: A error like this happen normally if the directory can not resolve the name of the client. Make sure you have a valid route to the client. Do you use subnetting? Can you ping the client from the director computer? Ralf On 4/21/07, Mike Vasquez [EMAIL PROTECTED] wrote: This is happened to two new machines running CentOS 4.4. In the logs it says SD termination status: Waiting on FD Here is my settings on one of them. Client { Name = hl72 Address = 192.168.1.3 FDPort = 9102 Catalog = MyCatalog Password = bacula # password for FileDaemon } Pool { Name = hl72_Full Pool Type = Backup Recycle = yes AutoPrune = yes Volume Retention = 12h Maximum Volume Jobs = 1 Label Format = ${Job}_${Level} Maximum Volumes = 6 } Job { Name = hl72 JobDefs = hl72 Write Bootstrap = /etc/bacula/bootstrap/hl72.bsr } JobDefs { Name = hl72 Type = Backup Client = hl72 FileSet = Default Schedule = DailyCycle Storage = Storage_hl72 messages = Standard Pool = hl72_Full Priority = 5 } Storage { Name = Storage_hl72 # Do not use localhost here Address = my.hostname.domainname.com# N.B. Use a fully qualified name here SDPort = 9103 Password = bacula Device = Backup_hl72 Media Type = File Autochanger = no } I have a couple more machines to setup but I need the above to work. I followed what the documentation said. Is there a specific version of the bacula-client that CentOS prefers. I am using version 1.36.2 of bacula-dir and 1.36.3-1 of the bacula-client. I have even modified hl72's host file to make sure it knows how to get the the director and I still have this problem. Any help would be appreciated. Mike V -- View this message in context: http://www.nabble.com/Unable-to-Connect-fo-File-daemon.--ERR%3ANo-Route-to-host-tf3619783.html#a10107377 Sent from the Bacula - Users mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users - Ahhh...imagining that irresistible new car smell? Check outnew cars at Yahoo! Autos.- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
[Bacula-users] Bacula issues with Linux Fibre Channel drive
Hello, I'm having a hard time tracking down some issues with bacula on my Linux2.6.9k system. I have the sense that the issue could be the result of a misconfiguration of a wide variety of sub-systems. I've spent a lot of time learning how to update firmware, verify driver versions and Fibre Channel topology. So with apologies in advance for my inability to identify the important info first... here's my issue. I have a 4-cpu Xeon system that runs RedHat AS4. This has an Overland 11 slot changer (/dev/sg12) with an HP LTO3 drive (/dev/nst0). This runs through a AIC7xxx type of scsi card. I rebuilt to bacula 2.0.2 last month. I also had the same issues last year using 1.3.36. I use postgres 7.4.13 as the db. The bacula system seems to function well on its own as tests with btape have no issues. But, when jobs are run, the jobs run very slowly with long halts. Also, thousands of these messages are put in the kernel ring buffer while the jobs are spooling to the staging area. The database is on one Fibre Chan. drive. The spooling directory is on another Fibre Channel drive. Most of data getting backed up is from those and other FC drives. All of those drives are on Fibre channel arrays on ioc0 using the mpt-fusion driver. mptbase: ioc0: LogInfo(0x2008): SubCl={FCP Initiator} mptbase: ioc0: LogInfo(0x2008): SubCl={FCP Initiator} mptbase: ioc0: LogInfo(0x2008): SubCl={FCP Initiator} mptbase: ioc0: LogInfo(0x2008): SubCl={FCP Initiator} mptbase: ioc0: LogInfo(0x2008): SubCl={FCP Initiator} mptbase: ioc0: LogInfo(0x2008): SubCl={FCP Initiator} mptbase: ioc0: LogInfo(0x2008): SubCl={FCP Initiator} This bacula issue is the only issue that I have with the system. I can't determine if the issue is related to bacula directly or if it is an indirect problem that only appears during bacula due to the high throughput. Have there been issue related to bacula's file usage on similar systems? (Just grasping at straws.) Can anyone offer suggestions one identifying or solving the problem? Keith - Now that's room service! Choose from over 150,000 hotels in 45,000 destinations on Yahoo! Travel to find your fit.Hello,I'm having a hard time tracking down some issues with my Linux2.6 system. I have the sense that the issue could be the result of a misconfiguration of a wide variety of sub-systems. I've done a fair bit tracking down hardware/ firmware issues, but I'm not convinced of my analysis. So with apolgies in advance for my inability to identify the importants first... here's my issue.I have a 4-core Xeon system that runs RedHat AS4. This has an Overland 11 slot changer (/dev/sg12) with an HP LTO3 drive (/dev/nst0). This runs through a AIC7xxx type of scis card.I rebuilt to bacula 2.0.2 last month. I also had the same issues last year using 1.3.36. I use postgres 7.4.13 as the db. The bacula system seems to function well on its own as tests with btape have no issues. But, when jobs are run, the jobs run very slowly. Also, thousands of these messages are put in the kernel ring buffer while the jobs are spooling to the staging area.I'm guessing that the issue is the device that houses the bacuala database. That drive is on a Fibre channel array on ioc0. mptbase: ioc0: LogInfo(0x2008): SubCl={FCP Initiator}mptbase: ioc0: LogInfo(0x2008): SubCl={FCP Initiator}mptbase: ioc0: LogInfo(0x2008): SubCl={FCP Initiator}mptbase: ioc0: LogInfo(0x2008): SubCl={FCP Initiator}mptbase: ioc0: LogInfo(0x2008): SubCl={FCP Initiator}mptbase: ioc0: LogInfo(0x2008): SubCl={FCP Initiator}mptbase: ioc0: LogInfo(0x2008): SubCl={FCP Initiator}- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] the DREADED autochanger won't load problem
Wow that was a helpful reply Arno. Thank you. Your btape advice will be heeded. Bacula is fantasic. Could it be that I was only missing the update slots command? (see below) Message: 1 Date: Fri, 17 Nov 2006 00:50:27 +0100 (MET) From: Arno Lehmann [EMAIL PROTECTED] Subject: Re: [Bacula-users] the DREADED autochanger won't load problem To: bacula-users@lists.sourceforge.net Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=windows-1252; format=flowed I?ve been able to get through about 5 tapes of full backup by manually loading and mounting the tapes. That is, the jobs are working fine, but the jobs are much bigger than the tapes? and bacula won?t change the tapes itself. Ok, first thing to try: Use the query command and check which volumes Bacula thinks are in the changer (hopefully that query is in your version...). Then: Use the 'Update slots scan' command and see what it reports. When I ran query, it reported there were only 2 tapes in the changer instead of the 11 newly labeled tapes. I ran update slots without problem and now query reports the tapes correctly. I started a job and bacula went off and loaded tapes and got things moving. Success! Bacula: 1.38.5 (run as root) RHEL4 We have a 11 slot LTO3 changer with no barcodes on the tapes. I?ve manually labeled all of the tapes in bconsole (via mtx /dev/sg8 load 1, then label.) How exactly did your label command look? My changer.volumes You mean you've got Bacula set up with the fake autochanger feature? I would NOT recommend to use that. Does that mean you recommend using barcoded labels? Or is there more too the fake autochanger setup that I'm using? ... Giving the mtx ?f /dev/sg8 status : ... looks normal. ... Starting a job: 16-Nov 16:52 backup3-dir: Start Backup JobId 537, Job=data.2006-11-16_16.52.32 16-Nov 16:52 backup3-sd: 3301 Issuing autochanger loaded drive 0 command. 16-Nov 16:52 backup3-sd: 3302 Autochanger loaded drive 0, result: nothing loaded. 16-Nov 16:52 backup3-sd: 3301 Issuing autochanger loaded drive 0 command. 16-Nov 16:52 backup3-sd: 3302 Autochanger loaded drive 0, result: nothing loaded. 16-Nov 16:52 backup3-sd: Please mount Volume F06T06 on Storage Device drive1 (/dev/nst0) for Job data.2006-11-16_16.52.32 Normal so far, because because it's quite possible that Bacula doesn't know the volme it wants is in the autochanger. ... I think we have a stock mtx-changer: ... then it's time to fix it, erm, to make it better suit your needs :-) ... especially here: # Increase the sleep time if you have a slow device # or remove the sleep and add the following: # wait_for_drive $device ... I'd usually recommend to use the wait_for_drive function if it works on your system. How will I know if the wait_for_drive function works? By uncommenting it and testing it with btape? ... Any pointers would be appreciated. It will probably really help you if you started with btape, checking your hardware setup, and learning how it works. Once you really need that knowledge there might be people around telling you to get at your data really soon.. I understand. Thanks very much. Anyway, I suspect you're only missing how to operate Bacula together with an autochanger. The key point is that Bacula needs to know which volumes are in the autochanger. Arno -- IT-Service Lehmann[EMAIL PROTECTED] Arno Lehmann http://www.its-lehmann.de Sponsored Link $420k for $1,399/mo. Think You Pay Too Much For Your Mortgage? Find Out! www.LowerMyBills.com/lre- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
[Bacula-users] the DREADED autochanger won't load problem
Hello all, I can’t get bacula to autoload tapes in the autochanger. I’ve read through a few months of the archives, but I can’t sort out my issue from the previous issues that have been reported. BTW, I just started this job and am trying to pick up where the previous admin left off. I’ve been able to get through about 5 tapes of full backup by manually loading and mounting the tapes. That is, the jobs are working fine, but the jobs are much bigger than the tapes… and bacula won’t change the tapes itself. Bacula: 1.38.5 (run as root) RHEL4 We have a 11 slot LTO3 changer with no barcodes on the tapes. I’ve manually labeled all of the tapes in bconsole (via mtx /dev/sg8 load 1, then label.) My changer.volumes 1:F06T06 2:F06T07 3:F06T08 4:F06T09 5:F06T10 6:F06T11 7:F06T12 8:F06T13 9:F06T14 10:F06T15 11:F06T16 Giving the mtx –f /dev/sg8 status : Storage Changer /dev/sg8:1 Drives, 11 Slots ( 0 Import/Export ) Data Transfer Element 0:Empty Storage Element 1:Full Storage Element 2:Full Storage Element 3:Full Storage Element 4:Full Storage Element 5:Full Storage Element 6:Full Storage Element 7:Full Storage Element 8:Full Storage Element 9:Full Storage Element 10:Full Storage Element 11:Full Starting a job: 16-Nov 16:52 backup3-dir: Start Backup JobId 537, Job=data.2006-11-16_16.52.32 16-Nov 16:52 backup3-sd: 3301 Issuing autochanger loaded drive 0 command. 16-Nov 16:52 backup3-sd: 3302 Autochanger loaded drive 0, result: nothing loaded. 16-Nov 16:52 backup3-sd: 3301 Issuing autochanger loaded drive 0 command. 16-Nov 16:52 backup3-sd: 3302 Autochanger loaded drive 0, result: nothing loaded. 16-Nov 16:52 backup3-sd: Please mount Volume F06T06 on Storage Device drive1 (/dev/nst0) for Job data.2006-11-16_16.52.32 From bacula-sd.conf Autochanger { Name = autochanger Device = drive1 Changer Device = /dev/sg8 Changer Command = /etc/bacula/mtx-changer %c %o %S %a %d } Device { Name = drive1 Media Type = LTO3 Archive Device = /dev/nst0 Drive Index = 0 Autochanger = yes Automatic mount = yes Autoselect = yes Always Open = yes Removable media = yes Random access = yes Spool Directory = /local/07/spool Maximum Spool Size = 1000 Alert Command = sh -c 'tapeinfo -f %c |grep TapeAlert|cat' } From bacula-dir.conf: # Definition of tape storage device Storage { Name = backup3-sd Address = xx9.xx5.xx1.25 (not the real address) Maximum Concurrent Jobs = 10 # Must match string Director Properties in bacula-sd.conf Password = ywZhS7MFR (not real) Device = autochanger Media Type = LTO3 } I think we have a stock mtx-changer: MTX=/usr/sbin/mtx #touch /var/bacula/working/mtx.log debug() { dbgfile=/var/bacula/working/mtx.log if test -e $dbgfile; then echo `date +\%Y%m%d-%H:%M:%S\` $* $dbgfile fi } # # Create a temporary file # make_temp_file() { TMPFILE=`mktemp -t mtx.XX` if test x${TMPFILE} = x; then TMPFILE=/var/bacula/working/mtx.$$ if test -f ${TMPFILE}; then echo Temp file security problem on: ${TMPFILE} exit 1 fi fi } wait_for_drive() { i=0 while [ $i -le 300 ]; do # Wait max 300 seconds if mt -f $1 status | grep ONLINE /dev/null 21; then break fi # debug Device $1 - not ready, retrying... sleep 1 i=`expr $i + 1` done } # check parameter count on commandline # check_parm_count() { pCount=$1 pCountNeed=$2 if test $pCount -lt $pCountNeed; then echo usage: mtx-changer ctl-device command [slot archive-device drive-i ndex] echo Insufficient number of arguments arguments given. if test $pCount -lt 2; then echo Mimimum usage is first two arguments ... else echo Command expected $pCountNeed arguments fi exit 1 fi } case $2 in list) check_parm_count $# 2 ;; slots) check_parm_count $# 2 ;; *) check_parm_count $# 5 ;; esac # Setup arguments ctl=$1 cmd=$2 slot=$3 device=$4 drive=$5 case $cmd in unload) # debug Doing mtx -f $ctl unload $slot $drive # # enable the following line if you need to eject the cartridge # mt -f $device offline # sleep 10 ${MTX} -f $ctl unload $slot $drive ;; load) # debug Doing mtx -f $ctl load $slot $drive ${MTX} -f $ctl load $slot $drive rtn=$? # # Increase the sleep time if you have a slow device # or remove the sleep and add the following: # wait_for_drive $device sleep 15 exit $rtn ;; list) # debug Doing mtx -f $ctl -- to list volumes make_temp_file # Enable the following if you are using