Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I've searched pretty extensively on google and here on LQ, and unfortunately I haven't found the answer posted. Most results have to do with "run a cleaning tape if your drive is having problems" which is off target.
Does anyone know how to read the cleaning status of a tape drive?
I'm using Red Hat Enterprise Linux 5.2 on a Dell PowerEdge 2950 with a Seagate Dat72 tape drive.
I have looked at mt to see if it would provide any status specific to the cleaning status, but I don't see anything that specific. "mt -f /dev/nst0 status" doesn't show anything specific to cleaning status, although for all I know once the tape drive needs to be cleaned it could show up there? (anyone?) I can't force the tape drive to trip the cleaning status to do a test.
Browsing through /dev and /proc didn't return anything that was obvious, although I could guess that cat'ing some of the files in those locations could actually be displaying a 1 or 0 that is the actual indicator.
What I'm really trying to accomplish is: I want to be notified when the tape drive cleaning status light goes on so I can know to go clean it. I work away from the machine and I'm trying to follow the manufacturer's recommendation to clean only when the cleaning light trips.
I run my backup job once daily in the middle of the night and I would love to run a cron job every morning at 8:00 AM to page me if I need to go run the cleaning tape.
I already have a paging utility, so I'm thinking my cron job will check the status and send a page if the result of the cleaning status is yes or 1 or whatever.
Any suggestions are welcome. I run bacula as my backup software, although I doubt it's relevant.
I've searched pretty extensively on google and here on LQ, and unfortunately I haven't found the answer posted. Most results have to do with "run a cleaning tape if your drive is having problems" which is off target.
Does anyone know how to read the cleaning status of a tape drive?
I'm using Red Hat Enterprise Linux 5.2 on a Dell PowerEdge 2950 with a Seagate Dat72 tape drive.
I have looked at mt to see if it would provide any status specific to the cleaning status, but I don't see anything that specific. "mt -f /dev/nst0 status" doesn't show anything specific to cleaning status, although for all I know once the tape drive needs to be cleaned it could show up there? (anyone?) I can't force the tape drive to trip the cleaning status to do a test.
Browsing through /dev and /proc didn't return anything that was obvious, although I could guess that cat'ing some of the files in those locations could actually be displaying a 1 or 0 that is the actual indicator.
What I'm really trying to accomplish is: I want to be notified when the tape drive cleaning status light goes on so I can know to go clean it. I work away from the machine and I'm trying to follow the manufacturer's recommendation to clean only when the cleaning light trips.
I run my backup job once daily in the middle of the night and I would love to run a cron job every morning at 8:00 AM to page me if I need to go run the cleaning tape.
I already have a paging utility, so I'm thinking my cron job will check the status and send a page if the result of the cleaning status is yes or 1 or whatever.
Any suggestions are welcome. I run bacula as my backup software, although I doubt it's relevant.
What you're looking for is the particular hardware sense code, that tells the "clean me" light on the tape drive to come on. That'll have to be something provided by the tape-drive driver. Have you checked the tape-drive vendor's site, to see if there's a linux driver? I'd also check the manual, to see if that sort of thing is described in it.
There's no magic-bullet, though...each tape manufacturer has a different code for different things...
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,197
Rep:
Also, it should drop a message into /var/log/messages. If you have some sort of monitoring utility watching that, you might find it. If you know a time that the light came on, go back and check messages to see if you can find something about it.
Personally, I've never noticed anywhere to check it in, e.g., `mt status`, which would be the obvious place. But, if you look at the man page for that, it is both device and architecture dependent; and, on Solaris, it lists as a "bug" that not all hardware reports available statuses and suggests checking the manual or release documents from the drive vendor.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.