Date: Wed, 30 Oct 2002 15:26:03 -0600 From: Dan Nelson <dnelson@allantgroup.com> To: Matthias Trevarthan <trevarthan@wingnet.net> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Sony AIT tape position question Message-ID: <20021030212603.GD42580@dan.emsphone.com> In-Reply-To: <200210301441.55643.trevarthan@wingnet.net> References: <200210301441.55643.trevarthan@wingnet.net>
next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Oct 30), Matthias Trevarthan said: > I have a Sony AIT tape drive (one of the nifty 4 tape autoloaders): > TSL-SA300C. It has a nice little display on the front that indicates > the tape's "wound" status. When the tape is fully rewound, the bar > graph is full. When the tape is fully recorded, or wound, the bar > graph is empty. > > Is there any way that I can detect this programmatically? I would > like my scripts to be intelligent enough that they can approximate > the size required for a dump, and the size left on the tape. That's difficult. There definitely isn't any standard SCSI command for pulling this info. Sony might provide it in a vendor-specific modepage (readable with the "camcontrol modepage" command; you can decode vendor-specific pages by adding entries to /usr/share/misc/scsi_modes). See if you can find a technical manual for the AIT drive. > (I would also like to detect which tape I have loaded at any given > point, but I suspect that is outside the bounds of standard SCSI > communication. I'd probably need some proprietary code to do this...) If your autoloader has a barcode scanner, you can read the labels with the "chio status" command. > When I use the 'mt' command with 'rdspos' I get a block number. Would this > number be useful in determining how wound the tape is? If so, how would I go > about interpreting this as a percentage or as a byte volume? rdspos gives you the logical scsi block number, which doesn't mean much if your tape does hardware compression, since a tape full of zeros will have more logical blocks on it than a tape full of zip files. rdhpos might work better, if the tape drive actually ends up writing fixed-size blocks to tape. -- Dan Nelson dnelson@allantgroup.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021030212603.GD42580>