From: Ron K. <rk...@mr...> - 2011-07-15 22:36:19
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> </head> <body bgcolor="#ffffff" text="#000000"> -----> Hi All,<br> -----> <br> -----> I'm wondering if anyone else has run across this. I'm running bacula5.0.2 on Linux (Centos 5) and I'm getting a timeout whenever I use the mtx-changer script to load a tape.<br> -----> <br> -----> I looked at the script and it determines timeout from this:<br> -----> <br> -----> wait_for_drive() {<br> -----> i=0<br> -----> while [ $i -le 300 ]; do # Wait max 300 seconds<br> -----> if mt -f $1 status 2>&1 | grep "${ready}" >/dev/null 2>&1; then<br> -----> break<br> -----> fi<br> -----> debug "Device $1 - not ready, retrying..."<br> -----> sleep 1<br> -----> i=`expr $i + 1`<br> -----> done<br> -----> }<br> -----> <br> -----> but when I issue:<br> -----> <br> -----> mt -f /dev/nst0 status<br> -----> <br> -----> I get this:<br> -----> <br> -----> SCSI 2 tape drive:<br> -----> File number=-1, block number=-1, partition=0.<br> -----> Tape block size 0 bytes. Density code 0x0 (default).<br> -----> Soft error count since last status=0<br> -----> General status bits on (50000):<br> -----> DR_OPEN IM_REP_EN<br> -----> <br> -----> No where does it say 'ready' .<br> -----> <br> -----> I might be able to kludge something, but I wonder if anyone has a solution to this. I'd be surprised if it hadn't come up before, unless I'm missing something obvious, which is certainly very possible.<br> -----> <br> -----> thanks,<br> -----> <br> -----> Eli<br> -----> <br> -----> +----------------------------------------------------------------------<br> -----> |This was sent by ermorris@... via Backup Central.<br> -----> |Forward SPAM to abuse@....<br> -----> +----------------------------------------------------------------------<br> <br> Hello Eli,<br> I just joined the list and was reading past posts. If this is old news, I apologize.<br> I had a similar issue. The '${ready}' is actually a variable found in the mtx-changer.conf file. The following code <br> if test -f /etc/debian_version ; then<br> mt --version|grep "mt-st" >/dev/null 2>&1<br> if test $? -eq 1 ; then<br> ready="drive status"<br> fi<br> fi<br> was a workaround at one point. Commenting out those lines fixed my problem as it appears that debian fixed the issue with mt at some point.<br> <br> The "DR_OPEN IM_REP_EN" line should appear as "BOT ONLINE IM_REP_EN" if the drive is loaded with a tape. From your output, I'd say you either didn't have a tape loaded, or you selected the wrong device to look at. I had a similar issue as the order of the devices in the changer were reversed under /dev - meaning what I'd assume to be /dev/nst0 was actually /dev/nst1 and vice versa. A simple check would be to load a tape and issue the 'mt -f /dev/nst0 status' command against all the /dev/nst* devices. If this is your case, you can switch the devices around in the bacula-sd.conf file and <br> <br> regards,<br> Ron<br> </body> </html> |