LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 02-13-2009, 03:19 PM   #1
ksun
Member
 
Registered: Sep 2003
Posts: 52

Rep: Reputation: 15
How to find tape drive cleaning status?


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.

[xxx ~]$ cat /proc/scsi/scsi
Attached devices:
....
Host: scsi1 Channel: 00 Id: 06 Lun: 00
Vendor: SEAGATE Model: DAT DAT72-052 Rev: A16E
Type: Sequential-Access ANSI SCSI revision: 03


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.
 
Old 02-13-2009, 04:09 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 23,532

Rep: Reputation: 6748Reputation: 6748Reputation: 6748Reputation: 6748Reputation: 6748Reputation: 6748Reputation: 6748Reputation: 6748Reputation: 6748Reputation: 6748Reputation: 6748
Quote:
Originally Posted by ksun View Post
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.

[xxx ~]$ cat /proc/scsi/scsi
Attached devices:
....
Host: scsi1 Channel: 00 Id: 06 Lun: 00
Vendor: SEAGATE Model: DAT DAT72-052 Rev: A16E
Type: Sequential-Access ANSI SCSI revision: 03


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...
 
Old 02-14-2009, 10:44 AM   #3
choogendyk
Senior Member
 
Registered: Aug 2007
Location: Massachusetts, USA
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,197

Rep: Reputation: 105Reputation: 105
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Tape Backups and How can i find out the Name (label) of the tape in the drive?? helptonewbie Linux - Newbie 2 10-27-2008 08:20 AM
How do I find internal tape drive model? scb31 Linux - Newbie 4 03-23-2007 12:37 PM
How do I use cleaning tape in LTO drive with Arkeia? bdb4269 Linux - Software 3 08-06-2006 07:24 PM
How to find out if Tape drive is compatible or not? nishidwivedi Linux - Hardware 1 06-14-2006 08:35 AM
Cleaning Tape Drive bad_andy Linux - Hardware 5 03-12-2005 12:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 08:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration