From owner-freebsd-questions@FreeBSD.ORG Sat May 19 23:39:42 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E2AB716A400 for ; Sat, 19 May 2007 23:39:42 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.freebsd.org (Postfix) with ESMTP id A5EE113C465 for ; Sat, 19 May 2007 23:39:42 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.1/8.13.8) id l4JNddRp005311; Sat, 19 May 2007 18:39:39 -0500 (CDT) (envelope-from dan) Date: Sat, 19 May 2007 18:39:39 -0500 From: Dan Nelson To: jhall@vandaliamo.net Message-ID: <20070519233939.GA13345@dan.emsphone.com> References: <1757.65.117.48.155.1179578635.squirrel@admintool.trueband.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1757.65.117.48.155.1179578635.squirrel@admintool.trueband.net> X-OS: FreeBSD 6.2-STABLE User-Agent: Mutt/1.5.15 (2007-04-06) Cc: freebsd-questions@freebsd.org Subject: Re: Tape Capacity Used? 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: Sat, 19 May 2007 23:39:43 -0000 In the last episode (May 19), jhall@vandaliamo.net said: > I am trying to calculate how much of the space on my tape has been used. > > This is what I have done, and I want to make sure I barking up the > right tree before going too far. > > Move the tape to the end of the data. (mt eod). > > Find the logical block location of the drive (mt rdspos). > > /dev/nsa0: logical block location 2242573 > > If I multiply the result (2242573) by my blocksize, does this give me > the total amount of the tape that has been used? If your tape drive has hardware compression turned off, that should be accurate. With compression enabled, logical blocks can be varying size on tape depening on the compression ratio. If your device supports the "rdhpos" command, that might give you a number that more accurately indicates where on the physical tape you are. It's a "device-specific value", though, which may not translate to a sequential "0-max" range. -- Dan Nelson dnelson@allantgroup.com