Frequently Asked Questions for: AIX V2.2.1 on IBM RT systems Part 3 of 4 parts. Various subject Q & A topics for AIX/RT. See part 1 for a complete index of the FAQ. ================================================================================ ------------------------------ 3.0 Problem Question and Answers. Q.1 I have lost my root password, how can I reset it? I have a procedure in another document outlining the steps for this recovery. E-mail me with your request, and I will mail it to you. I hesitate to post the procedure to a public list. ------------------------------ Q.2 LED code 99 is displayed at power on, what is it? The keylock has been left in the 'locked' position at power on. Turn the key to unlock and the system will continue booting. ------------------------------ Q.3 - How do I move 'system' filesystems (/,/usr,/tmp,/u,/vrm)? How to increase the size of filesystems. The procedure for moving or enlarging a minidisk are virtually the same. The basic procedure involves rebooting from the install/maint disk, backing up the minidisk in question, deleting the original space and remaking the new space, then restoring the data. One critical element of these procdures is the IODN of the various system minidisks. Make sure that you use the same IODN number for the newly created area as before. * Enlarging an existing minidisk To enlarge a minidisk, the principle is the following: backup your minidisk load the installation/maintenance diskette get the IODN of the current minidisk you want to enlarge delete the minidisk create a new, larger minidisk using the same IODN make a filesystem on the new minidisk restore your data reboot normally * Detailed procedure: You can change the size of the /usr minidisk (or any other for that matter). Minidisks are sections of the hard disk that are contiguous. There may not be any free space immediately after the /usr minidisk on your system. If that is the case, then you will have to rearrange several minidisks on your system in order to create the amount of contiguous free space that you need. A general procedure is outlined below. More detailed information is contained in Managing the AIX Operating System (SBOF-0168). 1) While in the Bourne Shell use the minidisk command and print off the minidisk configuration (F4). 2) Check the printout from the minidisk command. Check to see if there is any free space immediately after the /usr minidisk. If there is enough, then the procedure will be fairly simple. If not then it is a little more involved. 3) Shutdown and boot from the Installation/Maintenance Diskette. Follow procedure A or B, depending on the free space. Procedure A - IF there is ENOUGH free space: 4) Select Backup commands. 5) Select Backup a file system and backup the /usr minidisk. DO NOT USE THE BACKUP A MINIDISK IMAGE OPTION. Be sure to check for any errors during the backup operation. 6) Select Delete a fixed disk minidisk and write down the /usr minidisk IODN. Delete the minidisk. 7) Select Create a fixed disk minidisk. a) Select Specify IODN and supply the IODN that you noted in the previous step. b) Select No preference to cause the minidisk to be created in the first disk area large enough to accommodate it. (Do not use the beginning, middle, or end allocation suboptions.) c) Specify the number of blocks necessary to meet your new requirements. 8) Select Make a file system and create a file system on the new minidisk. Select the same IODN that the original file system had, the one you noted above. 9) Select Restore commands. a) Select Restore a file system. b) Restore the old file system to the new minidisk, using the same IODN. 10) Select Check a file system and check the structure of the new file system. 11) Remove the AIX Operating System Installation/Maintenance diskette and start the system from the fixed disk. Procedure B - IF there is NOT ENOUGH free space: 4) Select Backup commands. 5) Select Backup a file system and backup the /usr filesystem. a) Repeat this step for the other filesystems that are on the hard disk and physically located "behind" the /usr minidisk. For example if a system only has one hard disk (70 Meg), the minidisk facility gives the following information: MD MD MD Block Number ... Mount ...... Name IODN Type Size Blocks ... Directory ...... hd6 32760 VRM 512 3600 /vrm 32766 Pgsp 512 13722 hd0 16384 AIX 512 25679 / hd2 16387 AIX 512 66809 /usr hd1 16386 AIX 512 22810 /u hd3 16388 AIX 512 4000 /tmp hd4 16385 AIX 512 5000 (the dump minidisk) Available space 512 1000 Assuming that there is some free space after hd4, then backup the /usr and /u filesystems. You probably would not backup the /tmp minidisk since you do not have any permanent files there. You would not backup the dump minidisk (IODN 16385). DO NOT USE THE BACKUP A MINIDISK OPTION. It is good backup procedure to check the file system using fsck to make sure it isn't corrupted before doing a backup. Also, make sure the backup was successful by doing a 'restore -T' to the backup tape, before destroying the file system. 6) Select Delete a fixed disk minidisk and write down the IODN numbers for every minidisk you are about to delete. From the example in step 5, you would record the IODN's for the /usr, /u, /tmp, and the dump minidisk. After verifying your tape(s) are good, delete the minidisk(s) that need to be re-arranged. 7) Select Create a fixed disk minidisk. a) Select Specify IODN and supply the IODN that you noted in the previous step. b) Select No preference to cause the minidisk to be created in the first disk area large enough to accommodate it. (Do not use the beginning, middle, or end allocation suboptions.) c) Specify the number of blocks necessary to meet your new requirements. d) Repeat step 7 a), b), and c) for each of the minidisks previously removed. 8) Select Make a file system and create a file system on each of the new minidisks. Be sure to use the same IODNs as was used on the original file systems. 9) Select Restore commands. a) Select Restore a file system. b) Restore the old file system to the new minidisk, using the same IODN. c) Repeat 9 a) and b) for each minidisk and file system. 10) Select Check a file system and check the structure of all the new file systems you have restored. 11) Remove the AIX Operating System Installation/Maintenance diskette and start the system from the fixed disk. ==**==**==**==**==**==**==**==**==**==**==**==**==**==**==**==**==**== Tip from Willi Zuber, IBM France Date: 16.09.1988 [ NOTE: I personally have NOT tested this way of 'increasing' /usr. I HIGHLY recommend that you have a good system backup in case something goes wrong. Always 'Be Prepared' when experimenting! - MW ] If /usr is full, do the following to gain some space: 1. Find the biggest subdirectory in the /usr directory: commands: cd /usr li -R1p | xargs -i du -s {} The system lists the directories of /usr and their respective disk usage. Take note of the biggest one: ex. 18000 blocks for /usr/lib [ Note: lib is the hardest to move, as it is usually busy with programs. I suggest /usr/lpp first, then try /usr/lib. I suspect it would be best to have a completely idle system and a 'killall' done first before attempting /usr/lib. -MW ] 2. Create a new minidisk to contain that "biggest subdirectory" and give it a "dummy library name": ex. hd13 with 22000 blocks to contain "/dummylib" 3. Mount the new minidisk: command: mount /dev/hd13 /dummylib 4. Kill the error daemon: command: kill /usr/lib/errdemon NB. This is only necessary if you move the subdirectory "lib" 5. Copy /usr/lib to /dummylib: commands: cd /usr/lib find . -print | cpio -pdl /dummylib [ Note: Verify that your copy is good before continuing. - MW ] 6. Umount /dev/hd13: command: umount /dummylib 7. Remove the entries of /usr/lib: commands: cd /usr/lib rm -r * 8. Mount hd13 on the correct directory: command: mount /dev/hd13 /usr/lib 9. Update the file /etc/filesystems: change the stanza name "/dummylib:" into "/usr/lib:" (do not forget the double point!!) [ Colon for us USA types - MW ] WARNING: Make sure that the mount is set to always mount at IPL. 10. Re-ipl the system. ------------------------------ Q.4 - What do the IODN numbers mean. Input Output Device Numbers (IODN) of the system minidisks. The numbers assigned to various system minidisks is how the VRM is able to associate a particular disk partition with the related filesystem. dev IODN use mount attributes --- ----- ------- --------------- ----------------- hd0 16384 AIX / Auto IPL hd1 16386 AIX /u hd2 16387 AIX /usr hd3 16388 AIX /tmp hd4 16385 dump 32766 PgSpace hd6 32760 VRM /vrm read only hd7 20001 AIX /user-minidisk IODN number for minidisks is 16384 (minimum) to 32767 (maximum). User created minidisks start at 20001 thru 29999. ------------------------------ Q.5 - How do I make a netnews filesystem with lots of inodes? The minidisks command can make a minidisk partition of any size, but the maximum number of inodes in will make is less than 32000 inodes, and is based on the size of the minidisk being created. The AIX filesystem can be made with a larger number of inodes by use of a prototype file and the 'mkfs' command. 1) Use minidisks to make a filesystem of the size you wish, on the disk you want.. example /news. number of blocks maximum on a E310 = 605460 (leaving 9 free) Note the device number when the minidisks makes the new filesystem and minidisk. 2) mount /news df /news Note: The number of blocks will be LESS than that specified in the minidisks command, because of inode blocks overhead. 3) Use the proto command and save the output to a file. proto /news >/tmp/proto.keep 4) unmount /news 5) Edit the /tmp/proto.keep file and add the size of the filesystem, and your requested number of of inodes. Be conservitive, the 'mkfs' command will round UP to a proper multiple based on the geometry of the target disk drive. # cat /tmp/proto.keep : Prototype file for /news /noboot 605460 63000 d--777 0 0 lost+found d--755 0 0 $ $ $ # mkfs /dev/hd10 -vNEWS /tmp/proto.keep DANGER: Do not go over 64000 inodes. Due to some bug in the AIX filesystem code, it seems to get lost if the total number of inodes is very large, and does not contain some slack space. 6) mount /news Expand the lost+found directory by creating about 200 files with touch, and then delete them. This expansion is required so that during 'fsck' processing, if errors DO occur, the system can move 'dangling' files to the lost+found directory. During this processing fsck cannot have the filesystem changing without its knowledge. ------------------------------ Q.6 - The domain name server is not working correctly. The version of named shipped with AIX/RT is VERY old! A partial 'what /usr/lpp/tcpip/etc/named' shows: ns_init.c 4.23 (Berkeley) 2/28/88 ns_main.c 4.30 (Berkeley) 3/7/88 Copyright (c) 1986 Regents of the University of California. ns_maint.c 4.23 (Berkeley) 2/28/88 ns_req.c 7.7 89/01/27 11:30:46 ns_req.c 4.32 (Berkeley) 3/31/88 ns_resp.c 4.50 (Berkeley) 4/7/88 ns_sort.c 4.3 (Berkeley) 2/17/88 ns_stats.c 4.3 (Berkeley) 2/17/88 named 4.8 #12: Wed Jul 27 11:47:05 CDT 1988 While it pretends to be 4.8, it does not have anywhere near the features of the 4.8.3 server or later. Particular problems I have seen are: - Secondary servers do not understand how to save the transfered zone data to files for restart recovery. - zone transfers are NOT asyncronous. If lots of secondary zones are being handled, zone transfers will tie up the server making in unresponsive. - 'TXT' records, while not documented as available in the TCP/IP manual, do work on IBM supplied server. - Later maintence level of 1773, seems to have broken MX record lookup by the resolver routines located in libc. If you are having problems with the server, I suggest that you replace the named server with at least the 4.8.3 version available from the net. See section P.3 on porting and running that server. ------------------------------ Q.7 - Mail addressing and setup. The AIX/RT standard mail facilities consist of the sendmail program, (if installed) and the SYSV based user agent 'mail' command. The sendmail code appears to be based on sendmail version 7.24. The only overt major change to the programs is the location of the control files. They are located in: /usr/adm/sendmail IBM includes a program called '/usr/lib/edconfig' to help with editing the sendmail.cf control file. This program is menu driven, and depends on the supplied sendmail.cf and the comments located in the file to be able to change the sendmail configuration for you. However, you do not have to use this program to configure the sendmail config file. There are liberal comments located in the file describing the various macros for the system configuration. For more documentation on the IBM sendmail, see the "Managing the AIX Operating System" manual number SC23-2008. Chapter 7 is devoted to mail issues. That chapter has some excelent information on understanding the sendmail.cf file, sendmail macros, mail tailoring issues, understanding mail rewrite rules and the obscure format of the sendmail config file. Also covered is the format of the queue control files, and more. If you use the supplied AIX sendmail config file, here are some macros that should be looked at: Dw Host name macro Cw Host name class DD Domain name macro DE Macro for first (left most part here in the US) domain part. DF Macro for second domain part. DG Macro for third (optional) domain part. DH Macro for fourth (optional) domain part. To avoid confusion IBM manual recommends that the following names for your system should all be the same: nodename - Defined in /etc/master and built into the kernel. Binary changed in /unix and the running kernel with the 'chparm nodename=' command. nickname - The name that Distributed Services uses for your system name. Changed by the 'ndtable' command. hostname - TCP/IP name defined and displayed by the 'hostname' command. Usually set from /etc/rc.tcpip shell script. As supplied, you will find that the IBM mailer has a great deal of problems existing in a mixed UUCP and TCP envionment. A pure TCP envrionment also will have problems with MX records, and domain name service queries. X.400 names can cause it all kinds of problems. I found that the best solution was to replace the supplied sendmail with PD versions. See section P.5 for porting and install instructions for IDA sendmail 5.65c. ------------------------------ Q.8 - How do I set up a dial-in autospeed detect serial line? See the software question S.13 for general serial port add instructions. Modem capabilities vary greatly from vendor to vendor, and much of the 'art' of serial port setup of any type will be impacted by the setup 'switches' both hardware and software register setups. A great deal of the problem with serial port function is using the proper cable. Modem usage requires a correctly wired cable. See the hardware FAQ for pinout and cable information. Before starting any attachment of a modem, read your vendors manual on setups. Some vendors documentation have recommended setups for attachment to UNIX systems, particularly when used with UUCP. Examine your vendors modem manual about soft register settings dealing with speed matching, and how it is presented to the host computer. If you have one of the newer breed of modems where the serial-port-to-LOCAL-computer speed can be locked to a single speed, while the modem-to-REMOTE-computer speed can be set to the callers speed, Then the procedure described below is not neecessary, simply setup the port as normal, and set the port speed to the 'locked' speed of the modem, and your work is done. (Trailblazer modems have this capability for example). Make sure that the pacing, either XON/XOFF or RTS/CTS, is setup correctly in the modem and/or the communication terminal that the caller will be using. If the users speed will be mis-matching the port speed, there can be over/under run problems. Setting up an AIX/RT port for autobaud capabilities is not described very well in any of the AIX documentation. The Managing the AIX Operating system book has a small section devoted to serial port setup, but this obscure feature of AIX/RT serial ports is overlooked. The real truth is AIX/RT serial port capabilities are not great, especially in the autobaud arena. You will have to decide what combination of speeds and parity settings you would like to support and select a few popular combinations. To allow more than one speed to dial in requires you to edit manually the /etc/ports file AFTER you add the tty port with the devices command. WARNING: Any use of the devices command on this port later will wipe out the following changes, and will have to be manually be re-entered for that port. Edit the /etc/ports file, find the /dev/tty## entry that was added by the devices command for your serial port. Looks a little like this: /dev/tty0: lock = true speed = 2400 logmodes = echoe+cs8 runmodes = hupcl+cs8+cread+brkint+icrnl+opost+tab3+onlcr+isig+ icanon+echo+echoe+echok parity = none synonym = /dev/ltty0 Change the 'speed' and parity entries to look like this for a three speed call in of 9600,2400,1200 with no-parity used for any of the speeds used. speed=9600,2400,1200 parity=none,none,none This will set the port initially to 9600 baud, and step down the speed on each recipt of a 'break' sequence by the modem. If a user dials in at 2400, after the modems sync carrier, and setup for 2400 baud, if the port is at the wrong speed, they will receive garbage for the 'hearld' stanza in the 'defaults' section of the /etc/ports file. They then press 'break' and the RT will move to the next speed, and then the 'hearld' will be re-displayed. Once the speed and parity setting matches the users modem speed, the login hearld will be readable. If the end of the list is reached on speeds, it wraps around to the first entry. ------------------------------ Q.9 - How to setup a serial port for shared dial-in and out? To properly allow a serial p