HPE 9000 and HPE e3000 Servers
1748053 Members
5101 Online
108758 Solutions
New Discussion юеВ

Re: how to change Instance number for a tape drive?

 
Joshua Scott
Honored Contributor

Re: how to change Instance number for a tape drive?

Then I did an insf -e, just for good measure.

attached is the ioscan -funC tape after the insf -e

What are the chances...
Joshua Scott
Honored Contributor

Re: how to change Instance number for a tape drive?

Also, I did this:
# /usr/sbin/fbackup -f /dev/rmt/1m -i/home
fbackup(1004): session begins on Thu Mar 25 15:13:37 2004
fbackup(3205): WARNING: unable to read a volume header
fbackup(3024): writing volume 1 to the output file /dev/rmt/1m
fbackup(3055): total file blocks read for backup: 630
fbackup(3056): total blocks written to output file /dev/rmt/1m: 717
fbackup(1030): warnings encountered during backup
# cd /home/ftp/etc
# ll
-r--r--r-- 2 root other 174 Mar 15 11:51 group
-r--r--r-- 2 root other 174 Mar 15 11:51 logingroup
-r--r--r-- 1 root other 479 Mar 15 11:51 passwd
# mv group group.test
# /usr/sbin/frecover -x -f /dev/rmt/1m -i /home/ftp/etc/group
# ll
total 64
-r--r--r-- 1 root other 174 Mar 15 11:51 group
-r--r--r-- 2 root other 174 Mar 15 11:51 group.test
-r--r--r-- 2 root other 174 Mar 15 11:51 logingroup
-r--r--r-- 1 root other 479 Mar 15 11:51 passwd
# rm group
# /usr/sbin/frecover -x -f /dev/rmt/0m -i /home/ftp/etc/group
# ll
total 64
-r--r--r-- 1 root other 174 Mar 15 11:51 group
-r--r--r-- 2 root other 174 Mar 15 11:51 group.test
-r--r--r-- 2 root other 174 Mar 15 11:51 logingroup
-r--r--r-- 1 root other 479 Mar 15 11:51 passwd

---

As you can see, the both devices worked well at the same time.

Having both the 0m and 1m device files didn't affect my backup and restore.

Josh
What are the chances...
Selvaraj
Advisor

Re: how to change Instance number for a tape drive?

I found the issue with tape drive IDs. Hope you can understand from my first question, we swapped hard disk between production and lab nodes with same hardware configuration and model number. But it mismatched with tape drive IDs. The production node tape drive pointed to ID number "3" and the lab node pointed to ID number "0". That is the reason, it says "Instance number 0 already exists for class tape". Now I changed tape drive ID manually and corrected the issue without rebooting the box. The steps I followed are in production node:
1. Removed special files on tape devices using "rmsf -C tape -H "
2. Powered off tape drive while system runs online.
3. Changed tape drive SCSI ID to match production node (manually pulled out to change settings)
4. Powered on tape drive.
5. Performed "ioscan" command.
6. Performed "insf -e -q -C tape -H ".

Then it creates "0m/0mn" successfully and instance number on hard path also got changed to "0". My problem is solved for now.

Only concern is, how do we clear old instance number and create new one with instance number "0" without changing SCSI ID on tape drive but using the existing ID. Is there any method to remove "ioconfig" file and create new one with kernel files?. your suggestion is highly appreciated.

Thanks for all your help.
You can do it man !
Bill Hassell
Honored Contributor

Re: how to change Instance number for a tape drive?

Instance numbers are always created in the order in which new hardware is discovered. So the history of your server is what creates the apparent mismatch. If keeping the naming conventions is important, then hardware must be carefully added and deleted. However, it may be a much more portable solution to use symbolic links. Whatever name belongs to the desired tape drive (/dev/rmt/0mn, etc) just create a symlink called tape. For example:

ln -s /dev/rmt/0mn /dev/rmt/tape

So when you move to another server, figure out what the name of the tape is and create the symlink. A lot simpler, and avoids editing the fairly critical ioinit file.


Bill Hassell, sysadmin
Amrutha
Occasional Advisor

Re: how to change Instance number for a tape drive?

Thanks for this doc,