Você está na página 1de 25

VG COMMANDS

lsvg lsvg -o lsvg rootvg lsvg -l rootvg lsvg -o |lsvg -il lsvg -p rootvg mkvg -s 8 hdisk1 mkvg -s 8 -y sivg hdisk1 mkvg -s 4 -t 2 -y sivg hdisk1 chvg -a y newvg chvg -a n newvg chvg -t 2 newvg chvg -Q n newvg reorgvg newvg extendvg newvg hdisk3 hdisk4 exportvg newvg importvg -V 44 -y newvg hdisk2 redcucevg newvg hdisk3 varyoffvg newvg varyonvg newvg syncvg -v sivg mirrorvg -S -m sivg hdisk2 unmirrorvg sivg hdisk2 Display all VGs Display all active VGs Display info about rootvg Display info about all LVs in rootvg Display info about all LVs in all VGs Display info about all PVs in rootvg Create VG with name vgxx on hdisk1 with partition size 8MB Create VG with name sivg on hdisk1 with partition size 8MB Create sivg on hdisk1 with PP size 4 and no of partions 2 * 1016 To cuase VG newvg automatically activated at startup To deactivate the automatic activation at startup To change maximum no. of PP to 2032 on vg newvg To disable quorum on VG newvg Reorganises PP allocation of VG newvg Add PV hdisk3 and hdisk4 to VG newvg Exports the VG newvg Import the hdisk2 with name newvg, and assign major number 44 Remove PV hdisk3 from VG newvg To deactviate VG newvg To activate VG newvg To sync the mirrored LV in the VG sivg To mirror LVs of sivg with hdisk2 (-m for exact mirror, -S forbackground mirror) To remove the mirrored PV from the set.

FS COMMANDS
lsfs Lists all filesystems in the /etc/filesystems entry lsfs -q List all filesystems with detailed info lsfs -a To list all filesystems (default) lsfs -l Specify the output in list format lsfs -c Specify the output in column format lsfs -v jfs Lists all jfs filesystems chfs -a size=24576 /si Change size of FS /si to 24576 x 512 bytes blocks (12 MB) chfs -a size=+24576 /si Add 24576 x 512 byte blocks to FS /si chfs -asize=-500M /file/system you can also decrease size chfs -m /si /bi Change the mount point from /si to /bi chfs -A /si To auto mount the filesystem si chfs -d account /si Remove account attribute of /si. ( from /etc/filesystems file) chfs -a splitcopy=/backup -a copy=2 /oracle This will mount the 2nd copy of mirrored filesystem oracle to /backup in read-only mode crfs -v jfs -g testvg -a size=64465 -m /siju Creates FS /siju of type jfs in VG testvg of blocksize 64465 crfs -v jfs -d /dev/lv00 -m /siju Create FS /siju of type jfs on device /dev/lv00 rmfs /siju Deletes FS /siju and associated LV rmfs -r /siju Deletes FS /siju its mount point and associated LV defragfs /sifs To defragment the file system /sifs defragfs -q /sifs Display the current defrag status of the file system fsck -y n /dev/lv00 To fsck the filesystem associated to /dev/lv00 assuming response "yes" fsck -p /dev/lv00 To restore superblock from backup superblock

PV COMMANDS
lspv hdisk0 lspv -p hdisk0 Display status and characteristics of the PV Display PP usage of hdisk0

lspv -l hdisk0 chpv -v r hdisk1 chpv -v a hdisk1 chpv -c hdisk0 migratepv hdisk1 hdisk2 migratepv -l silv hdisk1 hdisk2

To list all logical volumes on PV hdisk0 Close the PV (Used while removing PV without varyon) Open the PV Clear the master boot record on PV hdisk0 To move PPs from PV hdisk1 to hdisk2 To migrate LV silv from PV hdisk1 to hdisk2

LV COMMANDS
lslv -l lv00 Display info about LV by PV lslv -p hdisk1 Display LV allocation map for hdisk1 chlv -t copy lv00 To change the lv00 to copy type chlv n silv lv00 To rename lv00 to silv chlv -x 950 ora1data_lv To change the ora1data_lv to <XXX to 950 PP> chlv -p r lv00 To change the lv00 to readonly mode rmlv silv To remove silv rmlv -f silv To remove silv without user intervention mklv -s n -c 3 silv hdisk1 To make LV silv with three copies on hdisk1 extendlv silv 5 To extend the LV silv with 5 LPs mklvcopy -s n lvsi 2 hdisk1 To mirror LV lvsi on same PV with 2 copies mklvcopy lvsi 3 hdisk1 hdisk2 To mirror LV lvsi on PV hdisk1 and hdisk2 with 3 copies rmlvcopy lvsi 2 hdisk1 Will remove one copy of LV lsvi from hdisk1 mklv -t jfslog -y log00 newvg 2 To create a jfslog with name log00 on VG newvg with 2LPs logform /dev/log00 To format jfslog volume log00 mklv/extendlv -a = PP alocation policy -am = middle -ac = center -ae = edge -aie = inner edge -aim = inner middle migratepv -l (lv) (old pv) (new pv) Move a logical volume between physical volumes. Both physical volumes must be in the same volume group ! mklv -y (lv) -t jfslog (vg) (No of PP's) (pv Name optional) Creates a JFSlog logical volume. logform (/dev/lv) Initialises an LV for use as an JFSlog getlvcb -AT (lv) Displays Logical Volume Control Block information

BLV COMMANDS
bootlist -m normal -o To see the boot sequence in normal mode bootlist -m service -o To see the boot sequence in service mode bootlist -m normal cd0 hdisk0 To change boot sequence to cd0,hdisk0 in normal mode bootlist -m service cd0 rmt0 hdisk0 To change boot sequence to cd0,rmt0,hdisk0 in service mode bosboot -ad /dev/hdisk1 To create boot image on PV hdisk1 mkboot -cd /dev/hdisk1 To clear the boot image bootinfo -b Specifies the bootable disk bootinfo - t Specifies the type of boot bootinfo -e Check the machine can boot from tape bootinfo -T To see the machine hardware type bootinfo -s hdisk0 To see the size of hdisk0 bootinfo -r To see the size of memory bootinfo k To see the key position bootinfo m To see the machine model code bootinfo o hdisk0 To list the location code of hdisk0 bootinfo z To see the machine is multiprocessor capable

bootinfo p bosboot -a -d (/dev/pv) mkboot -c -d (/dev/pv) savebase -d (/dev/pv)

To see the machine Creates a complete boot image on a physical volume. Zero's out the boot records on the physical volume. Saves customised ODM info onto the boot device.

PAGE SPACE COMMANDS


lsps -a lsps hd6 chps -a y paging00 chps -a n paging00 chps -s4 paging00 mkps -a -n -s4 sivg rmps paging00 swapon -a swapon /dev/paging00 To list out all paging spaces To display the details of the paging space hd6 To turn on the paging space paging00 To turn off the paging space paging00 To increase the size of the paging space in 4 LP blocks To create a paging space on VG sivg of 4 LP size (-s4) and activate it immediately (-n) and activate it at every restarts To remove the paging space paging00 To invoke all entries in /etc/swapspaces file To make available swap space paging00

SYSTEM DUMP COMMANDS


sysdumpdev -l sysdumpdev -L sysdumpstart -p sysdumpstart -s sysdumpdev -p /dev/lv00 sysdumpdev -P -p /dev/lv00 sysdumpdev -s /dev/rmt0 sysdumpdev -z To list the current dump destination List the details of the previous dump Starts dump in the primary dump device Starts dump in the secondary dump device To make lv00 as primary dump device To make lv00 as primary dump device permanently To make rmt0 as secondary dump device To determine a new system dump occurred

SYSTEM DUMP -------------------------------------------------------------------------------sysdumpdev -e Estimates dumpsize of the current system in bytes. (MCA machine can also dump if key is in service position and the reset button is pressed) sysdumpdev -p (dump device) -P Sets the default dump device, permanently Analyse dump file :echo "stat\n status\n t -m" | crash /var/adm/ras/vmcore.0

Device related commands


cfgmgr cfgmgr -l vscsi0 lscfg lscfg -l mem0 lscfg -l ent* lscfg -v lscfg -v -l hdisk0 mkdev -l rmt0 lsdev -P lsdev -P -c disk
lscfg -vp|grep -ip cabinet

To configure devices and installs device software in system To configure the components connected to the vscsi0 interface To display config, diagnostics and vital product definition info Display info about device mem0 Display info about all Ethernet cards Display vpd Display vpd of hdisk0 To change device rmt0 from defined state to available state To lists all supported devices To list all supported disks To list all cabinets

lsdev -P -r class lsdev -P -r subclass lsdev -C lsdev -C -l mem0 chdev -l sys0 -a maxproc=100 chdev -l rmt0 -a blocksize=512 chdev -l rmt0 -a ret=no rmdev -l rmt0 rmdev -d -l rmt0 rmdev -l rmt0 -S lsparent -C -k rs232 lsparent -C -l hdisk0 lsattr -Dl rmt0 lsattr -El rmt0 lsattr -El tty0 -a login -R

To display supported class To display all sub class To lists all configured devices To display the properties of mem0 To change default maxproc value to 100 To change the block size to 512 To avoid tape retension To remove the device rmt0 To remove the device totally from database To change the state of the device stopped To display possible parent devices which accept rs232 devices To display parent devices which accept child device hdisk0 To see the default values of the device rmt0 To see the current values of the device rmt0 To see all possible values of the login attribute of tty0

lsattr -R -l ent0 -a media_speed


lsconn -p scsi0 To list all possible connection scsi0 can accept lvlstmajor To list the available major numbers mknod /dev/null c 2 2 Create null device with major (2) and minor (2) nos. (c - char device) lsattr -E -l sys0 -a maxuproc

Console emulation commands


lscons To list the current console lscons -b To list the console at next boot chcons /dev/tty3 To change the console to tty3 chcons -a login=enable /dev/tty3 Redirect console to tty3 and provide login prompt swcons /dev/tty3 To change system console to tty3 temporarily alog -L t console To see the current attributes of log type console alog t console o To see the console messages alog t boot o To see the boot time messages

Installation specific commands


lslpp -l lslpp -ha bos.net.* lslpp -f bos.rte lslpp -w /etc/hosts lslpp -p bos.net.nfs.server installp -L -d /dev/rmt0.1 installp -aX -d /dev/rmt0.1 bos.net requires installp -u bos.net installp -r installp -c -f <product> installp -C lppchk -c <product> instfix -k IX9999 -d /dev/rmt0.1 instfix -ik IX9999 To see the details of installed file sets To list the installation history of all file set in bos.net packages To list the files in the bos.rte package To list the file set which contain /etc/hosts file To list the pre requisites for bos.net.nfs.server file set To list the installable products on the device rmt0 To install all filesets within bos.net and expands file system if it To remove bos.net To reject the applied software To commit the <product> To cleanup an incomplete installation To check the <product> To install the file set associated with fix IX9999 from rmt0 To verify fix IX9999 installed

Network related commands


host 193.9.200.1 host ibm Resolves ip to host name (from /etc/hosts file) Resolve ibm to ip address (from /etc/hosts file)

hostname ibm To change the host name to ibm entstat en0 To the status of ethernet device en0 entstat -d en0 To list the detailed status of device en0 no -a To list all net configurable attributes and their values no -d thewall To change thewall parameter to its default value no -o ipforwarding=1 To make the machine as router in tcpip networks traceroute ibm To trace the route to ibm ping ibm To tcp ping to the machine ibm ifconfig -a To show the status of all network interfaces ifconfig en0 To show the status of en0 ifconfig en0 up Turns on network card en0 ifconfig en0 down Turns off network card en0 ifconfig en0 detach Removes en0 card from the network interface list ifconfig en0 inet 194.35.52.1 netmask 255.255.255.0 up Configure en0 starts immediately ifconfig en0 alias 195.60.60.1 Create alias ip address for en0 route add 0 192.100.13.7 To make 192.100.13.7 as default gateway for entire network route add 192.100.12.0 192.100.13.7 To make 13.7 as gateway for 12.0 network route -f To clear the gateway table chdev -l inet0 -a hostname=si To change the host name to si permanently netstat -a To show the state of all sockets netstat -c To show the network buffers cache netstat -D To show the net drops of packets netstat -i To display interface statistics netstat -r To show the routing table netstat -rn To show routing table (ip will be given instead of host names) netstat -s To show the statistics of the protocols netstat -s -p < tcp/udp/ipv6> To show the statistics of respective protocols

Space usage commands


du -k du -l du -s df -i df -k pstat s dumpfs <disk> Ex : dumpfs /dev/hd3|more /dev/hd3: magic 0x43218765 cpu type 0x0 file system type 0 file system version 0 file system size 196608 fragment size 4096 block size 4096 allocation group size 2048 (frags) inodes/allocation grp 2048 compress 0 file system name /tmp volume name /tmp log device 0xa0003 log serial number 0xb4 file system state 1 read only 0 last update Thu Sep 24 14:31:28 BST 1998 lsfs Lists all filesystems lsfs -q (fs) Lists the file system details mount Lists all the mounted filesystems mount (fs or lv) Mounts a named filesystem To list number of bytes in 1k blocks To list number of bytes in 512 bytes blocks To list only the total disk usage in the current directory To display no of free and used inodes To display diskspace in 1024 bytes format Page space information shows superblock, i-node map and disk map information for the file system specified.

mount -a Mounts all filesystems mount all mount -r -v cdrfs /dev/cd0 /cdrom mounts cd0 drive over /cdrom crfs -v jfs -d(lv) -m(mount point) -A yes Will create a file system on the whole of the logical volume, adds entry into /etc/filesystems and will create mount point directory if it does not exist. crfs -v jfs -g(vg) -m(mount point) -a size=(size of fs) -A yes Will create a logical volume on the volume group and create the file system on the logical volume. All at the size stated. Will add entry into /etc/filesystems and will create the mount point directory if it does not exist.

Backup commands
mksysb -i -X /dev/rmt0 Creates image.data and system backup (-X expands /tmp if required) mksysb -m /dev/rmt0 Creates image.data file with map file and system backup mksysb -e /dev/rmt0 Creates system data but excludes the files listed in /etc/exclude.rootvg mkszfile Creates /image.data file mkcd -d /dev/cd1 Creates system boot backup to the CD-R device /dev/cd1 mkcd -d /dev/cd1 -v vg00 Creates backup of vg vg00 to CD-R device /dev/cd1 mkcd -d /dev/cd1 -G Creates generic boot backup savevg -i -f /dev/rmt0 vg00 Creates vg00.data image file and backup vg vg00 savevg -ef /dev/rmt0 vg00 Creates vg00 backup but excludes files listed in the /etc/exclude.vg00 find / -print | backup -ivf /dev/rmt0 Backup entire system to rmt0 backup -0vf /dev/rmt0 /home Backup /home directory to rmt0 with backup level 0 restore -Tvf /dev/rmt0 List the archive in rmt0 restore -xvf /dev/rmt0 /home Restore /home from archive in device rmt0 find ./home -print |cpio -ocvumB > /dev/rmt0 Archives /home directory cpio -icvdumB < /dev/rmt0 Restores cpio archive from rmt0 cpio -ivt < /dev/rmt0 List the contents of cpio archive from rmt0 cpio -icvd < /dev/rmt0 /home Restores /home directory from rmt0 tar -cvf /dev/rmt0 /home Archives /home to rmt0 device tar -tvf /dev/rmt0 List the archives in rmt0 tar -xvf /dev/rmt0 /home Extract /home from rmt0 dd if=si of=si1 conv=ebcdic Convert and copy ascii file si to ebcdic si1 dd if=/dev/rmt0 ibs=512 obs=1024 of=/dev/rmt1 To copy blocks from rmt0 with 512 blocks to rmt1 with 1024 blocks tctl -f /dev/rmt0 rewind To rewind the tape tctl -f /dev/rmt0 offline To eject the tape tctl -f /dev/rmt0 status To show the status of tape chdev -l rmt0 -a block_size=512 To change the block size of the tape to 512

Print commands
qchk -q qchk -P lp0 qchk -# 123 qchk -A qcan -x 123 qcan -X -P lp0 qpri -#570 -a 25 qhld # 569 qhld -r -#569 To display the default q To display the status of the printer lp0 To display the status of job number 123 To display the status of all queues To cancel the print job 123 To cancel all jobs submitted to lp0 To change the priority of the job to 25 To hold the job 569 To remove holding from 569

qmov -m lpa -#11 enable psq disable psq cancel -#111 lpstat lpstat -p lp0 lpstat -u root lpq -P lp0 last last |grep shutdown uptime (w -u )

To move the job 11 to queue lpa To enable queue psq To disable queue psq To cancel job 111 To display the status all queues To display the status of print queue lp0 To display the jobs submitted by user root To display the status of queue lp0 To list all the records in the /var/adm/wtmp file To show the shutdown sessions To show how long the system has been up

splp (device) Displays/changes printer driver settings splp /dev/lp0 export $LPDEST="pqname" Set default printer queue for login session lsvirprt Lists/changes virtual printer attributes. rmvirprt -q queuename -d queuedevice Removes a virtual printer qpri -#(job No) -a(new priority) Change a queue job priority. qhld -#(job No) Put a hold on hold qhld -r #(job No) Release a held job

Licensing commands
oslevel lslicense chlicense -u30 chlicense -f on To list the operating system level To see the number of license To change the fixed user license to 30 To enable floating user license

User commands

id To list all system identifications for current user id -gn To list the default group for current user id -Gn To list all system groups for current user lsuser root To list the attribute of user root lsuser ALL To list the attributes of all users lsuser -a HOME ALL To list the home directory of all users lsuser -a ALL To list all usernames lsuser -a auth1 auth2 ALL To list the authentication method for all users lsuser -a expires ALL To list expiry date lsuser -a account_locked ALL To check account lock status of all users chsec -f /etc/security/user -a account_locked=false -s user chuser -a login=true san To enable the user san chuser -a rlogin=true san Enable san to login remotely chuser maxexpired = -1 <User Name> Passwor never expairs for user} mkuser si Creates user si with default values in /usr/lib/security/mkuser.defalault mkuser su=false si Create user si without su facility rmuser si To remove user si rmuser -p si To remove user si and his all attributes who List users with tty nos and ip numbers who /var/adm/wtmp Lists history of login logout system startup and shutdowns who -r To list the run level who am i /who -m To list the current user mkgroup dcm To create the group dcm

chgroup users=u1,u2,u3 dcm rmgroup dcm chauthent

To add users u1 u2 and u3 to dcm group To delete the group dcm To change the authentication methods

Force a user to change their password on their next login: pwdadm -f ADMCHG username Note that this works with some sshd's and not others

Subsystem Commands
lssrc -a lssrc -h node1 -a lssrc -s kadmind lssrc -g tcpip mkssys rmssys -s kerberos chssys -s kerb -s kad startsrc -s kadmin startsrc -g tcpip stopsrc -s kadmin stopsrc -g tcpip refresh -s nfsd refresh -g tcpip

To list the status of all subsystems To list the status of all subsystems on foreign host node1 To list the status of the subsystem kadmind To get the status of the subsystem group tcpip To add a subsystem To remove the subsystem kerberos To rename the subsystem kerb to kad To start the subsystem kadmin To start the subsystem group tcpip To stop the subsystem kadmin To stop the subsystem group tcpip To refresh nfsd subsystem To refresh tcpip subsystem group

Scheduling commands
crontab -l crontab -e crontab -l > /si crontab -r crontab -v /var/adm/cron/cron.allow /var/adm/cron/cron.deny at -l at -r root.dfjdhjdh.21 /var/adm/cron/at.allow /var/adm/cron/at.deny batch atq joe

To list the crontab entries To edit the crontab entries To copies the entries of crontab to /si file To remove all crontab entries To list the submission time File containing users who allowed cron service File containing users denied cron service To list the jobs scheduled via at command To remove the scheduled job root.dfjdhjdh.21 File containing users who allowed at service File containing users denied at service To run the command when the system load permits To list all the jobs submitted by user joe

ODM Commands
odmget sm_menu_opt To get the objects from class sm_menu_opt odmget -q "id=licenses" sm_menu_opt To list objects that matches query id=licenses from object sm_menu_opt odmdelete -o sm_menu_opt -q "id=licenses" To delete the entries from class sm_menu_opt which agrees the query id=licenses odmshow sm_menu_opt To show the object class definition odmdrop -o sm_menu_opt To drop sm_menu_opt object class odmchange -o sm_menu_opt -q "id=licenses" file1 To change the attributes from file1

errpt To display complete summary of report errpt -a To list complete detailed report errpt -d H To list all hardware related errors errpt -d S To list all software related errors errpt -a -j 34564423 To list detailed error report of error id 34564423 chitab tty002:23:respawn:/usr/sbin/getty /dev/tty To enter the entry tty002:23:respawn:/usr/sbin/getty /dev/tty in inittab lssrc -g portmap To start tcpip

Daemons of NIS
Server ypserv yppasswd ypupdated Slave Server ypserv Client ypbind

NIS maps created by default (if file available on master server) MAP FILE passwd.byname /etc/passwd passwd.byaddr group.byname /etc/group group.byaddr hosts.byname /etc/hosts hosts.byaddr ethers.byname /etc/ethers ethers.byaddr networks.byname /etc/networks networks.byaddr rpc.bynumber /etc/rpc services.byname /etc/services protocols.byname /etc/protocols protocols.bynumber netgroup.byhost /etc/netgroup netgroup.byuser bootparams /etc/bootparams mail.aliases /etc/aliases mail.byaddr publickey.byname /etc/publickey netid.byname /etc/passwd /etc/group /etc/hosts /etc/netid netmasks.byaddr /etc/netmasks chypdom I mca chypdom B mca chypdom N mca domainname mca mkmaster

NICK NAME Passwd Group Hosts Ethers Networks

Protocols

Aliases

Modifies nis domain name entry in /etc/rc.nfs Changes nis domain and modifies /etc/rc.nfs file Changes nis domain name to mca Changes nis domain name to mca until next reboot To make the machine NIS master (Options -O Overwrites existing maps -o prevents overwriting existing maps

mkclient B S mca ypcat passwd ypcat x ypcat d pci passwd yppasswd lsmaster mrgpwd >/var/yp/passwd ypxfr -h mca passwd.byname

-E Exit on errors -e No exit on errors -P Starts yppasswdd daemon -p Dont start yppasswdd daemon -U Starts ypupdated daemon -u Dont start ypupdated daemon -C Starts ypbind daemon -c Dont start ypbind daemon -B Executes ypinit command and modifies rc.nfs Makes the machine as a client of mca server and starts ypbind daemon To cat the password map file passwd.byname To display map nickname translation table To display the passwd file in the domain pci To change the password of nis user Display characteristics for the configuration of NIS master To merge /etc/passwd and /etc/security/passwd file to /var/yp/passwd To transfer password map file from host mca

Procedure for NIS


Master Server
Change the nis domain name in the master server chypdom B mca or smit chypdom Verify tcpip is running by executing lssrc s inetd Verify portmap is running by executing lssrc s portmap (For security reason it is better to locate all nis files to /var/yp directory and change the DIR=/etc entry to DIR=/var/yp in the /var/yp/MakeFile. For merging the existing passwords execute mrgpwd > /var/yp/passwd) Execute mkmaster O E P U C B -O Overwrites existing maps for this domain -E Exist on errors when creating master server -P Starts yppasswdd daemon -U Starts ypupdated daemon -C Starts ypbind daemon -B Executes ypinit command, uncomment entries in rc.nfs and starts daemons Check the yp daemons with lssrc g yp

Slave Server
Change the nis domain name chypdom B mca Edit hosts file, keep entries for loopback, this machine and of server Execute mkslave O B C mca

Client machine
Change the nis domain name chypdom B mca Edit hosts file, and keep entries for loopback , this machine and of server Execute mkclient B mca Check for ypbind with lssrc s ypbind

HACMP Commands
logs

/tmp/hacmp.out Detailed event script output logged in 7 day rolling history /var/adm/cluster.log High level view of cluster events (No clean up on this file) /usr/sbin/cluster/history/cluster.mmdd Day by day view of cluster events. (one file / day of month) /tmp/cm.log Clstrmgr messages /tmp/cspoc.log Output from C-SPOC commands (similar to smit.log) /tmp/emuhacmp.out Output from event emulation rdist -b -f /etc/disfile1 Sample entry for disfile1 HOSTS = ( root@node1 root@node3 ) FILES = ( /etc/passwd /etc/security/passwd) ${FILES} -> ${HOSTS} clstart -m -s -b -i -l clstop -f -N clstop -g -N clstop -gr -N cldare -t cldare -t -f cldare -r cldare -r -f clverify cllscf cllsclstr cllsnode cllsnode -i node1 cllsdisk -g shrg cllsnw cllsnw -n ether1 cllsif cllsif -n node1_service cllsvg cllsvg -g sh1 cllslv cllslv -g sh1 cllsdisk -g sh1 cllsfs cllsfs -g sh1 cllsnim cllsnim -n ether cllsparam -n node1 cllsserv To start cluster daemons (m-clstrmgr, s-clsmuxpd, b-broadcast message, -i-clinfo, -l cllockd) To force shutdown cluster immediately without releasing resources To do graceful shutdown immediately with no takeover To do graceful shutdown immediately with takeover To sync the cluster toplogy To do the mock sync of topology To sync the cluster resources To do the mock sync of resources cluster verification utility To list clustur topology information To list the name and security level of the cluster To list the info about the cluster nodes To list info about node1 To list the PVID of the shared hard disk for resource group shrg To list all cluster networks To list the details of network ether1 To list the details by network adapter To list the details of network adapter node1_service To list the shared vgs which can be accessed by all nodes To list the shared vgs in resource group sh1 To list the shared lvs To list the shared lvs in the resource group sh1 To list the PVID of disks in the resource group sh1 To list the shared file systems To list the shared file systems in the resource group sh1 Show info about all network modules Show info about ether network module To list the runtime parameters for the node node1 To list all the application servers To distribute the files in disfile1 to all nodes in disfile1 in binary mode

claddclstr -i 3 -n dcm To add a cluster definition with name dcm and id 3 claddnode To add an adapter claddnim To add network interface module claddgrp -g sh1 -r cascading -n n1 n2 To create resource group sh1 with nodes n1,n2 in cascade claddserv -s ser1 -b /usr/start -e /usr/stop Creates an application server ser1 with startscript as /usr/start and stop script as /usr/stop

clchclstr -i 2 -n dcmds clchclstr -s enhanced clchnode clchgrp clchparam clchserv clrmclstr clrmgrp -g sh1 clrmnim ether clrmnode -n node1 clrmnode -a node1_svc clrmres -g sh1 clrmserv app1 clrmserv ALL clgetactivenodes -n node1

To change cluster definitions name to dcmds and id to 2 To change the clustur security to enhanced To change the adapter parameters To change the resource group name or node relationship To change the run time parameters (like verbose logging) To change the name of app. server or change the start/end scripts To remove the cluster definition To delete the resource group sh1 and related resources To remove the network interface module ether To remove the node node1 To remove the adapter named node1_svc To remove all resources from resource group sh1 To remove the application server app1 To remove all applicaion servers

To list the nodes with active cluster manager processes from cluster manager on node node1 clgetaddr node1 returns a pingable address from node node1 clgetgrp -g sh1 To list the info about resource group sh1 clgetgrp -g sh1 -f nodes To list the participating nodes in the resource group sh1 clgetif To list interface name/interface device name/netmask associated with a specified ip label / ip address of a specific node clgetip sh1 To get the ip label associated to the resource group clgetnet 193.9.200.2 255.255.255.0 To list the network for ip 193.9.200.2, netmask 255.255.255.0 clgetvg -l nodelv To list the VG of LV nodelv cllistlogs clnodename -a node5 clnodename -o node5 -n node3 clshowres clfindres xclconfig xhacmpm xclstat To list the logs To add node5 to the cluster To change the cluster node name node5 to node3 Lists resources defined for all resource group To find the resource group within a cluster X utility for cluster configuration X utility for hacmp management X utility for cluster status

SP Commands
Daemons
hats hags haem hr pman Topology services Group services Event management Host responds Problem management hatsd hagsd haemd hrd pmand,pmanrmd ( /usr/sbin/rsct/bin/hatsctrl script) (/usr/sbin/rsct/bin/hagsctrl script) (/usr/sbin/rsct/bin/haemctrl script) (/usr/sbin/rsct/bin/hrctrl script) (/usr/sbin/rsct/bin/pmanctrl script)

fault_service_Worm_RTG_SP (WORM) css_restart_node)

Switch daemon on nodes (/usr/lpp/ssp/rc.switch called by

kadmind authentication kerberos kpropd hardmon

The authentication database daemon for password changing and administration tools Listens port 751. It checks acl files admin.acl.(get,mod,add) in /var/kerberos/database /.k file for master key and /var/kerberos/databse/pricipal.pag, pricipal.dir for database. Daemon that provides authentication services & ticket granting ticket for clients. Daemon to receive update for a secondary database server Daemon that monitors and controls the state of SP hardware It checks acl file /spdata/sys1/spmon/hmacls

install_cw

setup_authent

To complete PSSP installation on cws (Installs PSSP programs for SMIT panels Starts and configures SDR Sets node number 0 for cws in ODM Creates hmacls file with rood.admin entry in Starts and configure PSSP daemons Configures default partition) To setup workstation as SP authentication server (Creates /etc/krb.conf, /etc/krb.realms files Creates authentication database using kdb_edit command Create master key file /.k using kstash command Adds kadmin and kerberos to inittab file and starts them Define initial auth. admin (eg:- root.admin) using kdb_edit command Creates Kerberos ACLS (admin_acl.get,mod,add files) Execute kinit for root.admin and creates local service principals (hardmon.cws, rcmd.cws) Creates /.klogin file and add admin principal to it Creates /etc/krb-srvtab file using ext_srvtab command) To setup CWS as BIS To check the PSSP versions in all nodes To verify system monitor configured properly To verify system monitor installed properly & operational To verify the system management component To verify communication subsystem

setup_server splst_versions -G -t spmon_ctest spmon_itest SYSMAN_test CSS_test SDR_test -l si SDRListClasses SDRArchive si

To verify SDR and logs the errors in file si To list the class name in the SDR To backup SDR in the directory /spdata/sys1/sdr/archives with name backup.<year><Julian day>.<hour><minute>.si sprestore_config backup.<year><Julian day>.<hour><minute>.si To restore SDR and partion sensitive subsystems SDRGetObjects Syspar To get the system partition info SDRGetObjects syspar_map To get the system partition map (with node info) SDRGetObjects Adapter node_number netaddr To get the node number and net address in the Adapter class SDRDeleteObjects Adapter netaddr==193.9.200.227 To delete class Adapter with netaddr value 193.9.200.227 SDRChangeAttrValues Node node_number==9 bootp_response==install To change the boot response as install on node with node number 9 SDRWhoHasLock <class_name> Returns the transaction ID of a lock on a specified class SDRClearLock <class_name> To unlock an SDR class

syspar_ctrl syspar_ctrl syspar_ctrl syspar_ctrl syspar_ctrl syspar_ctrl syspar_ctrl

-G -A -G -D -R -E -s -k -r

To add and restart all system partition sub systems To stop and delete all system partition sub systems To restore all system partition sub systems in current partition To list all system partition sub systems To start all system partition sub systems in current partition To stop all system partition sub systems in current partition To refresh all system partition sub systems in current partition To create node group si with 1st node in 1st frame To create node group si with 1st 2nd and 3rd nodes To create node group si with node groups ng1 and ng2 To create node group si with host name n1 and n2 To create node group si with all nodes in the current partition excluding hosts n1 and n2 To list node groups in current partition To list node groups globally To find all node groups which contain node group si To create 3 node groups with names si1 si2 and si3 To create 3 node groups globally with names si1 si2 and si3 To resolve the nodes in the node group si as node numbers with global option To resolve the nodes in the node group si as fully qualified host name To resolve the nodes in the node group si as fully qualified ip address To remove node groups si and si1 To remove node group si but leave entries in other node groups which is having the entries in it To clean up all node groups To add nodes 1 and 2 to the existing node group si To add nodes 1,2 and node group ng1 to node group si To remove nodes 1 and 2 from node group si To remove nodes 1, 2 and node group ng1 from node group si To display leds of nodes in a multi partition system To display leds of nodes in the current partion To power off node3 in frame 2 To power on node 3 in frame 2 To power on node3/frame 2 if it is outside current partition To change the key settings to service To power off frame1 To see the key settings of frame1/node1 To reset To open a tty on frame1/node1==(s1term -w 1 1) To run the diag in the current partition To run the diag globally Displays a descriptive list of symbolic variable names Displays the state of node1 in frame 1 and exists Displays and monitors continuously To stop and restart hardmon To power off all hardware

ngcreate -s 1:1 si ngcreate -n 1 2 3 si ngcreate -N ng1,ng2 si ngcreate -w n1,n2 si ngcreate -ae n1,n2 si nglist nglist -G ngfind si ngnew si1 si2 si3 ngnew -G si1 si2 si3 ngresolve -G -n si ngresolve -w si ngresolve -d si ngdelete si si1 ngdelete -u si ngclean -Ga ngaddto si 1 2 ngaddto si 1 2 ng1 ngdelfrom si 1 2 ngdelfrom si 1 2 ng1 spled -G spled or spmon -L spmon -p off frame2/node3 spmon -p on frame2/node3 spmon -G -p on frame2/node3 spmon -k service /frame2/node3 spmon -p off frame1 spmon -K frame1/node1 spmon -reset frame1/node1 spmon -open frame1/node1 spmon -d spmon -G -d hmmon -V 1:1 hmmon -Q -s 1:1 hmmon -q -s 1:1 hmreinit hmcmds -G off all

hmcmds -G off 1:3 To power off slot 3 in frame 1 hmcmds -G on 1:3 To power on slot 3 in frame 1 hmcmds -v -G boot_supervisor 1:1 To reset the power of node_supervisor card on slot 1 frame 1 (Use full to close the opened ttys on nodes) hmcmds secure l 1-3:2 To change the key in secure mode for slot 2 in frame 1 2 and 3 hmcmds -v synch_reset Perform sync reset. To clear the switch errors hmcmds -v power_on_reset Perform sync reset and do self test of switch chips cstartup -G all cstartup -N 1 2 4-8 cstartup -g si cstartup -GZ all cstartup -k all cstartup -E all cshutdown -F node1 cshutdown -h node1 cshutdown -g si cshutdown -G -N 1 3 4-7 cshutdown -X -N 1 2 3 hostlist -av hostlist -avd hostlist -dw node1 hostlist -N si hostlist -s 1-4:4 nodecond -n 1 1 nodecond 1 1 splstdata -h splstdata -i splstdata -v splstdata -t splstdata -b splstdata -n splstdata -s splstdata -d splstdata -p splstdata -e Efence Efence 193.9.1.2 193.9.1.5 Efence node1 node3 Efence -autojoin node1 Eunfence 193.9.1.2 193.9.1.5 Eunfence node1 node3 Estart Estart -autounfence -0 To startup all nodes globally To startup nodes 1,2 and 4 to 8 To startup node group si To startup all nodes. With Z it will restart the nodes which are already running (otherwise command will exit) To verify the startup with sequence file (StartSeq) To startup all nodes ignoring the sequence file To shutdown node1 immediately To halt the node node1 To shutdown the nodes in the node group si To shutdown nodes 1 3 and 4 to 7 regardless partition To shutdown nodes 1 2 and 3 ignoring sequence file To list sp host name which is active To list the hosts in ipaddress which are active Returns the ip of the node node1 List the host names in the node group si List the hostname of the node in 4th slot in frames 1-4 To get the ehternet address of the node 1 in frame 1 To network boot the node 1 in frame 1 To list the hardware info (equivalent to lscfg ) To list the network adapter data (equivalent to netstat -in) To list VG info on nodes To list extension node config To list boot install info To list node information To list node switch information To list file system info (equivalent to df) To list SP partition info To list the sp environment variables like ntp_config, amd_config To display all nodes fenced To fence nodes with ips 193.9.1.2 and 3 To fence nodes node1 and node3 To fence out but will unfence it after reboot To unfence nodes with ips 193.9.1.2 and 3 To unfence nodes node1 and node3 To start sp switch To start sp switch and turn off autounfence feature (1 for autounfence enabled)

Eunpartition delnimclient -l 1 2 3 mknimclient -l 1 2 3 delnimmast -l 1 17 33 mknimmast -l 1 17 33 lshacws ntpdate 90.1.2.1 spbootlist -l 1 2 nodecond 1 4 nodecond -n 1 4 sphrdwrad 1 3 2 setup_authent kdb_destroy create_krb_files file ext_srvtab -n node1 ext_srvtab -n SPbgAdm spsetauth -d k4 std chauthpar k4 std kpasswd lsauthent k4init k4init k4init k4init k4init siju -v siju -i siju -r siju -l siju

To prepare a system partition for repartitioning To delete nim client definition for nodes 1 2 and 3 from NIM master To make node 1 2 and 3 as NIM clients To unconfigure nodes 1 17 and 33 as NIM masters and remove filesets To make nodes 1 17 and 33 as NIM masters To list the status of the CWS Sets date and time by enquiring ntp server 90.1.2.1 To set the bootlist on nodes 1 and 2 To network boot the node 4 in frame 1 To fetch the ethernet address of node 4 in frame 1 To fetch mac address for node 3 and 4 in frame 1 To setup a cws to use kerberos authentication To destroy the kerberos database Searches for nodes in install/Customise mode and create krb-srvtab for those nodes. (Creates in tftpboot directory of CWS.) To extract service key files from the database for instance node1 To extract service key files from the database for instance SPbgAdm (Creates in the present directory with name <instance>-new-srvtab) To set the authentication methods as k4 and standard To change the authentication methods as k4 and std To change the kerberos principals password To list the authentication table To get the kerberos ticket for principal siju To get the same as above but give verbose output To get the same but the machine will ask for the instance To get the same for a different realm (U can specify realm) To get the same for the life time in minutes which u specify To obtain a maximum life time ticket for rcmd services on local node To list the ticket cache and principals name To list the contents of the server key file To change the life time of the principal siju to 30 minutes (6 x 5) To change the expiry date of principal siju to 2001 may 23 To list the predefined kerberos principals To list the kerberos service principals To list the kerberos client principals To list the principals of siju and abc To remove the principal siju To remove the principal siju without prompting for confirmation To remove the principal with verbose output

rcmdtgt k4list k4list -srvtab chkp -l 6 siju chkp -e 2001-5-23 siju lskp -p lskp -s lskp -c lskp siju abc rmkp siju rmkp -n siju rmkp -v siju

kdb_edit kdb_edit -n kdb_util dump /si.bak kdb_util load /si.bak kdb_util new_master_key kadmin kadmin kadmin kadmin kadmin kadmin kstash kdb_init ksrvutil list ksrvutil -f /etc/srvtab.bak list ksrvutil change ksrvutil delete ksrvutil -f /etc/srvtab.bak delete spacs_cntrl block user1 spacs_cntrl unblock user1 spacs_cntrl deny user1 spacs_cntrl allow user1 spacs_cntrl -f /tmp/si deny cw_allowed cw_restrict_login ank cpw cap get dest

To change the attributes of the kerberos principals To avoid asking master key and get it from .k file To backup the kerberos database to si.bak file To restore the kerberos database from file si.bak. To change the master key To add,delete,see,change password,change admin passwd of kerberose To add a new kerberos principal To change the password of a principal To change admin password To get the details of a principal To destroy admin ticket To save the master key in the .k file To initialize the kerberos system To list the principals and version number in the server key file To list the principals in the file /etc/srvtab.bak To change the key version in the default srvtab file To delete the keys in the /etc/krb-srvtab file To delete the keys in the /etc/srvtab.bak file To block user1 on the node To unblock user1 To deny user1 To allow user1 To deny the list of the users in the file /tmp/si List of users to be allowed to login to CWS Script which will deny user to login to cws and allow them to change the passwd (files are /usr/lpp/ssp/config/admin directory and entry for second file will be in /etc/profile file)

spmkuser id=1234 pgrp=system groups=system,bin home=node1:/home/siju siju To create SP user siju with id 1234, primary groups system, secondary groups system,bin and home directory home/siju of node1 sprmuser -ipr siju To remove the SP user siju (I for interactive, p for removing info from passwd file and r for removing the home directory) splsuser -c siju splsuser -f siju To list the attributes of sp user siju in column format To list the attributes of sp user siju in stanza format

spchuser groups=dev,system sh=/bin/ksh siju To change the shell to ksh and secondary groups to dev, system of SP user siju supper -v supper update supper status supper when supper where supper log supper rlog supper file user.admin supper install siju supper remove siju To go to the supper prompt in verbose mode To update all file collections To see the status of the file collections To list when last updation occured To show current servers for updation To show summary of last or current updation To show the details of last of current updation To list the files in the file collection user.admin To install the file collection siju To remove file collection siju

supper update user.admin supper diskinfo

To update file collection user.admin To show the diskspace and current VG

Procedure to Build a file collection with name siju for files in /home/siju
1) go to /var/sysman/sup 2) create dir siju 3) change ownership and group of siju to bin 4) copy contents of /var/sysman/sup/user.admin to siju 5) edit list file for including and omitting files in /home/siju directory It should contains entry like the following symlinkall upgrade ./home/siju omit ./home/siju/abc omitany ./home/siju/s* 6) Add a symbolic link to siju file in lists directory to list in siju directory ie ln -s /var/sysman/sup/siju/list /var/sysman/sup/lists/siju 7) Update /var/sysman/file.collections file with following entry primary siju - / - / EDO power no 8) Update sup.admin file collection to reflect the changes made to file.collections dsh -av supper update sup.admin 9) Install file collection siju in the nodes dsh -av supper install siju

sysctld /etc/sysctl.conf

Sysctl server daemon Sysctl configuration file

setauth -cmd svcconnect NONE To allow non kerberos users to execute sysctl commands (Entry in sysctl.conf file) setauth -cmd pdf {ACL /etc/si.acl}To change the acl file for pdf command to /etc/si.acl (Entry in sysctl.conf file) /etc/sysctl.acl sysctl -h sysctl -h sysctl -h sysctl -h sysctl -h sysctl -h sysctl -h sysctl -h sysctl -h sysctl -h sysctl -h sysctl -h sysctl -h Default acl file for sysctl

node1 Opens a sysctl command interface for node node1 node1 aclcheck siju To check entry for siju in the default acl file (sysctl.acl) node1 -f /etc/si.acl siju To check entry for siju in the acl file /etc/si.acl node1 info commands To list the authorized commands for the current principal node1 acladd -p siju To add the principal siju to the default ACL file node1 -f /etc/si.acl acladd -p siju To add the principal siju to /etc/si.acl ACL file node1 acldelete -p siju To delete the principal siju to the default ACL file node1 -f /etc/si.acl acldelete -p siju To delete the principal siju to /etc/si.acl ACL file node1 acllist To list the entries in the default acl file node1 -f /etc/si.acl acllist To list the entries in /etc/si.acl file node1 aclcreate -p root.admin -p siju -f /etc/si.acl To create acl file /etc/si.acl with the entries root.admin and siju node1 checkauth -cmd pdf To check authorization for command pdf for the current user node1 confadd include /etc/si.acl To include the acl file si.acl in the sysctl.conf file

sysctl -h node1 confdelete include /etc/si.acl To remove the acl file si.acl from sysctl.conf file sysctl -h node1 svcrestart To restart the sysctld daemon on node node1

Steps to create a Syctl application


Task :- User siju (kerberos principal siju.adm) should get the permission to start a subsystem by executing the command substart. Permission should not be given to other users. 1) Create the client application substart in /usr/bin directory of cws with following contents if [ $# -gt 2 ] then echo "Arguments exceed the limit" exit 1 fi /usr/lpp/ssp/bin/hostlist -n $1 | /usr/bin/sysctl -c - substart_proc $2 In the above script if condition will check for the number of arguments and execute procedure on corresponding host 2) Change the mode to executable chmod 755 /usr/bin/substart 3) Create server application substart.tcl with a procedure substart_proc with following contents create proc substart_proc {SubSystem} AUTH { global SCUSER if [ aclcheck -f /etc/substart.acl $SCUSER ] { exec /etc/substart.srv $SubSystem return } } if condition in the above example checks for kerberos user in the acl file /etc/substart.acl If the condition is true it execute the command /etc/substart.srv with arguments passed by substart command 4) Create the script substart.srv with following contents startsrc -s $2 This script execute the command startsrc with the argument passed by the substart command

5)

Change the mode to executable chmod 755 /etc/substart.srv

6)

Create acl file substart.acl with the entry for user siju #acl#

_PRINCIPAL siju.adm@CWS 7) Add the application to the sysctl by adding following line to sysctl.conf file include /etc/substart.tcl 8) Distribute the files to all nodes pcp -av /usr/bin/substart pcp -av /etc/substart.tcl pcp -av /etc/substart.srv pcp -av /etc/substart.acl pcp -av /etc/sysctl.conf Restart the sysctld daemon to get the new information on cws and on all nodes Get the kerberos ticket for user siju and execute following command substart 3 lpd This should start the lpd daemon on node 3 11) Try the above command with any other kerberos ticket. Result should be negative

9) 10)

NIM Commands
nimconfig -a pif_name=en0 -a netname=net1 To initialise the NIM master with network name net1 nimconfig -r To rebuild /etc/niminfo file which contains the variables for NIM nim -o define -t lpp_source -a source=/dev/cd0 -a server=master -a location=/export/lpp_source/lpp_source1 lpp_source1 cd0 To define lpp_source1 image in /export/lpp_source/lpp_source directory from source

nim -o define -t mksysb -a server=master -a location=/resources/mksysb.image mksysb1 To define mksysb resource mksysb1, from source /resources/mksysb.image on master nim -o remove inst_resource To remove the resource inst_resource nim -o check lpp_source1 To check the status of lpp_source lpp_source1 nim -o allocate -a spot=spot1 -a lpp_source=lpp_source1 node1 To allocate the resources spot1 and lpp_source1 to the the client node1 nim -o bos_inst node1 To initialise NIM for the BOS installation on node1 with the allocated resources nim -o dkls_init dcmds To initialize the machine dcmds as diskless operation nim -o dtls_init dcmds To initialize the machine dcmds for dataless operation nim -o cust dcmds To initialize the machine dcmds for customize operation nim -o diag dcmds To initialize the machine dcmds for diag operation nim -o maint dcmds To initialize the machine dcmds for maintenance operation nim -o define -t standalone -a platform=rspc -a if1="net1 dcmds xxxxx" -a cable_type1=bnc dcmds

To define the machine dcmds as standalone with platform as rspc and network as net1 with cable type bnc and mac address xxxxx nim -o unconfig master To unconfigure nim master master nim -o allocate -a spot=spot1 dcmds To allocate the resource spot1 from machine dcmds nim -o deallocate -a spot=spot1 dcmds To de allocate the resource spot1 from machine dcmds nim -o remove dcmds To remove machine dcmds after removing all resources associated to it nim -o reboot dcmds To reboot ther client dcmds nim -o define -t lpp_source -a location=/software/lpp1 -a server=master -a source=/dev/cd0 lpp1 To define lppsource lpp1 on master at /software/lpp1 directory from source device /dev/cd0 lsnim To list the nim resources lsnim -l dcmds To list the detailed info about the object dcmds lsnim -O dcmds To list the operation dcmds object can support lsnim -c resources dcmds To list the resources allocated to the machine dcmds nimclient The client version of nim command (User can obtain same results of nim in server )

Tape Drive Tasks Web-based System Manager: (Devices application) -ORTask List All Defined Tape Drives List All Supported Tape Drives Add New Tape Drives Automatically SMIT Fast Path smit lsdtpe smit lsstpe smit cfgmgr Command or File lsdev -C -c tape -H lsdev -P -c tape -F "type subclass description" -H cfgmgr mkdev -c tape -t '8mm' -s 'scsi' -p 'scsi0' -w '4,0' -a extfm=yes lsdev -C -l rmt0 lsattr -D -l rmt0 chdev -l rmt0 -a block_size='512' -a mode=no1 rmdev -l 'rmt0'1 wsm devices fast path

Add a User-Specified Tape Drive smit addtpe Show Characteristics of a Tape Drive Change Attributes of a Tape Drive Remove a Tape Drive smit chgtpe smit chgtpe smit rmvtpe

dosrd: copy DOS file to AIX file # dosrd: reads DOS file from floppy and converts to AIX format with # specified directory/filename $1 dosread -a $1 $1 doswr: copy AIX file to DOS file # doswr: writes AIX file to floppy and converts to DOS format with # specified directory/filename $1 doswrite -a $1 $1 Clusters

cath_node11:root:/# lssrc -g cluster Subsystem Group PID Status clstrmgrES cluster 19770 active clsmuxpdES cluster 22190 active clinfoES cluster 21940 active tail -f /tmp/hacmp.out|more cath_node11:root:/# tail -30 /tmp/hacmp.out|more EXPORTLIST= network_down_complete[91] [ -n ] network_down_complete[90] network_down_complete[90] odmget -q group=workflow_server1_int AND name=EXPORT_FILESYSTEM HACMPresource network_down_complete[90] grep value network_down_complete[90] awk {print $3} network_down_complete[90] sed s/"//g EXPORTLIST=/osmlocal_a network_down_complete[91] [ -n /osmlocal_a ] network_down_complete[93] [ REAL = EMUL ] network_down_complete[98] cl_update_statd cl_update_statd[91] [[ high = high ]] cl_update_statd[91] version=1.7 cl_update_statd[92] cl_update_statd[92] cl_get_path Cluster state Check the status of the cluster daemons by issuing lssrc -g cluster and lssrc -g lock. Run /usr/sbin/cluster/clstat to check the status of the cluster and the status of the network interfaces. Check the cluster log files with tail -f /tmp/hacmp.out, more /usr/sbin/cluster/history/cluster.mmdd (mmdd = current date), tail -f /var/adm/cluster.log, and more /tmp/cm.log. Check that the nodename is correct (use odmget HACMPcluster). Verify that all the HACMP Configuration is synchronized. To check the state of the HACMP cluster nodes, you have to test the topology and configuration of your HACMP cluster. This is done by using the clverify command.

The state of cluster can be found by using the /usr/sbin/cluster/clstat clstat - HACMP Cluster Status Monitor --------------------------------------------Cluster: cl_hacmp441 (1) Fri Oct 12 15:23:42 CDT 2001 State: UP Nodes: 2 SubState: STABLE Node: austin State: DOWN Interface: boot1 (0) Address: 192.168.1.11 State: DOWN Interface: austin_tty0 (1) Address: 0.0.0.0 State: DOWN Interface: austin_tmssa1 (2) Address: 0.0.0.0 State: DOWN Node: boston State: UP Interface: boston (0) Address: 192.168.1.20 State: UP

Interface: boston_tty0 (1) Address: 0.0.0.0 State: UP Interface: boston_tmssa1 (2) Address: 0.0.0.0 find /proc/*/fd -type f -links 0 -exec ls -lh {} \; invalid pointing links

rmfs (fs)

Removes the file system and will also remove the LV if there are no onther file systems on it. Reports the fragment status of the file system. Runs in report only defrag mode (no action). Defragments a file system.

defrag -q (fs) defragfs -r (fs) defragfs (fs)

fsck (fs) Verify a file system, the file system must be unmounted! fsck (-y or -n) (fs) Pre-answer questions either yes or no ! fsck -p (fs) Will restore primary superblock from backup copy if the superblock is corrupt.

Useful HACMP commands


clstat - show cluster state and substate; needs clinfo. cldump - SNMP-based tool to show cluster state cldisp - similar to cldump, perl script to show cluster state. cltopinfo - list the local view of the cluster topology. clshowsrv -a - list the local view of the cluster subsystems. clfindres (-s) - locate the resource groups and display status. clRGinfo -v - locate the resource groups and display status. clcycle - rotate some of the log files. cl_ping - a cluster ping program with more arguments. clrsh - cluster rsh program that take cluster node names as argument. clgetactivenodes - which nodes are active? get_local_nodename - what is the name of the local node? clconfig - check the HACMP ODM. clRGmove - online/offline or move resource groups. cldare - sync/fix the cluster. cllsgrp - list the resource groups. clsnapshotinfo - create a large snapshot of the hacmp configuration. cllscf - list the network configuration of an hacmp cluster. clshowres - show the resource group configuration. cllsif - show network interface information. cllsres - show short resource group information. lssrc -ls clstrmgrES - list the cluster manager state. lssrc -ls topsvcs - show heartbeat information. cllsnode - list a node centric overview of the hacmp configuration. LPAR uname L Use the uname command to obtain information about the system in relation to the LPAR. > uname -L -1 NULL The "-1" indicates that the system is not running with any logical partitions, but is running in full system partition mode.

The following example demonstrates how the uname command provides the partition number and the partition name as managed by the HMC: > uname -L 3 Web Server Knowing that the application is running in an LPAR can be helpful when you are assessing slight performance differences.

CHFS EXAMPLES
1. To change the file system size of the /test Journaled File System, enter: chfs -a size=24576 /test This command changes the size of the /test Journaled File System to 24576 512-byte blocks, or 12MB (provided it was previously no larger than this). 2. To increase the size of the /test Journaled File System, enter: chfs -a size=+8192 /test This command increases the size of the /test Journaled File System by 8192 512-byte blocks, or 4 MB. 3. 4. To convert a JFS2 file system to a version which can support NFS4 ACLs, type: chfs -a ea=v2 /test To change the mount point of a file system, enter: chfs -m /test2 /test This command changes the mount point of a file system from /test to /test2. 5. To delete the accounting attribute from a file system, enter: chfs -d account /home This command removes the accounting attribute from the /home file system. The accounting attribute is deleted from the /home: stanza of the /etc/filesystems file. 6. To split off a copy of a mirrored file system and mount it read-only for use as an online backup, enter: chfs -a splitcopy=/backup -a copy=2 /testfs This mount a read-only copy of /testfs at /backup. 7. To change the file system size of the /test Journaled File System, enter: chfs -a size=64M /test This command changes the size of the /test Journaled File System to 64MB (provided it was previously no larger than this). 8. To reduce the size of the /test JFS2 file system, enter: chfs -a size=-16M /test This command reduces the size of the /test JFS2 file system by 16MB. 9. To freeze a file system, enter: chfs -a freeze=60 /adl This command freezes the /adl file system for a maximum of 60 seconds. 10. To thaw a file system, enter: chfs -a freeze=off /zml

This command thaws the /zml file system.

Você também pode gostar