Special Notices
Please use this information with care. IBM will not be responsible for damages of any kind resulting from its use. The use of this information is the sole responsibility of the customer and depends on the customer's ability to evaluate and integrate this information into the customer's operational environment.
This document describes issues related to restoring tty and printer devices attached to 128-port adapters using the RAN (Remote Asynchronous Nodes).
AIX Level 4.2.1 or Greater
AIX Level 4.3
The status of this document and the accompanying script is that minimal testing has been done, but it now covers the main bases.
Devices on the RS/6000 are numbered in the order in which they are added to the operating system. The system administrator can maintain a logical order to devices, or can choose to add devices in a random order. By maintaining a logical order to devices, many problems can be avoided as will be shown in the section Preventing mksysb problems..
128-port adapters are numbered in the order in which they are added to the system. If more than one adapter is added at the same time, then the order will be dependent on the order in which the bus is walked during the next boot sequence. The device name will be depending on the type of bus.
BUS |
device names |
Microchannel |
cxma0, cxma1, .. |
ISA |
cxia0, cxia1, .. |
PCI |
cxpa0, cxpa1, .. |
The order of walking the bus is dependent on the RS/6000 model.
For the model H50 and H70 the order is:
H50 order H70 order
PCI slot 3 PCI slot 3
PCI slot 4 PCI slot 4
PCI slot 5 PCI slot 1
PCI slot 1 PCI slot 2
PCI slot 2 PCI slot 7
PCI slot 6 PCI slot 8
PCI slot 7 PCI slot 5
PCI slot 8 PCI slot 6
PCI slot 9
ISA card 1
ISA card 2To see the 128-port adapter locations in your system use the lsdev command as shown here:
lsdev -Cc adapter | grep cx
cxpa0 Available 10-70 IBM 128-Port Async (PCI) Adapter
cxpa1 Available 30-60 IBM 128-Port Async (PCI) AdapterThe information returned by the lsdev command indicates the adapter name, the status of the adapter, the location of the adapter, and the type of adapter. If the status of an adapter indicates Defined instead of Available, that is and indication that an adapter has been removed without removing the device, or that the adapter card is bad.
The location code is dependent on the RS/6000 model and bus type.
Possible 128-Port adapter locations on the RS/6000 F50 and F70 are shown in this table:
RS/6000 H50 |
RS/6000 H70 | |||
Slot Number |
Location |
Parent' |
Location |
Parent' |
PCI slot 1 |
20-58 |
pci1 |
20-58 |
pci1 |
PCI slot 2 |
20-60 |
pci1 |
20-60 |
pci1 |
PCI slot 3 |
10-68 |
pci0 |
10-68 |
pci0 |
PCI slot 4 |
10-70 |
pci0 |
10-70 |
pci0 |
PCI slot 5 |
10-78 |
pci3 |
40-58 |
pci3 |
PCI slot 6 |
30-60 |
pci3 |
40-60 |
pci3 |
PCI slot 7 |
30-68 |
pci2 |
30-68 |
pci2 |
PCI slot 8 |
30-70 |
pci2 |
30-70 |
pci2 |
PCI slot 9 |
30-78 |
pci2 |
NA |
NA |
First ISA card |
01-01 |
isa1 |
NA |
NA |
Second ISA card |
01-02 |
isa2 |
NA |
NA |
Back the the lsdev command, you can add a -F flag and show the parent as shown here:
lsdev -Cc adapter -F"name location parent description" | grep cx
cxpa0 10-70 pci0 IBM 128-Port Async (PCI) Adapter
cxpa1 30-60 pci2 IBM 128-Port Async (PCI) AdapterBased this information, cxpa0 is the adapter in slot 4, and cxpa1 is the adapter in slot 6.
In an ideal system, the lower numbers will be located earlier in the sequence of walking the bus.
RAN's are also numbered in the order in which they are added. This order has nothing to do with the adapter that they are located on. RANS are included among async adapters and are named sa3, sa4, sa5,.. The starting sa number for the first RAN will be dependent on the RS/6000 model and the adapters that have been installed earlier or have been found earlier in the boot sequence. In the boot sequence, the sequence that the RAN's are found is based first on the sequence in which the adapters are discovered, and then in the sequence of the line number and note number of the individual RAN's that are turned on during the boot. If a previously defined RAN is turned off during bootup, it will show up as defined.
The associating between the RAN and the parent 128-port adapter is can be seen by using the lsdev command :
lsdev -Cc concentrator
sa3 Available 10-70-11 16-Port RAN EIA-232 for 128-Port Adapter
sa4 Available 10-70-22 16-Port RAN EIA-232 for 128-Port Adapter
sa5 Available 30-60-21 16-Port RAN EIA-232 for 128-Port AdapterThis lsdev listing shows RAN's that are located on two different adapters. The first two byte sequences of the location code indicate the adapter location code. The third two byte sequence shows the 128-port line number and RAN node number. On an F50, line 1 is the top 15-pin connector on the adapter, and line 2 is the lower connector.
Location |
Adapter Location |
Line |
RAN Node |
10-70-11 | 10-70, Slot 4 |
1 | 1 |
10-70-12 | 10-70, Slot 4 |
1 | 2 |
10-70-21 | 10-70, Slot 4 |
2 | 1 |
10-70-22 | 10-70, Slot 4 |
2 | 2 |
30-60-11 | 30-60, Slot 6 |
1 | 1 |
30-60-21 | 30-60, Slot 6 |
2 | 1 |
30-60-24 | 30-60, Slot 6 |
2 | 4 |
lsdev -Cc concentrator -F"name location parent description"
sa3 10-70-11 cxpa0 16-Port RAN EIA-232 for 128-Port Adapter
sa4 10-70-22 cxpa0 16-Port RAN EIA-232 for 128-Port Adapter
sa5 30-60-21 cxpa1 16-Port RAN EIA-232 for 128-Port Adapter
The first three two byte sequences of the tty or lp location will show the location of the parent RAN, while the last two bytes will show the port of the RAN.
To see the tty devices use:
lsdev -Cc tty
tty0 Available 01-S1-00-00 Asynchronous Terminal
tty1 Available 10-70-11-00 Asynchronous Terminal
tty2 Available 10-70-11-01 Asynchronous Terminal
tty3 Available 10-70-11-02 Asynchronous Terminal
tty4 Available 30-60-21-15 Asynchronous Terminal
tty5 Available 30-60-21-00 Asynchronous Terminal
tty6 Available 10-70-22-00 Asynchronous Terminal
tty7 Available 10-70-22-08 Asynchronous TerminalTo see the printer devices use:
lsdev -Cc printer
lp0 Available 10-70-11-05 Lexmark 4039 plus LaserPrinter
lp1 Available 10-70-22-04 IBM 4039 LaserPrinter
lp2 Available 30-60-21-09 Lexmark Optra laser printerThe following table shows more details on the description of the tty and printer device location.
Location |
Adapter Location |
Line |
RAN Node |
RAN Port |
10-70-11-00 | 10-70, Slot 4 |
1 | 1 | 0 |
10-70-12-01 | 10-70, Slot 4 |
1 | 2 | 1 |
10-70-21-02 | 10-70, Slot 4 |
2 | 1 | 2 |
10-70-22-03 | 10-70, Slot 4 |
2 | 2 | 3 |
30-60-11-08 | 30-60, Slot 6 |
1 | 1 | 8 |
30-60-21-10 | 30-60, Slot 6 |
2 | 1 | 10 |
30-60-24-15 | 30-60, Slot 6 |
2 | 4 | 15 |
Based on the previous information, construct a wiring diagram for your 128-port devices. For the sample configurations shown, the diagram might looks something like:
Device |
Location |
Adapter Location |
Line |
RAN Node |
RAN Port |
tty0 |
01-S1-00-00 | System Board |
NA | NA | NA |
tty1 |
10-70-11-00 | 10-70, Slot 4 |
1 | 1 | 0 |
tty2 |
10-70-11-01 | 10-70, Slot 4 |
1 | 1 | 1 |
tty3 |
10-70-11-02 | 10-70, Slot 4 |
1 | 1 | 2 |
lp0 |
10-70-11-05 | 10-70, Slot 4 |
1 | 1 | 5 |
tty6 |
10-70-22-00 | 10-70, Slot 4 |
2 | 2 | 0 |
lp1 |
10-70-22-04 | 10-70, Slot 4 |
2 | 2 | 4 |
tty7 |
10-70-22-08 | 10-70, Slot 4 |
2 | 2 | 8 |
tty5 |
30-60-11-00 | 30-60, Slot 6 |
1 | 1 | 0 |
lp2 |
30-60-21-09 | 30-60, Slot 6 |
2 | 1 | 9 |
tty4 |
30-60-24-15 | 30-60, Slot 6 |
2 | 4 | 15 |
Major and Minor numbers for tty and lp devices can be found by doing a directory listing of the /dev directory. 128-port adapters and RAN's do not have major and minor numbers and do not have accessible special device files.
Look at the device files with ls -l /dev as shown below. The two numbers before the date are the major and minor numbers. The major number is operating system dependent, while the minor number is based on the location of the tty or lp device.
ls -l /dev/tty*
crw-rw-rw- 1 root system 1, 0 Apr 05 10:40 /dev/tty
crw--w--w- 1 root system 16, 0 Apr 05 10:41 /dev/tty0
crw------- 1 root system 36, 0 Apr 02 17:13 /dev/tty1
crw------- 1 root system 36, 1 Apr 02 17:13 /dev/tty2
crw------- 1 root system 36, 2 Apr 02 17:13 /dev/tty3
crw------- 1 root system 36,335 Apr 02 17:13 /dev/tty4
crw------- 1 root system 36,320 Apr 02 17:13 /dev/tty5
crw--w--w- 1 root system 36, 80 Apr 05 10:41 /dev/tty6
crw------- 1 root system 36, 88 Apr 02 17:13 /dev/tty7
ls -l /dev/lp*
crw-rw-rw- 1 root system 36, 5 Apr 02 17:13 /dev/lp0
crw-rw-rw- 1 root system 36, 84 Apr 02 17:13 /dev/lp1
crw-rw-rw- 1 root system 36,329 Apr 02 17:13 /dev/lp2With the PCI bus 128-port cards, the device numbers can be related as follows:
Adapter name |
Line No. |
RAN Node |
Port Number |
Minor Number |
cxpa0 |
1 |
1 |
0 |
0 |
cxpa0 |
1 |
1 |
1 |
1 |
cxpa0 |
1 |
1 |
0-15 |
0-15 |
cxpa0 |
1 |
2 |
0-15 |
16-31 |
cxpa0 |
1 |
3 |
0-15 |
32-47 |
cxpa0 |
1 |
4 |
0-15 |
48-63 |
cxpa0 |
2 |
1 |
0-15 |
64-79 |
cxpa0 |
2 |
2 |
0-15 |
80-96 |
cxpa1 |
1 |
1 |
0-15 |
256-271 |
cxpa1 |
2 |
1 |
0 |
320 |
cxpa1 |
2 |
1 |
1 |
321 |
When a system is restored from a mksysb tape, the device numbering for some devices such as 128-port adapters and RAN's is based on the order in which they are found while walking the bus, and this may be totally different from the numbers assigned during the original configuration of these devices. The problem is exacerbated by the fact that tty and lp devices attached to a ran are not renumbered during the mksysb, but are assigned based on the parent name (i.e. the RAN sa number).
One of the simplest examples of this problem is the case where you have only one 128-port adapter. When you start, you have only one RAN, and you place that RAN on line two of the adapter. The ran becomes SA3 because SA0, SA1, and SA2 are already used by the integrated serial ports on the H50. This ran will most likely have a node number of one, so the location for sa3 will be xx-yy-21. Sometime later, you have requirements for more users and add a new RAN, and to keep things optimal you add this ran on line 1. This new RAN becomes sa4 at location xx-yy-11. Of course we have already added tty and lp devices to the first RAN, and will add ones to this RAN. To keep this simple, lets just work with the two devices that are attached to port 0 on each ran. On the first RAN, you added an IBM3151 terminal on the first port of the ran, and on the later RAN, you added an Lexmark Optra printer on port 0. The device list now shows these devices as:
tty0 Available 01-S1-00-00 Asynchronous Terminal
tty1 Available 10-70-21-00 Asynchronous Terminal
lp0 Available 10-70-11-00 Lexmark Optra laser printerThe terminals work fine, and so do the printers. After everything is working, you use mksysb to create a backup of your system believing you are safe. That night, you have a lightning strike and your disk is totally destroyed. But you thing, "Not to worry, I have a system backup that is recent. You put in the new drive, and restore your system from your mksysb tape. The next morning, the phone in the help room rings off the wall. The user at the terminal on tty1 says. I can't get a login prompt on my screen, and I see data scrolling past from time to time. Another user calls and asks where his print job went. You panic and call IBM support line.
What happened during the mksysb restoration is that the RAN that was formerly known as sa4 was found earlier in the restoration process than the previous sa3. Since there are only two RAN's, the process is fairly simple: sa3 -> sa4 and sa4 -> sa3. Looking at a list of devices you now see:
tty0 Available 01-S1-00-00 Asynchronous Terminal
tty1 Available 10-70-11-00 Asynchronous Terminal
lp0 Available 10-70-21-00 Lexmark Optra laser printerThe easiest thing to do in this case is to simply swap cables, but that is not an exceptable solution in very many cases. The remainder of this document describes how to prevent the occurence of this problem, and how to fix the problem if it occurs.
If there is no change in the RAN sa numbers, then there will be no problems with TTY or Printer devices. The goal in preventing mksysb problems is to start on day one of installation planning for the mksysb.
If you follow these rules, you should not have mksysb restoration problems with devices attached to 128-port adapters.
At the time that you create the mksysb tape, use a script to save information about all your 128-port related devices. The following script will save all the information you need to successfully restore your system.
#!/bin/ksh
# Get customized attributes (lsattr info)
# Useful for restoring devices
odmget -q "name like tty*" CuAt > CuAt.tty
odmget -q "name like lp*" CuAt > CuAt.lp
odmget -q "name like sa*" CuAt > CuAt.sa
odmget -q "name like cx*" CuAt > CuAt.cx
# Get Customized Device info. Contains location and sa
# Useful for restoring devices
odmget -q "name like tty*" CuDv > CuDv.tty
odmget -q "name like lp*" CuDv > CuDv.lp
odmget -q "name like sa*" CuDv > CuDv.sa
odmget -q "name like cx*" CuDv > CuDv.cx
# Get customized driver info. Contains device minor number
# Useful for restoring devices
odmget -q "value3 like tty*" CuDvDr > CuDvDr.tty
odmget -q "value3 like lp*" CuDvDr > CuDvDr.lp
odmget -q "value3 like sa*" CuDvDr > CuDvDr.sa
odmget -q "value3 like cx*" CuDvDr > CuDvDr.cx
# Get device status info
# Useful for determining which devices need modified.
lsdev -Cc tty -F"name status location parent description" > lsdev.tty
lsdev -Cc printer -F"name status location parent description" > lsdev.printer
lsdev -Cc adapter -F"name status location parent description" > lsdev.adapter
lsdev -Cc concentrator -F"name status location parent description" > lsdev.concentrator
# Get dev directory info
# Show the major and minor numbers of devices
ls -l /dev/tty* > ls.tty
ls -l /dev/lp* > ls.lp
ls -l /dev/cx* > ls.cx
# Use snap to collect all async and printer information
snap -A
snap -p
# Move snap information to current directory
cp /tmp/ibmsupt/printer/*.snap .
cp /tmp/ibmsupt/async/*.snap .
Create a tar file with the information and save to a tape or diskette. Also leave a copy on the system that you are creating the mksysb tape on.
Create a base directory for the restoration such as /tmp/128port. Change to this directory and create three subdirectories: pre, post, and working. Change to the pre directory and restore the data that you collected prior to creating the mksysb tape. Change to the post directory and run the get128.sh script to collect data after the mksysb restoration. Change to the working directory to evaluate the problem and begin the fix.
To evaluate if there is a problem, and the extent of the problem you can look at devices in order from adapter to RAN to tty or printer.
The steps to evaluate the problem are:
It is not really important the the adapters keep the same device numbers. What we want to see here is if adapters have been moved to new slots. If they have not been moved, then we don't need to use the adapter information in restoring our terminal and printer devices.
To see if the adapters have moved check the differences in the device files saved from the pre and post installation. If the diff command shown below returns nothing or if the device numbers have not changed for the adapters, then you will have no problems. This is the typical case when you are restoring the mksysb on the same system that you made the tape from. For example:
# diff ../pre/lsdev.adapter ../post/lsdev.adapter | grep cx
> cxpa0 Available 10-70 IBM 128-Port Async (PCI) Adapter
< cxpa0 Available 10-70 IBM 128-Port Async (PCI) Adapter
> cxpa1 Available 30-60 IBM 128-Port Async (PCI) Adapter
< cxpa1 Available 30-60 IBM 128-Port Async (PCI) Adapter
On the other hand if your get back a listing indicating that one or more of the adapters is in a new slot, you will need to use this information when restoring the printer and terminal devices. In this example one of the 128-Port adapters is in a new slot:
# diff ../pre/lsdev.adapter ../post/lsdev.adapter | grep cx
new cxpa1 Available 10-70 IBM 128-Port Async (PCI) Adapter
old cxpa0 Available 10-70 IBM 128-Port Async (PCI) Adapter
new cxpa0 Available 10-60 IBM 128-Port Async (PCI) Adapter
old cxpa1 Available 30-60 IBM 128-Port Async (PCI) Adapter
Keep in mind that when we make the changes to the configuration files that the location and the minor number of the tty and lp devices are based on the location and name of the adapter.
The tty and printer assignments are based on the RAN sa number, and not on their original location. This means that if the RAN gets a new sa number that the tty and printer definitions will be associated with the RAN that gets the same sa number after the mksysb restore. To see if any RANs changed sa numbers use the diff command as shown in the following example:
# diff ../pre/lsdev.concentrator ../post/lsdev.concentrator
1,4c1,3
PRE
< sa3 Available 10-70-22 16-Port RAN EIA-232 for 128-Port Adapter
< sa4 Available 30-60-21 16-Port RAN EIA-232 for 128-Port Adapter
< sa5 Available 10-70-11 16-Port RAN EIA-232 for 128-Port Adapter
---
POST
> sa3 Available 10-70-11 16-Port RAN EIA-232 for 128-Port Adapter
> sa4 Available 10-70-22 16-Port RAN EIA-232 for 128-Port Adapter
> sa5 Available 30-60-21 16-Port RAN EIA-232 for 128-Port Adapter
Based on this example, and what we learned earlier about locations, tty devices that were previously on sa3 at location 10-70-22 which were on node 2 of line 2 on this 128-port adapter, are now on sa3 at location 10-70-11, or on line 1 node 1. In fact we should be able to move the rj45 connectors from the 10-70-22 RAN to the 10-70-11 RAN in corresponding ports and the devices should work. With three RAN's as shown here, this might be simple, but not with a half a dozen fully populated 128-port adapters. In the case above, you will notice that all of the adapters have changed locations. This means that to correct the problem we will have to change the configuration files for all of the devices attached to these RAN.
Based on what we learned about the RAN's, we can conclude that tty and lp devices will change locations. To confirm this, we can again use the diff command on our example files:
# diff ../pre/lsdev.tty ../post/lsdev.tty
< tty1 Available 10-70-22-00 Asynchronous Terminal
< tty2 Available 10-70-22-01 Asynchronous Terminal
< tty3 Available 10-70-22-02 Asynchronous Terminal
< tty4 Available 10-70-11-15 Asynchronous Terminal
< tty5 Available 10-70-11-00 Asynchronous Terminal
< tty6 Available 30-60-21-00 Asynchronous Terminal
< tty7 Available 30-60-21-08 Asynchronous Terminal
---
> tty1 Available 10-70-11-00 Asynchronous Terminal
> tty2 Available 10-70-11-01 Asynchronous Terminal
> tty3 Available 10-70-11-02 Asynchronous Terminal
> tty4 Available 30-60-21-15 Asynchronous Terminal
> tty5 Available 30-60-21-00 Asynchronous Terminal
> tty6 Available 10-70-22-00 Asynchronous Terminal
> tty7 Available 10-70-22-08 Asynchronous Terminal
# diff ../pre/lsdev.printer ../post/lsdev.printer
< lp0 Available 10-70-22-05 Lexmark 4039 plus LaserPrinter
< lp1 Available 30-60-21-04 IBM 4039 LaserPrinter
< lp2 Available 10-70-11-09 Lexmark Optra laser printer
---
> lp0 Available 10-70-11-05 Lexmark 4039 plus LaserPrinter
> lp1 Available 10-70-22-04 IBM 4039 LaserPrinter
> lp2 Available 30-60-21-09 Lexmark Optra laser printer
Although it would be easier to just remove and read this one tty, I want to use it as an illustration of how the process can be automated for a group of TTY's. The keys to restoring a tty is to correct the odm entries in the customized databases. In the collection script, we gathered information from all of the associated customized data bases. In this section, we will look at the entries that we retrieved and see how we can use these to create a working TTY at the original location.
First find the location of the original tty7 from the pre lsdev.tty file.
tty7 Available 30-60-21-08 sa4 Asynchronous TerminalNext find the RAN sa that matches this location after the mksysb restore from the post lsdev.concentrator file
sa5 Available 30-60-21 16-Port RAN EIA-232 for 128-Port Adapter
The CuDv Database contains the base location, status and parent information for a tty or printer device. We need to correct the entry from this database so that it matches the correct information that we would get from adding a new tty at the desired location.
The following shows the information from this database as obtained from the pre and post directories and then shows the correct value for a new tty added at this location after the mksysb.
Pre mksysb |
Post mksysb |
Corrected for restore |
|
|
|
If you look carefully you will see that I can take the location information from the original tty, and the sa information that matches that for the post install to get a new parent. To create a file that I can use to add the tty back, I simply need to change the status to "0". This is because after I add the device I want to have it come up as defined an not available. After making these changed, I will now have a file which I'll call CuDv.tty7 with the following information:
CuDv:
name = "tty7"
status = 0
chgstatus = 1
ddins = ""
location = "30-60-21-08"
parent = "sa5"
connwhere = "8"
PdDvLn = "tty/rs232/tty"
The CuDvDr Database contains the information for setting the minor number for the device file in the /dev directory.
Note: You do not need to fix this database because it is rebuilt by mkdev during the re-add of the tty. This information is only provided for your information, but is not needed for reinstalling the tty.
Again we can compare the entries from pre, post, and fixed for this tty7 example.
Pre mksysb |
Post mksysb |
Corrected for restore |
|
CuDvDr: resource = "devno" value1 = "36" value2 = "88" value3 = "tty7" |
CuDvDr: resource = "devno" value1 = "36" value2 = "328" value3 = "tty7" |
Note: The value1 value or major number comes from the post file, and the value2 or minor number comes from the pre file.
Based on this we now have our second file or CuDvDr.tty7:
CuDvDr:
resource = "devno"
value1 = "36"
value2 = "328"
value3 = "tty7"
The CuAt Database contains the device attributes and will be the same for both the pre and post, so you can simply extract this from the CuAt.tty file from either directory. This contains changes made during or subsequent to creating the tty. We can extract all the odm stanzas for tty7 into a file that we will call CuAt.tty7 that contains:
CuAt:
name = "tty7"
attribute = "login"
value = "enable"
type = "R"
generic = "DU"
rep = "sl"
nls_index = 18
CuAt:
name = "tty7"
attribute = "term"
value = "ibm3151"
type = "R"
generic = "DU"
rep = "s"
nls_index = 17
Restoring the tty
pdisable tty7
rmdev -l tty7 -d
lsdev -Cc tty | grep 30-60-21-08
lsdev -Cc printer | grep 30-60-21-08
odmadd CuDv.tty7
odmadd CuAt.tty7
PdDvLn = "tty/rs232/tty"
-c tty -s rs232 -t tty
mkdev -l $tty -c $c1 -s $s1 -t $t1 -p $p1 -w $w1
lsdev -Cl tty7
If you use odmadd:
tty7 Defined 30-60-21-08 Asynchronous Terminal
If you use mkdev
tty7 Available 30-60-21-08 Asynchronous Terminal
mkdev -l tty7
lsdev -Cl tty7
tty7 Available 30-60-21-08 Asynchronous Terminal
chdev -l $tty -a "attribute=value"
Example:
chdev -l tty4 -a "login=enable"
chdev -l tty4 -a "term=ibm3151"
Looking at the process in the previous example, you can easily come to the conclusion that it would be a lot easier to simply remove and re-add all the tty devices. In fact, this may be true, but keeping the tty's assigned to the right location would be an accounting nightmare. In this section, I will attempt to describe a solution that might help restore all of the tty and lp devices in a single step. This procedure assumes that you have not moved cables, and that all 128-port adapters are in the same slot as previous.
The steps in this automation are to:
Click here to download the script as a tar file rebuild.tar.
This tar file contains two files:
tar xvf rebuild.tarThis script is designed to aid in a migration from an H50 to an H70, but will also work for restoring an H50 or H70 or other RS/6000 system after mksysb restoration.
one assumptions made in this scripts:
mksysb 128-port restoration functions | |
function | Description |
gather | This function gathers information from the system and the mksysb tape needed to rebuild the tty and printer devices correctly. |
readtape | This function reads the mksysb tape if the tape has not already been read. The old ODM is stored in /tmp/etc/objrepos. |
extract | This function extracts the odm information into files that can be used to easily extract the information needed to rebuild and tty and lp devices that have been moved by migration. |
chklocation | This function checks to see that we have compatible systems before and after the mksysb. It checks we have the same number of RAN and 128-port adapters. The function then checks to see if any RAN locations match from before and after migration. If they match, it will make sure that tty and lp's are returned to their original locations. At this point, it looks for RAN that might have changed locations, or are on adapters that have changed locations. The function then asks a series of questions only if cards have moved or RAN have changed nodes that allow the devices to be moved to the proper locations. |
find_diff | This script finds the tty and lp devices that are at different locations on the system before and after migration. |
assign_dev | This function builds the arrays of information needed to remove and re-add the changed devices. |
mkidle | This function checks to make sure that no devices are being used when we try to remove them. It also runs "pdisable" on any of the tty's that are running a getty. |
rmbadtty | This function uses list of changed devices to pdisable and remove the bad tty and lp devices and entries so they can be readded later |
re_addtty | This function uses mkdev to re-add the tty and lp devices, and then runs chdev to change the device attributes. |
add_missing | This function uses mkdev and the mksysb odm information to add the tty and lp devices that did not get restored during the mksysb installation because of hardware failures of RAN not being turned on or detected. |
confirm | This function uses lsdev to list the devices and their availability. |
Files created | |
File | Description |
rebuild | Main script file |
rebuild.log | Log of actions taken by the rebuild script |
remap.list | List of locations remapped from before mksysb to after restore |
chtty.list | List of all tty and lp devices that were moved, and the locations before and after the move. With this information any errors can later be corrected. |
cuat.tty1 | Information needed to customize attributes after re-adding a device. This is used by the re_addtty function. |
../pre/* | Information gathered from the mksysb tape that is used to determine the locations of the devices before the mksysb was made. |
../post/* | Information gathered from the current system that is used to determine the available RAN and the current locations of all tty and lp devices. |
/tmp/etc/objrepos/* | ODM database information extracted from the mksysb tape |
Before running the script, log in to tty's that you suspect problems from and type tty to determine the tty number. Once you have finished running the script, repeat this exercise to determine if you have the desired tty name.
The script can be run from any directory. Use something like /home/restore. Once you are done, you could then clean up everything with:
rm -R /home/restore
rm -R /tmp/etcMake sure the script has permissions for executions. Run the script as root user. Type ./rebuild to start the script. The following shows the dialog from a test run.
No tape write necessary
PRE-restore data already available
Do you want to refresh local settings? (y or n)
Ready to check for compatibility between 128-port adapters
and RAN before and after the mksysb tape restoration
Hit enter to continue:
There are 2 adapters before and after the mksysb
There are 3 RAN before and after the mksysb
The number of RAN and adapters matches so we can continue
This section of the program makes sure we match
the 128-port concentrators from their pre mksysb
locations to their post mksysb locations
Press enter to continue.
Now find matches between pre-mksysb and reinstall RANs
Example: location 10-60-21
The first four numbers "10-60" identify the 128-port adapter
The first digit of the last number identifies the line
The second digit of the last number is the ran node
Example 21 is line 2, node 1
If you are unsure of the locations of your cards, exit this
program (ctrl-C), and "cat ../pre/lsdev.concentrator" and
"cat ../post/lsdev.concentrator" to understand the previous
and current assigned RAN locations
1: PRE: 30-60-21 not found on new configuration
H50 30-60 card found at H70 40-60
30-60-21 mapped to 40-60-21
2: PRE: 10-70-22 not found on new configuration
Card is at same address, Node has changed
Map 10-70-22 to 10-70-21? (y or n)
3: 10-70-11 matched 10-70-11
RAN remap table
PRE: 30-60-21 mapped to NEW: 40-60-21
PRE: 10-70-22 mapped to NEW: 10-70-21
PRE: 10-70-11 stays at NEW: 10-70-11
Is this correct? (y or n)
tty1: PRE: 30-60-21-00 POST: 10-70-11-00 Moveto: 40-60-21-00
tty2: PRE: 30-60-21-15 POST: 10-70-11-15 Moveto: 40-60-21-15
tty3: Already at 10-70-21-00 on sa4
tty4: Already at 10-70-21-15 on sa4
tty5: PRE: 10-70-11-00 POST: 40-60-21-00 Moveto: 10-70-11-00
tty6: PRE: 10-70-11-15 POST: 40-60-21-15 Moveto: 10-70-11-15
lp0: PRE: 30-60-21-08 POST: 10-70-11-08 Moveto: 40-60-21-08
lp1: Already at 10-70-21-09 on sa4
lp2: PRE: 10-70-11-10 POST: 40-60-21-10 Moveto: 10-70-11-10
Press enter to continue
tty5, tty6, and lp2 were moved from the adapter in slot-4 of the H50 to slot 6 on the H70, and will be moved back by the script to slot 4 of the H70.
After confirming this information is correct, press enter to continue. If the information is not correct, press ctrl-C to break out of the script, gather information and rerun the script.
Making sure devices are idle
/dev/tty1:
pdisable tty1
/dev/tty2:
pdisable tty2
/dev/tty5:
pdisable tty5
/dev/tty6:
pdisable tty6
/dev/lp0:
/dev/lp2:
All devices should now be disabled
Remove the tty and lp devices
Make sure that all TTY's in chtty.list have been removed
Check: tty1 Available 40-60-21-00 Asynchronous Terminal
Removing tty1
tty1 deleted
tty1 was removed successfully
Check: tty2 Available 40-60-21-15 Asynchronous Terminal
Removing tty2
tty2 deleted
tty2 was removed successfully
Check: tty5 Available 10-70-11-00 Asynchronous Terminal
Removing tty5
tty5 deleted
tty5 was removed successfully
Check: tty6 Available 10-70-11-15 Asynchronous Terminal
Removing tty6
tty6 deleted
tty6 was removed successfully
Check: lp0 Available 40-60-21-08 Lexmark 4039 plus LaserPrinter
Removing lp0
lp0 deleted
lp0 was removed successfully
Check: lp2 Available 10-70-11-10 IBM 4039 LaserPrinter
Removing lp2
lp2 deleted
lp2 was removed successfully
Ready to re-add the tty and lp devices that were removed
Press Enter when ready to continue
Configuring ttys
tty1 added successfully
Change is login=enable
tty1 changed
Change is term=ibm3151
tty1 changed
tty2 added successfully
Change is login=enable
tty2 changed
Change is term=ibm3151
tty2 changed
tty5 added successfully
Change is login=enable
tty5 changed
Change is term=ibm3151
tty5 changed
tty6 added successfully
Change is login=enable
tty6 changed
Change is term=ibm3151
tty6 changed
lp0 added successfully
lp2 added successfully
Confirming devices that were readded are available
tty1 Available 40-60-21-00 Asynchronous Terminal
tty2 Available 40-60-21-15 Asynchronous Terminal
tty5 Available 10-70-11-00 Asynchronous Terminal
tty6 Available 10-70-11-15 Asynchronous Terminal
lp0 Available 40-60-21-08 Lexmark 4039 plus LaserPrinter
lp2 Available 10-70-11-10 IBM 4039 LaserPrinter
Look for errors in the rebuild.log shown here for this successful run.
There are 2 adapters before and after the mksysb
There are 3 RAN before and after the mksysb
tty1 PRE: 30-60-21-00 POST: 10-70-11-00 Moveto: 40-60-21-00
tty2 PRE: 30-60-21-15 POST: 10-70-11-15 Moveto: 40-60-21-15
tty3: No change required.
tty4: No change required.
tty5 PRE: 10-70-11-00 POST: 40-60-21-00 Moveto: 10-70-11-00
tty6 PRE: 10-70-11-15 POST: 40-60-21-15 Moveto: 10-70-11-15
lp0 PRE: 30-60-21-08 POST: 10-70-11-08 Moveto: 40-60-21-08
lp1: No change required.
lp2 PRE: 10-70-11-10 POST: 40-60-21-10 Moveto: 10-70-11-10
pdisable tty1
pdisable tty2
pdisable tty5
pdisable tty6
Removing tty1 with mkdev -l tty1 -d
tty1 was removed successfully
Removing tty2 with mkdev -l tty2 -d
tty2 was removed successfully
Removing tty5 with mkdev -l tty5 -d
tty5 was removed successfully
Removing tty6 with mkdev -l tty6 -d
tty6 was removed successfully
Removing lp0 with mkdev -l lp0 -d
lp0 was removed successfully
Removing lp2 with mkdev -l lp2 -d
lp2 was removed successfully
Configuring TTY's
tty1 added successfully
tty1 changed login=enable
tty1 changed term=ibm3151
tty2 added successfully
tty2 changed login=enable
tty2 changed term=ibm3151
tty5 added successfully
tty5 changed login=enable
tty5 changed term=ibm3151
tty6 added successfully
tty6 changed login=enable
tty6 changed term=ibm3151
lp0 added successfully
lp2 added successfully
30-60-21 40-60-21
10-70-22 10-70-21
10-70-11 10-70-11
tty1 tty tty rs232 30-60-21 from 10-70-11 to 40-60-21
tty2 tty tty rs232 30-60-21 from 10-70-11 to 40-60-21
tty5 tty tty rs232 10-70-11 from 40-60-21 to 10-70-11
tty6 tty tty rs232 10-70-11 from 40-60-21 to 10-70-11
lp0 printer lex4039+ rs232 30-60-21 from 10-70-11 to 40-60-21
lp2 printer ibm4039 rs232 10-70-11 from 40-60-21 to 10-70-11
I moved the ../post directory information to save it and reran the script to see what new changes it would find.
No tape write necessary
PRErestore data already available
Restoring current ODM to ../post
tty1 Available 40-60-21-00 sa5 tty/rs232/tty
tty2 Available 40-60-21-15 sa5 tty/rs232/tty
tty3 Available 10-70-21-00 sa4 tty/rs232/tty
tty4 Available 10-70-21-15 sa4 tty/rs232/tty
tty5 Available 10-70-11-00 sa3 tty/rs232/tty
tty6 Available 10-70-11-15 sa3 tty/rs232/tty
lp0 Available 40-60-21-08 sa5 printer/rs232/lex4039+
lp1 Available 10-70-21-09 sa4 printer/rs232/lexOptra+
lp2 Available 10-70-11-10 sa3 printer/rs232/ibm4039
cxpa0 Available 10-70 pci0 adapter/pci/4f111b00
cxpa1 Available 40-60 pci3 adapter/pci/4f111b00
sa3 Available 10-70-11 cxpa0 concentrator/sync_pci/16c232
sa4 Available 10-70-21 cxpa0 concentrator/sync_pci/16c232
sa5 Available 40-60-21 cxpa1 concentrator/sync_pci/16c232
Ready to check for compatibility between 128-port adapters
and RAN before and after the mksysb tape restoration
Hit enter to continue:
There are 2 adapters before and after the mksysb
There are 3 RAN before and after the mksysb
The number of RAN and adapters matches so we can continue
This section of the program makes sure we match
the 128-port concentrators from their pre mksysb
locations to their post mksysb locations
Press enter to continue.
Now find matches between pre-mksysb and reinstall RANs
Example: location 10-60-21
The first four numbers "10-60" identify the 128-port adapter
The first digit of the last number identifies the line
The second digit of the last number is the ran node
Example 21 is line 2, node 1
If you are unsure of the locations of your cards, exit this
program (ctrl-C), and "cat ../pre/lsdev.concentrator" and
"cat ../post/lsdev.concentrator" to understand the previous
and current assigned RAN locations
1: PRE: 30-60-21 not found on new configuration
Card has moved
Map 30-60-21 to 40-60-21? (y or n) y
2: PRE: 10-70-22 not found on new configuration
Card is at same address, Node has changed
Map 10-70-22 to 10-70-21? (y or n) y
3: 10-70-11 matched 10-70-11
RAN remap table
PRE: 30-60-21 mapped to NEW: 40-60-21
PRE: 10-70-22 mapped to NEW: 10-70-21
PRE: 10-70-11 stays at NEW: 10-70-11
Is this correct? (y or n) y
tty1: Already at 40-60-21-00 on sa5
tty2: Already at 40-60-21-15 on sa5
tty3: Already at 10-70-21-00 on sa4
tty4: Already at 10-70-21-15 on sa4
tty5: No change required.
tty6: No change required.
lp0: Already at 40-60-21-08 on sa5
lp1: Already at 10-70-21-09 on sa4
lp2: No change required.
Press enter to continue
There are 2 adapters before and after the mksysb
There are 3 RAN before and after the mksysb
tty1: No change required.
tty2: No change required.
tty3: No change required.
tty4: No change required.
tty5: No change required.
tty6: No change required.
lp0: No change required.
lp1: No change required.
lp2: No change required.
The script above collects data from the mksysb tape and the rebuilt system and requires no other data except a knowledge of the system.
Special Notices
This document was produced in the United States. IBM may not offer the products, programs, services or features discussed herein in other countries, and the information may be subject to change without notice. Consult your local IBM business contact for information on the products, programs, services, and features available in your area. Any reference to an IBM product, program, service or feature is not intended to state or imply that only IBM's product, program, service or feature may be used. Any functionally equivalent product, program, service or feature that does not infringe on any of IBM's intellectual property rights may be used instead of the IBM product, program, service or feature.
Information in this document concerning non-IBM products was obtained from the suppliers of these products, published announcement material or other publicly available sources. Sources for non-IBM list prices and performance numbers are taken from publicly available information including D.H. Brown, vendor announcements, vendor WWW Home Pages, SPEC Home Page, GPC (Graphics Processing Council) Home Page and TPC (Transaction Processing Performance Council) Home Page. IBM has not tested these products and cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of those products.
IBM may have patents or pending patent applications covering subject matter in this document. The furnishing of this document does not give you any license to these patents. Send license inquires, in writing, to IBM Director of Licensing, IBM Corporation, New Castle Drive, Armonk, NY 10504-1785 USA.
All statements regarding IBM's future direction and intent are subject to change or withdrawal without notice, and represent goals and objectives only. Contact your local IBM office or IBM authorized reseller for the full text of a specific Statement of General Direction.
The information contained in this document has not been submitted to any formal IBM test and is distributed "AS IS". While each item may have been reviewed by IBM for accuracy in a specific situation, there is no guarantee that the same or similar results will be obtained elsewhere. The use of this information or the implementation of any techniques described herein is a customer responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. Customers attempting to adapt these techniques to their own environments do so at their own risk.
The information contained in this document represents the current views of IBM on the issues discussed as of the date of publication. IBM cannot guarantee the accuracy of any information presented after the date of publication.
All prices shown are IBM's suggested list prices; dealer prices may vary.
IBM products are manufactured from new parts, or new and serviceable used parts. Regardless, our warranty terms apply.
Any performance data contained in this document was determined in a controlled environment. Therefore, the results obtained in other operating environments may vary significantly. Some measurements quoted in this document may have been made on development-level systems. There is no guarantee these measurements will be the same on generally-available systems. Some measurements quoted in this document may have been estimated through extrapolation. Actual results may vary. Users of this document should verify the applicable data for their specific environment.
The following terms are registered trademarks of International Business Machines Corporation in the United States and/or other countries: ADSTAR, AIX, AIX/6000, AS/400, C Set++, CICS, CICS/6000, DB2, ESCON, IBM, Information Warehouse, LANStreamer, LoadLeveler, Magstar, MediaStreamer, Micro Channel, MQSeries, Netfinity, Parallel Sysplex, POWERparallel, PowerPC (logo), RS/6000, S/390, Service Director, ThinkPad, TURBOWAYS, Videocharger, VisualAge. The following terms are trademarks of International Business Machines Corporation in the United States and/or other countries: AIX PVMe, AS/400e, DB2 Universal Database, Deep Blue, e-business (logo), HACMP/6000, Intelligent Miner, Intellistation, Network Station, POWER2 Architecture, PowerPC 604, PowerPC Architecture, SmoothStart, SP. A full list of U.S. trademarks owned by IBM may be found at www.ibm.com/legal/copy/trade.html.
Microsoft, Windows, Windows NT and the Windows 95 logo are trademarks or registered trademarks of Microsoft Corporation in the United States, other countries or both. UNIX is a registered trademark of The Open Group. Java and all Java-based trademarks and logos are trademarks of Sun Microsystems, Inc. in the United States and other countries. Lotus, Lotus Domino and Lotus Notes are trademarks or registered trademarks of Lotus Development Corporation. Tivoli, TME, TME 10 and TME 10 Global Enterprise Manager are trademarks or registered trademarks of Tivoli Systems, Inc. Other company, product and service names, which may be denoted by a double asterisk (**), may be trademarks or service marks of others.
Index for H50 to H70 migration notes
Return to Terminal Tips Index non-frames
Return to Terminal Tips Index FRAMES
Tesch's Home with Frames