From owner-freebsd-questions@FreeBSD.ORG Thu Aug 25 18:55:42 2011 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 879171065672 for ; Thu, 25 Aug 2011 18:55:42 +0000 (UTC) (envelope-from fbsd-ml@gehlbach.com) Received: from element.websitewelcome.com (element.websitewelcome.com [74.53.26.50]) by mx1.freebsd.org (Postfix) with ESMTP id 62B508FC18 for ; Thu, 25 Aug 2011 18:55:42 +0000 (UTC) Received: from [64.253.112.88] (port=56696 helo=[192.168.50.97]) by element.websitewelcome.com with esmtpa (Exim 4.69) (envelope-from ) id 1Qwebu-00028L-Rg for questions@freebsd.org; Thu, 25 Aug 2011 13:25:03 -0500 Message-ID: <4E569379.4070005@gehlbach.com> Date: Thu, 25 Aug 2011 14:24:57 -0400 From: Renee Gehlbach User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110617 Thunderbird/3.1.11 MIME-Version: 1.0 To: questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - element.websitewelcome.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - gehlbach.com X-BWhitelist: no X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: lexdsl01.4.0.0.178.a.iglou.com ([192.168.50.97]) [64.253.112.88]:56696 X-Source-Auth: krgehlba@support.gehlbach.com X-Email-Count: 4 X-Source-Cap: cmRnZWhsYmE7cmRnZWhsYmE7ZWxlbWVudC53ZWJzaXRld2VsY29tZS5jb20= Cc: Subject: Problem reading from tape drive X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Aug 2011 18:55:42 -0000 I recently purchased a FreeBSD-compatible SAS card (an Adaptec ASR 2045) and moved our backup server from Ubuntu to FreeBSD 8.2. I am trying to set up the backup software, but am having problems with the tape drive. Hopefully this is a "duh" type question, since I have a lot more experience working with tape drives in Ubuntu than FreeBSD. I installed bacula, and ran the test function in the btape utility. It wrote 10000 blocks, wrote EOF, wrote 10000 blocks, wrote EOF, wrote EOF. Rewound the tape. Read 10000 blocks, failed reading the second 10000 blocks. I had no luck researching the bacula error message, so I switched to mt and tar for further troubleshooting. camcontrol devlist does show the tape drive: backup# camcontrol devlist at scbus2 target 0 lun 0 (sa0,pass0) So then I went into a directory that had one subdirectory, which contained several plain text logfiles. I did four tars, alternating between that directory and the subdirectory (so I would be able to see a difference between the tar files). backup# mt -f /dev/nsa0 rewind backup# tar -cf /dev/nsa0 * backup# cd log/ backup# tar -cf /dev/nsa0 * backup# cd .. backup# tar -cf /dev/nsa0 * backup# cd log/ backup# tar -cf /dev/nsa0 * So far so good. Then I went back to read those tar files. backup# mt -f /dev/nsa0 rewind backup# tar -tf /dev/nsa0 log/ log/mbw01.log (....insert rest of correct tar listing) backup# tar -tf /dev/nsa0 tar: Unrecognized archive format tar: Error exit delayed from previous errors. So....same results as bacula's tape test utility was giving.....it writes, it reads the first file, then errors on trying to read the second file. However: backup# mt -f /dev/nsa0 rewind backup# tar -tf /dev/nsa0 log/ log/mbw01.log (....insert rest of correct tar listing) backup# mt -f /dev/nsa0 fsf backup# tar -tf /dev/nsa0 mbw01.log (....insert rest of correct tar listing) backup# mt -f /dev/nsa0 fsf backup# tar -tf /dev/nsa0 log/ log/mbw01.log (....insert rest of correct tar listing) backup# mt -f /dev/nsa0 fsf backup# tar -tf /dev/nsa0 mbw01.log (....insert rest of correct tar listing) backup# mt -f /dev/nsa0 fsf So, when I tell it to forward space file at the end of each tar file, it is able to read all four files correctly. This leaves me scratching my head, and wondering what the heck I've set up wrong. Any ideas? Thanks, Renee Gehlbach