From owner-freebsd-questions@FreeBSD.ORG Tue May 17 12:59:42 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 070ED16A4CE for ; Tue, 17 May 2005 12:59:42 +0000 (GMT) Received: from clunix.cl.msu.edu (clunix.cl.msu.edu [35.9.2.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6CA2343D8B for ; Tue, 17 May 2005 12:59:41 +0000 (GMT) (envelope-from jerrymc@clunix.cl.msu.edu) Received: from clunix.cl.msu.edu (localhost [127.0.0.1]) j4HCxaJF029552; Tue, 17 May 2005 08:59:36 -0400 (EDT) Received: (from jerrymc@localhost) by clunix.cl.msu.edu (8.12.10+Sun/8.12.2/Submit) id j4HCxavZ029551; Tue, 17 May 2005 08:59:36 -0400 (EDT) From: Jerry McAllister Message-Id: <200505171259.j4HCxavZ029551@clunix.cl.msu.edu> To: virenp@mail.utexas.edu Date: Tue, 17 May 2005 08:59:36 -0400 (EDT) In-Reply-To: <1220.66.25.129.27.1116333880.squirrel@mail.cm.utexas.edu> X-Mailer: ELM [version 2.5 PL7] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: questions@freebsd.org cc: Kris Kennaway Subject: Re: Transferring dump file to tape? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 May 2005 12:59:42 -0000 > >> >> > >> >> Any way to do this? > >> > > >> > You can use dd to write a file to a device (e.g. > >> tape). > >> > > >> > Kris > >> > > >> > >> I thought so too, but it doesn't work. When I issue > >> > >> dd if=var-20050516 of=/dev/nsa0 > >> > >> I get the following error: > >> > >> dd: /dev/nsa0: Invalid argument > >> 1+0 records in > >> 0+0 records out > >> 0 bytes transferred in 0.000786 secs (0 bytes/sec) > >> > >> Since 'dump' works with /dev/nsa0 I am not sure what the > >> problem is. > > > > I would expect the dd to work also. You may need to do > > something > > with blocksize. > > > > But, we see that error a lot on different machines while > > attempting > > to write a file to a tape. We have code that opens the > > drive and > ... > > avail. The error > > you report is the one we see with dd. I generally don't > > see any > > other console message or anything that shows in a dmesg. > > > > I would very much like to see someone who really knows > > about writing > > tapes respond to this. I have begun to be suspicious > > that there is > > something weird about the the sa driver or something along > > the line, > > but don't know enough to really dig it out. I posted > > some questions > > around 3 years ago, but got no response. > > > > By the way, this has occurred in various versions of > > FreeBSD from > > around 3.2 through 4.9. I haven't experimented with it > > on 5.xx yet. > > > > ////jerry > > > >> Viren > > Thanks for your input. As per Kris' suggestion adding the > blocksize worked for me. 'mt' reports my tapedrive having > a blocksize of 1024 bytes (1k), so my command was > > dd if=var-200501516 of=/dev/nsa0 bs=1k > > I transfered the dump file to tape and then was able to > restore directly from tape. My test dump file was small > (140K) but today I plan to test with a full-size > multi-gigabyte dump file. I haven't played long with dd to > judge its reliability. While I was looking around, I also > came across sdd (/usr/ports/sysutils/sdd), which claims to > be a better dd replacement. Adjusting the blocksize was my suggestion. But, even doing that doesn't fix the problem we often see with writes to tape failing in that manner. dd itself is reliable. It is tried and true. I think our failures come from something in the sa driver because a drive that fails usually fails for everything except maybe tar and dump. I wonder what is better about sdd. Guess I should look at it. ////jerry > > Viren >