How 2 Know
If you can't Google it, You Can Knowing it.

Archive for the ‘Operating Systems’ Category

How 2 Know OS Version on alt_inst_rootvg online

Thursday, September 2nd, 2021

 

There is a helpful command to check the OS Release on the Alternative Disk in AIX without booting from it or wakeup

 

/usr/lpp/bosinst/blvset -d /dev/hdisk0 -g level

Continue Reading…

List ALL ASM Disks with header ( AIX )

Thursday, September 2nd, 2021

Hello ALL,,

 

Below is script Tested on AIX Environments to List ALL ASM Disks ( Oracle ASM ) with SN , Header of DIsk , Major and Minor ,,

 

Continue Reading…

AIX Duplicate Node ID

Friday, December 14th, 2018

This small article describes how to change the ct_node_id in case two LPARs have the same.

1. Duplicate Node ID after LPAR Cloning

When you clone an LPAR by splitting up a copy of the rootvg of an existing LPAR on storage level, both the original and the cloned rootvg have the same /etc/ct_node_id. This confuses the HMC and communication between LPAR and HMC will only partly work. DLPAR for instance doesn’t work if two LPARs have the same node ID in /etc/ct_node_id.

Continue Reading…

Detect SAN Switch from AIX Side

Tuesday, August 28th, 2018

Sometimes AIX Admin need to be sure that the System is connected to different SAN Switch for more redundancy and stability.

Follow below steps to check SAN Switches from AIX Side:

 # lsdev |grep fc
fcs0       Available 24-T1       Virtual Fibre Channel Client Adapter
fcs1       Available 24-T1       Virtual Fibre Channel Client Adapter
# lsattr -El fscsi0 |grep -i scsi_id
scsi_id     0xdf0707  Adapter SCSI ID                       False
# lsattr -El fscsi1 |grep -i scsi_id
scsi_id     0xde0718  Adapter SCSI ID                       False

Continue Reading…

Recursively replacing a string in all files in a directory

Wednesday, April 11th, 2018

You can use the following command to change Specific string on all files under specific directory:

find /u01/directory -type f | xargs perl -pi~ -e ‘s/oldtext/newtext/g;’

Tested on Linux & AIX

Ref:
https://blogs.oracle.com/rammenon/recursively-replacing-a-string-in-all-files-in-a-directory-linux

Solaris Quick Start

Sunday, September 3rd, 2017

You can download the following PDF which you can use it for a quick start on Solaris:

solaris-quicksheet

the PDF file taking about the following outlines:

Continue Reading…

Shell Script Quick Sheet

Sunday, September 3rd, 2017

The following link containing a quick sheet to start on Shell Script:

shell-quicksheet

The Sheet has the following outline:
Variables
Relational operators
Pattern matching
Functions
Shell math
Test conditions
Flow control
Sample snippets
Special variables
Conditional commands
Trapping signals
Output redirection
Variable substitution

Continue Reading…

Change default values on ODM for Fibre

Sunday, August 20th, 2017

Hello Everybody …

Sometimes for performance recommendations or redundancy solutions, you will need to change some parameters on fibre card, like fc_err_recov & dyntrk

TEST_SERVER#lsattr -El fscsi0
attach       none      How this adapter is CONNECTED         False
dyntrk       yes       Dynamic Tracking of FC Devices        True+
fc_err_recov delayed FC Fabric Event Error RECOVERY Policy True+
scsi_id                Adapter SCSI ID                       False
sw_fc_class  3         FC Class for Fabric                   True

 Continue Reading...

Script to list disks Info

Sunday, August 20th, 2017

Hello Everybody,

The following lines are a for loop script to display disks info @ AIX System (Disk Name, Disk Unique ID, Disk Size in MB) and of course you can customize the data by add more columns:

Continue Reading…

Couldn’t canonicalise: Permission denied

Wednesday, January 13th, 2016

If your work on AIX System (or any other UNIX/Linux Distribution), may be you face the following Message when you try to access SFTP:

Couldn't canonicalise: Permission denied
Need cwd

after many troubleshooting :
– user can access SSH without any problem.
– user can’t access SFTP
– you can switch on this user normally.

Continue Reading…