LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 09-21-2006, 02:20 PM   #1
bkesting
Member
 
Registered: Mar 2004
Location: Nebraska
Distribution: SuSE, RedHat
Posts: 36

Rep: Reputation: 15
IDE tape drive not being detected


I have an IDE tape drive on a server running SLES 10. As far as I can tell, the machine is not recognizing the tape drive, how can I go about fixing this?

Thanks.
 
Old 09-21-2006, 02:56 PM   #2
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
It could be called one of several things. If you have IDE=SCSI emulation then it will probably be called /dev/st0. If you don't have that then it will probably be called /dev/mt0 or /dev/rt0.

Check your boot log in /var/log/boot.log to see if there is any mention of the tape drive. I don't happen to have mine hooked up so I can't provide an example, but it will be very clear that it has found a tape drive.

You can also use the lspci utility to see if the system sees the tape drive.

Also you can use the hwinfo utility to see what devices the kernel detects.
 
Old 09-21-2006, 03:06 PM   #3
bkesting
Member
 
Registered: Mar 2004
Location: Nebraska
Distribution: SuSE, RedHat
Posts: 36

Original Poster
Rep: Reputation: 15
In /var/log/boot.msg there is a line that says it found an ATAPI tape drive and assigned it to /dev/hdc.

How do you use the two utilities you mentioned?

Thanks.
 
Old 09-21-2006, 03:57 PM   #4
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
Quote:
Originally Posted by bkesting
In /var/log/boot.msg there is a line that says it found an ATAPI tape drive and assigned it to /dev/hdc.

How do you use the two utilities you mentioned?
I seem to recall that my SuSE v9.2 was saying the same thing during boot, tape = /dev/hdc. I'm not absolutely sure about that. I haven't had my IDE tape drive connected for several months, but an old backup script that I was using has it as /dev/ht0. Just for kicks see if that exists on your system.
Code:
ls /dev/ht*
If it does exist put a tape in your tape drive and try this.
Code:
mt -f /dev/ht0 retension
If that makes the tape go then we're all set. I'm just not sure if I had the IDE=SCSI kernel parameter when I was using this script. Lately I've been backing up to an external disk. It's amazing how quickly you forget stuff.

Well anyway, give that a try and see what happens.
 
Old 09-21-2006, 04:03 PM   #5
bkesting
Member
 
Registered: Mar 2004
Location: Nebraska
Distribution: SuSE, RedHat
Posts: 36

Original Poster
Rep: Reputation: 15
That command does cause my tape drive to fire up and do something. So now, it is just a matter of software I am using to see the tape drive.
 
Old 09-21-2006, 04:59 PM   #6
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
Okay so we found the tape drive mapping. As you say, now it's just a matter of figuring out what you want to use for backup software. I can tell you what I was doing before I switched to external hard disks.

I created files that were the same size as the tapes, in in blocks. Then I mounted them through the loop devices using encryption. Then I formatted them and did a backup into them. Then I would unmount them and use dd to copy the encrypted files to tapes. That way the data on the tapes is encrypted. I believe that there is an easier way. I know that the tar command has an option to use an external program to compress the tar archive. I was thinking that instead of an external compression program I could call gpg to encrypt the tar archive as the backup was being created. One step encrypted archives. Much neater. I never tested it though.

Here is an example of how I was using dd to copy the encrypted files to tape. Maybe it might give you an idea.

Code:
root> cat dd2tape01.sh
#!/bin/bash

echo Retensioning tape.
mt -f /dev/ht0 retension

echo Erasing tape.
mt -f /dev/ht0 erase

echo Rewinding tape.
mt -f /dev/ht0 rewind

echo Starting tape dump of tape01.enc at `date +"%d %b %Y %r"`.
time \
dd if=/home/bkp/tape01.enc of=/dev/nht0 bs=10240 conv=notrunc,noerror
sync

echo Rewinding tape.
mt -f /dev/ht0 rewind

echo The tape dump has completed.
echo

exit
You'll notice that I actually backed up to device /dev/nht0. That is the same as /dev/ht0 except that /dev/nht0 won't automatically rewind. You have to give it the rewind command to get the tape to rewind when you use /dev/nht0. The "n" stands for "no automatic rewind". I had that in there because I was thinking about adding a block of data after the tar file to store the log file. Obviously I didn't implement it.

Last edited by stress_junkie; 09-22-2006 at 09:40 AM.
 
  


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
IDE Tape Drive not being recognized nethawk Linux - Hardware 5 08-11-2006 08:19 AM
detecting IDE tape drive heramboak SUSE / openSUSE 12 01-30-2006 08:35 AM
Travan 40 IDE Tape Drive Kaashar Mandriva 1 10-25-2004 04:34 PM
Onstream IDE Tape Drive jwatco2001 Linux - Hardware 17 08-11-2003 04:32 AM
Ide Tape drive problems edati Linux - General 9 02-26-2001 12:00 AM

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

All times are GMT -5. The time now is 10:34 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