Configuring LVM Filesystems for Maximimum Disk
AvailabilityAudience: Systems Administrators Date: March 1999 The
following item was found on an internal IBM web site. It describes
how to configure RS/6000 disk drives for the maximum AVAILABILITY.
You will note that these settings tradeoff I/O performance for
availability. 1. Use 3 copies. 2. Write-verify: YES. Verify each
write by performing a follow-up read. 3. INTER-policy: MINIMUM.
This specifies that only as many physical volumes as there are
copies should be used to 4. contain the logical volume. 5.
Scheduling Policy: SEQUENTIAL. This requires the write of each copy
to be performed sequentially, increasing the likeliness that at
least one copy completes prior to a system failure. (Comment: this
setting limits reads from only the primary mirror. In contrast, the
PARALLEL option allows reads to occur from any mirror copy, which
can improve read performance.) 6. Allocate each logical partition
copy on a separate disk: YES. This setting will not allow any two
copies of the same data to reside on the same disk.
AIX Tip of the Week: Configuring LVM Filesystems for Optimum
PerformanceAudience: Systems Administrators Date: March 1999 Last
weeks tip involved configuring disks for optimum availability. This
tip covers configuring disks for optimum performance. To configure
an RS/6000 system for the highest disk I/O performance, create the
logical volumes using the following guidelines. 1. 2. 3. 4. Create
logical volumes with only 1 copy (do not mirror partitions) Set
"write-verify": NO INTRA-policy: CENTER INTER-policy: MAXIMUM
Note the tradeoffs between higher performance and availability.
Typical systems are configured somewhere between the two extremes
presented in the AIX Tips. The following attachment explains the
reasoning behind each of these selections. (From IBM ITEM
Q494227)
AIX Tip of the Week: Customizing Modems in AIX with Hayes
CommandsAudience: AIX Administrators Date: June 11, 1999
Modem settings often need to be customized using Hayes commands.
The following tip demonstrates one method of sending Hayes commands
to a modem in AIX. In this example, we assume we want to enable a
dial-in line on tty0. Step 1: Configure tty0 via "smit mktty". Set
"Enable Login" to "enable". Set the remaining parameters as
appropriate. Step 2: Define tty0 to UUCP by adding the following
line to the /etc/uucp/Devices file. UUCP is part of the base AIX
operating system, which may or may not be installed by default
depending on AIX level. Note the characters are case
sensitive.Direct tty0 - 9600 direct
Step 3: Disable the port to allow Hayes commands to be sent to
the modem: pdisable tty0. Step 4: Send Hayes commands using the
"cu" command. The "cu" command starts an interactive session with
the modem. In this case, the Hayes command tells the modem to
autoanswer after one ring. The session is terminated with a "tilde"
followed by a "period".cu -ml tty0 ats0=1 ~.
Step 5: Enable the tty0 port: penable tty0
AIX Tip of the Week: Viewing a Remote Screen Using the AIX
portmir CommandAudience: AIX Administrators and End Users Date: May
1999 The AIX portmir command can be used to mirror a remote screen
on a local terminal. This is a useful diagnostic tool for viewing a
remote end user's screen, or possibly mirroring consoles. As a
practical matter, both local and remote terminal should be of the
same type to avoid screen formatting problems. The portmir command
is available in AIX 4.2.1+. See the AIX documentation for more
information.
Comment: although the portmir documentation lists "tty's" as the
supported terminal type, I've been able to get pseudo-terminals
(pts) to work by substituting the appropriate "pts/n" for
"ttyn."
Reconfiguring AIX's System DumpAudience: AIX Administators Date:
July 24, 1999
I generally recommend changing the default setup for AIX's
system dump facility. The default setting stops the system from
rebooting after an unexpected halt. A system dump copies selected
areas of the kernel to disk (or tape) if the system halts
unexpectedly. The default dump location is the page space. When a
system attempts to reboot after an unexpected halt, it stops to
warn the operator the page space contains a dump. The reboot stops
until the operator tells the system what do to with the dump. The
dump facility can be reconfigured to reboot automatically by
changing the dump device from the page space to a raw partition on
the disk. The procedure for making this change is in the attached
HTML file. See your AIX documentation for more information.
Managing System Dump Devices [manage.dump.32-42.cmd]Managing
System Dump Devices
------------------------------------------------------------------------------Contents
About this document Related documentation Managing system dump
devices Determining proper size for dump device Setting a tape
drive as a dump device Extended options in AIX 4.x Dumping a
mirrored logical volume Remote dumps over to a network
------------------------------------------------------------------------------About
this document This document discusses how to manage storage devices
used by AIX to store a system dump in the event of a catastrophic
operating system software failure. Its intent is to help the system
administrator ensure that a system dump will be complete and usable
for troubleshooting purposes. This document applies to AIX versions
3.2 and 4.x.
------------------------------------------------------------------------------Related
documentation For more in-depth coverage of this subject, the
following IBM documents are recommended: o AIX Version 4.1 Software
Problem Debugging and Reporting for the RISC System/6000
(GG24-2513) o Common Diagnostics and Service Guide (SA23-2687) o
Diagnostic Information For Micro Channel Bus Systems (SA23-2765) o
Diagnostic Information for Multiple Bus Systems (SA38-0509) o
Problem Solving Guide and Reference (SA23-2204) (SA23-2606) o
System Management Guide, V3.2 (SC23-2457) o System Management
Guide, V4 (SC23-2525)
-------------------------------------------------------------------------------
Managing system dump devices When an unexpected system halt
occurs, the system dump facility automatically copies selected
areas of kernel data to the primary dump device. These areas
include kernel segment 0 as well as other areas registered in the
Master Dump Table by kernel modules or kernel extensions. There are
two dumps devices (a primary and secondary). To view information
about the current dump devices, enter: sysdumpdev -l Example: #
sysdumpdev -l primary secondary /dev/hd7 /dev/sysdumpnull
In this example, the primary dump device is the logical volume
hd7. When the operating system is installed, the primary dump
device is automatically configured. In AIX 3.2, the default primary
dump device is /dev/hd7. This is a logical volume dedicated for
system dumps. In AIX 4.x, the default dump device is /dev/hd6. This
is the primary paging space logical volume. In both AIX 3.2 and 4.x
the default secondary dump device is /dev/sysdumpnull. This is a
null device and any dump written to this device is lost.
------------------------------------------------------------------------------Determining
proper size for dump device The default dump device created for
system use may NOT be large enough for a complete dump. To
determine how large the dump device is, first determine what the
primary dump device is using the procedure mentioned in this
section. If the dump device is not currently set to a tape drive,
then this device should be a logical volume. To retrieve
information about this logical volume enter: lslv Example: lslv hd7
This command will return a screen of information. Obtain the values
for LPs and PP SIZE. Multiply these two values to get the size of
the dump device in megabytes. Next, determine how large the dump
device for your machine should be. To view an estimate of how large
the dump device should be, enter: sysdumpdev -e Example: #
sysdumpdev -e Estimated dump size in bytes: 4526080
NOTE: This value will be what the CURRENT running machine would
require. This value can change based on the activity of the
machine. It is best to run this command when the machine is under
its heaviest work load. This will return a value in bytes. The
primary dump device should be a size that is at or greater than the
value returned. In this case, the dump space needs to be 4.5
megabytes. A normal system will have a physical partition size of 4
megabytes for rootvg. The dump device has to be increased in
multiples of this size. A dump space of 4 megabytes would not be
large enough to hold this dump, so the next size would have to be 8
megabytes. At AIX levels prior to 3.2.4, this command option may
not be available. If this is the case, a general rule of thumb is
to make the dump device 1/4 of the size of your total RAM. To
obtain the size of your total RAM, enter: bootinfo -r If the dump
device is a standard dump logical volume, such as hd7, then use the
command extendlv to increase its size. If it is the primary paging
space hd6, use the command chps.
------------------------------------------------------------------------------Setting
a tape drive as a dump device If you do not have sufficient space
on the system to store a dump, use a tape drive as the dump device.
To accomplish this, put a blank tape in the desired tape drive and
enter: sysdumpdev -Pp /dev/rmt# In this case, rmt# refers to the
specific tape drive you want to use for this (for example, rmt0,
rmt1, rmt2, etc.) Be aware that the tape drive will not be usable
by any other application until you re-assign the dump device to
another location.
------------------------------------------------------------------------------Extended
options in AIX 4.x At AIX 4.x, there are three extra attributes
that are not available in AIX 3.2. sysdumpdev -l will show these
extra options. Example: # sysdumpdev -l primary secondary copy
directory forced copy flag always allow dump /dev/hd6
/dev/sysdumpnull /var/adm/ras TRUE TRUE
The copy directory entry specifies a filesystem in the rootvg
volume group where the dump will be copied upon reboot after a
system dump. This only applies if the primary dump is the primary
paging space (hd6). The force copy flag entry specifies if the
system will prompt you to copy this dump to external media if there
is not enough space in the specified filesystem. If this is set to
FALSE and the system cannot copy this dump to the filesystem, then
it will discard the contents of the dump. The always allow dump
flag is a security measure. If this is set to FALSE, then
the only way to force a system dump would be to turn the service
key to Service and then press Reset. It also prevents forcing a
dump of any kind on machines with no service key, such as all PCI
based machines. If the primary dump device is the primary paging
device, the only way it can copy the dump to the filesystem save
area is if there is enough free space in that filesystem. The free
space in the filesystem can be determined with the df command. If
the free space in that filesystem is not at least as large as the
space required for the dump (sysdumpdev -e), then either increase
the size of that filesystem to have enough free space, remove files
in that filesystem until enough free space is available, or move
the save area to another filesystem with the required space. The
latter can be accomplished with the sysdumpdev command. This
filesystem must be in the rootvg volume group.
------------------------------------------------------------------------------Dumping
to a mirrored logical volume AIX does not support dumping to a
mirrored logical volume. This is because the dump only dumps to one
copy of the logical volume. In other words, one of the mirrors will
contain the dump. Since the logical volume is not being handled
like a mirrored logical volume, the new data written, (for example,
the dump) will not be synched with the other mirrors. Thus, when
crash tries to read the dump, it can obtain data from both mirrors,
only one of which actually contains the dump. That is, crash sees
good dump data mixed with garbage data, and will not read the dump.
By splitting up the logical volume, creating one logical volume per
copy of the original, one of them would contain a good dump. This
can be accomplished with the splitlvcopy command. The procedure for
splitting the logical volume is: Run lslv to get the LV IDENTIFIER:
# lslv hd7 LOGICAL VOLUME: hd7 LV IDENTIFIER: 0000335216021417.12
VG STATE: active/complete TYPE: dump MAX LPs: 128 COPIES: 2 LPs: 4
STALE PPs: 0 INTER-POLICY: minimum INTRA-POLICY: middle MOUNT
POINT: N/A MIRROR WRITE CONSISTENCY: on EACH LP COPY ON A SEPARATE
PV ?: no VOLUME GROUP: PERMISSION: LV STATE: WRITE VERIFY: PP SIZE:
SCHED POLICY: PPs: BB POLICY: RELOCATABLE: UPPER BOUND: LABEL:
rootvg read/write opened/syncd off 4 megabyte(s) parallel 8
relocatable yes 32 None
Notice that there are two copies. This means that there is one
mirror. Use the splitlvcopy command to split the logical volume,
hd7 in this case, into two logical volumes. # splitlvcopy
0000335216021417.12 1 A message similar to the following may
appear: splitlvcopy: WARNING! The logical volume being split, hd7,
is open. Splitting an open logical volume may cause data loss or
corruption and is not supported by IBM. IBM will not be held
responsible for data loss or corruption caused by splitting an open
logical volume. Do you wish to continue? y(es) n(o)? lv02 Enter y.
The command will complete and show the name of the new logical
volume
it created, e.g., lv02. At this point, hd7 contains one copy of
the original hd7, and lv02 contains the other. This is exactly what
we need. If there had been three copies, shown by lslv, then lv02
would contain two copies of the original hd7. Run crash on /dev/hd7
first to see if that was the right copy. If crash does not give
error messages, the correct one has been found. If the dump is
unusable, run crash on /dev/lv02, if lv02 has only one copy, that
is, if the original hd7 contained two copies. If lv02 has two
copies now, because the original hd7 had 3, run lslv /dev/lv02 to
get the LV IDENTIFIER. Then run splitlvcopy 1 to split lv02 to
obtain one copy of each of its mirrors. This may not work for dumps
taken to mirrored paging space, because the pager may have already
overwritten the dump.
------------------------------------------------------------------------------Remote
dumps over a network Currently, the system dump does not handle ARP
requests received from the server, or the gateway used, during the
dump. If an ARP request is received while taking a dump, this
causes the dump to hang. If your system takes a system dump and
hangs on 0c7, this is likely the problem. At this point, power the
system off and reboot. To avoid this problem, create a permanent
ARP entry for the client (the dumping machine) on the server or
gateway. The machine that needs the permanent ARP entry is the
machine on the same local network or ring as the client. This can
be thought of as the logical server, since, if it is not the real
server, the dump data must pass through it to get to the real
server. NOTE: "Real server" refers to the machine designated in the
remote dump specification on the client. Run the following steps on
the real server to establish a permanent ARP entry on the server or
gateway machine. 1. Ensure an ARP entry exists by pinging the
client. Example: ping myclient.xyz.com 2. Use arp -a to see the ARP
table. Example: # arp -a The following four lines of text should
appear as two full lines. myclient.xyz.com (128.3.56.9) at
10:0:5a:9:e:7d [token ring] myserver.xyz.com(128.3.56.20) at
10:0:5a:8f:12:bf [token ring]| 3. Now use the arp command to make
the dumping client's entry permanent. Example: # arp -s 802.5
myclient.xyz.com 10:0:5a:9:e:7d The 802.5 refers to a token-ring
network. Valid network types are listed in the ARP documentation of
the product documentation, and are currently ether(802.3), fddi,
and 802.5. NOTE: If the dump hangs and the client must be rebooted,
the partial dump on
the server may still be useful. Techdocs Ref:90605210214768 4FAX
Ref:6221
Changing DNS Search OrderAudience: AIX Administrators Date: July
30, 1999 By default, AIX resolves TCP/IP host names and addresses
in the following order: 1. DNS 2. NIS 3. /etc/hosts. There are
situations where you can improve performance and availability by
reordering the search order. Here are two methods for changing the
defaul
Early Adopter Experiences with AIX 4.3.3Audience: AIX
Administrators Date: November 5, 1999 As an early adopter of AIX
4.3.3, I've found it to be a solid operating system that works as
advertised. However, I encountered three glitches after migrating
from AIX 4.3.2 to 4.3.3. I've compiled a list of these issues for
other early adopters
"oslevel" command still shows AIX 4.3.2 after the migration The
C compiler works only for "root" id "docsearch" for Web based
documentation stops working after the upgrade
Most, if not all, of the issues were related to a migration
install, rather than a fresh install. If you observe any of these
symptoms, see the below for the resolution. Despite the minor
glitches, I highly recommend AIX 4.3.3! For more current
information, visit the AIX 4.3 Tip page.
AIX 4.3 Installation TipsOctober 8, 1999 This document contains
the latest tips for successful installation of AIX 4.3, and will be
updated as new tips become available. APARs and PTFs mentioned in
this document, when available, can be obtained from FixDist.
Information on obtaining and using FixDist is available at the
following URL.http://service.software.ibm.com/rs6k/fixes.html
oslevel May Not Indicate 4.3.3.0 ifor_ls.msg Installation
Failures bos.loc.utf.ZH_CN Update Failure perfagent.tools Update
Failure sysmgt.websm.apps Update Failure Installation Failures from
NFS Mounted CD AIX Fast Connect in DCE Environment LED E1DC During
Boot on CHRP Systems Firmware Corruption Using feprom_update Exec
Format Error Running Netscape Communicator WebSphere V3.0 with AIX
JDK 1.1.8 C Compiler Works Only for "root" ID after Upgrade to
4.3.3 Web Based AIX Documentation "docsearch" Failure
oslevel May Not Indicate 4.3.3.0The oslevel command may not
correctly output '4.3.3.0' on systems installed or updated from the
AIX 4.3.3 product media because the level of the ifor_ls.compat.cli
fileset on the AIX product media is backleveled at the 4.3.2.0.
This problem can be corrected by installing the ifor_ls.compat.cli
4.3.3.0 update (PTF U466561), which is available from FixDist. This
problem does not occur when updating from the 4.3.3.0 Maintenance
Level. The bos.perf.pmr fileset is down level after updating from
the AIX 4.3.3 product media. The occurs only when updating AIX
4.3.0 and 4.3.1 systems, which already have the bos.perf.pmr
fileset installed. The bos.perf.pmr fileset is obsolete in AIX
4.3.3 and should be removed. The bos.crypto* and sysmgt.security*
filesets are not included in the AIX 4.3.3.0 Maintenance Level,
since they contain encryption code that is subject to export
restrictions. Updates to these filesets are available only on the
AIX 4.3.3 Bonus Pack that that is shipped with AIX 4.3.3.
ifor_ls.msg Installation FailuresSome ifor_ls.msg.*.compat.gui
filesets may fail to install from the AIX 4.3.3 product media due
to a requisite to ifor_ls.compat.gui 4.3.3.0, which does not exist.
This problem can be corrected by installing the ifor_ls.compat.gui
4.3.3.0 update (APAR IY04448), when available, from FixDist.
bos.loc.utf.ZH_CN Update FailureWhen updating an existing AIX
4.3 system from the AIX 4.3.3.0 Maintenance Level, the
bos.loc.utf.ZH_CN 4.3.3.0 update will fail to install if the
bos.loc.iso.zh_CN fileset is not installed. To
prevent this problem, install the bos.loc.iso.zh_CN fileset from
your existing AIX media prior to updating from the AIX 4.3.3.0
Maintenance Level. This problem does not occur when updating from
the AIX 4.3.3 Product Media.
perfagent.tools Update FailureWhen updating an existing AIX 4.3
system from the AIX 4.3.3.0 Maintenance Level, the perfagent.tools
2.2.33.0, as well as other requisites, may fail to install. The
requisite failure occurs if the perfagent.server fileset is
installed without the perfagent.tools fileset. To prevent this
problem, install the perfagent.tools fileset from your existing AIX
media prior to updating from the AIX 4.3.3.0 Maintenance Level.
This problem does not occur when updating from the AIX 4.3.3
Product Media.
sysmgt.websm.apps Update FailureWhen updating an existing AIX
4.3 system from the AIX 4.3.3.0 Maintenance Level, the
sysmgt.websm.apps 4.3.3.0, as well as other requisites, may fail to
install. The requisite failure occurs if the sysmgt.websm.apps
fileset is already installed, due to a requisite to perl.rte, which
is a new fileset in 4.3.3. To prevent this problem, install the
perl.rte fileset, which is included in the AIX 4.3.3.0 Maintenance
Level prior to updating from the AIX 4.3.3.0 Maintenance Level.
This problem does not occur when updating from the AIX 4.3.3
Product Media.
Installation Failures from NFS Mounted CDPermissions of some
install images on the AIX 4.3.3 product media do not include read
permission for others. Although this will not cause problems while
installing from a locally mounted CD-ROM, it can cause installation
failures from a CD-ROM that is NFS mounted. This problem can be
circumvented by copying the images to disk and changing the
permissions, or by changing the NFS export parameters to allow root
access for the mounting host.
AIX Fast Connect in DCE EnvironmentAIX Fast Connect configured
in a DCE environment to provide access to file shares located in
DFS space must be started using the following steps. 1. Login as
root. 2. dce_login as a principal (such as cell_admin) that has su
rights to the DFS tree being shared.
3. Start AIX Fast Connect using the 'net start /load' command.
SMIT or WebSM can also be used as long as the they are started from
this shell. The above procedure allows the cifsServer daemon to run
with su login context while cifsUserProc runs with users login
context. Users login context gets set following DCE
authentication.
LED E1DC During Boot on CHRP SystemsCHRP based systems can hang
at boot with E1DC in the LEDs after booting down-level diagnostics
or AIX CDs. You can determine if your system is CHRP based using
the following command: lslpp -Ldevices.chrp.base.rte
If the devices.chrp.base.rte filesets is installed, the system
architecture is likey CHRP. If this fileset is not installed, this
problem cannot occur on your system. To prevent this problem from
occurring, install APAR IX79693, which is included in AIX 4.3.2,
and also obtain the latest 4.3.2 diagnostics CD-ROM, P/N 08L1427 or
08L1430. Do not attempt to boot the system with earlier level
diagnostics CD-ROMs or other media that contains a level of AIX
earlier than 4.3.2. Once this problem occurs, the only way to
correct the condition is to power the system off, unplug the
battery for approximately 10 minutes, plug in the battery and power
the system back on.
Firmware Corruption Using feprom_updateThe "feprom_update"
command fails on AIX 4.3 systems with an error similar to: 1734-009
cannotwrite in FEPROM
Once this failure occurs, the system firmware is corrupt, and
the system will no longer reboot. This problem affects SMP systems
with 604e processors, including SP High Nodes. APAR IX84560 is
currently available and should be installed prior to attempting a
firmware update..
Exec Format Error Running Netscape CommunicatorNetscape
Communicator uses a private copy of the AIX C library (libc.a). The
libc.a shipped with Netscape Communicator 4.0.4 and earlier may not
be compatible with AIX 4.3.1, and may fail to start with an error
similar to the following:Could not load program
/usr/local/netscape4/netscape_aix4 Symbol __malloc_postfork_unlock
in /usr/lib/libpthreads.a is undefined Symbol __malloc_prefork_lock
in /usr/lib/libpthreads.a is undefined Could not load library
libC.a[shr.o]
Error was: Exec format error
To correct this problem, refer to the following URL for
instructions on downloading and installing the
fix.ftp://aix.software.ibm.com/aix/efixes/netscape/
WebSphere V3.0 with AIX JDK 1.1.8Use of the AIX Java 1.1.8 JIT
(Just-in-Time compiler) with the WebSphere V3.0 Administration
Server requires APAR IY04792. Until the APAR is applied, the JIT
should be disabled during WebSphere Application Server startup.
Disabling the JIT can have negative WebSphere Application Server
performance impacts, therefore installation of APAR IY04792 is
highly recommended. To disable the AIX JDK 1.1.8 JIT, modify the
WebSphere admin.config file and replace the
line:com.ibm.ejs.sm.util.process.Nanny.adminServerJvmArgs=-mx128m
with the
line:com.ibm.ejs.sm.util.process.Nanny.adminServerJvmArgs=-mx128m
-Djava.compiler=NONE
Secondly, any Application Server that is created will also
require the JIT to be disabled. To accomplish this, through the use
of the WebSphere Administrative Console, add the following to the
Command line arguments field for the Application Server:
-Djava.compiler=NONE The Admin Console DOES NOT require the JIT to
be disabled. The procedure is only required for the Adminserver and
any Application Servers.
C Compiler Works only for "root" ID after UpgradeThe C compiler
may be usable only by root after a migrating install to AIX 4.3.3.
The cause of the problem is a permissions change on an iforls
directory. To fix the problem run the following command: chmod 1777
/var/ifor
Web Based AIX Documentation "docsearch" Failure After UpgradeThe
"docsearch" function of the AIX's web based documentation may fail
after upgrading to AIX 4.3.3. To fix, cd /infocd unlinkbasecd
linkbasecd
Backing Out AIX UpdatesAudience: AIX Administrators Date:
November 19, 1999 According to the Wall Street Journal, several
recent well publicized web outages were caused by inadequate
software change control. Several useful change control features are
provided in base AIX. One particularly useful function is the
ability to back out software updates. The ability to backout
updates requires that they be installed using non-default settings.
On the smit install_latest screen, change two of the options as
follows: Commit software updates? No Saved replaced files? Yes
These settings will save the replaced files when the updates are
applied. At some future point, you can either commit the updates
(smit commit), or back them out (smit reject). The backout
automatically restores the original files. ** Recommendation: To be
safe, always make a system backup (mksysb) before applying
updates.
Identifying the Serial Number of a Remote RS/6000Audience: AIX
Administrators Date: January 21, 2000 The following AIX commands
identify the model and serial number of PCI based RS/6000s Model
Number: uname -M Serial Number: lsattr -El sys0 -a systemid These
commands can make it easier to inventory remote systems via an
rexec command or telnet session. These commands do not work on
older Microchannel based systems. On these systems, you can use the
"uname -m" command to generate a code that corresponds to the model
(but not serial number). See the documentation for the AIX "uname"
command for the code-model number correlation. The following Korn
shell script uses these and other commands to list the
configuration of a RS/6000. The output includes the model, serial
number (PCI only), number of CPU's, amount of memory, disk space,
TCP/IP address and AIX level.
Example of the OutputHost/IP Address RS/6000 Model Number of
CPU's Memory (KB) AIX Level = = = = = dodgers.ibmus2.ibm.com is
9.93.152.173 7009-C10 1 65536 4.3.3.0
Number of hdisks = 5 Volume Groups VG Total(MB) datavg 1000
rootvg 1000 externvg 2356
Free 244 60 1032
USED 756 940 1324
Disks 1 1 3
Korn Shell Script#!/usr/bin/ksh # Bruce Spencer, IBM # 2/4/99 #
Modified 1/20/2000 to add serial number and "uname -M" # This
program identifies the Model, serial number (PCI only), memory,
CPU' # and disk on a RS/6000 # Hardware Codes for MCA based systems
CODE=`uname -m | cut -c9,10 ` case $CODE in 02) MODEL="7015-930";;
10) MODEL="7016-730, 7013-530, 7016-730";; 14) MODEL="7013-540";;
18) MODEL="7013-53H";; 1C) MODEL="7013-550";; 20)
MODEL="7015-930";; 2E) MODEL="7015-950";; 30) MODEL="7013-520,
7018-740/741";; 31) MODEL="7012-320";; 34) MODEL="7013-52H";; 35)
MODEL="7012-32H";; 37) MODEL="7012-340";; 38) MODEL="7012-350";;
41) MODEL="7011-220";; 42) MODEL="7006-41T/41W";; 43)
MODEL="7008-M20";; 46) MODEL="7011-250";; 47) MODEL="7011-230";;
48) MODEL="7009-C10";; 57) MODEL="7012-390, 7030-3BT";; 58)
MODEL="7012-380, 7030-3AT";; 59) MODEL="7012-39H, 7030-3CT";; 5C)
MODEL="7013-560";; 63) MODEL="7015-970/97B";; 64)
MODEL="7015-980/98B";; 66) MODEL="7013-580/58F";; 67)
MODEL="7013-570/770/771/R10";; 70) MODEL="7013-590";; 71)
MODEL="7013-58H";; 72) MODEL="7013-59H/R12";; 75)
MODEL="7012-370/375/37T";; 76) MODEL="7012-360/365/36T";; 77)
MODEL="7012-355/55H/55L";; 79) MODEL="7013-590";; 80)
MODEL="7015-990";; 82) MODEL="7015-R24";; 89) MODEL="7013-595";;
90) MODEL="7009-C20";; 91) MODEL="7006-42x";; 94)
MODEL="7012-397";; A0) MODEL="7013-J30";; A1)
MODEL="7013-J40";;
A3) A4) A6) A7) C0) C4) 4C) *)
MODEL="7015-R30";; MODEL="7015-R40";; MODEL="7012-G30";;
MODEL="7012-G40";; MODEL="7024-E20";; MODEL="7025-F40";;
MODEL=`uname -M`;; MODEL="Unknown";;
# PCI systems
esac # echo "Hostname echo "Host/IP Address echo "RS/6000
Model
= " $(hostname) = " $(host $(hostname) ) = " $MODEL
SN=$(lsattr -El sys0 -a systemid 2>/dev/null) if [ $? -eq 0 ]
then echo "Serial Number = " `echo $SN | awk ' { print $2 }'` fi
echo "Number of CPU's = " $(lscfg |grep -c "^+ proc") echo "Memory
(KB) = " $(lsattr -El sys0 | awk '/realmem/ {print $2 }') echo "AIX
Level = " $(oslevel) echo "Number of hdisks = " $(lspv |wc -l) echo
"Volume Groups" # list volume groups disk avail/used for i in
$(lsvg) do lsvg $i done | awk ' BEGIN {
printf("%10s\t%10s\t%10s\t%10s\t%10s\n","VG","Total(MB)","Free","USED","Disks")
} /VOLUME GROUP:/ { printf("%10s\t", $3) } /TOTAL PP/ {
B=index($0,"(") + 1 E=index($0," megaby") D=E-B printf("%10s\t",
substr($0,B,D) ) } /FREE PP/ { B=index($0,"(") + 1 E=index($0,"
megaby") D=E-B printf("%10s\t", substr($0,B,D) ) } /USED PP/ {
B=index($0,"(") + 1 E=index($0," megaby") D=E-B printf("%10s\t",
substr($0,B,D) ) } /ACTIVE PV/ { printf("%10s\t\n", $3) } '
Disabling Remote root LoginAudience: AIX Administrators Date:
March 24, 2000 When multiple users have root access to a system, a
common security question is who logged in as root? One alternative
is to disable remote logins for the root id (chuser -rlogin=false
root). This forces users to
first login in with their regular user id, then "su -" to root.
All "su" activity is captured in /var/adm/sulog, thus answering the
question of "who logged in as root." Comment: In general it is a
good practice to disable root remote access as it provides two
layers of password protection.
ANSI Terminal SupportAudience: System Administrators Date: April
5, 2000 The default AIX installation does not include support for
ANSI terminals. ANSI support is important because Win95/98 telnet
clients use this terminal emulation. Without ANSI support, full
screen applications such as smit or vi, won't work properly. To
support ANSI terminals, install bos.terminfo.ansi.data package on
the base AIX CD. As an alternative, the ANSI terminfo file is
attached below. To install: 1. cp ansi.ti /usr/lib/terminfo 2. tic
/usr/lib/terminfo/ansi.ti
ansi.ti# @(#)18 1.1 src/bos/usr/share/lib/terminfo/ansi.ti,
terminfo, bos430, 9737A_430 9/1/93 20:34:12 # # COMPONENT_NAME:
(TERMINFO) Terminfo # # FUNCTIONS: ansi.ti # # ORIGINS: 4 # #
OBJECT CODE ONLY SOURCE MATERIALS # # ident "@(#)terminfo:ansi.ti
1.12" # ANSI - standards and other nonexistent terminals emulated
in software. # # Manufacturer: ANSI - Generic # Class: III # #
Info: # This category is used for terminals people "make up" in
software # that do not represent a particular piece of hardware.
This # includes standards, such as the ANSI standard, as well as #
emulator programs that accept a particular set of escape #
sequences. # # ANSI capabilities are broken up into pieces, so that
a terminal # implementing some ANSI subset can use many of them. #
ansi+local, cud=\E[%p1%dB, cub=\E[%p1%dD, cuf=\E[%p1%dC,
cuu=\E[%p1%dA, ansi+local1,
cud1=^J, cub1=^H, cuf1=\E[C, cuu1=\E[A, ansi+tabs, ht=^I,
cbt=\E[Z, hts=\EH, tbc=\E[2g, ansi+inittabs, it#8, use=ansi+tabs,
ansi+erase, ed=\E[J, el=\E[K, clear=\E[H\E[J, ansi+rca,
hpa=\E[%p1%{1}%+%dG, vpa=\E[%p1%{1}%+%dd, ansi+cup,
cup=\E[%i%p1%d;%p2%dH, home=\E[H, ansi+rep,
rep=%p1%c\E[%p2%{1}%-%db, ansi+idl, dl=\E[%p1%dM, il=\E[%p1%dL,
ansi+idl1, dl1=\E[M, il1=\E[L, ansi+idc, dch1=\E[P, ich=\E[%p1%d@,
ich1=\E[@, # smir=\E6, rmir=\E6, commented out by ehr3 ansi+arrows,
kcuu1=\E[A, kcud1=\E[B, kcub1=\E[D, kcuf1=\E[C, khome=\E[H, kbs=^H,
ansi+sgr|ansi graphic renditions, rev=\E[7m, blink=\E[5m,
invis=\E[8m, sgr0=\E[0m, ansi+sgrso|ansi standout only, rmso=\E[m,
smso=\E[7m, ansi+sgrul|ansi underline only, rmul=\E[m, smul=\E[4m,
ansi+sgrbold|ansi graphic renditions; assuming terminal has bold;
not dim, bold=\E[1m,
sgr=\E[%?%p1%t7;%;%?%p2%t4;%;%?%p3%t7;%;%?%p4%t5;%;%?%p6%t1;%;m,
use=ansi+sgr, use=ansi+sgrso, use=ansi+sgrul, ansi+sgrdim|ansi
graphic renditions; assuming terminal has dim; not bold, dim=\E[2m,
sgr=\E[%?%p1%t7;%;%?%p2%t4;%;%?%p3%t7;%;%?%p4%t5;%;%?%p5%t2;%;m,
use=ansi+sgr, use=ansi+sgrso, use=ansi+sgrul, ansi+pp|ansi printer
port, mc4=\E[4i, mc5=\E[5i, mc0=\E[0i, # Info: # ANSI is a vanilla
ANSI terminal. This is assumed to implement # all the normal ANSI
stuff with no extensions. It assumes # insert/delete line/char is
there, so it won't work with # vt100 clones. It assumes video
attributes for bold, blink, # underline, and reverse, which won't
matter much if the terminal # can't do some of those. Padding is
assumed to be zero, which # shouldn't hurt since xon/xoff is
assumed. # # We assume a 24x80 screen. This entry was derived from
the # Ann Arbor Ambassador, and is untested. # ansi|generic ansi
standard terminal, use=vanilla, am, cols#80, lines#24, xon,
use=ansi+cup, use=ansi+rca, use=ansi+erase, use=ansi+tabs,
use=ansi+local1, use=ansi+local, use=ansi+idc, use=ansi+idl1,
use=ansi+idl, use=ansi+rep, use=ansi+sgrbold, use=ansi+arrows, #
Info: # Bare minimum ANSI terminal. This should work on anything,
but # beware of screen size problems and memory relative cursor
# addressing. # minansi|minimum ansi standard terminal, am, xon,
use=vanilla, cols#80, lines#24, use=ansi+cup, use=ansi+erase, #
Info: # This terminal type is for ANSI terminals with ONLY memory #
relative cursor addressing and more than one page of memory. # It
uses local motions instead of direct cursor addressing, # and makes
almost no assumptions. It does assume auto margins, # no padding
and/or xon/xoff, and a 24x80 screen. # mransi|mem rel cup ansi, am,
use=vanilla, cols#80, lines#24, xon, use=ansi+erase,
use=ansi+local1, # Info: # Columbus UNIX virtual terminal. This
terminal also appears in # UNIX 4.0 and successors as line
discipline 1 (?), but is # undocumented and does not really work
quite right. # virtual|cbunix|cb-unix|cb-unix virtual terminal,
cr=^M, cud1=^J, ind=^J, bel=^G, cols#80, lines#24, am, clear=\EJ,
cub1=^H, cup=\EG%p2%c%p1%c, cuf1=\EC, cuu1=\EA, el=\EK, ed=\EL,
il1=\EP, dl1=\EN, ich1=\EO, dch1=\EM, lm#0, da, db, kcub1=\ED,
kcuf1=\EC, kcuu1=\EA, kcud1=\EB, khome=\EE, smso=\Ea\004,
rmso=\Eb\004, smul=\Ea\001, rmul=\Eb\001, # Info: # This terminal
is based on virtual but cleans up a few problems # with control
characters in parameter strings. It is implemented # in mrh's
window manager. # pty|4bsd pty terminal, smso=\Ea$, rmso=\Eb$,
smul=\Ea!, rmul=\Eb!, cup=\EG%p1%' '%+%c%p2%' '%+%c, use=virtual, #
Info: # A dumb terminal with 1 line which is a fake status line. #
This is useful to run sysline in in a multi-window environment. #
1line|one_line|one line window, cr=^M, ind=^J, cols#80, lines#1,
am, ht=^I, cub1=^H, hs, tsl=\n, # Info: # 1linepty is like 1line
but the 1 line window is smarter, # with standout, cursor
addressing, and clear to eol. # 1linepty|one_linepty|1 line window
in a pty, smso=\Ea$, rmso=\Eb$, smul=\Ea!, rmul=\Eb!, cup=\EG%p1%'
'%+%c%p2%' '%+%c, tsl=\r\EK\EG %p2%' '%+%c, eslok, use=1line,
vanilla, bel=^G, cr=^M, cud1=^J, ind=^J, datakit, am, gn, cols#80,
bel=^G, cr=\r, cud1=\n, ind=\n,
Identifying Which Fileset an AIX Command Installs FromAudience:
AIX Administrators
Date: October 6, 2000 As is typical of most operating systems
today, the default AIX load does not include all software available
on the installation CD-ROM. If you are missing a command, you can
use the which_fileset to identify which fileset needs to be
installed. For example, depending on your AIX level, the
which_fileset dbx command might display/usr/bin/dbx >
/usr/ccs/bin/dbx /usr/ccs/bin/dbx bos.adt.debug 4.2.1.0
bos.adt.debug 4.2.1.0
Install the missing fileset and you're back in business. The
which_fileset command is itself an optional command, and requires
the bos.content_list to be installed. For more information, see
http://www.rs6000.ibm.com/doc_link/en_US/a_doc_lib/cmds/aixcmds6/which_fileset.htm
Thanks to Allen Oh for this tip!
AIX Tip of the Week: Centralizing Console Support for RS/6000
Server FarmAudience: AIX Administrators, Operations Date: November
18, 2000 You can use the RS/6000 128 Port Asynch Adapter to
centralize console functions of an entire server farm onto a single
PC or workstation. The console functions include "Power On/Off",
viewing boot messages and redirecting the console. The central PC
can be located anywhere in the network. See the Central Console
Setup PDF file for more information.
AIX Tip of the Week: Viewing AIX Boot and Console LogsAudience:
AIX Systems Administrators Date: December 2, 2000 Boot and console
messages can be used to identify and fix problems. These messages
are automatically stored on disk by AIX. To view the stored
messages, use the alog command. Here are a couple examples of the
alog command:alog -L alog -o -t boot alog -o -t console # # # List
the defined log types View the boot log View the console log
See the AIX documentation for more information on the alog
command, as well as how to define your own log types.
AIX Tip of the Week: Determining Installed AIX
Software/VersionAudience: Systems Administrators Date: January 5,
2001 Here are some useful commands for determining which AIX
software packages are installed and their version/fix levels.
List all installed filesets with their version level lslpp -L
AIX maintenance level oslevel List known AIX maintnenance levels
oslevel -q List filesets that are below the AIX 4.3.2.0 maintenance
level oslevel -l 4.3.2.0 Determine whether a fix is installed (for
example. fixes IX38794 and IX48523), and what it fixes (-a).
instfix -iak IX38794 Determine if a maintenance package is
installed instfix -ik 433-02_AIX_ML Determine which filesets need
updating to reach the 4.3.3.0-02 level instfix -ciqk 4330-02_AIX_ML
| grep ":-:"
AIX Tip of the Week: Identifying the Origin of "core"
FilesAudience: Systems Administrators Date: January 12, 2001 When
an application core dumps, a "core" file is placed in the current
directory. Core files are often a symptom of a problem that needs
attention. You can determine which application caused the "core"
file going to the directory where the core file is located and
running the command: $ lquerypv -h core 6b0 64 The name of the
application causing the core file is listed in the section on the
right. In the sample output below, the "ftpd" application caused
the core file.000006B0 000006C0 000006D0 000006E0 000006F0 00000700
00000710 7FFFFFFF 00000000 00170000 66747064 00000000 00000000
00000000 FFFFFFFF 000007D0 53245A2C 00000000 00000000 00000000
00000020 7FFFFFFF 7FFFFFFF 00000000 00000000 00000000 00000000
00000000 FFFFFFFF FFFFFFFF 00000015 00000000 00000000 000000CF
000000BE |................| |................| |....S$Z,........|
|ftpd............| |................| |................| |.......
........|
In addition, AIX can be configured to detect when core files are
created and mail a message to root, alerting root that an
application has failed. The instructions for setting this up are in
a README file in the /usr/samples/findcore directory. These
programs are delivered with the bos.sysmgt.serv_aid fileset.
Microcode Discovery Service and VPD Capture Service
Audience: All Date: February 23, 2001 AIX development recently
announced two utilities that centralize and simplify configuration
management tasks. The utilities are Microcode Discovery Service and
VPD Capture Service. Microcode Delivery Service identifies
downlevel microcode on a group of RS/6000 or SP systems. (You are
keeping your microcode current, aren't you?) VPD Capture Service
records hardware configuration information for IBM to insure the
correct system upgrade components are shipped. Both services can be
run from a centralized PC browser using a Java Applet. The services
use a new AIX command and daemon: invscout and invscoutd. Both are
included in the 10/00 AIX 4.33 update, and in AIX 5.0. For prior
releases and for documentation see: Microcode Discovery Service
Users Guide>http://techsupport.services.ibm.com/rs6k/mds.html
(=>Users Guide ) VPD Capture Service
http://techsupport.services.ibm.com/rs6k/vcs.html
New AIX Support for System V InitAudience: Systems
Administrators Date: March 2, 2001 The AIX 4.3.3.25+ maintenance
level adds a new /etc/rc.d directory. This directory supports the
System V Init process. It has been added to AIX to make it easier
to port System V applications that depend on run level. (AIX still
uses the BSD style init.) The purpose of both System V and BSD init
is to start processes at boot time. The processes that are started
depend on the system "run level" (AIX has "run levels" ranging from
0-9, with level 3 being default.) In the System V init process, the
startup scripts are grouped into directories by "run level." The
directory names are of the form /etc/rc.d/rc${run_level}.d (For
example, /etc/rc.d/rc3.d directory contains scripts for run level
3.) Each directory contains both startup/shutdown scripts. Script
names that start with "K" kill processes, and script names that
start with "S" start processes. The scripts are run in alphabetical
order. In practice, the startup scripts physically reside in the
/etc/rc.d/init.d directory. The scripts in the
/etc/rc.d/rc${run_level}.d are actually links to back to files in
the init.d directory. For more information on the AIX init process,
see:
http://www.rs6000.ibm.com/doc_link/en_US/a_doc_lib/files/aixfiles/inittab.htm
http://www.rs6000.ibm.com/doc_link/en_US/a_doc_lib/cmds/aixcmds5/telinit.htm#A15891e19
Using timedc and setclock to Display and Synchronize
ClocksAudience: System Administration Date: March 16, 2001 Clock
settings must be synchronized in a client/server architecture to
maintain data integrity and to facilitate problem determination.
Two common synchronization methods include using a central time
server (NTP) or running the timed daemon. The timed daemon creates
an average network time by synchronizing clocks with other systems
on the LAN who are running timed. Two useful commands for
displaying and setting clocks are timedc and setclock. Here are a
couple examples of using each command. timedc msite - identifies
the location of the current timed server. timedc clockdiff
remotehost - display the clock difference between the local host
and remotehost. setclock remotehost - synchronizes the local hosts
time/date to that of remotehost
IP AliasingAudience: System Administration Date: March 30, 2001
The following tip if from Bob Kelly, IBM Austin. IP Aliasing allows
a single network interface to have multiple IP addresses. One of
the advantages of aliasing is the ability consolidate applications
and web pages on one server without changing application code. The
commands to add/delete an IP alias are To add an alias to your
existing network adapter: ifconfig en1 alias 10.10.10.1 netmask
255.255.255.1 To delete an alias from your network adapter ifconfig
en1 delete 10.10.10.1 *For all you smitty folks, smitty inetalias
will accomplish the same. Important Notes: Sendmail can still be
configured to receive mail to either address. It can be "told" to
use the "firstwebsite" address, or you could use the
"secondwebsite" address. To the outside world, it will appear that
your network has two machines, "firstwebsite" and "secondwebsite",
when actually they are one machine, with two TCP/IP addresses. Be
aware. There are known issues with AIX 4.3.3 gated and aliases.
Gated was not designed to handle aliases implemented in the way AIX
implement them. Gated will send a HELLO from each interface, which
can confuse the routers.
Restoring a "tar" Backup with Absolute Path Names to a Different
Directory
Audience: AIX Users Date: July 30, 2001 A tar backup created
using absolute path names can only only be restored to the
directory from which it was created. One way to restore it to a
different directory is by using the pax command. For example,
suppose you receive a tar tape created using absolute path names:
tar -cvf /dev/rmt0 /work/* but want to restore it to the /test
directory. The pax command would be: pax -rf /dev/rmt0
-s/work/test/p The -s/work/test/p does the directory change. It
functions similar to a "vi" search and replace. The pax command has
several other uses such as duplicating directories. See the pax man
page for more information.
Booting Multiple Versions of AIXAudience: System Administration
Date: April 7, 2001 The AIX "bootlist" command can be used to
select the boot disk. This is useful if you want to test different
AIX levels on the same system. For example, assume hdisk0 has AIX
4.2.1 installed and hdisk1 AIX 4.3.3 installed. Use one of the
following "bootlist" commands** to select which version will come
up on the next reboot:bootlist -m normal hdisk0 # Reboots to AIX421
bootlist -m normal hdisk1 # Reboots to AIX433
The second disk can be installed from CD, a "mksysb" tape, or
using AIX 4.3's "alt_disk_install" capability. Both CD and mksysb
installs require downtime. The "alt_disk_install" allows you to
install the second disk from a "mksysb" or clone your existing OS
while the system is running ** Comment: In practice, I recommend
the following "bootlist" syntax which specifies that if hdisk0
fails to boot, try booting from hdisk1, then tape, and finally CD
ROM.bootlist -m normal hdisk0 hdisk1 rmt cd
Replacing an AIX Disk DriveAudience: AIX Administrators Date:
August 5, 2001 The procedure to replace an AIX disk drive depends
on what is on the disk. The attached PDF file describes how to
replace a disk drive in AIX. It is based on the official "Removing
and Replacing a Fixed Drive" document that can
be found at http://techsupport.services.ibm.com/rs6k/techbrowse
/ A few of the additions include
Documenting the disk configuration How to create map file to
restore an LV to the exact disk partition. How to replace a JFSLOG.
A flowchart for replacing a disk drive
Replacing an AIX Disk
Split Mirror CopyAudience: AIX System Administrators Date:
September 4, 2001 As applications move toward 7x24 uptime, there is
less downtime available for backups. This tip describes the split
mirror backup technique which reduces downtime for backups to
minutes, for even the largest The technique involves mirroring the
data, to another disk, splitting off the copy, then backing up the
copy in the background while the system is running production.
There are two basic ways to split a mirror copy. One way uses
hardware commands (Shark Flash Copy or ssa_make_copy). The other
uses AIX commands. If using hardware commands, use the recreatevg
command to redefine the disk definitions (PVID, LV, filesystem
names). This is because a hardware copy duplicates all definitions,
which would cause conflicts. The recreatevg command.resolves the
conflicts by creating a new volume group with unique PVIDs, LV
names and filesystem names. The recreatevg command is available in
both AIX 4.3.3 and 5L, but the documentation is found only in AIX
5L:
http://publib.boulder.ibm.com/doc_link/en_US/a_doc_lib/cmds/aixcmds4/recreatevg.htm
The AIX alternative to split a mirror copy uses either the
splitlvcopy or chfs command. The splitlvcopy is used for raw
partitions, and the chfs command is used for filesystems. To
illustrate, the following example assumes we want to make a split
mirror copy of the "datalv". The copy will be located on hdisk2,
with a LV name of "lv_copy"1. Define a mirror copy of "datalv" on
"hdisk2" mklvcopy datalv 2 hdisk2
2. Synchronize (copy) the data to the mirror syncvg -l -P6
datalv
3. Verify copy is complete (ie no "stale" partitions) lslv
datalv 5. Stop application/database
6
Split off the hdisk2 mirror copy. For raw partitions: For JFS
filesystems: splitlvcopy -y lv_copy datalv 1 hdisk2 chfs -a
splitcopy=/data_copy -a copy=2 If not, you'll see the error:
/data
Note: to use "chfs," the JFSLOG must be mirrored.
"jfs_syscall: A system call received a parameter that is not
valid " 7. Restart application/database 8. Backup data
The downtime associated with the split mirror copy is in Steps
5-7. Depending on the size of the data, the typical downtime is
5-30 minutes. All other steps can done while running
production.
Work Load ManagerAudience: System Administrators Date: September
30, 2001 AIX Workload Manager (WLM) is a "no-charge" operating
system component introduced in AIX Version 4.3.3. With WLM you can
control the amount of CPU and memory used by users and
applications. The benefits of WLM include helping maintain service
levels, and reducing the impact of some poorly behaved
applications. For more information, see
http://www.ibm.com/servers/aix/library (WLM is located under the
Technical Publications) http://www.redbooks.ibm.com (Search for
sg245522.pdf. Work Load Manager Surveys load balancing in general.
WLM is covered in Chapter 5)
Configuring Network Adapters for RedundancyAudience: System
Administrators Date: October 15, 2001 You can protect against
network adapter failure using AIX's Etherchannel support.
Etherchannel allows you to create a "logical" ethernet adapter out
of 2 physical adapters. If the primary network adapter fails, AIX
seemlessly moves network traffic to the surviving adapter using the
same IP address.
The Etherchannel function is available in AIX 4.3.3+.
Documentation is scarce, so here's a quick "how to". In this
example, we assume we have two physical adapters (ent1 and ent2)
that we want to group as a logical interface: smit => devices
=> communications => etherchannel =>"Add an Etherchannel"
(fastpath "smit etherchannel")Add An Etherchannel Type or select
values in entry fields. Press Enter AFTER making all desired
changes. Etherchannel Adapters Enable ALTERNATE ETHERCHANNEL
address ALTERNATE ETHERCHANNEL address Mode Internet Address to
Ping Number of Retries Retry Timeout (sec) [Entry Fields] ent1 ent2
no [] netif_backup [] [] []
This will create a "logical" interface using the next available
adapter name ("ent3"). From here, configure an IP address on the
logical interface ent3.
Comments:ALTERNATE ETHERCHANNEL = yes allows you to specify a
"MAC" address. (Not necessary) Mode = round-robin provides higher
aggregate bandwidth by distributing outgoing packets over multiple
network adapters. However "round-robin" does not distribute
incoming packets, nor does it provide adapter failover. Use
"netif_backup" if you want failover. Internet Address to Ping: IP
address for "keep alive". Optional as most failures detected at
link layer Bruce Spencer, [email protected]
EtherChannel Readme FileEtherchannelIntroduction Etherchannel is
an aggregation technology that allows you to produce a single large
pipe by combining the bandwidth of multiple ethernet adapters. The
aggregated pipe appears to be single ethernet interface to the
upper layers (IP, etc.). Each of the ethernet adapters will share a
single MAC address. There is a single ethernet interface associated
with the aggregated pipe, which has a single IP address as well.
Hardware The ethernet adapters inside which are members of the
etherchannel can be any supported ethernet adapter. The ethernet
adapters must be connected to a switch which supports Etherchannel
. Configuration
In AIX 4.3.3, a single etherchannel can combine either two or
four ethernet adapters in the channel. You can configure multiple
etherchannels on a single system. Be aware that each etherchannel
constitutes an additional ethernet interface. The "no" option,
ifsize (default 8), needs to be increased to include not only the
ethernet interfaces for each adapter, but also any etherchannels
that are configured. See the "no" command documentation in regards
to modifying ifsize. The adapters in an etherchannel need to be
configured to the same speed (10 or 100 Mbps) and mode (half or
full duplex). I. Configuring Etherchannel
Etherchannel is configured through smit. I will use the
following setup to show how etherchannel is configured: there will
be 2 ethernet adapters, ent0 and ent1, in the etherchannel and
there is no etherchannel alternate address specifed. There are 5
ethernet adapters to choose from. Execute:#smittyetherchannel
which produces a screen that looks like:
Etherchannel MovecursortodesireditemandpressEnter.
ListAllEtherchannels AddAnEtherchannel
Change/ShowCharacteristicsofanEtherchannel RemoveAnEtherchannel
Then choose "Add An Etherchannel" selection:
Etherchannel MovecursortodesireditemandpressEnter.
ListAllEtherchannels AddAnEtherchannel
Change/ShowCharacteristicsofanEtherchannel DeleteAnEtherchannel
|AvailableNetworkAdapters | |MovecursortodesireditemandpressF7.
|ONEORMOREitemscanbeselected. |PressEnterAFTERmakingallselections.
| |>ent0 |>ent1 |ent2 |ent3 |ent4 |
|F1=HelpF2=RefreshF3=Cancel |F7=SelectF8=ImageF10=Exit
F1|Enter=Do/=Findn=FindNext F9
As instructed, select one more more of the listed adapters. The
"Available Network Adapters" displays all of the ethernet adapters.
If one selects an ethernet adapter that is already being used (i.e.
has an interface defined), then one will get an error similar to:
NOTE Methoderror(/usr/lib/methods/cfgech):0514001Systemerror:
Methoderror(/usr/lib/methods/chgent):
0514062Cannotperformtherequestedfunctionbecausethe
specifieddeviceisbusy.
AddanEtherchannel Typeorselectvaluesinentryfields.
PressEnterAFTERmakingalldesiredchanges.
[EntryFields] EtherchannelAdaptersent0ent1
EnableALTERNATEETHERCHANNELaddressno ALTERNATEETHERCHANNELaddress[]
Modestandard EnableGIGABITETHERNETJUMBOframesno
InternetAddresstoPing[] NumberofRetries[] RetryTimeout(sec)[]
After hitting the enter key: COMMANDSTATUS
Command:OKstdout:yesstderr:no
Beforecommandcompletion,additionalinstructionsmayappearbelow.
ent5Available
Since an alternate address was not specified, the config method
for the etherchannel changed the alternate address of ent1 to the
hardware add NOTE ent0. If an alternate address was specified, both
ent0 and ent1 would ha alternate address. Then add an interface,
en5 for standard ethernet or et5 for IEEE 802.3, through the normal
means. The easiest way is to use the "Minimum Configuration &
Startup" TCP/IP smit menu. II. Listing Etherchannels
Execute:#smittyetherchannel
and choose the "List All Etherchannels" selection: III.
Etherchannel MovecursortodesireditemandpressEnter.
ListAllEtherchannels AddAnEtherchannel
Change/ShowCharacteristicsofanEtherchannel RemoveAnEtherchannel
COMMANDSTATUS Command:OKstdout:yesstderr:no
Beforecommandcompletion,additionalinstructionsmayappearbelow.
ent5AvailableEtherchannel
Changing the alternate address
Execute:#smittyetherchannel
Then choose "Change / Show Characteristics of an Etherchannel"
selection:
Etherchannel MovecursortodesireditemandpressEnter.
ListAllEtherchannels AddAnEtherchannel
Change/ShowCharacteristicsofanEtherchannel RemoveAnEtherchannel
|AvailableEtherchannels | |MovecursortodesireditemandpressEnter.
| |ent5 | |F1=HelpF2=RefreshF3=Cancel |F8=ImageF10=ExitEnter=Do
F1|/=Findn=FindNext F9
To change the Alternate etherchannel address to
1234deadbeef:
Change/ShowCharacteristicsofanEtherchannel
Typeorselectvaluesinentryfields.
PressEnterAFTERmakingalldesiredchanges.
[EntryFields] Etherchannelent5
EnableALTERNATEETHERCHANNELaddressyes
ALTERNATEETHERCHANNELaddress[0x1234deadbeef]
After hitting the enter key:
COMMANDSTATUS Command:OKstdout:yesstderr:no
Beforecommandcompletion,additionalinstructionsmayappearbelow.
ent5changed
If one wants to add or delete an ethernet adapter from the
etherchannel, one must NOTE use the "Remove an Etherchannel" smit
menu selection, then re-add the etherchannel with the "Add An
Etherchannel" smit menu selection. Unconfiguring the Etherchannel
Execute:#smittyetherchannel
Then choose "Remove an Etherchannel" selection: Etherchannel
MovecursortodesireditemandpressEnter.
Choose 'ent5', then hit the enter key: COMMANDSTATUS
Command:OKstdout:yesstderr:no
Beforecommandcompletion,additionalinstructionsmayappearbelow.
ent5deleted ent0changed ent1changed
Troubleshooting tcpdump and trace can be used to troubleshoot
the etherchannel. The trace hook id for the transmit packets is 2FA
and for other events is 2FB. You cannot trace receive packets on
the channel as a whole, but you can trace each of the adapter's
receive trace hooks.
The entstat command will give the aggregate statistics of all
the adapters in an etherchannel. If entstat is run with the "-d"
option, the statistics of each of the individual adapters is
printed. Restrictions Remote dump is not supported over an
etherchannel. IV. Modes
There are three modes for Etherchannel. Each control the method
the channel uses to send and receive packets. Standard In this mode
the channel will hash on the destination IP address and use this
value to choose which adapter it will send the packet out on. This
mode will guarantee packets are sent out over the channel in the
order they were sent, but may not make full use of the bandwidth.
Round Robin In this mode the channel will rotate through the
adapters, giving each adapter one packet before repeating. In this
mode packets may be sent out in a slightly different order than
they were given to the channel, but the channel will make the best
use of its bandwidth. Network Interface Backup In this mode, the
channel will only activate one adapter at a time. The intention is
that the adapters are plugged into different ethernet switches,
each of which is capable of getting to any other machine on the
subnet/network. When a problem is detected, either with the direct
connection, or through inability to ping a machine, the channel
will deactivate the current adapter, and activate a backup adapter.
The channel will poll the adapter for Link Status in "Retry
Timeout" intervals. If the Link Status is not up (either due to a
cable being unplugged, switch down, or device driver problem) , the
channel will switch to another adapter. This mode is the only one
that makes use of the "Internet Address to Ping", "Number of
Retries", and "Retry Timeout" fields. V. Internet Address to Ping
The address will be ping'd if the address field has a non-zero
address and the mode is set to netif_backup. If the channel is
unable to ping the address for the "Number of Retries" times in
"Retry Timeout" intervals. The channel will switch adapters. VI.
Number of Retries The number of retries is the number of ping
response failures before the channel switches adapters. The default
is 3 times. VII. Retry Timeout The retry timeout is the interval in
seconds between the times when the channel will send out a ping
packet and poll the adapter's Link Status. The defauls is 1 sec
intervals.
Disabling CPU's in AIX 4.3.3Audience: System Administrators
Date: December 14, 2001 The cpu_deallocate command is useful tool
for scaleability testing. This command can be used to
dynamically
deactivate CPU's. The cpu_deallocate command is significantly
easier to use compared to the alternative of shutting the system
down and disabling CPU's via the Service Processor. The command
syntax is: cpu_deallocate . where "CPU number" is an integer
ranging between 0 and "n-1" where "n" is the number of CPU's.
(Comment: the logical CPU number is not necessarily the same number
associated with proc## in "lsdev -Cc processor" output. The proc##
are often not in sequence.) To verify a processor has been
disabled, run lsattr -El proc## Although the deactivation is
immediate. To reactivate the CPU's, the system must be rebooted.
Prereqs: AIX: bos.mp.4.3.3.21 Enable cpuguard: chdev -l sys0 - a
cpuguard=enable See AIX Tip Enabling CPU Deallocation for more
information.
Enabling CPU DeallocationAudience: System Administrators Date:
January 7, 2002 AIX's "CPU Deallocation" can enhance SMP
availability by dynamically taking a failing CPU offline. However,
"CPU Deallocation" is not enabled by default. To enable, use smit
or the command chdev -l sys0 -a cpuguard='enable' To verify it has
been enabled, run the command: lsattr -El sys0 Note: CPUguard
requires a minimum of three CPU's. You can use the cpu_deallocate
command to dynamically turn off a processor. See the AIX Tip
cpu_deallocate for more information.
splitmirrorvg Shell ScriptAudience: All Date: March 8, 2002
Audience Systems Administrators, DBA's. One use for "split
mirror copy" is to quickly move large amounts of data between
systems on a SSA loop, SAN or equivalent. You simply vary off the
volume group containing the copy and vary it on another server. It
avoids the congesting the network with large file transfers, and
the procedure takes only minutes. The attached "splitmirrorvg"
shell script automates the split mirror copy process. The split
copy is placed into a new volume group, which can then be
exported/imported onto another system on the same SSA loop or SAN.
The script illustrates many useful AIX LVM commands. It's worth a
look even if you don't have a need for split mirror copy.
Acknowledgement: Thanks to Dan Braden for the shell script.
NotesSteps: 1. create VG mkvg -y -s mkvg -f -y'splitmirrorvg'
-s'8' hdisk13 hdisk14 hdisk 15 hdisk17 hdisk18 hdisk19 hdisk20
hdisk21 2. Create LV (original copy) mklv -y -e x -w n mklv
-y'lvnum1' -e'x' -w'n' splitmirrorvg 18 hdisk16 hdisk17 hdisk18 3.
Create first copy of LV mklvcopy 2 mklvcopy lvnum1 2 hdisk19
hdisk20 hdisk21 4. Create second copy of LV mklvcopy 3 mklvcopy
lvnum1 3 hdisk13 hdisk14 hdisk15 5. List out LV map root@f1n3 >
lslv -m lvnum1 lvnum1:N/A LP PP1 PV1 0001 0109 hdisk16 0002 0109
hdisk17 0003 0109 hdisk18 0004 0110 hdisk16 0005 0110 hdisk17 0006
0110 hdisk18 0007 0111 hdisk16 0008 0111 hdisk17 0009 0111 hdisk18
0010 0112 hdisk16 0011 0112 hdisk17 0012 0112 hdisk18 0013 0113
hdisk16 0014 0113 hdisk17 0015 0113 hdisk18 0016 0114 hdisk16 0017
0114 hdisk17 0018 0114 hdisk18
PP2 0109 0055 0055 0110 0056 0056 0111 0057 0057 0112 0058 0058
0113 0059 0059 0114 0060 0060
PV2 hdisk19 hdisk20 hdisk21 hdisk19 hdisk20 hdisk21 hdisk19
hdisk20 hdisk21 hdisk19 hdisk20 hdisk21 hdisk19 hdisk20 hdisk21
hdisk19 hdisk20 hdisk21
PP3 0109 0055 0055 0110 0056 0056 0111 0057 0057 0112 0058 0058
0113 0059 0059 0114 0060 0060
PV3 hdisk15 hdisk14 hdisk13 hdisk15 hdisk14 hdisk13 hdisk15
hdisk14 hdisk13 hdisk15 hdisk14 hdisk13 hdisk15 hdisk14 hdisk13
hdisk15 hdisk14 hdisk13
6. Create a filesystem for testing (for raw LVs this wouldn't be
necessary) crfs -v jfs -d lvnum1 -m /tmp/fs -A yes Note that this
creates a jfslog LV which we also need to mirror 7. Mirror the
jfslog to (which will also be split later) mklvcopy loglv00 3
hdisk16 hdisk13 root@f1n3 > lslv -m loglv00 loglv00:N/A LP PP1
PV1 PP2 PV2 PP3 PV3 0001 0121 hdisk19 0115 hdisk16 0061 hdisk13 8.
Mount the FS and put some data in there for testing # mount /tmp/fs
# cd /tmp/fs # cp -R /etc/ . 9. Unmount the filesystem (i.e. stop
I/O) # umount /tmp/fs 10. Split off a copy of the LVs (use hdisk13
so the split LVs are on the same set of hdisks) splitlvcopy -y
lvnum2 lvnum1 2 hdisk13 (for the filesystem LV) splitlvcopy -y
newloglv00 loglv00 2 hdisk13 (for the jfslog LV) root@f1n3> lslv
-m lvnum2 lvnum2:N/A LP PP1 PV1 PP2 0001 0109 hdisk15 0002 0055
hdisk14 0003 0055 hdisk13 0004 0110 hdisk15 0005 0056 hdisk14 0006
0056 hdisk13 0007 0111 hdisk15 0008 0057 hdisk14 0009 0057 hdisk13
0010 0112 hdisk15 0011 0058 hdisk14 0012 0058 hdisk13 0013 0113
hdisk15 0014 0059 hdisk14 0015 0059 hdisk13 0016 0114 hdisk15 0017
0060 hdisk14 0018 0060 hdisk13 root@f1n3> lslv -m newloglv00
newloglv00:N/A LP PP1 PV1 PP2 0001 0061 hdisk13 11. Mount the
original LV # mount /tmp/fs 12. Save the LV maps for newloglv00 and
lonum2 Using the reformatmap script: #!/bin/ksh # reformap - script
to take an LV and get it's map and create a map # that can be used
by mklv # input is an LV name, output is a file of name $lvmap
lv=$1 cat /dev/null > ${lv}map lslv -m $lv | grep -v ^$lv | grep
-v ^LP | while read lpnum ppnum pv
PV2
PP3
PV3
PV2
PP3
PV3
do echo ${pv}:$ppnum >> done
${lv}map
# reformatmap lvnum2 # reformatmap newloglv00 root@f1n3 > pg
lvnum2map hdisk15:0109 hdisk14:0055 hdisk13:0055 hdisk15:0110
hdisk14:0056 hdisk13:0056 hdisk15:0111 hdisk14:0057 hdisk13:0057
hdisk15:0112 hdisk14:0058 hdisk13:0058 hdisk15:0113 hdisk14:0059
hdisk13:0059 hdisk15:0114 hdisk14:0060 hdisk13:0060
[email protected] (/tmp) > cat newloglv00map hdisk13:0061
13. Add entry to /etc/filesystems for new filesystem /tmp/newfs:
dev = /dev/lvnum2 vfs = jfs log = /dev/newloglv00 mount = false
options = rw account = false 14. Mount it and see if the data is
there (make sure new mount point is there first) # mkdir /tmp/newfs
# mount /tmp/newfs # find /tmp/newfs -print 15. Unmount the
filesystem and remove the new LVs in preparation for creating them
in a new VG on hdisk13, hdisk14 and hdisk15 Unmount # umount
/tmp/newfs Remove the LVs # rmlv -f lvnum2 # rmlv -f newloglv00 16.
Remove the disks from the VG Remove the disks from the VG #
reducevg splitmirrorvg hdisk13 hdisk14 hdisk15 17. Create a new VG
with the same partition size # mkvg -y newvg -s 8 hdisk13 hdisk14
hdisk15 18. Make the LVs using the maps we saved earlier mklv -y
lvnum2 -m lvnum2map newvg 18 mklv -y newloglv00 -m newloglv00map
newvg 1
Note that we used the same LVname (lvnum2) and the number of LPs
(18) One can get the number of LPs from the following command: #
lslv | grep ^LPs | awk '{print $2}' We also used the same LVname
for the jfslog, the mount point doesn't change 19. Mount the
filesystem and check it out # mount /tmp/newfs # find /tmp/newfs
-print At this time, one could varyoff the VG, then import it on
another machine connected to the disk.
splitmirrorvg Shell Script#!/bin/ksh # splitmirrorvg # Use this
script to split off a mirror copy containing all LVs in a VG. # The
split off copy is placed into a new VG so that the data can be #
exported/imported into another system. # # Usage: splitmirrorvg #
where the listed hdisks are a set of disks that have one copy of
the LVs on # them and will be put into another VG # # The new VG
and LVs will be preceded by the prefix mir to # designate that it
is a mirrored VG/LV. Mount points will be # . # # NOTE: NO CHECKING
OF THE SETUP IS DONE. IT IS ASSUMED THAT YOUR VG IS SETUP # AND
MIRRORED CORRECTLY USING SUPER STRICT COPIES (I.E. EACH COPY OF THE
LVS # ARE ON DISTINCT SETS OF DISKS), and that your input is
correct. # This also assumes you have 3 copies of the LVs - it
won't work for 2 # This also assumes any JFS log you have is of
type "jfslog" # This also assumes the VG is synced # Your LV and VG
names should not exceed 12 characters # # Standard Disclaimers:
backup your data, test first on a development system.
#--------------------------------------------# "Are you sure"
warning message # You can erase this section between the lines tput
clear echo $0 ":This script splits off the LVs in the mirror copy
on " $@ echo "into a new volume group." echo "*** Caution *** This
script assumes your VG is setup and mirrored " echo "correctly. See
comments in this script." echo "\nContinue? (yes/no)" read if [[ !
$REPLY = yes ]] then echo "Exiting" exit fi
#--------------------------------------------
# Get a list of LV, mountpoint, #LPs, and hdisk and put them in
a file cat /dev/null > /tmp/splitlvdata # First get a list of
the LVs in the VG lvs=`lsvg -l $1 | tail -n +3 | awk '{print $1}'`
# Now we loop on the LVs for lv in ${lvs} do # determine the mount
point if any associated with the LV mountpt=`lslv $lv | grep
"MOUNT" | awk '{print $3}'` # Determine the number of LPs lps=`lslv
$lv | grep ^LPs | awk '{print $2}'` # Determine one of the input
hdisks on which the copy exists for disk in $@ do if [ "$disk" =
"$1" ] then continue fi lspv -l $disk | grep ^$lv > /dev/null if
[ "$?" = "0" ] then { hdisk=$disk break } fi done echo "$lv
$mountpt $lps $hdisk" >> /tmp/splitlvdata done # Now for each
LV, we unmount it first print "Starting to umount the filesystems"
for lv in ${lvs} do # Do the umount only if it is a filesystem
fs=`grep ^$lv /tmp/splitlvdata | cut -f2 -d" "` if [ "$fs" != "N/A"
] then { # Check to see if it is mounted first mount | grep "
/dev/$lv " > /dev/null if [ "$?" = "0" ] then { umount $fs if [
"$?" != "0" ] then { print "Error unmounting $fs - script stopping"
exit 99 } fi } fi } fi done # Now for each LV, we split it print
"Starting to split the LVs" for lv in ${lvs} do hdisk=`grep ^$lv
/tmp/splitlvdata | cut -f4 -d" "` splitlvcopy -y mir${lv} $lv 2
$hdisk done
# Now we mount the original filesystems and assure the new mount
point exists for lv in ${lvs} do mountpt=`grep ^$lv
/tmp/splitlvdata | cut -f2 -d" "` if [ "$mountpt" != "N/A" ] then
mount $mountpt mkdir $mountpt/mir fi done print "Application can be
restarted now!" # Now we update /etc/filesystems print "Starting to
update /etc/filesystems" # To do this first we need to know which
is the JFS log lsvg -l $1| grep jfslog > /dev/null if [ "$?" =
"0" ] then log=`lsvg -l $1 | grep jfslog | cut -f1 -d" "` fi for lv
in ${lvs} do # is this lv a filesystem? mountpt=`grep ^$lv
/tmp/splitlvdata | cut -f2 -d" "`/mir if [ "$mountpt" != "N/A/mir"
] then { echo " " >> /etc/filesystems echo "$mountpt:"
>> /etc/filesystems echo " dev = /dev/mir${lv}" >>
/etc/filesystems echo " vfs = jfs" >> /etc/filesystems echo "
log = /dev/mir${log}" >> /etc/filesystems echo " mount =
false" >> /etc/filesystems echo " options = rw" >>
/etc/filesystems echo " account = false" >> /etc/filesystems
} fi done # Now make map files for the LVs print "Starting to make
map files" for lv in ${lvs} do cat /dev/null > /tmp/mir${lv}map
lslv -m mir$lv | grep -v ^mir$lv: | grep -v ^LP | while read lpnum
ppnum pv do echo ${pv}:$ppnum >> /tmp/mir${lv}map done done #
Now remove the mirLVs print "Removing the split LVs" for lv in
${lvs} do rmlv -f mir$lv done # Now remove the input disks from the
VG print "Removing the disks from the VG" disks=`echo $@ | cut -f
2- -d" "` reducevg $1 $disks # Now create the newVG
print "Starting to make the new VG" # First we need the old
partition size ppsize=`lsvg $1 | grep "PP SIZE" | awk '{print $6}'`
mkvg -y mir$1 -s $ppsize $disks # Now create the LVs using the maps
for lv in ${lvs} do lps=`grep ^$lv /tmp/splitlvdata | cut -f 3 -d"
"1` mklv -y mir$lv -m /tmp/mir${lv}map mir$1 $lps done
Sizing Page Space in AIXAudience: All Date: March 28, 2002 You
may be wasting disk and I/O capacity if you have a large paging
space. Starting with AIX 4.3.2, the rules for sizing page space
changed**. Previous to AIX 4.3.2, paging space needed to be large,
typically 2-3 times the size of real memory. This is because page
space was preallocated when a program started.....whether it used
the page space or not. Starting with AIX 4.3.2, paging space is not
allocated until needed ("deferred paging"). In this environment,
the system uses page space only if it runs out of real memory. If
the memory is sized correctly, there is no paging and the page
space can be small. For example, I successfully ran a benchmark
last summer on a p680 with 64 GB memory and a 32 MB page space. The
application used less than 64 GB of real memory and it never
touched the page space. So my rule of thumb is to size page space
proportional to the probability of paging. The lower the
probability, the smaller the page space. Here are a couple useful
ways to determine how much memory and page space is being used by
the system. 1. "lsps -a" command lists the amount of page disk that
is currently allocated. (This is not to be confused with paging
rate. It's only the amount of disk being used. It does not indicate
whether the system is paging. See "vmstat"). 2. "vmstat": shows the
paging rate. The system is paging when the PI or PO columns are
greater than 0. 3. "svmon -G" command reports overall memory use.
The output is listen in 4k pages, so multiply by 0.004 to convert
to MBytes. 4. "wlmstat" to determine the amount of memory used by
application, group, or user. For more information, see
http://silcon.silcon.com/~baspence/AIXtip/wlm_memory.htm ** The
following URL lists the AIX functional enhancements by release:
http://www1.ibm.com/servers/aix/os/aixs2s.pdf
Choosing Between AIX 5 32 and 64 Bit Kernet
Audience: Systems Administrator Date: May 12, 2002 When you
install AIX 5, you can choose either a 32 or 64 bit kernel. In most
cases, the choice isn't critical. Here's the similarities and
differences.
SimilaritiesBoth 32 and 64 bit kernel support 64 bit
applications Both support JFS2 (large filesystems)
DifferencesThe 64 bit kernel supports over 96 GB memory. My
recommendation is to install the 32 bit kernel, unless you're using
JFS2 or need to support over 96 GB memory. The 32 bit kernel has
been around longer, and internal benchmarks show comparable
performance to the 64 bit kernel. On the other hand, I understand
the 64 bit kernel runs JFS2 better.
Remote Reboot FacilityAudience: Systems Administrator Date: June
1, 2002 The Remote Reboot Facility allows the system to be rebooted
through a native (integrated) serial port. The system is rebooted
when the reboot string is received at the port, followed by a
confirmation response of 1. This facility is useful when the system
does not otherwise respond but is capable of servicing serial port
interrupts. For more information, see
http://publib.boulder.ibm.com/doc_link/en_US/a_doc_lib/aixprob/prbslvgd/remrebfac.htm
Chapter 13. Remote Reboot FacilityThe remote reboot facility
allows the system to be rebooted through a native (integrated)
serial port. The system is rebooted when the reboot string is
received at the port, followed by a confirmation response of 1.
This facility is useful when the system does not otherwise respond
but is capable of servicing serial port interrupts. Remote reboot
can be enabled on only one native serial port at a time. The user
is expected to provide their own external security for the port.
This facility runs at the highest device interrupt class and a
failure of the UART to clear the transmit buffer quickly may have
the effect of causing other devices to lose data if their buffers
overflow during this time. It is suggested that this facility only
be used to reboot a machine that is otherwise "hung" and cannot be
remotely logged into. File systems will NOT be sync'd, and a
potential for some loss of data which has not been flushed exists.
It is strongly suggested that when remote reboot is enabled that
the port not be used for any other purpose, especially file
transfer, to prevent an inadvertent reboot.
Two native serial port attributes control the operation of
remote reboot.
reboot_enableIndicates whether this port is enabled to reboot
the machine on receipt of the REMOTE reboot STRING, and if so,
whether or not to take a system dump prior to rebooting.no -
Indicates remote reboot is disabled reboot - Indicates remote
reboot is enabled dump - Indicates remote reboot is enabled, and
prior to rebooting a system dump will be taken on the primary dump
device.
reboot_stringSpecifies the remote reboot string that the serial
port will scan for when the remote reboot feature is enabled. When
the remote reboot feature is enabled and the reboot_string is
received on the port, a '>' character is transmitted and the
system is ready to reboot. If a '1' character is recieved the
system is rebooted; any character other than '1' aborts the reboot
process. The reboot string has a maximum length of 16 characters
and must not contain a space, colon, equal sign, null, new line, or
cntrl-\ character. Remote reboot can be enabled through SMIT, or
via the command line. For SMIT the path System Environments ->
Manage Remote Reboot Facility may be used for a configured TTY.
Alternatively, when configuring a new TTY, remote reboot may be
enabled from the Add a TTY or Change/Show Characteristics of a TTY
menus. These menus are accessed through the path Devices -> TTY.
From the command line, the mkdev or chdev commands are used to
enable remote reboot. For example, the following command enables
remote reboot (with the dump option) and sets the reboot string to
ReBoOtMe on tty1.chdev -l tty1 -a remreboot=dump -a
reboot_string=ReBoOtMe
This example enables remote reboot on tty0 with the current
reboot string in the database only (will take effect on the next
reboot).chdev -P -l tty0 -a remreboot=reboot
If the tty is being used as a normal port, then you will have to
use the pdisable command before enabling remote reboot. You may use
penable to reenable the port afterwards.
Making Backups to DVDAudience: Systems Administrator Date: June
9, 2002 A DVD can be an inexpensive way to make data or system
backups. The current list price of a DVD is $1,000, compared to
$2,000-$6,000 for tape. On the down side, the DVD storage capacity
is limited to about 4 GB, which is
small compared to 20+GB for tape. Creating a DVD backup is
different than making a tape backup. To create a backup, you use
the new AIX mkcd command (or smit mkcd). The smit mkcd options are
straightforward, with the exception of the "DVD sized image", which
should be set to "yes". The mkcd command requires extra disk space,
as it stages the backup data on disk. My understanding is the
staging size is the size of the backup. So, if the backup size is
greater than 2 GB, you'll need to change the ulimit (or fsize=1 in
/etc/security/limits) for non-root users. For more information,
see:
http://publib.boulder.ibm.com/doc_link/en_US/a_doc_lib/cmds/aixcmds3/mkcd.htm
http://publib.boulder.ibm.com/doc_link/en_US/a_doc_lib/aixins/aixinsgd/intro_backup_cdrom.htm
Finally, the mkcd requires the public domain software package
"cdrecord-1.9.0.0" to burn CD's. This software is is available from
the following website:
http://www.rge.com/pub/systems/aix/bull/aix432 /
mkcd CommandPurposeCreates a multi-volume CD (or CDs) from a
mksysb or savevg backup image.
Syntaxmkcd -d cd_device | -S [ -m mksysb_image | -M
mksysb_target | -s savevg_image | -v savevg_volume_group ] [ -C
cd_fs_dir ] [ -I cd_image_dir ] [ -V cdfs_volume_group ] [ -G ] [
-B ] [ -p pkg_source_dir ] [ -R | -S ] [ -i image.data ] [ -u
bosinst.data ] [ -e ] [ -P ] [ -l package_list ] [ -b bundle_file ]
[ -z custom_file ] [ -D ]
DescriptionThe mckd command creates a system backup image
(mksysb) to CD-Recordable (CD-R) from the system rootvg or from a
previously created mksysb image. It also creates a volume group
backup image (savevg) to CD-R from a user-specified volume group or
from a previously created savevg image. With mkcd you can create
three types of CDs: personal system backup, "generic" backup, and a
non-bootable volume group backup. Personal system backup CDs can
only boot and install a specific machine and is similar to using
mksysb on tape. Generic backup CDs can boot and install any RS/6000
platform (rspc, rs6k, or chrp). This backup requires all the
necessary device support, including the MP kernel, to create the
boot images for all three platforms. This type of backup also
requires a user-supplied and previously created mksysb image. The
non-bootable volume group backup contains only the CD image of a
volume group. If this backup contains rootvg backup, then you must
boot from a product CD before restoring the mksysb image, or use
alt_disk_install to install it. If the backup volume group is a
non-rootvg volume group, then use restvg to restore the image.
Note: The functionality required to create Rock Ridge format CD
images and to write the CD image to the CD-R device is not part of
the mkcd command. You must supply additional code to mkcd to do
these tasks. The code will be called via shell scripts and then
linked to /usr/sbin/mkrr_fs (for creating the Rock Ridge format
image) and /usr/sbin/burn_cd (for writing to the CD-R device). Both
links are called from the mkcd command. Some sample shell scripts
are included for different vendor-specific routines. You can find
these scripts in /usr/samples/oem_cdwriters. If you do not give any
file systems or directories as command parameters, mkcd creates the
necessary file systems and removes them when the command finishes
executing. File systems you supply are checked for adequate space
and write access. Note: If mkcd creates file systems in the backup
volume group, they are excluded from the backup. If you need to
create multi-volume CDs because the volume group image does not fit
on one CD, mkcd gives instructions for CD replacement and removal
until all the volumes have been created.
Flags
To Back Up Your SystemThis section provides instructions for
backing up your system, including how to back up the root volume
group, verify a backup tape or CD, and back up a user volume
group.
Complete the Prerequisites
Be sure you are logged in as root user. Mount all file systems
you want to back up. The mksysb command only backs up JFS
(Journaled File Systems). Refer to the mount command for details.
Note: The mksysb command does not back up file systems mounted
across an NFS network.
Unmount any local directories that are mounted over another
local directory. Make at least 8.8MB of free disk space available
in the /tmp directory. The mksysb command requires this working
space for the duration of the backup. Use the df command, which
reports in units of 512-byte blocks, to determine the free space in
the /tmp directory. Use the chfs command to change the size of the
file system, if necessary. For example, the following command adds
12MB of disk space to the /tmp directory of a system with 4MB
partitions:chfs -a size=+24000 /tmp
All hardware must already be installed, including external
devices, such as tape and CD-ROM drives. The bos.sysmgt.sysbr
fileset in the BOS System Management Tools and Applications
software package must be installed. The bos.sysmgt.sysbr fileset is
automatically installed in AIX Version 4.3. Enter the following
command to determine if the bos.sysmgt.sysbr fileset is installed
on your system:lslpp -l bos.sysmgt.sysbr
If your system has the bos.sysmgt.sysbr fileset installed,
continue with either To Back Up the Root Volume Group or To Back Up
a User Volume Group. If the lslpp command does not list the
bos.sysmgt.sysbr fileset, install it before continuing with the
backup procedure. Refer to To Install Software and Service Updates
with Custom Install for instructions, or enter the following
command:installp -agqXd device bos.sysmgt.sysbr
where device is the location of the software; for example,
/dev/cd0 for CD-ROM drive.
To Back Up the Root Volume GroupUse either the Web-based System
Manager Backups application or SMIT to create a system backup
stored either to tape or in a file. If you are using AIX Version
4.3.3 or later, the system backup image can be stored on CD. Using
Web-based System Manager To use the Web-based System Manager
application to back up the root volume group, enter the wsm backup
fast
Installing BOS from a System BackupIf you are installing from a
backup image you made of your system, follow these steps: 1. Go to
Installing BOS from a System Backup . 2. Go to Customizing Your
Installation if the installed system requires further
configuration.
Installation GuideIntroduction to Backups on CDCreating a backup
CD is new function that has been added to AIX Version 4.3.3. It is
similar to making a backup tape for your personal use, but with
some noticeable differences. You must obtain the hardware and
software necessary to create a CD. IBM does not sell or support the
software or hardware that is used to create CD's. The new command
for this process, mkcd, requires that you already have the software
to create a CD-ROM file system (Rock Ridge) and to "burn" or write
the CD. Some of the hardware and software that was tested with this
procedure includes: Software Hardware
GNU & Free Software Foundation, Inc. Yamaha CRW4416SX Ricoh
MP6201SE 6XR-2X Panasonic Cw-7502-B cdrecord version 1.8a5 mkisofs
version 1.5 Jodian Systems and Software, Inc. CDWrite version 1.3
mkcdimg version 2.0 Youngminds, Inc. MakeDisc version 1.3-Beta2 and
CD-R creation software, refer to the following
file:/usr/lpp/bos.sysmgt/README.oem_cdwriters
Tested on all of above
CD Studio For more information about CD-R drives
Once you decide what hardware and software you want to use and
obtain it, you will need to create the appropriate links to scripts
that have been written that will work with the mkcd command. For
example, if you are using Jodian software, then you will need to
create the following links:ln -s
/usr/samples/oem_cdwriters/mkrr_fs_jodian /usr/sbin/mkrr_fs ln -s
/usr/samples/oem_cdwriters/burn_cd_jodian /usr/sbin/burn_cd
In order to run the mkcd mkcd command, you will need extra
working space. A separate file system or directory is required for
each of the following:
storing a mksysb or savevg image storing the CD file system
contents storing the CD images before they are recorded
The mkcd command will create the following file systems if they
are not already present, or if alternate file systems or
directories have not been given:/mkcd/mksysb_images /mkcd/cd_fs
/mkcd/cd_images
The space used in these file systems will only be temporary
(unless the -R or -S flag is specified to save the images). If the
mkcd command creates the file systems, it will remove them. Each
file system or directory could require over 640 megabytes. The
/mkcd/cd_fs directory will need 640 megabytes. The
/mkcd/mksysb_images directory's space requirement will depend on
the size of the mksysb image that will be created. The mkcd process
will attempt to calculate this space and verify that adequate space
is available before starting the mksysb image. The /mkcd/cd_image
directory will be need at least 640 megabytes of space. If the -R
or -S flags are used to specify not removing the images, and there
are multiple volumes required, then more space will have to be
provided. If you don't have space on your machine, you may want to
NFS mount space from another server system, however, the file
systems must be writeable. You could create a /mkcd file system
that is very large (1.5 gig) and then create subdirectories cd_fs,
mksysb_images and cd_images under /mkcd. Then /mkcd could be
mounted on to the clients when they wanted to create a backup CD on
their systems.
Personal and Generic backup CD'sThere are two types of backup
CD's that can be created. The first is what we call a "personal"
backup CD. This type is similar to a backup tape, in that it will
only boot and install the machine on which it was created. The
second type of CD is a "generic" backup CD. This type of backup can
be used to boot any RS/6000 machine running the AIX operating
system. It contains 3 boot images and all the device and kernel
packages necessary to install any system. The mksysb image that is
stored on the CD does not require that all the devices be installed
in it, because the install process will install the needed devices
for that machine from the packages on the CD. This type of backup
CD might be used to install (clone) a large number of machines in a
customer's environment. This is particularly convenient when each
machine in the system environment needs to have the same image
installed, but may not all have the same hardware configuration.
There are SMIT (smit mkcd) and Web-based System Manager Backups
(wsm backup) interfaces available for the mkcd command. The
Web-based System Manager Back Up to CD TaskGuide will help you
through the required steps and will even create the links to the
OEM scripts for you. Another op