Aix CMD
Aix CMD
VI editor #vi <file name> Add or remove or modify the text in file
VI editor Esc +:wq to save the text
VI editor Esc +:wq! to save the text with force option
VI editor Esc +:q with out saving text exit from VI editor
VI editor Esc +:q! with out saving text exit from VI editor
VI editor Esc +:x to save and exit from vi editor
VI editor Esc +/(word) To find word in vi editor
VI editor Esc +r to replace word
VI editor n to find next word in vi editor
VI editor N to find previous word in vi editor
VI editor Esc +w move cursor fromm one word to another word
VI editor Esc +x to remove letters or words
VI editor Esc+shift+h jump to first line
VI editor Esc+Shift+g jump to last line
VI editor Esc+shift+m jump to middle line
VI editor Esc +shift+a jump to the end in the same line
VI editor Esc +shift+i jump to the starting in the same line
VI editor Esc +yy copies the total horizontal line
VI editor Esc +p paste the line
VI editor Esc+dd to remove the line
VI editor Esc:%s/old name/newname/g replace old name with new name in vi editor
VI editor ESc:set nu toset line numbers to all lines
VI editor Esc+ set nonu to remove line numbers
VI editor Esc+Shift+ <number> g jump to given number line ex 5th line
VI editor Esc +<number>yy copy given number of lines from cursor point
VI editor Esc+<number>dd delete given number of lines from cursor point
at jobs #at -f <file name>/<cmd/script> -t CCYYMMDDhhmmSS schedule any single job at a time
at jobs #atq list the at jobs
at jobs #at -r <job name> to remove the at job
at jobs #at -r to remove all at jobs
at jobs /var/spool/cron/atjobs all at jobs location
LVM #cfgmgr cofigure or scan the disk
LVM #lspv display the disks
LVM #lsdev -Cc <disk name> display the specific disk
LVM #bootinfo -s <diskname> to verify the size of the disk
LVM #chdev -l <disk name> -a pv=yes create the PVID for specific disk
LVM #chdev -l <disk name> -a pv=clear remove the PVID for specific disk
LVM #mkvg -y <vg name> -s <ppsize> <disk name or pv name> create the volume group
LVM #mklv -y <lv name> -t <type of lv> <vg name> <number of lps> <pv name> create the logical volume
LVM #crfs -v <type of fs> -d /dev/lvname -A yes -m /<fs name> create the file system
LVM #crfs -v <type of fs> -g <vg name> -a size=<number> -A yes -m <fs name> create the file system without LV
LVM #mount </fs name> mount the file system
LVM #unmount </fs name> unmount file system
LVM #lsvg list all VGs
LVM #lsvg <vg name> list specific VG with attributes
LVM #lsvg -o list active VGs
LVM #lsvg -p <vg name> list all hard disks in a specific VG
LVM #lsvg -l <vg name> list file systems in specific VG
LVM #lslv <lv name> list Specific LVs with attributes
LVM #lspv <pv name> list perticular PV with attribute
LVM #lsfs list all file systems (mounted and unmounted)
LVM #lsfs -q list all file systems (mounted and unmounted)
LVM #df -gt list only mounted file systems
LVM #mount list only mounted file systems
LVM #mount -a </fs name> mount the all file systems in a specific vg
LVM #unmount -a </fs name> unmount all file system in a specific vg
LVM #rmlv <lv name> remove LV
remove FS (after unmount the file system perform remove
LVM #rmfs </fs name> operation)
LVM #fuser -u </fs name> finding the current working user in the specific file system
LVM #fuser -uk </fs name> kill the current working iser in the specific file system
LVM #lspv -m <disk or pv name> list all the file systems in a specific disk
2nd method
#powermt display dev=all
#lsvg -p <vg name>
#bootinfo -s <new disk name>
#lsvg -l <vg name>
#unmount </fs name>
#varyoffvg <vg name>
#exportvg <vg name>
#rmdev -dl <old disk name>
#lspv
#importvg -y <vg name> <pv name>
#varyonvg <vg name>
#lsvg -l <vg name>
#mount </fs name>
Mirroring VG #cfgmgr
#lspv
#bootinfo -s <new disk name>
#chdev -l <new disk name> -a pv=yes
#extendvg <vg name> <new pv name>
#mirrorvg <vg name> <new pv name> Mirroring VG
#mirrorvg -S <vg name> <new pv name> Mirroring VG will happened in background
Mirroring VG will happened in background and also we can
#mirrorvg -S -c <number> <vg name> <new pv name> take required number of copies
#prompt
#bosboot -ad </dev/new pv name> Create boot logical volume on new disk
#bootlist -om normal check the boot logical order
#bootlist -om normal <old pv name> <new pv name> set the boot logical order
#bootlist -om normal again check the bootlist order
#lspv
Auto Synchronization ON #lsvg <vg name> check the vg attributes for Auot Sync is on or off
#syncvg -v <vg name> To sync VG
#syncvg -p <pv name> To sync PV
#syncvg -l <lv name> <pv name or vg name> To sync LV or FS
#chvg -sy <vgname> Auto sync on = Yes
#chvg -sn <vgname> Auto sync on = NO
#readvgda <pv name> To display the VGDA info (Volume group descripter area)
#getlvcb -AT <lvname> To display the LVCB info (Logical Volume Control Block)
#chvg -Qy <vg name> IF VGDA => 51% to enable the quorum
#chvg -Qn <vg name> IF VGDA <= 51% to disable the quorum
Topic CMD Meaning
Login to HMC
Creation of LPAR
Install the OS to the server through CD/DVD
Installation of OS through NIM Steps to the configure NIM server
1)Create Lpar
2)Install the OS to the server through CD/DVD
3)Install NIM supported softwares/Filesets
4)Configure NIM network
c)Configure the lpp_source /export/lpp_source (or) /export/nim/lpp_source Here 1st create the file system
#smitty nim Configure the lpp_source
-- Perform NIM administration tasks
-- Manage resources
-- Define Resources
-- Select lpp_source
Fill the below final window
Resource Name : <lpp5304>
Resource Type : <lpp_source>
Server of Resource : Master
Location of Server : /export/lpp_source
Source of Installation Images : <cd0>
#lsnim -t lpp_source list the lpp_source
d)Configure the spot /export/spot (or) /export/nim/spot Here 1st create the file system
#smitty nim Configure the spot
-- Perform NIM administration tasks
-- Manage resources
-- Define Resources
-- Select spot
Fill the below final window
Resource Name : <spot5304>
Resource Type : <spot>
Server of Resource : Master
Location of Server : /export/spot
Source of Installation Images : <lpp5304> Here we have to give the lpp resource name
#lsnim -t spot list the spot
Here 1st create the file system and add the client server
e)Configure the Client Server on NIM Server /etc/hosts name and IP address in this file
#smitty nim Configuraration of Client Server on NIM server
-- Perform NIM administration tasks
-- Manage machines
-- Define a machine
Host of the machine : <nimclient1> Here hit enter two times, Client will be configure
#lsnim -c machines To list master and client servers
#lsnim -t standalone To list only client servers without maser server
#mksysb -ieX /<file system name>/<backup file name> mksysb rootvg or roottvg backup command