Operating System - Linux
1832086 Members
3206 Online
110037 Solutions
New Discussion

Re: Connect the tape drive

 
SOLVED
Go to solution
peterchu
Super Advisor

Connect the tape drive

I use ARCserve as the backup server on my RH linux server , I hv just kill the backup process , then the tape device ( /dev/st0 )can't connect again , now I tried to use tar to backup file , then it pop the below error ,
could suggest how can I connect it back except reboot it ? thx.

/tmp> tar -cvf /dev/st0 /tmp/*
tar: /dev/st0: Cannot open: No such device or address
tar: Error is not recoverable: exiting now
17 REPLIES 17
peterchu
Super Advisor

Re: Connect the tape drive

the below is my output , it seems the device /dev/st0 is gone, how to mount it back ? thx.

/dev> mt status
/dev/tape: No such device or address
edp//dev> mt unlock
/dev/tape: No such device or address
edp//dev> mt offl
/dev/tape: No such device or address
edp//dev> mt -f /dev/st0 rewind
/dev/st0: No such device or address
Bojan Nemec
Honored Contributor
Solution

Re: Connect the tape drive

Hi,

Do a cat /proc/scsi/scsi to see if the device is present. If it is not, you can try to add it using the link I posted to you in this thread:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=725762

PS
If this is an option for you, you can try to reboot the system.

Bojan
peterchu
Super Advisor

Re: Connect the tape drive

thx reply ,

I use cat /proc/scsi/scsi to check , it is present , but I can't use it now , could suggest how to make it work ? thx
Coenen_1
New Member

Re: Connect the tape drive

you can try to reconnect the scsi device with the following command:

echo add-single-device x x x x > /proc/scsi/scsi

Of course you have to replace the x with the lun configuration found in the current /proc/scsi/scsi or you can search the dmesg of the original discovery of the tape drive.
xyko_1
Esteemed Contributor

Re: Connect the tape drive

Hi peterchu.

Did you see if the st module is loaded ?
You can see it with lsmod.

If it's not loaded try

depmod
modprobe st

and verify if everything is ok.

If the module is loaded verify if it's in use

lsmod (count field not = zero).

If it is in use try to determine who is using it.

lsof /dev/st0

and, if possible, kill the process.

Unload (modprobe -r st) and reload (modprobe st), and verify if /dev/st0 is ok now.

If st is not loaded, load it (modprobe st).

Hope it helps.
Xyko
peterchu
Super Advisor

Re: Connect the tape drive

thx reply ,

I try to use "modprobe -r st" and reload it ,

then run lsmod ,the result as below , I found that the "st" is unused status , is it the problem why I can't use it ? could suggest how can I make it work ? thx

Module Size Used by Not tainted
st 31396 0 (unused)
nfsd 85168 8 (autoclean)
lockd 58992 1 (autoclean) [nfsd]
sunrpc 88444 1 (autoclean) [nfsd lockd]
lp 9124 0 (autoclean)
parport 38816 0 (autoclean) [lp]
autofs 13620 0 (autoclean) (unused)
e1000 75808 1
floppy 57520 0 (autoclean)
sg 37228 0 (autoclean)
microcode 6848 0 (autoclean)
keybdev 2976 0 (unused)
mousedev 5624 0 (unused)
hid 22276 0 (unused)
input 6144 0 [keybdev mousedev hid]
usb-ohci 23176 0 (unused)
usbcore 80928 1 [hid usb-ohci]
ext3 89960 7
jbd 55060 7 [ext3]
ips 43484 8
sd_mod 13360 16
scsi_mod 112680 4 [st sg ips sd_mod]



peterchu
Super Advisor

Re: Connect the tape drive

When I tar the file to the /dev/st0 , there is below error .

# tar -cvf /dev/st0 /tmp/*
tar: /dev/st0: Cannot open: No such device
tar: Error is not recoverable: exiting now
xyko_1
Esteemed Contributor

Re: Connect the tape drive

Hi peterchu,
try

dmesg | grep tape

and see if you receive an answer like that

Attached scsi tape xxx at scsi0, channel 0, id 2, lun 0

where xxx is your tape device.

Verify if you have a /dev/xxx or /dev/some-subdirectory/xxx.

then try

mt -f /dev/xxx status.

If nothing like that is appearing for you then your system in not reconigsing you tape.

Hope this helps.

regards.
Xyko
peterchu
Super Advisor

Re: Connect the tape drive

I tried " mt -f /dev/st0 status ", but "/dev/st0: No such device " ,
the "/bin/dmesg |grep tape" can't find anything,

as my previous , the problem may be due to the st is "unused" , how to enable it ? thx in advance .
xyko_1
Esteemed Contributor

Re: Connect the tape drive

Peterchu,

if dmesg | grep tape does not present any information, it's because your system cannot see your tape drive.

The fact that st module has a usecount of zero is because this module was never used since last boot, and it was never used because there are no tape drives usable in your system.

How your tape drive is connected to the system ? Using a pci card ? What are the pci card and tape drive manufactors and models ?

Please send us the output of

dmesg
cat /proc/pci
cat /proc/scsi/scsi
lspci -vv


regards,
xyko
peterchu
Super Advisor

Re: Connect the tape drive

thx reply ,
it is by scsi connection ,

please find the attached files

dmesg --> dmesg.txt
cat /proc/pci --> pci.txt
cat /proc/scsi/scsi --> scsi.txt
lspci -vv --> lspcivv.txt
peterchu
Super Advisor

Re: Connect the tape drive

please find the file
pci.txt
peterchu
Super Advisor

Re: Connect the tape drive

lsmod.txt
peterchu
Super Advisor

Re: Connect the tape drive

scsi.txt
thx
xyko_1
Esteemed Contributor

Re: Connect the tape drive

peterchu,

as I can see your tape is attached to an Adaptec scsi controller and you are not loading the aic7xxx module.

Try

depmod -a
modprobe aic7xxx

and see the messages that appears in the log.

After that try to access the tape (/dev/st0).

I'll wait for your feedback about that.

xyko
peterchu
Super Advisor

Re: Connect the tape drive

thank you much for xyko ,

it is OK now, I can use /dev/st0 , I will give you 100 marks ,

may I ask one more question , what is the mean "aic7xxx" , is it stardand tape driver ? I also found it in my other server . thx
xyko_1
Esteemed Contributor

Re: Connect the tape drive

peterchu,

aic7xxx is the standard driver (module) for the Adaptec scsi controller.

I guess that you have installed that controller after the installation of the RH operating system because when you install red hat on a server that has this controller it is automaticaly detected.
Don't forget to put a reference in the /etc/modules.conf for aic7xxx to have the module dinamicaly loaded.
Some thing like that
alias scsi_hostadapter aic7xxx

Verify if you have the module aic79xx and if it works for you. I thing that module is newer and better for your controller.

Best regards,
Xyko