Showing posts with label AIX. Show all posts
Showing posts with label AIX. Show all posts

Tuesday, September 14, 2010

Send documents to this blog


Send documents to this blog


Hi AIX learner,

Thanks for visiting my blog... this is my small blog and this may helpful to AIX learners. Most of the posts in this blog are came from my little work experience as AIX administrator. 

For sharing better knowledge i wish to say everyone that please send good Documents or your experience in AIX to this e-mail id

praveenk.aix.4world ( at ) blogger.com


The E-mail send by you will be posted in this blog after review.
You can send text and images up to 10MB in size (No attachments).
please do not send any copy righted documents.

This blog is for you...

Now it's by you... be a part of it...



BEST WISHES...



Praveen K




Feel free to inform me about blog content and suggest how can we improve this blog by sending e-mail to

praveenk.aix.4world ( at ) blogger.com

and this information will not be published.

Thanks...





**************

Wednesday, January 20, 2010

NIM related Commands in AIX



AIX NIM Commands


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 ) 

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   
  To define  lpp_source1 image in /export/lpp_source/lpp_source directory from source cd0

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 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 

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





********************







Thursday, December 3, 2009

SRC (System Resource Controller)commands in AIX


SRC commands in AIX

lssrc -a      To list the status of all subsystems

lssrc -h node1-a    To list the status of all subsystems  on foreign host node1


lssrc -s inetd            To list the status of the subsystem inetd

lssrc -g tcpip            To get the status of the subsystem group tcpip 

startsrc -s inetd         To start the subsystem inetd

startsrc -g tcpip        To start the subsystem group tcpip


stopsrc -s inetd      To stop the subsystem inetd (if process is under srcmstr. ie PPID of process=PID of srcmstr)


stopsrc -g tcpip   
        To stop the subsystem group tcpip


refresh -s nfsd            To refresh nfsd subsystem


refresh -g tcpip  
          To refresh tcpip subsystem group


lssrc -p [PID of process]  To get  status of the subsystem by process ID 

kill  [PID of process]   To kill a process that not started by srcmstr 

mkssys       To add a subsystem

rmssys -s kerberos        To remove the subsystem kerberos


chssys -s kerb -s kad        To rename the subsystem kerb to kad





*************

Wednesday, December 2, 2009

User related commands in AIX


User related commands in AIX


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 ALL            To list all usernames 

lsuser -a HOME ALL        To list the home directory of all users

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

chuser -a login=true praveen        To enable the user praveen

chuser -a rlogin=true username        Enable user to login remotely to server 

mkuser praveen   Creates user si with default values in /usr/lib/security/mkuser.default

passwd   To change password of current user

passwd username  To change password of a user

pwdadm username  To change password of a user by security (admin) member

mkuser su=false username       Create user without su facility

rmuser username            To remove a user

rmuser -p praveen            To remove user praveen 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 shutdown

last root  All previous login and logoff time of root user

who -r     To list the current run level ( cat /etc/.init.state )

whoami   show current user

who am i         To list the exact user (who -m) ( ie. difference between su and su - After su shows previous username bcoz environment not set for current user and su - shows current username bcoz environment has been set)

mkgroup dcm            To create the group dcm

chgroup users=user1,user2,user3 dcm    To add users user1,user2 and user3 to dcm  group

rmgroup dcm            To delete the group dcm

chauthent            To change the authentication methods

chuser unsuccessful_login_count=0 username   To change the unsuccessful login count

pwdck -t ALL / Username  To verify user passwords ( Report error and ask to fix it)

usrck -t ALL / Username   To verify user definition.

grpck -t ALL / groupname  To verify a group




*************


Print commands in AIX

Print commands in AIX

switch.prt  -d    to Display current print subsytem (AIX, System V, BSD) 

switch.prt  -s AIX   to change current print subsytem to AIX 

switch.prt  -d systemV    to change current print subsytem to systemV

qprt -P  qname filename   To submit print jobs (AIX Printing)


qprt -P:lp1 filename   To submit a print job if multiple queue / printer is there 

qprt -N   No. of print copy required 

qchk -q                To display the default q

qchk -P lp0            To display the status of the printer lp0


qchk -# 123           To display the status of job number 123


qchk -A                To display the status of all queues (AIX Printing) 


qcan -x 123            To cancel the print job 123 (AIX Printing)

qcan -X -P lp0            To cancel all jobs submitted to lp0
(AIX Printing)

qchk -L  to show job priorities 

qpri -#570 -a 25            To change the priority of the job to 25

qhld -# 569            To hold the  job 569


qhld -r -#569            To remove holding job 569 (release)


qmov -m pq1 -#11        To move the job 11 to queue pq1


enable psq            To enable queue psq


disable psq            To disable queue psq


lp -d qname filename  To submit printjob (System V printing)

lp -n   No. of print copy required


lpstat                 To display the status all queues (System V printing) 

lpstat -p lp0            To display the status of print queue lp0

lpstat -u root            To display the jobs submitted by user root


cancel -#111            To cancel job 111
(System V printing)

lpq -P lp0            To display the status of queue lp0  ( BSD Printing )






************



Backup commands in AIX


Backup commands in AIX


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    (mksysb)



mkcd -d /dev/cd1 -v datavg        Creates  backup of VG datavg to CD-R device /dev/cd1   (savevg)


savevg -i -f /dev/rmt0 datavg    Creates datavg.data image file and backup vg datavg (path = /tmp/vgdata/datavg/datavg.data)



savevg -ef  /dev/rmt0 datavg        Creates datavg backup but excludes files listed in the /etc/exclude.datavg


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


restore –xvf /export/mksysb ./etc/sshd.conf    Restores particular file from /export/mksysb image

restore -Pa -vf /dev/rmt0 ./etc/passwd    Restore only a file attribute from tape

 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=file1 of=file2 conv=ebcdic    Convert and copy ascii file to ebcdic file2


dd count=1 bs=4k skip 31 seek=1 if=/dev/hd4 of=/dev/hd4    copy 31st block and paste to 1st block in the hd4 ( ie.to fix currupted superblock by restoring it's backup copy to original location)



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

tcopy /dev/rmt0.0 /dev/rmt1.0   to copy contents of 1st tape(tape0) to 2nd tape(tape1). It is useful when the size of the tapes are different.


tcopy /dev/rmt0     to show no. of files and block size in the tape



chdev -l rmt0 -a block_size=512    To change the block size of the tape to 51201






******************



Tuesday, December 1, 2009

How to's in AIX

1) How to disable telnet in AIX

How to disable telnet in AIX

  
#vi /etc/inetd.conf

comment out telnet from this file (#telnet ... ... .. )

save it and

#refresh -s inetd

Then telnet session will be disabled in that server from now.


2) HOW TO FIX A CORRUPTED BLV IN AIX



3) HOW TO DO LINK AGREGATION IN AIX



4) HOW TO CONFIGURE NTP IN AIX
















Sunday, November 22, 2009

Short forms related to IBM AIX

IBM AIX acronyms


IBM         International Business Machines 

AIX        Advanced Interactive eXecutive (Advanced IBM uniX)

POWER   Performance Optimized With Enhanced RISC

RISC       Reduced Instruction Set Computing

CISC      Complex Instruction Set Computing

SCSI      Small computer Simple Interface

PCI       Peripheral Component Interconnect

ISA       Industry Standard Architecture

MCA     Micro Channel Architectural

CHRP    Common Hardware Reference Platform

SMP      Symmetric Multi Processor

PSSP     Parallel System Support Programs

LPAR    Logical PARtition 

HACMP  High Availability Cluster Multi Processing

RSCT   Really Scalable ( RS6000) Cluster Technology

P2SC   POWER2 Super Chips

RAS     Releability Availability Serviceability

SMP    Symmetric Multi Processing

NUMA   Non-Uniform Memory Access

MPP     Massively Parallel Processing

CMP    Chip Multi Processing

CAD   Computer Aided Design

CWS   Controll Work Station

ISB    Intermediate Switch Boards

SDR    System Data Depository

PVM   Parallel Virtual Machine

MPI   Message Passing Interface

HPF   High Performance FORTRAN 

HMC     Hardware Management Console

ASM     Advanced System Management

NIM      Network Installation Manager

LPP      Licenced program Product

BOS     Base Operating System

APAR    Authorized program Analysis Report

SMS     System Management Services

SRC     System Resource Controller 

JFS       Journaled File System

JFS2     Enhanced Journaled File System

CDRFS   CD-ROM File System

UDFS     Universal Disk Format Specification

CIFS      Common Internet File System

NFS      Network File System

NBPI     Number of Bytes Per Inode 

WSM    Web based System management

RMC     Resource Monitoring and Controll

DAT     Digital Audio tape

QIC     Quarter Inch Catridge

DLT     Digital Linear Tape

LTO     Linear tape Operation

TAR     Tape ARchive

CPIO   CoPy Input to Output 

DD      Device to Device

TCTL   Tape  ConTroL 

DCE    Distributed Computing Environment 

CDE    Common Desktop Environment

PPA    parallel Port Adapter

TCP/IP     Transmission Control Protocol / Internet protocol

DARPA    Department of Advanced Research Projects Agency

IAB      Internet Architecture Board

RFC     Request For Comments

LAN     Local Area Network

WAN    Wide Area Network

NIS     Network Infornation Services

DNS    Domain Name Service

DHCP   Dynamic Host Configuration Protocol

NCS     Network Computing System

ICMP    Internet Control Message Protocol

PING    Packet InterNet Gropher

ODM     Object Data Manager

SWVPD   SoftWare Vital Product Data

SRC    System Resource Controller

SMIT  System Management Interface Tool

PUN   Physical Unit Number

LUN   Logical Unit Number

LVM   Logical Volume Manager 

VGDA    Volume Group Descriptor Area

VGSA     Volume Group Status Area

LVCB    Logical Volume Control Block

LVDD  Logical Volume Device Driver

PDT    Performance Diagnostic Tool

SSH    Secured SHell

RSH    Restricted SHell 

EA       Extended Attributes

ACL     Access Controll List

TCB    Trusted Computing Base

SAK    Secure Authentication Key

SAN    Storage Area Network

NAS    Network Area Storage (by NFS)



******************


Tuesday, October 13, 2009

Network Related commands in AIX


AIX Network Related commands

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

host ibm                 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 and starts immediately

mktcpip -h ibm -a 10.0.2.40 -m 255.255.255.0 -i en0  assign hostname as ibm, IP as 10.0.2.40 subnetmask 255.255.255.0 to en0 interface

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=ibm    To change the host name to ibm 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 <>      To show the statistics of respective protocols

********


Installation specific commands in AIX


AIX Installation Specific commands

lslpp -l                              To see the details of installed file sets

lslpp -ha bos.net.*             To list the installation history of all file set in bos.net packages

lslpp -f bos.rte                   To list the files in the bos.rte package

lslpp -w /etc/hosts
           To list the file set which contain /etc/hosts file (parent fileset)

lslpp -p bos.net.nfs.server  To list the pre requisites for bos.net.nfs.server file set 

lslpp -d                To show dependancies of fileset
         
installp -L -d /dev/rmt0.1  To list the installable products on the device rmt0

installp -aX -d /dev/rmt0.1 bos.net   To install all filesets within bos.net and expands file system if it requires

installp -u bos.net       To remove bos.net

installp -r                      To reject the applied software

installp -c -f                 
To commit the applied fileset

installp -C                     To cleanup an incomplete installation

lppchk -c                      To check the fileset items and verifies that the checksum and filesize are consistent with SWVPD

lppchk -v                      verify that all filesets have required requisites and are completely installed

instfix -k IX9999 -d /dev/rmt0.1 To install the file set associated with fix IX9999 from rmt0

instfix -ik IX9999         To verify fix IX9999 installed


************

Console Emulation commands in AIX


AIX 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


************

Device Related Commands in AIX


AIX Device Related commands


cfgmgr                 To configure devices and installs device software in system

cfgmgr -l vscsi0     To configure the components connected to the vscsi0 interface

lscfg                          To display config, diagnostics and vital product definition info

lscfg -l mem0         Display info about device mem0

lscfg -l ent*
            Display info about all Ethernet cards

lscfg -v
                   Display vpd

lscfg -v -l hdisk0       Display vpd of hdisk0

mkdev -l rmt0         To change device rmt0 from defined state to available state

lsdev -P                  To lists all supported devices

lsdev -P -c disk        To list all supported disks

lsdev -P -r class        To display supported class

lsdev -P -r subclass  To display all sub class

lsdev -C                  To lists all configured devices

lsdev -C -l mem0     To display the properties of mem0

chdev -l sys0 -a maxproc=100   To change default maxproc value to 100/user

chdev -l rmt0 -a blocksize=512  To change the block size to 512

chdev -l rmt0 -a ret=no            To avoid tape retension

rmdev -l rmt0                           To remove the device rmt0

rmdev -dl rmt0                         To remove the device totally from database

rmdev -l rmt0 -S                          
To change the state of the device stopped

lsparent -C -k rs232                 To display possible parent devices which accept rs232 devices

lsparent -C -l hdisk0                 To display parent devices which accept child device hdisk0

lsattr -Dl rmt0                         To see the default values of the device rmt0

lsattr -El rmt0                         To see the current values of the device rmt0

lsattr -El tty0 -a login -R           To see all possible values of the login attribute of tty0

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)


****************

System Dump commands in AIX


AIX System Dump commands

sysdumpdev -l           To list the current dump destination

sysdumpdev -L          List the details of the previous dump

sysdumpstart -p        Starts dump in the primary dump device

sysdumpstart -s        Starts dump in the secondary dump device

sysdumpdev -p /dev/lv00       To make lv00 as primary dump device tempararly

sysdumpdev -P -p /dev/lv00   To make lv00 as primary dump device permanently

sysdumpdev -s /dev/rmt0
     To make rmt0 as secondary dump device

sysdumpdev -z                      To determine a new system dump occurred


**************

Paging Space Commands in AIX

AIX Paging Space COMMANDS

lsps -a                      To list out all paging spaces

lsps hd6                   To display the details of the paging space hd6

chps -a y paging00    To turn on the paging space paging00 on next reboot

chps -a n paging00    To turn off the paging space paging00 on next reboot

chps -s4 paging00     To increase the size of the paging space in 4 LP blocks

mkps -a -n -s4 newvg   To create a paging space on VG newvg of 4 LP size (-s4) and activate it immediately (-n) and activate it at every restarts

rmps paging00               To remove the paging space paging00

swapon -a                     To invoke all entries in /etc/swapspaces file

swapon /dev/paging00
  To make available swap space paging00

swapoff /dev/paging00  To disable swap space paging00




***********


BLV commands in AIX


AIX Boot Logical Volume commands


Bootlist, Bosboot and Bootinfo commands in AIX


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 hdisk0 hdisk1        To change boot sequence to hdisk0, hdisk1 in normal mode

bootlist -m service cd0 rmt0 hdisk0    To change boot sequence to cd0,rmt0,hdisk0 in service mode

bosboot -a       To create Boot image on default boot logical volume on the hard disk, from where the system is booted.

bosboot -ad /dev/hdisk1                 To create boot image on specified PV hdisk1

mkboot -cd /dev/hdisk1
                  To clear the boot image from hdisk1 (as chpv -c hdisk1

bootinfo -b           To show the last boot device

bootinfo -e             
Check the machine can boot from tape

bootinfo -k             To check the type of boot (1=secure,2=service,3=normal)

bootinfo -K              To check whether the 32 or 64 bit kernel is active

bootinfo -m             To display machine model code


bootinfo -o hdisk0    To display the device location or disk device name of hdisk0 

bootinfo -p            To see the machine platform

bootinfo -r               To see the size of memory

bootinfo -s hdisk0   To see the size of hdisk0

bootinfo -P 0 -s hdisk0    To see the physical partition(PP) size of hdisk0

bootinfo -t              Specifies the type of boot

bootinfo -T           To see the machine type

bootinfo -y              To see whether the hardware in use is 32 bit or 64 bit



*****************

LV commands in AIX



AIX Logical Volume Commands

lslv -l lv00              Display info about LV lv00 by PV

lslv -p hdisk1           Display LV allocation map for hdisk1

chlv -t copy lv00    To change the lv00 to copy type

chlv -p r lv00
        To change the lv00 to readonly mode

rmlv testlv            To remove testlv

rmlv -f testlv         To remove testlv forcefully (without confirmation)

mklv -s n -c 3 testlv hdisk1   To make LV testlv with three copies on hdisk1

extendlv testlv 5                      To extend the LV silv with 5 LPs

mklvcopy -s n testlv 2 hdisk1     To mirror LV testlv on same PV with 2 copies

mklvcopy testlv 3 hdisk1 hdisk2
  To mirror LV testlv on hdisk1 and hdisk2 with 3 copies

rmlvcopy testlv 2 hdisk1            To remove one copy of LV testlv from hdisk1

mklv -t jfslog -y log00 newvg 2  To create a jfslog with name log00 on VG newvg with 2LPs


mklv -t boot -y hd5  rootvg 1      To create logical volume, type as boot with 1 LP (BLV)

logform /dev/log00                 To format jfslog volume log00


**************

PV commands in AIX


AIX Physical Volume commands


lspv                         show all PV's in the system and their status

lspv hdisk0              display status and characteristics of the PV hdisk0

lspv -p hdisk0          display PP usage of hdisk0 and their location

lspv -l hdisk0           To list all logical volumes on PV hdisk0 and their  distribution

chpv -v r hdisk1       make unavailable the PV (Used while removing PV without varyoffvg)

chpv -v a hdisk1      make PV available.(Open the PV)

chpv -c hdisk0        Clear the master boot record on PV hdisk0 (CAREFULLY..!!)

migratepv hdisk1 hdisk2  To move PPs from hdisk1 to hdisk2

migratepv -l newlv hdisk1 hdisk2   To migrate LV newlv from hdisk1 to hdisk2


**************

FS commands in AIX


AIX File System commands


lsfs                    Lists all filesystems in the /etc/filesystems entry

lsfs -a                To list all filesystems (default)

lsfs -q                List all filesystems with detailed info (shows size of FS and LV in it. so we can check wheather size of LV=size os FS)

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 /test        Change size of FS /test to 24576(blocks)x 512 bytes  (12 MB)

chfs -a size=+24576 /test     Add 24576(blocks)x512 byte  to FS /test


chfs -a size=+64M /test        Add 64 MB to /test

chfs -a size=10G /test           fix size of the FS /test to 10 GB

chfs -m /test /new                 Change the mount point from /test to /new

chfs -A /test                         To auto mount the filesystem test


chfs -d account /test              Remove account attribute of /test.(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 for backup purpose

crfs -v jfs2 -g newvg -a size=100M -m /test   Creates FS /test of type jfs in VG newvg of size 100 MB with default LV.

crfs -v jfs -d /dev/lv00 -m /test Create FS /test of type jfs on device /dev/lv00

rmfs /test            Deletes FS /test and associated LV

rmfs -r /test         Deletes FS /test its mount point and associated LV

defragfs /test      To defragment the file system /test

defragfs -q /test  Display the current defrag status of the file system

fsck -y n /dev/lv00  To check the filesystem associated to /dev/lv00 assuming response "yes"

fsck -p /dev/lv00    To restore superblock from backup superblock


*************


VG commands in AIX


AIX Volume Group COMMANDS

lsvg                      Display all VGs

lsvg -o                  Display all active VGs

lsvg rootvg            Display info about rootvg

lsvg  -l rootvg         Display info about all LVs in rootvg

lsvg -o |lsvg -il       Display info about all LVs in all VGs

lsvg  -p rootvg        Display info about all PVs in rootvg

mkvg  -s 8 hdisk1    Create VG with name vgxx on hdisk1 with partition size 8MB

mkvg -s 8 -y newvg hdisk1          Create VG with name newvg on hdisk1 with partition size 8MB

mkvg -s 4 -t 2 -y newvg hdisk1    Create sivg on hdisk1 with PP size 4 and no of partions 2 * 1016

chvg -a y newvg            To automatically activate newvg at startup

chvg -a n newvg            To deactivate the automatic activation at startup

chvg -t 2 newvg            To change maximum no. of PP / PV to 2032 on vg newvg i.e 2*1016 ( so max no. of hdisk in newvg is 16 as in this case in normalvg)

chvg -Qn newvg            To disable quorum on VG newvg

reorgvg  newvg             Reorganises PP allocation of  VG newvg

extendvg newvg hdisk3 hdisk4    Add PV hdisk3 and hdisk4 to VG newvg


exportvg newvg            Exports the VG newvg

importvg -V 44 -y newvg hdisk2    Import the hdisk2 with name  newvg, and assign major number 44

redcucevg newvg hdisk3        Remove PV hdisk3 from VG newvg

varyoffvg newvg            To deactviate VG newvg (after unmounting filesystems in newvg)

varyonvg newvg             To activate VG newvg

syncvg -v newvg            To sync the mirrored LV in the VG newvg

mirrorvg -S -m newvg hdisk2    To mirror LVs of newvg with hdisk2 (-m for exact mirror, -S for forbackground  mirror)

unmirrorvg newvg hdisk2    To remove the mirrored PV from the newvg


***********


Monday, October 12, 2009

Important AIX commands


USEFUL AIX COMMANDS


lsitab init : to display default
runlevel of an AIX system

cat /etc/.init.state
: to get current runlevel of an AIX system


lslpp : display installed softwares on AIX

/usr/lib/errdemon : to start error login ( errpt ) in AIX

procwait -v : wait for a process and display status

procsig : list all signal action defined by processes

chuser fsize=-1 : to give permissions to create files over 2GB for a user.(-1=no limit)

lppchk -l : to verify that the symbolic links assoiciated with a file set are correct as indicated in the SWVPD.

shutdown -F : fast shutdown AIX system

shutdown -Fr : fast reboot AIX system

shutdown -Fm : reboot an AIX system to maintenance mode

telinit 2 : reboot an AIX system to normal mode

teleinit q : read nittab file

oslevel -s : display the currently installed service pack level in AIX

find /apps -print | backup -i -v -f /dev/rmt0 : copy the contents of /apps to tape in AIX

who : display currently logged users

ln -sf /usr/lib/boot/unix_64 /unix
ln -sf /usr/lib/boot/unix_64 /usr/lib/boot/unix
bosboot -ad /dev/ipldevice
shutdown -Fr
: reconfigure an AIX system from a 32-bit kernel to a 64-bit kernal.

oslevel -rl 5300-06 : show which filesets still need to get new technology level 5300-06 after AIX upgradation

chnfs -n 100 -B : increase the number of system threads allowed to access NFS mounts to 100

./myscript > /tmp/myoutput 2>1 : run myscript and redirect stdout and stderr to /tmp/myoutput


installp -C : to cleanup improperly applied filesets ( interrupted)

lppchk -c : to verify all the filesets installed completely

lppchk -v : verify that the operating system(AIX) is in a consistent state after installing AIX technology level ( to verify all filesets are installed completely)

refresh -s inetd : to restart TCP/IP

chvg -Qn testvg : disable quorum in testvg

smit update_all : to apply system to latest technologic level from CD.

migratepv -l /dev/testlv hdisk1 hdisk2 : move (migrate) testlv from hdisk1 to hdisk2

migratepv hdisk1 hdisk2 : move all data from hdisk1 to hdisk2

lsfs -q /testfs : to check the size of /testfs and the LV mounted on it. i.e how much space required by the FS to reach as that to LV in it.

last    To list all the records in the /var/adm/wtmp file (all successful logins)




last shutdown         To show the time of previous shutdown of server.


last reboot    To show the time of previous reboot of server. 




uptime   To show how long the system has been up ( w -u )


oslevel                To list the operating system level


lslicense              To see the number of license


chlicense -u30          To change the fixed user license to 30


chlicense -f  on         To enable floating user license

lsmcode        To check system firmware version (sys0)

invscout        To get firmware of all peripheral devices. It will generate the output in /var/adm/invscout/invs.mrp containing the firmwares of all peripheral devices.

 





****************