Slackware This Forum is for the discussion of Slackware 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
|
10-12-2005, 10:09 AM
|
#1
|
|
Member
Registered: Apr 2005
Location: Warrior, AL
Distribution: Slackware 10.1, Fedora Core 4
Posts: 128
Rep:
|
Tape drive
Where does Slackware mount the tape drive by default? I have a SCSI tape drive using ID2.
|
|
|
|
10-12-2005, 10:48 AM
|
#2
|
|
Member
Registered: Jan 2005
Location: Shropshire, England, UK
Distribution: RedHat, Fedora, CentOS..........
Posts: 121
Rep:
|
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
If your using modprobe you can use the option
Code:
modprobe st buffer_kbs=128
Last edited by cardy; 10-12-2005 at 10:51 AM.
|
|
|
|
10-12-2005, 10:53 AM
|
#3
|
|
Member
Registered: Apr 2005
Location: Warrior, AL
Distribution: Slackware 10.1, Fedora Core 4
Posts: 128
Original Poster
Rep:
|
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.
|
|
|
|
10-12-2005, 11:16 AM
|
#4
|
|
Member
Registered: Jan 2005
Location: Shropshire, England, UK
Distribution: RedHat, Fedora, CentOS..........
Posts: 121
Rep:
|
Try the command
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.
|
|
|
|
10-12-2005, 11:29 AM
|
#5
|
|
Member
Registered: Apr 2005
Location: Warrior, AL
Distribution: Slackware 10.1, Fedora Core 4
Posts: 128
Original Poster
Rep:
|
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....
|
|
|
|
10-12-2005, 12:39 PM
|
#6
|
|
Senior Member
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145
Rep:
|
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
|
|
|
|
10-13-2005, 04:42 AM
|
#7
|
|
Member
Registered: Jan 2005
Location: Shropshire, England, UK
Distribution: RedHat, Fedora, CentOS..........
Posts: 121
Rep:
|
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).
|
|
|
|
10-14-2005, 10:41 AM
|
#8
|
|
Member
Registered: Oct 2005
Location: UK
Posts: 31
Rep:
|
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. 
|
|
|
|
10-14-2005, 11:08 AM
|
#9
|
|
Member
Registered: Jan 2005
Location: Shropshire, England, UK
Distribution: RedHat, Fedora, CentOS..........
Posts: 121
Rep:
|
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.
|
|
|
|
10-14-2005, 01:14 PM
|
#10
|
|
Member
Registered: Oct 2005
Location: UK
Posts: 31
Rep:
|
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!
|
|
|
|
10-14-2005, 02:07 PM
|
#11
|
|
Member
Registered: Oct 2005
Location: UK
Posts: 31
Rep:
|
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 02:37 PM.
|
|
|
|
10-24-2005, 06:29 AM
|
#12
|
|
Member
Registered: Jan 2005
Location: Shropshire, England, UK
Distribution: RedHat, Fedora, CentOS..........
Posts: 121
Rep:
|
No problem, glad you got it working. What was the problem in the end ?
|
|
|
|
10-24-2005, 06:52 AM
|
#13
|
|
Member
Registered: Oct 2005
Location: UK
Posts: 31
Rep:
|
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? 
|
|
|
|
10-24-2005, 09:59 AM
|
#14
|
|
Member
Registered: Jan 2005
Location: Shropshire, England, UK
Distribution: RedHat, Fedora, CentOS..........
Posts: 121
Rep:
|
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.
|
|
|
|
01-25-2006, 07:27 PM
|
#15
|
|
Member
Registered: Apr 2005
Location: Warrior, AL
Distribution: Slackware 10.1, Fedora Core 4
Posts: 128
Original Poster
Rep:
|
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?
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 12:58 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|