Saturday, June 16, 2018

QUORUM in aix

what is quorom in aix ?


During my AIX learning day i always wondered about what is quorom and how it affect volume group on AIX ? But after doing google i found answer like below.

Here is the answer :

Number of disk must be present in volume group to successfully vary on volume group in AIX.

"51% is mandatory vgda."


for example, XYZ volume group having 6 disk so mandatory disk for 51% VGDA is 4.

if disk in volume group is 10 then mandatory disk for 51% VGDA is 6.

Its simple


51% VGDA=Number of disk in Volume group/2 +1


so what happen if that mandatory percentage (51%) not available ?

rootvg quorom always kept disabled.

QUORUM:         1 (Disabled)

Reason behind this is when AIX OS boot and at the time of boot if rootvg having 2 disk and 1 disk from rootvg crashed then OS will never came up,because it not satisfies 51% VGDA rule.so its always good idea to keep mirrored rootvg quorom disabled.



will update new idea and thought on AIX

Thanks !!

Create filesystem in AIX using INLINE and JFS2 log


How To create filesystem in AIX using INLINE and JFS2 log

Method 1: INLINE Log

Identify Volume group on which we going to create Logical volume "testlv".
Make sure that volume group having enough physical partition free to create logical volume(LV).

Here Volume group is datavg


 

mklv -y testlv -t jfs2 datavg

crfs -v jfs2 -d testlv -m /test -a logname=INLINE -A yes

mount /test


Method 2:
Using JFS2 log

mklv -y testlv1 -t jfs2 datavg

mklv -y testloglv -t jfs2log -a e -r n datavg 1

mount /test1

Difference between JFS2 log and INLINE
  • JFS2 log support many Filesystems.
  • every Filesystem have 1 INLINE log
  • if we have several busy Filesystem and we having JFS2log which support these FS,then there is chances of performance bottleneck, to avoid this INLINE log is good option where every filesystem can have 1 inline.

Friday, June 15, 2018

Useful AIX command alt_disk_copy

Useful AIX command alt_disk_copy command

This command clones existing OS copy to other disk of same size.
other application of this command is while cloning admin also do AIX TL upgrade.

some good example with explanation of alt_disk_copy


1.alt_disk_copy -d hdisk1 -b update_all -l /home/AIX72TL02

above command will clone existing OS to hdisk1 and after successful cloning update the OS on cloned disk .

after successful cloning and AIX TL update on new disk ,bootlist has been changed to new disk.

2.alt_rootvg_op -X old_rootvg

After successful booting from newly cloned disk  ,if admin wants to remove old_rootvg then above command is useful.

**here my suggestion is after cloning and AIX TL update keep old_rootvg for 3-4 week .if everything is working fine then admin can remove old_rootvg.


3.Clone AIX OS to hdisk1.
alt_disk_copy -d hdisk1 

some time situation arise where we need to include multiple disk in rootvg ,so in this sitiation how alt_disk_copy will work

Ans:

 alt_disk_copy -d "hdisk5 hdisk6" -b update_all -l /AIX72TL02

so above command will clone AIX 7.2 on hidsk5 and hdisk6 and then update to AIX 7.2 TL 02.


# alt_disk_copy -d "hdisk4 hdisk5"   

clone rootvg on 2 hdisk4 and hdisk5


Below figure show illustration of alt_disk_copy in AIX


                                               


Thanks

will continue writing new ideas on AIX alt_disk_copy





Sunday, June 10, 2018

df command in hang state on AIX two node cluster .

df command in hang state on AIX node


Incident:

on AIX two node hacmp cluster ,when we executed df -gt command , in command output observed that some nfs mount was missing and command is not exiting and in hang state.
because of this TSM backup for AIX node was failing.

Analysis:
After analysis found that one filer mount is missing on server and AIX cluster node was trying to mount it.we checked nmon log file and also /etc/filesystems to find missing mount entry.

solution :

forcefully umounted that filer and after that df -gt works and also TSM backup also worked
after that requested filer access to storage team which was not accessible.

umount -f /nfs-mountpoint  and then TSM backup and df -gt also working fine.

After doing analysis of df -gt hang issue we also found that at Firewall level there was rule missing for communication between AIX server and filer ,so to resolve  issue at network level Firewall rule need to be implement and need to mount again to solve this issue.

df command may hang on AIX NFS clinet when NFS server is down or crashed from where file-system exported to client.

Also want to discuss on mount type in AIX.there are two types of mount 
1.HARD
2.SOFT

so here question is which one is better .As per my knowledge and experience soft mount is the best option while doing NFS mount. generally these two parameter define that if there is nfs mount crash or mount point is not accessible then how nfs client react.

why soft mount is better ??

 AIX node tries until timeout value reach ,but in hard mount it there is no  timeout value defined so AIX server try indefinitely ,so in this situation system performance may degrade.


Thanks !!!!!!

Saturday, June 9, 2018

Assign root privilege to normal user using sudoers on AIX

Assign root privilege to normal user using sudoers file.

Unix root user is master of all user.but sometime situation demand that other user also need access of command which are only executed by root user .

Here /etc/sudoers file come in picture. this configuration file containing stanza for user and their access right.visudo is the command used for editing  /etc/sudoers file.


# User privilege specification
root    ALL=(ALL) ALL
oracle  ALL=(ALL) NOPASSWD:ALL
webuser  ALL=(ALL) NOPASSWD:ALL

In above yellow highlighted text user oracle and webuser able to execute all root user command without entering root password.

Following are some example where normal  user provided root command access.

If admin wants to provide poweroff command access to user test,then following will be the stanza in /etc/sudoers.
 test ALL=(ALL) NOPASSWD: /sbin/poweroff

Default log file for sudo log

Defaults logfile=/var/adm/sudo.log


Friday, June 8, 2018

Rename Logical volume and mount point on SUSE Linux

Rename Logical volume and mount point on SUSE Linux.

while doing day today administration task on SUSE linux one day i got task to rename existing LV name and mount point.when i got this task first thought in my mind was ,is it possible while File system is in mounted state ??.so answer to this is NO.

Here is the scenario

Filesystem                              Type  Size      Used   Avail   Use%   Mounted on
/dev/mapper/vg01-lvopt_IBM ext3  9.8G      2.8G    6.5G  30%       /opt/IBM
Rename LV name from lvopt_IBM to lvopt_IBMNew and chnage mount point to /opt/IBMNew
solution:

1.First take fstab file backup using command
  cp /etc/fstab /etc/org_fstab

2.mkdir -p /opt/IBMNew   //make sure that same name directory not exist in mentioned path.

3.umount /opt/IBM

4.lvrename vg01  lvopt_IBM   lvopt_IBMNew

syntax: lvrename [vg name]  old_lv_name   new_lv_name

5.Change /etc/fstab entry with New LV and mount point name

old 

/dev/vg01/lvopt_IBM  /opt/IBM             ext3       defaults              1 2

New

/dev/vg01/lvopt_IBMNew  /opt/IBMNew            ext3       defaults              1 2

6. mount /opt/IBMNew  

Check mounted file system using command 

df -hT /opt/IBMNew
Filesystem                              Type  Size      Used   Avail   Use%   Mounted on
/dev/mapper/vg01-lvopt_IBMNew ext3  9.8G      2.8G    6.5G  30%       /opt/IBMNew

Thanks .


Thursday, June 7, 2018

Recovering AIX root password using NIM server

                   
Recovering AIX root password using NIM server
---------------------------------------------------------------------------------
When AIX admin came across situation where  demand is recovery of  AIX root password.
In this situation there are 2 method

1. AIX DVD
2. NIM SPOT  // Here SPOT must be at same AIX OS level.
SPOT is shared product object tree which is used to boot NIM client(AIX LPAR).

So here i will prefer 2 option.use convenient option according to environment.

NIM SPOT : generally used for network boot of NIM client.

steps to boot NIM client(AIX LPAR) in maintenance mode

1.On NIM server define client
2.Assign NIM spot resource to client.
3.Initialize operation on NIM client(AIX LPAR) using command smitty nim_mac_op and select maint_boot = enable a machine to boot in maintenance mode
4.Boot into SMS menu.

IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM 
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM 
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM 
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM 
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM 
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM 
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM 
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM 
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM 
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM 
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM 
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM 
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM 
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM 

1 = SMS Menu 5 = Default Boot List 
8 = Open Firmware Prompt 6 = Stored Boot List 


Select option 1


5. Select option 4


Main Menu 

1. Select Language 
2. Password Utilities NOT available in LPAR mode 
3. View Error Log 
4. Setup Remote IPL (Initial Program Load) 
5. Change SCSI Settings 
6. Select Console NOT available in LPAR mode 
7. Select Boot Options 


6.On next screen admin should choose correct NIC adapter on which he set IP parameter for NIM server ,NIM client
(AIX LPAR) ,subnetmask and NIM client gateway.

Network Parameters 

1. IP Parameters 
2. Adapter Configuration 
3. Ping Test

enter value which suits network environment in your orgnization

IP Parameters 
1. Client IP Address [x.x.x.x ] 
2. Server IP Address [x.x.x.x
3. Gateway IP Address [x.x.x.x
4. Subnet Mask [x.x.x.x



7. Do ping test to verify  whether NIM server is reachable from NIM client.


Network Parameters 

1. IP Parameters 
2. Adapter Configuration 
3. Ping Test


8.Return to MAIN screen


Main Menu 

1. Select Language 
2. Setup Remote IPL (Initial Program Load) 
3. Change SCSI Settings 
4. Select Console 
5. Select Boot Options

9.Next screen


1. Select Install/Boot Device 


10. select Network


Select Device Type 
1. Diskette 
2. Tape 
3. CD/DVD 
4. IDE 
5. Hard Drive 
6. Network 
7. List all Devices 



11. On next screen admin need to choose correct adapter for network boot.

12. Select Normal boot mode.

1. Information 
2. Normal Mode Boot
3. Service Mode Boot 

13.On next screen choose YES option

Are you sure you want to exit System Management Services? 
1. Yes 
2. No 

14.On next screen choose "Access a Root Volume Group".


Type the number of your choice and press Enter. 


0 Continue 

88 Help ? 
 99 Previous Menu 


15. After choosing  0 option and it will list volume group details .



Option1 Access this volume group and start a shell before mounting file systems
Option 2 Allows you to perform file system maintenance on /, /usr, /tmp, and /var before mounting them
.
16.choose correct volume group.

17.

choose option 1 and press Enter. 

1) Access this Volume Group and start a shell   
2) Access this Volume Group and start a shell before mounting filesystems 



18. If AIX admin wants to edit file he must set TERM to terminal type.


If you intend to use SMIT or vi, set your terminal type in preparation for editing the file.

terminal types are lft, ibm3151, or vt100.

        TERM=
        export TERM
when admin want to edit any configuration file at that point export of TERM variable will come in picture.

19.
Execute command
 #passwd root   //To chnage root passwd

set password
20. sync;sync;sync;reboot     //To save changes

Second method ,which i will say traditional one is using AIX OS media DVD to recover or reset password .

other solution for resetting AIX server root password are like below
1.Find Jump server from where trust(pass-wordless configuration) configured to affected server and 
reset password of root
2. Sudo root access to other user than root ,so that user can execute root user command to reset password.


Thanks