SUMMARY: number of ufsdumps on a tape

From: LaMere, Brian (N-Innovantage) <brian.lamere_at_lmco.com>
Date: Thu Sep 22 2005 - 14:26:25 EDT
> is there an elegant way to determine how many ufsdumps are on a tape?
> 
> In what is a gross "hack," I simply issue several commands like:
> 
>    "mt -f /dev/rmt/0n fsf 1"
> 
> until I get an error.  When at the last file, issuing that 
> command again responds with:
> 
>    "/dev/rmt/0 fsf 1 failed: I/O error"

(note that it was simply a typo in the email that it didn't say /dev/rmt/0n before)

several said that often things (esp device drivers) are done precisely like that - loop until you get an error.  So I went forward with that, until the oem suggestions...

doing the following:

	mt -f /dev/rmt/0n eom
	let COUNT=`mt -f /dev/rmt/0n status|awk '/file/ {print$3}'`

with that, COUNT is the num of archives on the tape.  Tada!  Then "ufsrestore -tvf" can be used to verify the contents one after the other, based on that.  I had seen/used oem before, but

Meh.  I'm used to using high-level backup utils (Netbackup, etc) so I guess I got spoiled.  Thanks to those that replied!

Brian LaMere
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Thu Sep 22 14:49:22 2005

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:51 EST