1754021 Members
7958 Online
108811 Solutions
New Discussion юеВ

tape special files

 
SOLVED
Go to solution
romano r
Frequent Advisor

tape special files

Hi all,
I'm new in UX, and I've not clear why when I add just one tape to the system (715 with UX10.20) and I generate their special files with insf it creates /dev/rmt/1m, 1mb ... and not 0m, 0mb ... in this case the SCSI id is 4. Are 0, 1 ... related by default to the SCSI id?

Thanx
RR
10 REPLIES 10
V. V. Ravi Kumar_1
Respected Contributor

Re: tape special files

hi,

try with SCSI id 3. but there will not be any problem with this device files also. use SAM to create default device files.

regds
Never Say No
Frederic Sevestre
Honored Contributor

Re: tape special files

Hi,

There is no relation between SCSI ID and the x of /dev/rmt/xm, xmb...
If you do want to change it, and if the 0m is unused, you can used mv :
for all special files :

# mv /dev/rmt/1m /dev/rmt/0m
# mv /dev/rmt/1mb /dev/rmt/0mb
...
...

Regards,
Fr??d??ric

Crime doesn't pay...does that mean that my job is a crime ?
steven Burgess_2
Honored Contributor

Re: tape special files

Romano

ioscan -fnC tape

This will show you the hardware path of your tape drive. I'm not at a server at the moment and can't remember the relationship between the device number and where it resides on the scsi interface.

HTH

Steve
take your time and think things through
Heiner E. Lennackers
Respected Contributor

Re: tape special files

Hi,

the number in /dev/rmt/Xm does not respond the scsi id. There is another device file like /dev/rmt/c0t3d0BEST. Here does the "t3" respond the scsi id.
In /dev/rmt/Xm it is just the number of tapes you already have, 0=first tape, 1 second tape ....
And it may happen, that there was already a tape connected, but the config was not completely removed when the tape drive was removed. then the next tape will get the next number ...

Heiner
if this makes any sense to you, you have a BIG problem
Pete Randall
Outstanding Contributor
Solution

Re: tape special files

RR,

You can make the special file whatever you want (as long as it's not already in use). Just follow these steps:

1. Use "ioscan" to find out what the current device files look like and what instance number is (under column I - 1 in this example) manitoba(274)root# ioscan -kfnCtape
Class I H/W Path Driver S/W State H/W Type Description
======================================================================
tape 0 10/12/5.1.0 stape CLAIMED DEVICE HP C1537A
/dev/rmt/1m /dev/rmt/c10t1d0BESTn
/dev/rmt/1mb /dev/rmt/c10t1d0BESTnb
/dev/rmt/1mn /dev/rmt/c10t1d0DDS
/dev/rmt/1mnb /dev/rmt/c10t1d0DDSb
/dev/rmt/c10t1d0BEST /dev/rmt/c10t1d0DDSn
/dev/rmt/c10t1d0BESTb /dev/rmt/c10t1d0DDSnb

2. Use "mksf" to create each of the four types of device files.

manitoba(191)root# /sbin/mksf -d stape -I 1 -a -b BEST rmt/0m
manitoba(191)root# /sbin/mksf -d stape -I 1 -u -b BEST rmt/0mb
manitoba(191)root# /sbin/mksf -d stape -I 1 -a -n -b BEST rmt/0mn
manitoba(191)root# /sbin/mksf -d stape -I 1 -u -n -b BEST rmt/0mnb

3. Use "ll" to compare your newly created device files with those created by the system. Major and minor numbers should batch between corresponding entries (205 0x0a1000 for both 0m and the equivalent c10t1d0BEST).
manitoba(275)root# ll /dev/rmt/ |more
total 0
crw-rw-rw- 2 bin bin 205 0x0a1000 Apr 29 14:29 0m
crw-rw-rw- 2 bin bin 205 0x0a1080 Aug 22 2000 0mb
crw-rw-rw- 2 bin bin 205 0x0a1040 Oct 17 2001 0mn
crw-rw-rw- 2 bin bin 205 0x0a10c0 Aug 22 2000 0mnb
crw-rw-rw- 2 bin bin 205 0x0a1000 Apr 29 14:29 c10t1d0BEST
crw-rw-rw- 2 bin bin 205 0x0a1080 Aug 22 2000 c10t1d0BESTb
crw-rw-rw- 2 bin bin 205 0x0a1040 Oct 17 2001 c10t1d0BESTn
crw-rw-rw- 2 bin bin 205 0x0a10c0 Aug 22 2000 c10t1d0BESTnb

4. repeat the ioscan to double check that your new device files are associated with the correct tape drive.

You're done!

Hope this helps,
Pete

Pete
romano r
Frequent Advisor

Re: tape special files

Thank you everybody!
I created the special files as suggested by Pete. There is only a little question in my mind: I removed "older" 1m, 1mn ... with rmsf after creating new 0... if in future I'll run again insf -eC tape the 1m,... will be created again and not these with 0; seem that the sistem remember somewhere the original situation, how to remove completely the previous situation(as Heiner wrote)?

Thank again
RR
Pete Randall
Outstanding Contributor

Re: tape special files

RR,

I don't think so. I believe that insf will see that there is a special file associated with that instance and therefore will not create another.

Pete

Pete
Joseph A Benaiah_1
Regular Advisor

Re: tape special files

Romano,

You can use ioinit to reasign instance numbers for a particular class of device in an ioscan as follows:

ioscan -kfCtape | awk '/^tape/ { print $3, $1, $2 }' > /tmp/infile

This file contains H/P Path, Class, Instance.

Edit the file so that the H/W path has the instance no 0 and run:

ioinit -f /tmp/infile -r

You will need to reboot the server for this to take effect but your tape H/W path will have the device file /dev/rmt/0m e.t.c.

Cheers,

Joseph.
romano r
Frequent Advisor

Re: tape special files

thank you Joseph,
your suggestion is very useful, but when I run ioinit it says: "Instance no. already exist ...". Clear, in this box were previously connected 2 tapes, but now just one.
how to reset these instances?

cheers
RR