LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 10-12-2005, 11:09 AM   #1
JSLayton
Member
 
Registered: Apr 2005
Location: Warrior, AL
Distribution: Slackware 10.1, Fedora Core 4
Posts: 128

Rep: Reputation: 15
Tape drive


Where does Slackware mount the tape drive by default? I have a SCSI tape drive using ID2.
 
Old 10-12-2005, 11:48 AM   #2
cardy
Member
 
Registered: Jan 2005
Location: Shropshire, England, UK
Distribution: RedHat, Fedora, CentOS..........
Posts: 121

Rep: Reputation: 19
Usually the first tape drive found is /dev/st0

You can check by using the dmesg
Code:
dmesg | grep -i "attached" | grep -i tape
command to see what has been detected. On my system I see this:
Code:
Attached scsi tape st0 at scsi2, channel 0, id 0, lun 0
Once you have your drive working it is worth noting that if your drive is shoeshining i.e. moving the tape back and forth a lot this is caused by the kernel only allocating a 32k tape buffer by default.

This can be changed either as a parameter to the kernel or as a parameter to modprobe when you load the st module.

Kernel Option:

in grub.conf add the following to the line starting kernel
Code:
st=128
If your using modprobe you can use the option

Code:
modprobe st buffer_kbs=128

Last edited by cardy; 10-12-2005 at 11:51 AM.
 
Old 10-12-2005, 11:53 AM   #3
JSLayton
Member
 
Registered: Apr 2005
Location: Warrior, AL
Distribution: Slackware 10.1, Fedora Core 4
Posts: 128

Original Poster
Rep: Reputation: 15
OK, I did the command you gave me and it found nothing. Now, how can I fix this problem? I know it is detecting the drive on boot, but I'm guessing it's just not mounting it.
 
Old 10-12-2005, 12:16 PM   #4
cardy
Member
 
Registered: Jan 2005
Location: Shropshire, England, UK
Distribution: RedHat, Fedora, CentOS..........
Posts: 121

Rep: Reputation: 19
Try the command
Code:
lsmod
If you don't see the module st in the list then use the command
Code:
modprobe st buffers_kbs=128
To tell the kernel to load SCSI tape support.
 
Old 10-12-2005, 12:29 PM   #5
JSLayton
Member
 
Registered: Apr 2005
Location: Warrior, AL
Distribution: Slackware 10.1, Fedora Core 4
Posts: 128

Original Poster
Rep: Reputation: 15
does the modprobe command tell the kernal to load the tape on every boot or just now? After running that command, I rebooted and the tape still wasn't there....
 
Old 10-12-2005, 01:39 PM   #6
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 51
If you reboot after loading a module it would be useless since it won't load again automatically. modprobe st to load the module and see if you tape is recognized, or if you want to "feel safe" with a reboot, add the modprobe st line to /etc/rc.d/rc.modules
 
Old 10-13-2005, 05:42 AM   #7
cardy
Member
 
Registered: Jan 2005
Location: Shropshire, England, UK
Distribution: RedHat, Fedora, CentOS..........
Posts: 121

Rep: Reputation: 19
It would be useful to see the output from the kernel boot (you can do this using dmesg), specifically the section where your scsi card detects the tape drive. Can you post this section onto the forum (not the whole dmesg output).
 
Old 10-14-2005, 11:41 AM   #8
stokes
Member
 
Registered: Oct 2005
Location: UK
Posts: 31

Rep: Reputation: 15
Hi, sorry for interrupting but I seem to have a very similar if not the same problem. I have a tape drive installed in my Slack 10.1 box and the Adaptec card recognises the drive before Linux starts to boot.

However dmesg has revealed the following:

Code:
SCSI subsystem driver Revision: 1.00 
kmod: failed to exec /sbin/modprobe -s -k scsi_hostadapter, errno = 2 
kmod: failed to exec /sbin/modprobe -s -k scsi_hostadapter, errno = 2 
kmod: failed to exec /sbin/modprobe -s -k scsi_hostadapter, errno = 2
I tried "modprobe st buffers_kbs=128" and now I can see it when I do lsmod:

Code:
root@mail:~# lsmod
Module                  Size  Used by    Not tainted
st                     27832   0  (unused)
Does that mean I should be able to mount it now? I have tried this so far:

Code:
root@mail:~# mount /dev/sda1 /mnt/tape 
mount: mount point /mnt/tape does not exist 
root@mail:~# ls /mnt 
cdrom/  floppy/  hd/ 
root@mail:~# mkdir /mnt/tape 
root@mail:~# mount /dev/sda1 /mnt/tape 
mount: /dev/sda1 is not a valid block device 
root@mail:~# mount /dev/sda /mnt/tape 
mount: /dev/sda is not a valid block device 
root@mail:~# mount /dev/sdb /mnt/tape 
mount: /dev/sdb is not a valid block device 
root@mail:~# mount /dev/sg0 /mnt/tape 
mount: /dev/sg0 is not a block device
What to try next?

Hope you don't mind me hijacking this thread .. it seemed relevant and may help all of us.
 
Old 10-14-2005, 12:08 PM   #9
cardy
Member
 
Registered: Jan 2005
Location: Shropshire, England, UK
Distribution: RedHat, Fedora, CentOS..........
Posts: 121

Rep: Reputation: 19
Your problem is that your scsi card has not been correctly configured and the module has not loaded. Because of this the system knows nothing about the scsi devices attached to your scsi controller.

The st module has loaded correctly but because no scsi devices have been detected the module has nothing to do.

Finally tapes can not be mounted like a file system, you can use the command mt to control the tape drive once you have it correctly detected and you can read and write to the tape using programs such as tar but you can't mount it like a filesystem.

If you let me know what scsi card your using we should be able to locate the appropriate module for it.
 
Old 10-14-2005, 02:14 PM   #10
stokes
Member
 
Registered: Oct 2005
Location: UK
Posts: 31

Rep: Reputation: 15
Quote:
Originally posted by cardy
If you let me know what scsi card your using we should be able to locate the appropriate module for it.
That sounds hopeful!

The card is an Adaptec AHA-2930CU.

Thanks for your help!
 
Old 10-14-2005, 03:07 PM   #11
stokes
Member
 
Registered: Oct 2005
Location: UK
Posts: 31

Rep: Reputation: 15
I found a Linux driver and downloaded the tar.gz from here:

http://people.freebsd.org/~gibbs/linux/SRC/

I know it has freebsd in the URL but it is apparently the Linux driver. I've untarred it and installed it with "insmod aic7xxx"

Now I can see it here:

Code:
root@mail:/downloads/ben/drivers/scsi/aic7xxx# lsmod
Module                  Size  Used by    Not tainted
aic7xxx               141080   0  (unused)
I feel like I'm getting somewhere but I still cant mount it...

edit: sussed it ... it works now.

Code:
mt -f /dev/st0 status
SCSI 2 tape drive:
File number=0, block number=0, partition=0.
Tape block size 512 bytes. Density code 0x13 (DDS (61000 bpi)).
Soft error count since last status=0
General status bits on (41010000):
 BOT ONLINE IM_REP_EN
cardy: Thanks for pointing me in the right direction.

Last edited by stokes; 10-14-2005 at 03:37 PM.
 
Old 10-24-2005, 07:29 AM   #12
cardy
Member
 
Registered: Jan 2005
Location: Shropshire, England, UK
Distribution: RedHat, Fedora, CentOS..........
Posts: 121

Rep: Reputation: 19
No problem, glad you got it working. What was the problem in the end ?
 
Old 10-24-2005, 07:52 AM   #13
stokes
Member
 
Registered: Oct 2005
Location: UK
Posts: 31

Rep: Reputation: 15
All I needed to do was "insmod aic7xxx"

Now I can control the tape drive using the "mt" command.

I have one final question for ya as you've resurrected this thread! I've been looking for a graphical front end for "mt" since setting this up as I'm used to using programs like Backup Exec in windows, rather than tar and gzip. I tried using KDAT which comes with KDE but it doesn't seem to be capable of mounting my tape drive. I think it's because I have to use mt to send commands to it. Any ideas?
 
Old 10-24-2005, 10:59 AM   #14
cardy
Member
 
Registered: Jan 2005
Location: Shropshire, England, UK
Distribution: RedHat, Fedora, CentOS..........
Posts: 121

Rep: Reputation: 19
There are a number of open source backup tools available although no GUI to mt that I know of.

I have been trialing bacula
http://www.bacula.org/ which allows you to have managed drives, there is also a free version of arkeia available which is a comercial package but will support a single tape drive and should do what you want. have a look at

http://<br /> http://www.arkeia.org...ght.html<br />

The above version is limited it depends what you wish to backup.

On a final note, you did not say what kernel your using but if you add the line
Code:
alias scsi_hostadapter aic7xxx
to the file /etc/modules.conf (if your using a 2.4 kernel) or /etc/modprobe.conf (if using a 2.6 kernel) you should find that your scsi card module will automatically be inserted.
 
Old 01-25-2006, 08:27 PM   #15
JSLayton
Member
 
Registered: Apr 2005
Location: Warrior, AL
Distribution: Slackware 10.1, Fedora Core 4
Posts: 128

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by cardy
Code:
modprobe st buffers_kbs=128
To tell the kernel to load SCSI tape support.
I know this is an old thread, but I just realized this. When trying to initialize this section of the code, it is telling me that buffers_kbs is not a valid parameter. Any other ideas to change the buffer size?
 
  


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
How Do I use a Tape drive monkeymartin Slackware 4 05-26-2006 07:46 AM
Floppy drive interfaced tape drive in Slackware isolationist Linux - Hardware 6 02-13-2006 06:54 AM
tape drive tincat2 Linux - Hardware 1 02-13-2006 06:50 AM
Tape Drive sph90457 Linux - Hardware 2 02-13-2006 06:47 AM
Help with tape drive smgr12 Red Hat 2 08-29-2005 12:07 PM


All times are GMT -5. The time now is 02:45 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration