Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tape Drive Addresses

Status
Not open for further replies.

mazeh

Technical User
Mar 28, 2001
14
US
Hi,

I have a machine with a total of 5 tape drives ( 2 DLT, 2 8mm and a 4mm). Is there any script or command that will tell me which /dev/rmt/some-number refers to one of the drives.

At the moment I am resorting to inserting a tape and then using the mt -f /dev/rmt/X status ( X being a number 1 to 5 ). It's not a big deal to do this, but if there was something easier which I could pass on to my users.
 
0lbn -> ../../devices/pci@1f,0/pci@1/scsi@8,1/st@4,0:lbn

You should see something like this when you do a ls -al on /dev/rmt.

Use the SCSI ID to identify the tape drive. It is 4 in this case....
 
But what does
"0lbn -> ../../devices/pci@1f,0/pci@1/scsi@8,1/st@4,0:lbn" this mean?
 
0 0bn 0cb 0cn 0hb 0hn 0lb 0ln 0mb 0mn 0u 0ubn
0b 0c 0cbn 0h 0hbn 0l 0lbn 0m 0mbn 0n 0ub 0un

you should see something like this in your dev/rmt directory
the
n = no rewind
b = bsd device driver
c = hardware compression ( so you do have to | through gzip or compress)
and so on...
to access a device using bsd driver with hardware compression and no rewind(use with multi records) and you want to use tape at addr0

dd if=<yourfile> of=/dev/rmt/0cbn

When the file is done copying you will have 1 record on the tape .. The tape will not rewind after your dd is complete... So your second copy will have to be
dd if=<filecopied> of=/dev/rmt/0cbn
If you take the tape out and put it back in... The tape will
be put at the start... Then to copy a new file and not copy over your others you will have to fast forward to record 3
mt -t /dev/rmt/0n fsf 3

That means to go to record 3 and stop...
That is the reason for the addressing of the tape drives.
for more info
docs.sun.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top