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

Thursday, 26 April 2018

How to check Operating Systems Version is 64-bit or 32-Bit in AIX and Solaris

In this post, you can see how we will check the operating system is 32 bit or 64 bit. Normally when we download any software on Unix platform they have dependency regarding the operating system version. So after following my this post you can easily get the information about the operating system version information.
When you work on Unix operating system then you must know the version of operating system. Because without getting exact version of OS, you can not install the packages on the Linux system.

Here, I mentioned the command and their output using these commands you can easily found the version of operating system. It is 32 bit or 64 bit.

Linux Operating System:

#uname –a
Linux vibhor 3.10.0-229.el7.x86_64 #1 SMP Fri Mar 6 11:36:42 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

#uname  -m
x86_64

If the output has "x86_64",the environment is 64 bit.

Solaris Operating System:

#isainfo options

-v         Prints detailed information about the other options
-b         Prints the number of bits in the address space of the native instruction set.
-n         Prints the name of the native instruction set used by portable applications supported by the current version of the OS.
-k         Prints the name of the instruction set or sets that are used by the OS kernel components such as device drivers and STREAMS modules.

[vibhor]# isainfo -v

64-bit sparcv9 applications
        ima fmaf vis2 vis popc
32-bit sparc applications
        ima fmaf vis2 vis popc v8plus div32 mul32

[vibhor]# isainfo -b
64

[vibhor]#isainfo
sparcv9 sparc

The output for the above command should be sparcv9 sparc for a 64-bit operating System.

AIX Operating System:

vibhor:/> getconf -a | grep KERN
KERNEL_BITMODE:                         64

vibhor:/> bootinfo -y
64

The output of the above command should be 64 for a 64-bit hardware. The command must be executed as root.

Note: on AIX, the -y option will specify if the hardware is 32- or 64-bit mode while bootinfo -k will specify if the kernel is 32- or 64-bit (this command must be run as root).

HP-UX Operating system:
         
 hpx:/> getconf KERNEL_BITS
 64
         
The output of the above command should be 64 for a 64-bit operating system.

Monday, 24 July 2017

How to reset or change root password in AIX Operating System

If you forgotten the root password on AIX server, then please follow the below step by step method to recover or reset the root password.
 
➥ You need to insert the operating system same version media disk on cd/dvd rom and power on the AIX machine.
 
➥ When the screen of icons appears, or you hear a double beep sound from hardware of AIX, please press the F1 key repeatedly until the System Management Services menu appears.
 
➥ Select Multi boot option from the SMS (System Management Services) menu
 
➥ Select Install From option from multi boot screen.
 
➥ Select the device (CD rom) that keep the AIX operating system image and then select Install.
 
➥ Select the AIX version icon from the screen menu.
 
➥ Please describe your current system as the system console by pressing the F1 key and then press Enter.
 
➥ In this step you need to select the number of your preferred language and press Enter. In my case I use global language "English".
 
➥ Once you select the language in this step you need to select Start Maintenance Mode for System Recovery by typing 3 and press Enter.
 
➥ In the second last step you can ignore the messages like that "select Access a Root Volume Group".

A message displays explaining that you will not be able to return to the Installation menus without rebooting if you change the root volume group at this point.
 
➥ Please Type 0 and press Enter.

Type the number of the appropriate volume group from the list and press Enter.

Select Access this Volume Group and start a shell by typing 1 and press Enter.

At the # (number sign) prompt, type the passwd command at the command line prompt to reset the root password.

# passwd
Changing password for "root"
root's New password:
Enter the new password again:
 
➥ In the final step , you need to write everything from the buffer to the hard disk and reboot the system.

sync;sync;sync;reboot

When the login screen appears, the password you set in above step 11 should now permit access to root privileges.

Friday, 7 July 2017

How to configure NTP Server on AIX Operating system

NTP ( Network time Protocol) is one of the oldest internet protocol still in use and it allows the synchronization of computer clocks distributing UTC (Coordinated Universal Time) over the network.

Their are several ways to configure the NTP server in different linux servers but if you are doing configuration on AIX operating system it's seems tricky, So in this post you can aware about the step by step configuration of NTP in AIX.

Step by Step Configuration of NTP Server:

➤ In the initial step we must verify that we have check the available NTP server on AIX server. For this please run the below command.

ibm_aix:/>lssrc -ls xntpd
-----------------------------------------------
 Program name:    /usr/sbin/xntpd
 Version:         3
 Leap indicator:  00 (No leap second today.)
 Sys peer:        ntp.aix.in.com
 Sys stratum:     4
 Sys precision:   -18
 Debug/Tracing:   DISABLED
 Root distance:   0.014709
 Root dispersion: 0.066422
 Reference ID:    192.168.1.22
 Reference time:  dc721077.d3a8e000  Tue, Mar 14 2017  7:47:19.826
 Broadcast delay: 0.003906 (sec)
 Auth delay:      0.000122 (sec)
 System flags:    pll monitor filegen
 System uptime:   19248381 (sec)
 Clock stability: 0.000107 (sec)
 Clock frequency: 0.000000 (sec)
 Peer: ntp.aix.in.com
      flags: (configured)(sys peer)
      stratum:  3, version: 3
      our mode: client, his mode: server
 Peer: ntpuk.aix.in.com
      flags: (configured)(sys peer)
      stratum:  3, version: 3
      our mode: client, his mode: server
Subsystem         Group            PID          Status
xntpd            tcpip            8520514      active
------------------------------------------------------

You can found the above output once you run the above command to check the available NTP server. On my AIX machine if you see the sys peer should show a valid server (ntp.aix.in.com). If the server is not showing any ntp server then we need to correct it by adding a server line into /etc/ntp.conf and will take restart of "xntpd" services.

Note : In this post I will use my dummy NTP name instead of real NTP server because of security reason.

➤ As your NTP server is not configured and it is show "insame" then you need to add manual entry on the NTP configuration file.

ibm_aix:/>vi /etc/ntp.conf

server ntp.aix.in.com
server ntpuk.aix.in.com

Once you added these ntp server entry manually on the configuration file then please take a restart of NTP services.

ibm_aix:/>stopsrc -s xntpd
ibm_aix:/>startsrc -s xntpd

Using above command we can stop and start the "xntpd" service on AIX operating system.

➤ In this step you need to again verify the status of newly added NTP server.

ibm_aix:/>lssrc -ls xntpd

It is taking some time that time because it synchronize process is running. Once the synchronization has been complete and you run the above command you can found the NTP server entry as describe in Step 1.

Step by Step configuration of NTP Client:

➤ On the client machine you need to again verify that you have a server suitable for synchronization or not. For this please run the below command.

ibm_aix:/>ntpdate -d ntp.aix.in.com
-----------------------------------------------------------
14 Mar 08:16:21 ntpdate[64356890]: 3.4y
transmit(192.168.1.22)
receive(192.168.1.22)
transmit(192.168.1.22)
receive(192.168.1.22)
transmit(192.168.1.22)
transmit(192.168.1.22)
transmit(192.168.1.22)
server 192.168.1.22, port 123
stratum 16, precision -6, leap 11, trust 000
refid [63.15.23.11], delay 0.03688, dispersion 24.00334
transmitted 4, in filter 4
reference time:      00000000.00000000  Thu, Feb  7 2036  7:28:16.000
originate timestamp: dc721745.3ff1b000  Tue, Mar 14 2017  8:16:21.249
transmit timestamp:  dc721746.3d08a000  Tue, Mar 14 2017  8:16:22.238
filter delay:  0.03688  0.05624  0.00000  0.00000
               0.00000  0.00000  0.00000  0.00000
filter offset: -0.00081 -0.00750 0.000000 0.000000
               0.000000 0.000000 0.000000 0.000000
delay 0.03688, dispersion 24.00334
offset -0.000812

14 Mar 08:16:23 ntpdate[64356890]: no server suitable for synchronization found
--------------------------------------------------------------------------

If you get the message ," no server suitable for synchronization found", verify xntpd is running on the server also verify that no firewalls are blocking port 123.

➤ If the no server suitable for synchronization then you must specify the xntpd server in /etc/ntp.conf.

ibm_aix:/>vi /etc/ntp.conf

server ntp.aix.in.com

Once you added the NTP server entry on client configuration file then restart the "xntpd" service again.

ibm_aix:/>startsrc -s xntpd

➤ If you want to start the xntpd service on boot time then you need to uncomment the below lines on the configuration file.

ibm_aix:/>vi /etc/rc.tcpip

Unconmment the following line

start /usr/sbin/xntpd "$src-running"

➤ Now verify the NTP server on client machine has been synchronized or not. Please use the same command which we used for checking the status.

ibm_aix:/>lssrsc -ls xntpd

This time on the NTP client machine sys peer should display the IP Address or name of your "xntpd" server. As you know it is taking some time to synchronization so you must wait for time.

Sunday, 28 May 2017

How to add a new disk on Logical Volume Manager (LVM) in AIX Operating System

AIX logical volume manager (LVM) is a widely used tool for logical volume management which includes allocating disks and resizing logical volumes.

Using logical volume manager, a hard disk or set of hard disk is allocated to one or more physical volumes. Logical volume manage (LVM) allows users to create partitions from more than one disk and allows them to extend the filesystem size online within few seconds.

In below text, you can find how to add a new drive in AIX operating system using LVM.

Step by step method to add a new disk on LVM:

➤ Initially we need to add the new physical or virtual disk to the logical partition. After successfully adding virtual disk you need to re scan your server hardware so we can get the new disk information.

For scanning please run the below command on AIX server terminal.

ibm_aix:/> cfgmgr

The command output show you the available new disk which are connected to this AIX machine.

➤ Let’s assume that the new disk is hdisk01,please run the below command to check the disk.

ibm_aix:/> lsdev -Cc disk
hdisk00  Available  Virtual SCSI Disk Drive
hdisk01  Available  Virtual SCSI Disk Drive

In above output two disk is available hdisk00 & hdisk01.

➤ You need to create a new group and move the new disk hdisk01 in there. Let's assume the new group named is "rootvg". So please find the below command to create a new group and add the disk in it.

ibm_aix:/> mkvg -y rootvg hdisk01

in this step we add "hdisk01" into "rootvg".

➤ "lspv" command is used for getting an information about the new disk "hdisk01". Please find the "lspv" command output as given below.

ibm_aix:/> lspv hdisk01
PHYSICAL VOLUME:    hdisk01                   VOLUME GROUP:     rootvg
PV IDENTIFIER:      00f68f03d1e42951 VG IDENTIFIER     00f68f0300004c0000000153d1e429c1
PV STATE:           active
STALE PARTITIONS:   0                        ALLOCATABLE:      yes
PP SIZE:            128 megabyte(s)          LOGICAL VOLUMES:  17
TOTAL PPs:          799 (102272 megabytes)   VG DESCRIPTORS:   2
FREE PPs:           118 (15104 megabytes)    HOT SPARE:        no
USED PPs:           681 (87168 megabytes)    MAX REQUEST:      256 kilobytes
FREE DISTRIBUTION:  11..00..00..00..107
USED DISTRIBUTION:  149..160..159..160..53
MIRROR POOL:        None

If you look the above output you can see the all information regarding the new disk in details.

➤ In this step, you need to create a log logical volume for jfs2 file system and this needs to be part of volume group "rootvg".

ibm_aix:/> mklv -t jfs2log rootvg 1

➤ Please check the new logical volume (lv) and  used the "lsvg" command to check the new logical volume present on the AIX server.

ibm_aix:/> lsvg
rootvg

The command shown you he existing logical group on the server.

ibm_aix:/> lsvg -l rootvg
rootvg:
LV NAME             TYPE       LPs     PPs     PVs  LV STATE      MOUNT POINT
hd5                 boot       1       1       1    closed/syncd  N/A
hd6                 paging     404     404     1    open/syncd    N/A
loglv00             jfs2log    1       1       1    open/syncd    N/A
hd4                 jfs2       4       4       1    open/syncd    /

In above output, you can see "rootvg" is volume group present and in rootvg, you can find the logical volume "loglv00".Now we create a logical volume and fixed their size , lets assume we will used 20GB size and used the logical volume name lv_aix.

ibm_aix:/> lsvg rootvg
ibm_aix:/> mklv -t jfs2 -y lv_aix rootvg 30G
ibm_aix:/> mkfs -o log=/dev/loglv00 -V jfs2 /dev/lv_aix

➤ After successfully create filesystem, we will mount the filesystem to a particular folder.

ibm_aix:/> mkdir /aix
ibm_aix:/> mount -o log=/dev/loglv00 /dev/lv_aix /aix

So, nwly "/aix" filesystem has been created, for permanent it, please make an entry in "/etc/filesystems file. So when you will take a reboot of machine the filesystem not umount.

Please comment on the post, if you have any query regarding this topic.

Thursday, 18 May 2017

How to get the SAN Storage Information on AIX Operating System

If you are using IBM AIX Operating System and wants to work on Storage part, then you need understand basic of SAN fiber connectivity with server.

In blog, I would show you all the commands with an example, through which you can get an idea how SAN fiber connect with server and works.

➤ If you want to see how many fiber card (FC) adapter are present on the AIX operating system then please run the below command.

ibm_aix:/> lsdev -Cc adapter | grep fcs

"lsdev" command used for to check the FC adapter present on the IBM AIX servers. In the below line you can find the command output.

ibm_aix:/> lsdev -Cc adapter | grep fcs
fcs0    Available 00-00 8Gb PCI Express Dual Port FC Adapter (df1000f114108a03)
fcs1    Available 00-01 8Gb PCI Express Dual Port FC Adapter (df1000f114108a03)
fcs2    Available 03-00 8Gb PCI Express Dual Port FC Adapter (df1000f114108a03)
fcs3    Available 03-01 8Gb PCI Express Dual Port FC Adapter (df1000f114108a03)

In above command output, you can see on my AIX machine , I have 4 FC card adapter present. Each card adapter have dual port 8Gb. You can see the available adapter name like "fcs0,fcs1". It would be different on every AIX server depend up which type of storage you used.

➤ If you want to check WWN number or SAN ID, please use the below command to check specific information.

ibm_aix:/> lscfg -vl fcs2 | grep "Network Address"
        Network Address.............10000090FAC8D594

In above example, "lscfg" command use to check the all information about a adapter. In my machine , I need an information about WWN  of third adapter "fcs2" which are present on the AIX server. 

This command show you the wwn or SAN ID number which are connected to the server.

➤ If you want to see the fiber card adapter current status, then please use the below command. This command show you regarding the fiber health and all the information regarding the fiber.

ibm_aix:/> fcstat fcs0

FIBRE CHANNEL STATISTICS REPORT: fcs0

Device Type: FC Adapter (adapter/pciex/df1000f114108a0)
Serial Number: 1A550004C1
Option ROM Version: 027820F5
ZA: U2D2.03X5
World Wide Node Name: 0x20000090FACA86B4
World Wide Port Name: 0x10000090FACA86B4

Output of this command "fcstat" is very long so I can not write here, you can run this command on your AIX platform and check all the information. 

Please post your comment on this blog, if you have any query regarding this topic. I will try to resolve your query as earliest.