Operating System - HP-UX
1751695 Members
5060 Online
108781 Solutions
New Discussion юеВ

How do I remap existing tape devices to new names?

 
John McNulty_2
Frequent Advisor

How do I remap existing tape devices to new names?


[ Build info: HP-UX 11i v2 ( June 2007 ) on an rx3600 ]

Hello,

I know this subject seems to have been done to death. I've read lots of other posts, but none of them are working for me. I have a list of tape drives presented over a SAN from an ESL 322E. During setup they were removed and represented a number of times, and now the rmt device names are all over the place.

I want to re-order them to that they start a instance 1 (there's an internal DAT tape at 0) but nothing I've tried so far works. Here's a list from ioscan:

# ioscan -funC tape
Class I H/W Path Driver S/W State H/W Type Description
===========================================================================
tape 33 0/2/1/0.201.9.255.0.0.2 stape CLAIMED DEVICE HP Ultrium 3-SCSI
/dev/rmt/33m /dev/rmt/33mnb /dev/rmt/c22t0d2BESTn
/dev/rmt/33mb /dev/rmt/c22t0d2BEST /dev/rmt/c22t0d2BESTnb
/dev/rmt/33mn /dev/rmt/c22t0d2BESTb
tape 32 0/2/1/0.201.10.255.0.0.3 stape CLAIMED DEVICE HP Ultrium 3-SCSI
/dev/rmt/32m /dev/rmt/32mnb /dev/rmt/c23t0d3BESTn
/dev/rmt/32mb /dev/rmt/c23t0d3BEST /dev/rmt/c23t0d3BESTnb
/dev/rmt/32mn /dev/rmt/c23t0d3BESTb
tape 34 0/2/1/0.201.10.255.0.0.4 stape CLAIMED DEVICE HP Ultrium 3-SCSI
/dev/rmt/34m /dev/rmt/34mnb /dev/rmt/c23t0d4BESTn
/dev/rmt/34mb /dev/rmt/c23t0d4BEST /dev/rmt/c23t0d4BESTnb
/dev/rmt/34mn /dev/rmt/c23t0d4BESTb
tape 35 0/3/1/0.201.9.255.0.0.1 stape CLAIMED DEVICE HP Ultrium 3-SCSI
/dev/rmt/35m /dev/rmt/35mnb /dev/rmt/c20t0d1BESTn
/dev/rmt/35mb /dev/rmt/c20t0d1BEST /dev/rmt/c20t0d1BESTnb
/dev/rmt/35mn /dev/rmt/c20t0d1BESTb
tape 37 0/3/1/0.201.9.255.0.0.2 stape CLAIMED DEVICE HP Ultrium 3-SCSI
/dev/rmt/37m /dev/rmt/37mnb /dev/rmt/c20t0d2BESTn
/dev/rmt/37mb /dev/rmt/c20t0d2BEST /dev/rmt/c20t0d2BESTnb
/dev/rmt/37mn /dev/rmt/c20t0d2BESTb
tape 36 0/3/1/0.201.10.255.0.0.3 stape CLAIMED DEVICE HP Ultrium 3-SCSI
/dev/rmt/36m /dev/rmt/36mnb /dev/rmt/c21t0d3BESTn
/dev/rmt/36mb /dev/rmt/c21t0d3BEST /dev/rmt/c21t0d3BESTnb
/dev/rmt/36mn /dev/rmt/c21t0d3BESTb
tape 38 0/3/1/0.201.10.255.0.0.4 stape CLAIMED DEVICE HP Ultrium 3-SCSI
/dev/rmt/38m /dev/rmt/38mnb /dev/rmt/c21t0d4BESTn
/dev/rmt/38mb /dev/rmt/c21t0d4BEST /dev/rmt/c21t0d4BESTnb
/dev/rmt/38mn /dev/rmt/c21t0d4BESTb
tape 0 0/5/1/0.0.0 stape CLAIMED DEVICE HP C7438A
/dev/rmt/0m /dev/rmt/c1t0d0BEST /dev/rmt/c1t0d0DDS
/dev/rmt/0mb /dev/rmt/c1t0d0BESTb /dev/rmt/c1t0d0DDSb
/dev/rmt/0mn /dev/rmt/c1t0d0BESTn /dev/rmt/c1t0d0DDSn
/dev/rmt/0mnb /dev/rmt/c1t0d0BESTnb /dev/rmt/c1t0d0DDSnb
tape 21 0/6/1/0.101.9.255.0.0.1 stape CLAIMED DEVICE HP Ultrium 3-SCSI
/dev/rmt/21m /dev/rmt/21mnb /dev/rmt/c27t0d1BESTn
/dev/rmt/21mb /dev/rmt/c27t0d1BEST /dev/rmt/c27t0d1BESTnb
/dev/rmt/21mn /dev/rmt/c27t0d1BESTb
tape 22 0/6/1/0.101.9.255.0.0.2 stape CLAIMED DEVICE HP Ultrium 3-SCSI
/dev/rmt/22m /dev/rmt/22mnb /dev/rmt/c27t0d2BESTn
/dev/rmt/22mb /dev/rmt/c27t0d2BEST /dev/rmt/c27t0d2BESTnb
/dev/rmt/22mn /dev/rmt/c27t0d2BESTb
tape 4 0/6/1/0.101.10.255.0.0.3 stape CLAIMED DEVICE HP Ultrium 3-SCSI
/dev/rmt/4m /dev/rmt/4mnb /dev/rmt/c28t0d3BESTn
/dev/rmt/4mb /dev/rmt/c28t0d3BEST /dev/rmt/c28t0d3BESTnb
/dev/rmt/4mn /dev/rmt/c28t0d3BESTb
tape 8 0/6/1/0.101.10.255.0.0.4 stape CLAIMED DEVICE HP Ultrium 3-SCSI
/dev/rmt/8m /dev/rmt/8mnb /dev/rmt/c28t0d4BESTn
/dev/rmt/8mb /dev/rmt/c28t0d4BEST /dev/rmt/c28t0d4BESTnb
/dev/rmt/8mn /dev/rmt/c28t0d4BESTb
tape 29 0/7/1/0.101.9.255.0.0.1 stape CLAIMED DEVICE HP Ultrium 3-SCSI
/dev/rmt/29m /dev/rmt/29mnb /dev/rmt/c25t0d1BESTn
/dev/rmt/29mb /dev/rmt/c25t0d1BEST /dev/rmt/c25t0d1BESTnb
/dev/rmt/29mn /dev/rmt/c25t0d1BESTb
tape 30 0/7/1/0.101.9.255.0.0.2 stape CLAIMED DEVICE HP Ultrium 3-SCSI
/dev/rmt/30m /dev/rmt/30mnb /dev/rmt/c25t0d2BESTn
/dev/rmt/30mb /dev/rmt/c25t0d2BEST /dev/rmt/c25t0d2BESTnb
/dev/rmt/30mn /dev/rmt/c25t0d2BESTb
tape 12 0/7/1/0.101.10.255.0.0.3 stape CLAIMED DEVICE HP Ultrium 3-SCSI
/dev/rmt/12m /dev/rmt/12mnb /dev/rmt/c26t0d3BESTn
/dev/rmt/12mb /dev/rmt/c26t0d3BEST /dev/rmt/c26t0d3BESTnb
/dev/rmt/12mn /dev/rmt/c26t0d3BESTb
tape 15 0/7/1/0.101.10.255.0.0.4 stape CLAIMED DEVICE HP Ultrium 3-SCSI
/dev/rmt/15m /dev/rmt/15mnb /dev/rmt/c26t0d4BESTn
/dev/rmt/15mb /dev/rmt/c26t0d4BEST /dev/rmt/c26t0d4BESTnb
/dev/rmt/15mn /dev/rmt/c26t0d4BESTb


Then I remove the devices

# rmsf -H 0/2/1/0.201.9.255.0.0.1
# rmsf -H 0/2/1/0.201.9.255.0.0.2
# rmsf -H 0/2/1/0.201.10.255.0.0.3
# rmsf -H 0/2/1/0.201.10.255.0.0.4
# rmsf -H 0/3/1/0.201.9.255.0.0.1
# rmsf -H 0/3/1/0.201.9.255.0.0.2
# rmsf -H 0/3/1/0.201.10.255.0.0.3
# rmsf -H 0/3/1/0.201.10.255.0.0.4

# rmsf -H 0/6/1/0.101.9.255.0.0.1
# rmsf -H 0/6/1/0.101.9.255.0.0.2
# rmsf -H 0/6/1/0.101.10.255.0.0.3
# rmsf -H 0/6/1/0.101.10.255.0.0.4
# rmsf -H 0/7/1/0.101.9.255.0.0.1
# rmsf -H 0/7/1/0.101.9.255.0.0.2
# rmsf -H 0/7/1/0.101.10.255.0.0.3
# rmsf -H 0/7/1/0.101.10.255.0.0.4

Then try and poke them back in the instance positions I want

# insf -C tape -H 0/2/1/0.201.9.255.0.0.1 -I 1
# insf -C tape -H 0/2/1/0.201.9.255.0.0.2 -I 2
# insf -C tape -H 0/2/1/0.201.10.255.0.0.3 -I 3
# insf -C tape -H 0/2/1/0.201.10.255.0.0.4 -I 4
# insf -C tape -H 0/3/1/0.201.9.255.0.0.1 -I 5
# insf -C tape -H 0/3/1/0.201.9.255.0.0.2 -I 6
# insf -C tape -H 0/3/1/0.201.10.255.0.0.3 -I 7
# insf -C tape -H 0/3/1/0.201.10.255.0.0.4 -I 8

# insf -C tape -H 0/6/1/0.101.9.255.0.0.1 -I 9
# insf -C tape -H 0/6/1/0.101.9.255.0.0.2 -I 10
# insf -C tape -H 0/6/1/0.101.10.255.0.0.3 -I 11
# insf -C tape -H 0/6/1/0.101.10.255.0.0.4 -I 12
# insf -C tape -H 0/7/1/0.101.9.255.0.0.1 -I 13
# insf -C tape -H 0/7/1/0.101.9.255.0.0.2 -I 14
# insf -C tape -H 0/7/1/0.101.10.255.0.0.3 -I 15
# insf -C tape -H 0/7/1/0.101.10.255.0.0.4 -I 16


But whatever I do (and I've tried various combinations of flags, they always come back with the same instance numbers:

# ioscan
# insf -eC tape
insf: Installing special files for stape instance 31 address 0/2/1/0.201.9.255.0.0.1
insf: Installing special files for stape instance 33 address 0/2/1/0.201.9.255.0.0.2
insf: Installing special files for stape instance 32 address 0/2/1/0.201.10.255.0.0.3
insf: Installing special files for stape instance 34 address 0/2/1/0.201.10.255.0.0.4
insf: Installing special files for stape instance 35 address 0/3/1/0.201.9.255.0.0.1
insf: Installing special files for stape instance 37 address 0/3/1/0.201.9.255.0.0.2
insf: Installing special files for stape instance 36 address 0/3/1/0.201.10.255.0.0.3
insf: Installing special files for stape instance 38 address 0/3/1/0.201.10.255.0.0.4
insf: Installing special files for stape instance 0 address 0/5/1/0.0.0
insf: Installing special files for stape instance 21 address 0/6/1/0.101.9.255.0.0.1
insf: Installing special files for stape instance 22 address 0/6/1/0.101.9.255.0.0.2
insf: Installing special files for stape instance 4 address 0/6/1/0.101.10.255.0.0.3
insf: Installing special files for stape instance 8 address 0/6/1/0.101.10.255.0.0.4
insf: Installing special files for stape instance 29 address 0/7/1/0.101.9.255.0.0.1
insf: Installing special files for stape instance 30 address 0/7/1/0.101.9.255.0.0.2
insf: Installing special files for stape instance 12 address 0/7/1/0.101.10.255.0.0.3
insf: Installing special files for stape instance 15 address 0/7/1/0.101.10.255.0.0.4

I've even tried building an infile for ioinit to try and force a change, but it refuses:

# ioinit -f /tmp/infile -r
ioinit: Instance number 1 already exists for class tape.
Line 1. 0/2/1/0.201.9.255.0.0.1 tape 1

The last thing I tried was unpresenting the tapes, removing them with rmsf; rebooting the system and then presenting them back again. Guess what .. same instance numbers again.

How do I flush all instances of tape drives permanently from the system so I can start the discovery all over again. I don't understand why this is proving to be so difficult.

Regards,

John





4 REPLIES 4
TwoProc
Honored Contributor

Re: How do I remap existing tape devices to new names?

John, leave the existing node names alone, then use either of the two alternatives.
1) My favorite, just make symbolic links to the tape drives, and use those with the backup software/mediums. For instance, you could take one of those, and name the symbolic link "T1" and then write to "T1" in your backups. I use this and it works great.
2) You can just run "mksf" to create a new special file and name it what you want. This works fine as well to present to the backup library. You can make special file called "T1" and just use that handle for the backups.
We are the people our parents warned us about --Jimmy Buffett
Steven E. Protter
Exalted Contributor

Re: How do I remap existing tape devices to new names?

Shalom John,

http://docs.hp.com/en/B2355-91024/B2355-91024.pdf

That document has the whole procedure. I've trashed a system doing this and do an Ignite backup before trying it.

It's difficult, sorry.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Pete Randall
Outstanding Contributor

Re: How do I remap existing tape devices to new names?

John,

Here are my notes from when I did this myself:


First, let me echo Bill Hassell in saying you can simply rename the existing dev
ice file. There is no significance other than historical to the device names as
we know them.

Second, if you're still nervous about it, you can use a link - linking the undes
ired name to the preferred name.

Third, if you really want to re-create the device names properly, here is a guid
e:

1. Use "ioscan" to find out what the current device files look like and what th
e instance number is:
ioscan -kfnCtape


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

/sbin/mksf -d stape -I 12 -a -b BEST rmt/12m
/sbin/mksf -d stape -I 12 -u -b BEST rmt/12mb
/sbin/mksf -d stape -I 12 -a -n -b BEST rmt/12mn
/sbin/mksf -d stape -I 12 -u -n -b BEST rmt/12mnb


3. Use "ll" to compare your newly created device files with those created by the
system. Major and minor numbers should match between corresponding entries (205
0x061000 for both 12m and the equivalent c6t1d0BEST):

ll /dev/rmt |more

crw-rw-rw 1 bin bin 205 0x061000 Mar 17 08:40 12m
.
.
.
crw-rw-rw 1 bin bin 205 0x061000 Mar 17 08:40 c6t1d0BEST
.
.
.



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

ioscan -kfnCtape



I was using 12m in the example but you can use anything you want.


Pete

Pete
John McNulty_2
Frequent Advisor

Re: How do I remap existing tape devices to new names?


First, thanks to everyone to replying. Your time is appreciated.

Pete, I think I'll have a go at yours first. I'm a bit wary of just renaming device files in case an 'insf -e' in the future does something unpredictable. So I'll ...

1) rmsf -H the devices to clean out everything

2) ioscan so the kernel can see them

3) Use mksf as you've described to match the instances the system sees to the names I need to use. This is actually one half of a two node SG cluster, so they need to be the same on both sides.

I think this should get me out of a hole. I need to close this one off quick as I'm getting married on Saturday, and my fiance is throwing a fit that I'm still mucking around at work instead of doing 'real work' and helping with all the last minute wedding things.

Cheers guys.