Tuesday, November 16, 2010

Assiging original PVID to hdisk in AIX.

I am using AIX 5.3L with EMC Symmetrix storage, establishing BCV's and then
splitting them and mounting them to the same host. I can mount the BCV's to
the same host using the 'recreatevg' command, but the problem I'm having is
when I'm restoring a BCV back to the standard. When the BCV is restored and
I do an 'lsvg vg1' where vg1's original PV was hdiskpower33 (the standard) it
is now hdiskpower35 (the BCV). I do not want this to happen and suspect the
problem is that the BCV's PVID was changed during the recreatevg. I want to
assign the original PVID to the BCV so that it will not remove hdiskpower33
from vg1. If I do 'rmdev -dl hdiskpower35' and then do 'lsvg -p vg1' I get
an error stating that the PVID was not found, and hdiskpower33 is not listed
as being a member of the vg1 volume group. I've tried doing:

chdev -l hdiskpower35 -a pv={original pvid}

but am told it is an illegal parameter. Is there another way to do this?


Solution:
---------

Use at your own risk:

1) BACKUP old disk critical information

# dd if=/dev/hdisk9 of=/tmp/hdisk9.save bs=4k count=1

If something were to go wrong and the head information got damaged
use the following to RECOVER the origional PVID and head information

RECOVERY
# dd if=/tmp/hdisk9.save of=/dev/hdisk9 bs=4k count=1

2) Find the origional PVID. This might be seen with lspv importvg, or
varyonvg. Our example origional PVID is "0012a3e42bc908f3"

# lqueryvg -Atp /dev/hdisk9
...
Physical: 0012a3e42bc908f3 2 0
00ffffffc9cc5f99 1 0
...

3) Verify that the disk sees an invalid PVID. The first 2 data fields
of offset 80 contain the PVID.

# lquerypv -h /dev/hdisk9 80 10
00000080 00001155 583CD4B0 00000000 00000000 ...UX<.......... ^^^^^^PVID^^^^^^^ 4) Translate the ORIGIONAL PVID into the octal version. Take every 2 digits of the hex PVID and translate it to octal. This can be done by hand, calculator, script, or web page. 00012a3e42bc908f3 -> 00 12 a3 e4 2b c9 08 f3
Octal version -> 000 022 243 344 053 311 010 363

5) Write the binary version of the PVID to a file by using the octal
values. Each octal char is lead with a backslash-Zero "\0". Do
not use spaces or any other characters except for the final \c to
keep from issuing a hard return.

# echo "\0000\0022\0243\0344\0053\0311\0010\0363\c" >/tmp/oldpvid

6) Verify that the binary pvid was written correctly. The origional
hex PVID should be seen AND the final address should be "0000010"
If EITHER of these is incorrect, try again, make sure there are no
spaces in the echo and the echo ends with a "\c".

# od -x /tmp/oldpvid
0000000 0012 a3e4 2bc9 08f3
0000010

7) Restore the PVID to the disk. You sould see 8 records in and out.
If there are more or less, restore the origional 4K block by using
the recovery method in step 1.

# cat /tmp/oldpvid dd of=/dev/hdisk9 bs=1 seek=128
8+0 records in.
8+0 records out.

8) Verify that the PVID was written correctly

#lquerypv -h /dev/hdisk9 80 10
00000080 0012A3E4 2BC908F3 00000000 00000000 ....+...........

9) Reconfigure the disk definitions on all systems attaching to that disk.
The ODM information for that drive will NOT be updated until the
disk is removed and reconfigured. Until that reconfigure commands
like `lspv` will still be incorrect.

Finding large files works in AIX, Unix and Linux.

find / -type f -size +10000 -exec ls -lrt {} \; | sort -n +4

You can change "/" or "." or "/home" ....

Use the -xdev option of find so as not to traverse devices...

find / -xdev -type f -size +10000 -print | xargs du -ka | sort -rn

Sometimes use du -kx|sort -n

On linux, following is the possible command:
find / -type f -size +20000k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'

To tweak the output and have the file sizes in a column, add this to the end:

| column -t

this just expands the tabs to even the columns out.

Finding all large directories
To find all directories taking 50k (kilobytes) blocks of space. This is useful to find out which directories on system taking lot of space.
# find / -type d -size +50k
Output:

/var/lib/dpkg/info
/var/log/ksymoops
/usr/share/doc/HOWTO/en-html
/usr/share/man/man3

Type following on your linux command prompt:

find / -size +10240000c -exec du -h {} \;
That should find all files larger then ~10MB.

Thursday, October 14, 2010

IBM System p 570 with POWER 6

* Advanced IBM POWER6™ processor cores for enhanced performance and reliability

* Building block architecture delivers flexible scalability and modular growth

* Advanced virtualization features facilitate highly efficient systems utilization

* Enhanced RAS features enable improved application availability

The IBM POWER6 processor-based System p™ 570 mid-range server delivers outstanding price/performance, mainframe-inspired reliability and availability features, flexible capacity upgrades and innovative virtualization technologies. This powerful 19-inch rack-mount system, which can handle up to 16 POWER6 cores, can be used for database and application serving, as well as server consolidation. The modular p570 is designed to continue the tradition of its predecessor, the IBM POWER5+™ processor-based System p5™ 570 server, for resource optimization, secure and dependable performance and the flexibility to change with business needs. Clients have the ability to upgrade their current p5-570 servers and know that their investment in IBM Power Architecture™ technology has again been rewarded.

The p570 is the first server designed with POWER6 processors, resulting in performance and price/performance advantages while ushering in a new era in the virtualization and availability of UNIX® and Linux® data centers. POWER6 processors can run 64-bit applications, while concurrently supporting 32-bit applications to enhance flexibility. They feature simultaneous multithreading,1 allowing two application “threads” to be run at the same time, which can significantly reduce the time to complete tasks.

The p570 system is more than an evolution of technology wrapped into a familiar package; it is the result of “thinking outside the box.” IBM’s modular symmetric multiprocessor (SMP) architecture means that the system is constructed using 4-core building blocks. This design allows clients to start with what they need and grow by adding additional building blocks, all without disruption to the base system.2 Optional Capacity on Demand features allow the activation of dormant processor power for times as short as one minute. Clients may start small and grow with systems designed for continuous application availability.

Specifically, the System p 570 server provides:

Common features Hardware summary

* 19-inch rack-mount packaging
* 2- to 16-core SMP design with building block architecture
* 64-bit 3.5, 4.2 or 4.7 GHz POWER6 processor cores
* Mainframe-inspired RAS features
* Dynamic LPAR support
* Advanced POWER Virtualization1 (option)
o IBM Micro-Partitioning™ (up to 160 micro-partitions)
o Shared processor pool
o Virtual I/O Server
o Partition Mobility2
* Up to 32 optional I/O drawers
* IBM HACMP™ software support for near continuous operation*
* Supported by AIX 5L (V5.2 or later) and Linux® distributions from Red Hat (RHEL 4 Update 5 or later) and SUSE Linux (SLES 10 SP1 or later) operating systems


* 4U 19-inch rack-mount packaging
* One to four building blocks
* Two, four, eight, 12 or 16 3.5 GHz, 4.2 GHz or 4.7 GHz 64-bit POWER6 processor cores
* L2 cache: 8 MB to 64 MB (2- to 16-core)
* L3 cache: 32 MB to 256 MB (2- to 16-core)
* 2 GB to 192 GB of 667 MHz buffered DDR2 or 16 GB to 384 GB of 533 MHz buffered DDR2 or 32 GB to 768 GB of 400 MHz buffered DDR2 memory3
* Four hot-plug, blind-swap PCI Express 8x and two hot-plug, blind-swap PCI-X DDR adapter slots per building block
* Six hot-swappable SAS disk bays per building block provide up to 7.2 TB of internal disk storage
* Optional I/O drawers may add up to an additional 188 PCI-X slots and up to 240 disk bays (72 TB additional)4
* One SAS disk controller per building block (internal)
* One integrated dual-port Gigabit Ethernet per building block standard; One quad-port Gigabit Ethernet per building block available as optional upgrade; One dual-port 10 Gigabit Ethernet per building block available as optional upgrade
* Two GX I/O expansion adapter slots
* One dual-port USB per building block
* Two HMC ports (maximum of two), two SPCN ports per building block
* One optional hot-plug media bay per building block
* Redundant service processor for multiple building block systems2

AIX,HP,SOLARIS,LINUX most used commands on 1 page

DIRECTORY MAPPINGS:


USER CREATION:
GENERAL COMMANDS:


PRINTERS:

TCP/IP:


SYSTEM FILES:
DISKS/LVM COMMANDS:



MISC:




SOFTWARE:



DEVICES:

Rootvg disk replacement procedure

root$ lsvg -p rootvg
rootvg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk0 active 546 78 33..11..00..00..34
hdisk1 missing 546 119 09..16..00..00..94

root$ lsvg -l rootvg
rootvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
hd5 boot 3 6 2 closed/stale N/A
hd6 paging 64 128 2 open/stale N/A
hd8 jfs2log 1 2 2 open/stale N/A
hd4 jfs2 2 4 2 open/stale /
hd2 jfs2 32 64 2 open/stale /usr
hd9var jfs2 5 10 2 open/stale /var
hd3 jfs2 16 32 2 open/stale /tmp
hd1 jfs2 3 6 2 open/stale /home
hd10opt jfs2 5 10 2 open/stale /opt
appllv jfs2 14 28 2 open/stale /appl
nsrlv jfs2 1 2 2 open/stale /nsr
hd7x sysdump 46 46 1 open/syncd N/A
hd7 sysdump 46 46 1 open/syncd N/A
lv00 jfs 41 41 1 closed/syncd N/A
loglv00 jfslog 1 2 2 open/stale N/A


root$ lslv -l hd7x
hd7x:N/A
PV COPIES IN BAND DISTRIBUTION
hdisk1 046:000:000 0% 000:000:000:031:015


A) Description:

From above outputs its clear that hdisk1 is in missing state. It has either failed or had some stale partitions. Also we see that there is a Secondary Dump device which is created on hdisk1.

B) Pre-replacement steps:

** varyonvg rootvg --> This will solve the problems of stale partitions if any.

If above step shows right status hdisk1 dont need replacement.

Else log a call with IBM, send snap -gc and confirm with them hdisk1 has failed and plan replacement accordingly.

C) Steps while replacing the disk in rootvg:

1) touch /dev/sysdumpnull --> Make a null Sysdump device.
2) sysdumpdev -Ps /dev/sysdumpnull --> Change the secondary dump device null.
3) rmlv hd7x --> Remove Secondary Dump device from hdisk1.
4) unmirrorvg rootvg hdisk1 --> Break the mirror.
5) reducevg rootvg hdisk1 --> Remove hdisk1 from rootvg
6) After step 5 hdisk1 can be removed. Let IBM do the replacement of the disk. Once its replaced configure the disk again on the server
cfgmgr -v
7) lspv | grep -i hdisk | grep -i none | more --> Check name of the new hdisk.
8) extendvg rootvg newdiskname --> Add the new disk to rootvg.
9) mirrorvg rootvg newdiskname --> Mirror the new disk.
10) varryonvg rootvg --> Synchronizing the Volume Group.
11) bootlist -m normal -o --> Check the current bootlist.
12) bosboot -ad /dev/hdisk0 --> Update the boot image again.
13) bosboot -ad /dev/newdiskname --> Update the boot image for new disk.
14) bootlist -m normal hdisk0 hdisk1 --> Set the bootlist again.
15) create a lv hd7x (secondary sysdump) on the new disk according to the previous size of the dump device.
16) sysdumpdev -Ps /dev/hd7x --> Assign hd7x as secondary dump device.


D) Sometimes while replacing the disks IBM has wrong disk location. If you want to give an indication to the IBM CE with the right disk to be replaced you can do below:

diag --> Task Selection (Diagnostics, Advanced Diagnostics, Service Aids, etc.) --> Hot Plug Task --> SCSI and SCSI RAID Hot Plug Manager -->

LIST SCSI HOT SWAP ENCLOSURE DEVICES 802482

The following is a list of SCSI Hot Swap Enclosure Devices. Status information
about a slot can be viewed.

Make selection, use Enter to continue.

U7879.001.DQD16J9-
ses0 P1-T14-L15-L0
slot 1 [empty slot]
slot 2 [empty slot]
slot 3 [empty slot]

U7879.001.DQD16J9-
ses1 P1-T12-L15-L0
slot 1 P1-T12-L5-L0 hdisk1
slot 2 P1-T12-L4-L0 hdisk0
slot 3 [empty slot]


Here you can select the right location and give an Indicator to IBM.

AIX useful commands

Filesystems:
Default rootvg Filesystems
hd1 - /home
hd2 - /usr
hd3 - /tmp
hd4 - /
hd5 - Boot logical volume
hd6 - paging space
hd8 - log device
hd9var - /var
hd10opt - /opt
hd11admin - /admin
Remove mount point entry and the LV for /mymount
rmfs /mymount (Add -r to remove mount point)
Grow the /var Filesystem by 1 Gig
chfs -a size=+1G /var
Grow the /var Filesystem to 1 Gig
chfs -a size=1G /var
Find the File usage on a Filesystem
du -smx /
List Filesystems in a grep-able format
lsfs
Get extended information about the /home Filesystem
lsfs -q /home
Create a log device on datavg VG
mklv -t jfs2log -y datalog1 datavg 1
Format the log device just created
logform /dev/datalog1


Kernel Tuning:
no is used in the following examples. vmo, no, nfso, ioo, raso, and
schedo all use similar syntax.
Reset all networking tunables to the default values
no -D (Changed values will be listed)
List all networking tunables
no -a
Set a tunable temporarily (until reboot)
no -o use isno=1
Set a tunable at next reboot
no -r -o use isno=1
Set current value of tunable as well as reboot
no -p -o use isno=1
List all settings, defaults, min, max, and next boot values
no -L
List all sys0 tunables
lsattr -El sys0
Get information on the minperm% vmo tunable
vmo -h minperm%
Change the maximum number of user processes to 2048
chdev -l sys0 -a maxuproc=2048
Check to see if SMT is enabled
smtctl


ODM:
Query CuDv for a speci c item
odmget -q name=hdisk0 CuDv
Query CuDv using the \like" syntax
odmget -q "name like hdisk?" CuDv
Query CuDv using a complex query
odmget -q "name like hdisk? and parent like vscsi?" CuDv


Devices:
List all devices on a system
lsdev
Device states are: Unde ned; Supported Device, De ned; Not usable
(once seen), Available; Usable
List all disk devices on a system (Some other devices are: adapter,
driver, logical volume, processor)
lsdev -Cc disk
List all customized (existing) device classes (-P for complete list)
lsdev -C -r class
Remove hdisk5
rmdev -dl hdisk5
Get device address of hdisk1
getconf DISK DEVNAME hdisk1 or bootinfo -o hdisk1
Get the size (in MB) of hdisk1
getconf DISK SIZE hdisk1 or bootinfo -s hdisk1
Find the slot of a PCI Ethernet adapter
lsslot -c pci -l ent0
Find the (virtual) location of an Ethernet adapter
lscfg -l ent1
Find the location codes of all devices in the system
lscfg
List all MPIO paths for hdisk0
lspath -l hdisk0
Find the WWN of the fcs0 HBA adapter
lscfg -vl fcs0 | grep Network
Temporarily change console output to /console.out
swcons /console.out (Use swcons to change back.)


Tasks:
Change port type of (a 2Gb) HBA (4Gb may use di erent setting)
rmdev -d -l fcnet0
rmdev -d -l fscsi0
chdev -l fcs0 -a link type=pt2pt
cfgmgr
Mirroring rootvg to hdisk1
extendvg rootvg hdisk1
mirrorvg rootvg
bosboot -ad hdisk0
bosboot -ad hdisk1
bootlist -m normal hdisk0 hdisk1
Mount a CD ROM to /mnt
mount -rv cdrfs /dev/cd0 /mnt
Create a VG, LV, and FS, mirror, and create mirrored LV
mkvg -s 256 -y datavg hdisk1 (PP size is 1/4 Gig)
mklv -t jfs2log -y dataloglv datavg 1
logform /dev/dataloglv
mklv -t jfs2 -y data01lv datavg 8 (2 Gig LV)
crfs -v jfs2 -d data01lv -m /data01 -A yes
extendvg datavg hdisk2
mklvcopy dataloglv 2 (Note use of mirrorvg in next example)
mklvcopy data01lv 2
syncvg -v datavg
lsvg -l datavg will now list 2 PPs for every LP
mklv -c 2 -t jfs2 -y data02lv datavg 8 (2 Gig LV)
crfs -v jfs2 -d data02lv -m /data02 -A yes
mount -a
Move a VG from hdisk1 to hdisk2
extendvg datavg hdisk2
mirrorvg datavg hdisk2
unmirrorvg datavg hdisk1
reducevg datavg hdisk1
Find the free space on PV hdisk1
lspv hdisk1 (Look for \FREE PPs")


Users and Groups:
List all settings for root user in grepable format
lsuser -f root
List just the user names
lsuser -a id ALL | sed 's/ id.*$//'
Find the fsize value for user wfavorit
lsuser -a fsize wfavorit
Change the fsize value for user wfavorit
chuser fsize=-1 wfavorit


Networking:
The examples here assume that the default TCP/IP configuration (rc.net) method is used. If the alternate method of using rc.bsdnet
is used then some of these examples may not apply.
Determine if rc.bsdnet is used over rc.net
lsattr -El inet0 -a bootup option
TCP/IP related daemon startup script
/etc/rc.tcpip
To view the route table
netstat -r
To view the route table from the ODM DB
lsattr -EHl inet0 -a route
Temporarily add a default route
route add default 192.168.1.1
Temporarily add an address to an interface
ifconfig en0 192.168.1.2 netmask 255.255.255.0
Temporarily add an alias to an interface
ifconfig en0 192.168.1.3 netmask 255.255.255.0 alias
To permanently add an IP address to the en1 interface
chdev -l en1 -a netaddr=192.168.1.1 -a netmask=0xffffff00
Permanently add an alias to an interface
chdev -l en0 -a alias4=192.168.1.3,255.255.255.0
Remove a permanently added alias from an interface
chdev -l en0 -a delalias4=192.168.1.3,255.255.255.0
List ODM (next boot) IP con guration for interface
lsattr -El en0
Permanently set the hostname
chdev -l inet0 -a hostname=www.tablesace.net
Turn on routing by putting this in rc.net
no -o ipforwarding=1
List networking devices
lsdev -Cc tcpip
List Network Interfaces
lsdev -Cc if
List attributes of inet0
lsattr -Ehl inet0
List (physical layer) attributes of ent0
lsattr -El ent0
List (networking layer) attributes of en0
lsattr -El en0
Speed is found through the entX device
lsattr -El ent0 -a media speed
Set the ent0 link to Gig full duplex
(Auto Negotiation is another option)
chdev -l ent0 -a media speed=1000 Full Duplex -P
Turn o Interface Speci c Network Options
no -p -o use isno=0
Get (long) statistics for the ent0 device (no -d is shorter)
entstat -d ent0
List all open, and in use TCP and UDP ports
netstat -anf inet
List all LISTENing TCP ports
netstat -na | grep LISTEN
Remove all TCP/IP con guration from a host
rmtcpip
IP packets can be captured using iptrace / ipreport or tcpdump



Error Logging:
Error logging is provided through: alog, errlog and syslog.
Display the contents of the boot log
alog -o -t boot
Display the contents of the console log
alog -o -t console
List all log types that alog knows
alog -L
Send a message to errlog
errlogger "Your message here"
Display the contents of the system error log
errpt (Add -a or -A for varying levels of verbosity)
Errors listed from errpt can be limited by the -d S or -d H op-
tions. S is software and H is hardware. Error types are (P)ermanent,
(T)emporary, (I)nformational, or (U)nknown. Error classes are
(H)ardware, (S)oftware, (O)perator, or (U)ndetermined.
Clear all errors up until x days ago.
errclear x
List info on error ID FE2DEE00 (IDENTIFIER column in errpt output)
errpt -aDj FE2DEE00
Put a \tail" on the error log
errpt -c
List all errors that happened today
errpt -s `date +%m%d0000%y`
To list all errors on hdisk0
errpt -N hdisk0
To list details about the error log
/usr/lib/errdemon -l
To change the size of the error log to 2 MB
/usr/lib/errdemon -s 2097152
syslog.conf line to send all messages to log le
*.debug /var/log/messages
syslog.conf line to send all messages to error log
*.debug errlog
Error log messages can be redirected to the syslog using the errnotify
ODM class.


smitty FastPaths:
Find a smitty FastPath by walking through the smitty screens to get
to the screen you wish. Then Hit F8. The dialog will tell you what
FastPath will get you to that screen. (F3 closes the dialog.)
lvm - LVM Menu
mkvg - Screen to create a VG
con gtcp - TCP/IP Con guration
eadap - Ethernet adapter section
fcsdd - Fibre Channel adapter section
chgsys - Change / Show characteristics of OS
users - Manage users (including ulimits)
devdrpci - PCI Hot Plug manger
etherchannel - EtherChannel / Port Aggregation


System Resource Controller:
Start the xntpd service
startsrc -s xntpd
Stop the NFS related services
stopsrc -g nfs
Refresh the named service
refresh -s named
List all registered services on the system
lssrc -a
Show status of ctrmc subsystem
lssrc -l -s ctrmc


Working with Packages:
List all Files in bos.games Fileset.
lslpp -f bos.games
Find out what Fileset \fortune" belongs to.
lslpp -w /usr/games/fortune
List packages that are above the current OS level
oslevel -g
Find packages below a specified ML
oslevel -rl 5300-05
List installed MLs
instfix -i | grep AIX ML
List all Filesets
lslpp -L
List all filesets in a grepable or awkable format
lslpp -Lc
Find the package that contains the filemon utility
which fileset filemon
Install the database (from CD) for which fileset
installp -ac -d /dev/cd0 bos.content list
Create a mksysb backup of the rootvg volume group
mksysb -i /mnt/server1.mksysb.`date +%m%d%y`
Cleanup after a failed install
installp -C


LVM:
Put a PVID on a disk
chdev -l hdisk1 -a pv=yes
Remove a PVID from a disk
chdev -l hdisk1 -a pv=clear
List all PVs in a system (along) with VG membership
lspv
Create a VG called datavg using hdisk1 using 64 Meg PPs
mkvg -y datavg -s 64 hdisk1
Create a LV on (previous) datavg that is 1 Gig in size
mklv -t jfs2 -y datalv datavg 16
List all LVs on the datavg VG
lsvg -l datavg
List all PVs in the datavg VG
lsvg -p datavg
Take the datavg VG o ine
varyoffvg datavg
Remove the datavg VG from the ODM
exportvg datavg
Import the VG on hdisk5 as datavg
importvg -y datavg hdisk5
Vary-on the new datavg VG (can use importvg -n)
varyonvg datavg
List all VGs (known to the ODM)
lsvg
List all VGs that are on line
lsvg -o
Check to see if underlying disk in datavg has grown in size
chvg -g datavg
Move a LV from one PV to another
migratepv -l datalv01 hdisk4 hdisk5
Delete a VG by removing all PVs with the reducevg command.
reducevg hdisk3 (-d removes any LVs that may be on that PV)



Memory / Swapfile:
List size, summary, and paging activity by paging space
lsps -a
List summary of all paging space
lsps -s
List the total amount of physical RAM in system
lsattr -El sys0 -a realmem
Extend the existing paging space by 8 PPs
chps -s 8 hd6


Performance Monitoring:
Make topas look like top
topas -P
View statistics from other partitions
topas -C
View statistics for disk I/O
topas -D
Show statistics related to micro-partitions in Power5 environment
topas -L
All of the above commands are availible from within topas
Use mpstat -d to determine processor afinity on a system. Look for
s0 entries for the best afinity and lesser afinity in the higher fields.
Get verbose disk stats for hdisk0 every 2 sec
iostat -D hdisk0 2
Get extended vmstat info every 2 seconds
while [ 1 ]; do vmstat -vs; sleep 2; clear; done
Get running CPU stats for system
mpstat 1
Get time based summary totals of network usage by process
netpmon to start statistics gathering, trcstop to finish and summarize.


Getting info about the system:
Find the version of AIX that is running
oslevel
Find the ML/TL or service pack version
oslevel -r {or{ oslevel -s
List all attributes of system
getconf -a
Find the type of kernel loaded (use -a to get all options)
getconf KERNEL BITMODE
bootinfo and getconf can return much of the same information, getconf
returns more and has the grepable -a option.
Find the level of rmware on a system
invscout
List all attributes for the kernel \device"
lsattr -El sys0
Print a \dump" of system information
prtconf

Display Error Codes:
214,2C5,2C6,2C7,302,303,305 - Memory errors
152,287,289 - Power supply failure
521 - init process has failed
551,552,554,555,556,557 - Corrupt LVM, rootvg, or JFS log
553 - inittab or /etc/environment corrupt
552,554,556 - Corrupt filesystem superblock
521 through 539 - cfgmgr (and ODM) related errors
532,558 - Out of memory during boot process
518 - Failed to mount /var or /usr
615 - Failed to con g paging device
More information is availible in the \Diagnostic Information for Multiple Bus Systems" manual

Security

groups Lists out the groups that the user is a member of

setgroups Shows user and process groups

chmod abcd (filename) Changes files/directory permissions

Where a is (4 SUID) + (2 SGID) + (1 SVTX)
b is (4 read) + (2 write) + (1 execute) permissions for owner
c is (4 read) + (2 write) + (1 execute) permissions for group
d is (4 read) + (2 write) + (1 execute) permissions for others

-rwxrwxrwx -rwxrwxrwx -rwxrwxrwx
||| ||| |||
- - -
| | |
Owner Group Others

-rwSrwxrwx = SUID -rwxrwSrwx = SGID drwxrwxrwt = SVTX

chown (new owner) (filename) Changes file/directory owners
chgrp (new group) (filename) Changes file/directory groups

chown (new owner).(new group) (filename) Do both !!!

umask Displays umask settings
umask abc Changes users umask settings

where ( 7 - a = new file read permissions)
( 7 - b = new file write permissions)
( 7 - c = new file execute permissions)

eg umask 022 = new file permissions of 755 = read write and execute for owner
read ----- and execute for group
read ----- and execute for other

mrgpwd > file.txt Creates a standard password file in file.txt

passwd Change current user password

pwdadm (username) Change a users password

pwdck -t ALL Verifies the correctness of local authentication

lsgroup ALL Lists all groups on the system
mkgroup (new group) Creates a group
chgroup (attribute) (group) Change a group attribute
rmgroup (group) Removes a group


NFS:
exportfs Lists all exported filesystems

exportfs -a Exports all fs's in /etc/exports file

exportfs -u (filesystem) Un-exports a filesystem

mknfs Configures and starts NFS services

rmnfs Stops and un-configures NFS services

mknfsexp -d /directory Creates an NFS export directory

mknfsmnt Creates an NFS mount directory

mount hostname:/filesystem /mount-point Mount an NFS filesystem

nfso -a Display NFS Options
nfso -o option=value Set an NFS Option
nfso -o nfs_use_reserved_port=1



TAR:

tar -cvf (filename or device) ("files or directories to archive")

eg tar -cvf /dev/rmt0 "/usr/*"

tar -tvf (filename or device) Lists archive

tar -xvf (filename or device) Restore all
tar -xvf (filename or device) ("files or directories to restore")
use -p option for restoring with orginal permissions

eg tar -xvf /dev/rmt0 "tcpip" Restore directory and contents
tar -xvf /dev/rmt0 "tcpip/resolve.conf" Restore a named file


Tape Drive
rmt0.x where x = A + B + C

A = density 0 = high 4 = low
B = retension 0 = no 2 = yes
C = rewind 0 = no 1 = yes

tctl -f (tape device) fsf (No) Skips forward (No) tape markers
tctl -f (tape device) bsf (No) Skips back (No) tape markers
tctl -f (tape device) rewind Rewind the tape
tctl -f (tape device) offline Eject the tape
tctl -f (tape device) status Show status of tape drive

chdev -l rmt0 -a block_size=512 changes block size to 512 bytes
(4mm = 1024, 8mm = variable but
1024 recommended)

bootinfo -e answer of 1 = machine can boot from a tape drive
answer of 0 = machine CANNOT boot from tape drive

diag -c -d (tape device) Hardware reset a tape drive.

tapechk (No of files) Checks Number of files on tape.

< /dev/rmt0 Rewinds the tape !!!


Boot Logical Volume (BLV):
bootlist -m (normal or service) -o displays bootlist
bootlist -m (normal or service) (list of devices) change bootlist

bootinfo -b Identifies the bootable disk
bootinfo -t Specifies type of boot

bosboot -a -d (/dev/pv) Creates a complete boot image on a physical volume.

mkboot -c -d (/dev/pv) Zero's out the boot records on the physical volume.

savebase -d (/dev/pv) Saves customised ODM info onto the boot device.

Outputs necessary to be taken before any activity/reboot

Necessary outputs for any system :

lsvg > lsvg.out

lsvg -o > lsvg-o.out
lspv > lspv.out
df -k > dfk.out
lsdev -C > lsdev.out
lssrc -a|grep active > lssrc.out
lslpp -L > lslpp.out
cat /etc/inittab > inittab.out
ifconfig -a > ifconfig.a.out
netstat -rn > netstatrn.out
powermt display > poweradapters.out
powermt display dev=all > powerhdisks.out
prtconf > prtconf.out
lsfs -q > lsfsq.out
lscfg -vp > lscfg.out
odmget Config_Rules > odmconfigrules.out
odmget CuAt > odmCuAt.out
odmget CuDep > odmCuDep.out
odmget CuDv > odmCuDv.out
odmget CuDvDr > odmCuDvDr.out
odmget PdAt > odmPdAt.out
odmget PdDv > odmPdDDv.out
ps -ef | grep -i pmon > oracle.out
ps -ef > ps.out
ps -ef | wc -l > pswordct.out
ps -ef | grep -i smb > samba.out
who > who.out
last > last.out



If the system has Cluster then:

/usr/es/sbin/cluster/utilities/cldump > cldump.out
/usr/es/sbin/cluster/utilities/cltopinfo > cltopinfo.out
/usr/es/sbin/cluster/utilities/clshowres > clshowres.out
/usr/es/sbin/cluster/utilities/clfindres > clfindres.out
/usr/es/sbin/cluster/utilities/cllscf > cllscf.out
/usr/es/sbin/cluster/utilities/cllsif > cllsif.out

Followers