From: LaMere, Brian (N-Innovantage) (brian.lamere@lmco.com)
Date: Wed Sep 21 2005 - 14:34:47 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/0 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"
Therein lies the ugly hack - I simply count the number of times that took (well, I do an mt status, and extract the file number from the bottom line). Then I rewind the tape, and do my ufsrestores based off that number. For this task I'm forced to use ksh, so automation is restricted thusly.
Very ugly. Surely there's a pretty way to do this? Is there a command I'm missing somewhere that will just give me the number of ufsdumps on a tape, without having to end a loop on an error?
Thanks,
Brian LaMere
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:31:41 EDT