Operating System - HP-UX
1820254 Members
2631 Online
109622 Solutions
New Discussion юеВ

ioinit: Instance number 0 already exists for class tape

 
Fedon Kadifeli
Super Advisor

ioinit: Instance number 0 already exists for class tape

Hi,

A new machine came preinstalled from HP (HP-UX 11.31). However the only DAT tape (D7438A) has device name like /dev/rmt/2m (this is because its instance number is 2 in ioscan).

I wanted to change the instance number to 0 (the default tape drive for most commands is /dev/rmt/0m).

The
ioscan -kf | grep -e INTERFACE -e DEVICE | grep -v target | awk '{printf "%s %s %s\n",$3,$1,$2}'
command output is as follows:

0/0/1/0 OO 0
0/0/1/1 OO 1
0/0/1/2 OO 2
0/0/2/0 sideba 0
0/0/2/0.0 ext_bus 0
0/0/2/0.0.0.0 disk 2
0/0/2/0.1 ext_bus 1
0/1/1/0 ext_bus 2
0/1/1/0.0.0 disk 1
0/1/1/0.1.0 disk 0
0/1/1/1 ext_bus 3
0/1/1/1.3.0 tape 2
0/1/2/0 lan 0
0/4/1/0 fc 0
0/7/1/0 tty 0
0/7/1/1 tty 1
16 ipmi 0

I changed the 2 at the end of line containing "tape" to 0 and did:

# mv /etc/ioconfig /etc/ioconfig.save
# mv /stand/ioconfig /stand/ioconfig.save
# shutdown -ry 0

Booted in single user mode and did:

# /sbin/ioinit -c
... and CTRL-D to continue boot process.
# init s
# ioinit -f /infile -r

At this point ioinit says that the instance number 0 already exists for class tape. However, this tape drive is the only and single tape drive in the system.

How can I make the change I want? Am I missing something? I did this type of thing several times on other 11.x systems; but this is my first 11.31 system.

Thank you.
5 REPLIES 5
Pete Randall
Outstanding Contributor

Re: ioinit: Instance number 0 already exists for class tape

Have a look at the attached doc composed after I struggled with a similar situation several years ago.


Pete

Pete
Fedon Kadifeli
Super Advisor

Re: ioinit: Instance number 0 already exists for class tape

Thank you Pete for the suggestions. Unfortunately I wasn't able to create the necessary device file with the same minor number.

#/sbin/mksf -d stape -I 2 -a -b BEST rmt/0m

#ll /dev/rmt
total 0
crw-rw-rw- 1 bin bin 205 0x033020 Sep 13 15:23 0m
crw-rw-rw- 2 bin bin 205 0x033000 Jul 23 23:08 2m
crw-rw-rw- 2 bin bin 205 0x033080 Jul 23 22:55 2mb
crw-rw-rw- 2 bin bin 205 0x033040 Jul 23 23:32 2mn
crw-rw-rw- 2 bin bin 205 0x0330c0 Jul 23 22:55 2mnb
crw-rw-rw- 2 bin bin 205 0x033000 Jul 23 23:08 c3t3d0BEST
crw-rw-rw- 2 bin bin 205 0x033080 Jul 23 22:55 c3t3d0BESTb
crw-rw-rw- 2 bin bin 205 0x033040 Jul 23 23:32 c3t3d0BESTn
crw-rw-rw- 2 bin bin 205 0x0330c0 Jul 23 22:55 c3t3d0BESTnb

#ioscan -fnkC tape
Class I H/W Path Driver S/W State H/W Type Description
=====================================================================
tape 2 0/1/1/1.3.0 stape CLAIMED DEVICE HP C7438A
/dev/rmt/0m /dev/rmt/c3t3d0BEST
/dev/rmt/2m /dev/rmt/c3t3d0BESTb
/dev/rmt/2mb /dev/rmt/c3t3d0BESTn
/dev/rmt/2mn /dev/rmt/c3t3d0BESTnb
/dev/rmt/2mnb


But, I would prefer the instance number change method.

Anyway; the original device (2m) also does not work:

#tar -cf /dev/rmt/2m /tmp
tar: cannot open /dev/rmt/2m
Tim Nelson
Honored Contributor

Re: ioinit: Instance number 0 already exists for class tape

What if you remove the tape device, rmsf any tape related device files, reboot the server to clean things up and then reconnect the tape and do an ioscan ?

Just a shot in the dark.

Fedon Kadifeli
Super Advisor

Re: ioinit: Instance number 0 already exists for class tape

Tim,

I did what you suggested. Removed power from the tape drive; rmsf'ed all devices:

# rmsf /dev/rmt/2m* /dev/rmt/c3*

Rebooted the system and checked that no tape device is show in ioscan.

After that, I powered on the tape drive and did ioscan and insf; but the SAME device names reappeared.

Can this be related to the "agile view" thing which is new in HP-UX 11.31?

The current state is as follows:

# ioscan -fnC tape
Class I H/W Path Driver S/W State H/W Type Description
=====================================================================
tape 2 0/1/1/1.3.0 stape CLAIMED DEVICE HP C7438A
/dev/rmt/2m /dev/rmt/c3t3d0BEST
/dev/rmt/2mb /dev/rmt/c3t3d0BESTb
/dev/rmt/2mn /dev/rmt/c3t3d0BESTn
/dev/rmt/2mnb /dev/rmt/c3t3d0BESTnb


# ioscan -fNnC tape
Class I H/W Path Driver S/W State H/W Type Description
===================================================================
tape 3 64000/0xfa00/0x7 estape CLAIMED DEVICE HP C7438A
/dev/rtape/tape3_BEST /dev/rtape/tape3_BESTn
/dev/rtape/tape3_BESTb /dev/rtape/tape3_BESTnb


I want the tape device to be the default /dev/rmt/0m.
Fedon Kadifeli
Super Advisor

Re: ioinit: Instance number 0 already exists for class tape

A correction to my previous to previous post. The device /dev/rmt/2m DOES work.

In the meantime, I opened a case to HP (requesting the instance number change 2 -> 0).