Thursday, May 28, 2015

What is the difference between soft mount and hard mount in aix?

What is the difference between soft mount and hard mount in aix?


Scenario:

·        After reboot, the target server is trying to mount the nfs filesystem as part of boot process, in the same time the source server went to offline or some one reboot the source server, in this case what will happen.

·        if the filesystem mounted to the target server as soft mount, then it will contact the source server and tring to mount the filesystem, if it does not get the source server within a while, then it will stop to contact the source server and  make the target server to come online without mounting the filesystem.

·        If the filesystem mounted to the target server as hard mount, then it will wait until the source server to come online to mount the filesystem as per the above scenario, so in this case the target server can not up until the source server is accessible.


Simply we can explain like below.

·        A soft mount will return an error if the source server goes offline.

·        A hard mount will wait until the server comes back online, and then begin to transferring /copying again.


·        It is really best practice when you mount the filesystem as soft mount. 




If you happy with the above topic, please leave your reactions.

Tuesday, May 26, 2015

How about jfs and jfs2 differ in aix?

How about jfs and jfs2 differ in aix?



Still some of the aix interview, they are asking about the difference between jfs and jfs2. The main difference would be shrink the filesystem in jfs2 and not possible in jfs. However we have to answer the question when the interviewer asked. Here are the differenciation below.


Function
JFS
JFS2

Max.Filesystem size
1 TB
4 PB
Max File size
64 GB
4 PB
No.of i-nodes
16MB
Dynamic
i-node size
128 bytes
512 bytes
Fragment
512 bytes
512 bytes
Data block size
4096 bytes
4096 bytes
Compression
Yes
No
SGID
On
Off
INLINE log
No
Yes
File system size decrease
No
Yes















If you happy with the above topic, please leave your reactions below.

Sunday, May 24, 2015

How to find out the top ten space consuming files in aix?

How to find out the top ten space consuming files in aix?


As a system admin, daily we are facing the disk utilization for the root and non root filesystems. At that time we need to find out the highly utilized files and based on the confirmation we proceed with housekeep.

If we receive /var filesystem utilizing above the threshold limit, we need to use the below command to find out the highly space consuming files. 


find /var -xdev -ls|sort +6rn|head -20


What the command will do?:

The command is really very very useful to find out top 20 high space consuming files under /var. The command check all the directory and sub-directory of /var and find out the highly space consuming files and display it. You can find out the file size on the 6th column and the files are list out in reverse order which means highly space consuming files are list out in first.

Note: please change the filesystem name on the second place of the command according to you.





If you like the above topic, please leave your reactions.

Saturday, May 23, 2015

How to confirm the mksysb backup is good for restore in aix?

How to confirm the mksysb backup is good for restore in aix?


Being as a system admin, many times we are dealing with mksysb backup. We need to take the mksysb backup before we are doing any maintenance activity. 

If you executing the mksysb backup, then you can able to identify whether the mksysb is successfully taken or not by the output of the mksysb command. In case, someone already taken the mksysb or script taken the mksysb, in this case you really should not know the mksysb backup is successfully taken or not.

Actually speaking, There is no true verification of the “restorability” of a mksysb other than actually restoring it. Taking precautions such as understanding the flags used for the creation of the mksysb, checking your error report for any serious disk related errors before running the mksysb, and verifying the readability of the mksysb after creation are all good checks.

To verify the readability of your backup run the following command.

listvgbackup -f <mksysb_name>

#listvgbackup –f /tmp/mksysb_tst01

once you execute the command, It will list out a long output, dont panic.if you get the prompt (#) then we can confirm that the mksysb is backed up successfully without any issues.

Any errors that occur while reading the headers of any of the files will be displayed, otherwise only the initial backup header information will be displayed. Keep in mind that this check tests the readability of the data only, not the writeability.


If you happy with above topic, Kindly rate your reactions/comments below

Friday, May 22, 2015

How to set alias in aix?

How to set alias in aix?


I frequently working on vio server, everytime i wanna execute the vio command, i need to go to vio prompt and then execute the commands, to make my work easier, I am going to put the alias for the /usr/ios/cli/ioscli command.

By using aliases, you can save a lot of time when doing tasks you do frequently.

Please find the syntax for creating an alias below:

alias Name=String

Note: The Name parameter specifies the name of the alias, and the String parameter specifies a string of characters. If String contains blank spaces, enclose it in quotation marks.


To create an alias for the command /usr/ios/cli/ioscli at the prompt, type the following:

alias viocmd=/usr/ios/cli/ioscli

 In this example, whenever I enter the command viocmd, the actual command performed is =/usr/ios/cli/ioscli


For example: On vio server Instead of executing #/usr/ios/cli/ioscli lsmap -all in aix prompt, i can execute with the alias like below.

                   #viocmd lsmap -all


Example 2:

To create an alias for the command rm -i at the prompt, type below
alias rm="/usr/bin/rm -i"

To display all the aliases we have, type the following:
alias

The output is like below

viocmd=/usr/ios/cli/ioscli
rm="/usr/bin/rm -i"


If you happy with above topic, Kindly rate your reactions/comments below

Friday, May 15, 2015

How to open and close the virtual terminal (console) session?

How to open and close the virtual terminal (console) session?


 A virtual terminal window is available for each partition or Full System Partition of the managed system. 

 In Command Line:

To open a console:  mkvterm -m <managed-system> -p <partition-name>
Example:                    mkvterm -m frame1  -p lpar07

To close a console: rmvterm -m  <managed-system>  -p <Partition-name>

Example:                   rmvterm -m frame1  -p lpar07



Note: When the managed system is powered off, you can use mkvterm –m <managed-system> to open a virtual terminal to access the service processor menu.

-------------------------------------------------------------------------------------------------------
Detailed Explanation
In HMC:

To open the virtual terminal window

1. Expand the System and Partition folder in the navigation area.
2. Select the Server Management application.
3. Select the frame in which the target managed system resides.
4. Select the managed system on which the target partition is running.
5. Expand the Partitions tree.
6. Select the target partition and right-click on it.
7. Select the Open Terminal menu.

Close a virtual terminal window

To close a virtual terminal window, click the X in the top-right corner of the panel. To force a virtual terminal window to close, select the partition, right-click, and then select Close Terminal Connection.

---------------------------------------------------------------------------------------------------

How about IPAT via IP aliases and IPAT via IP replacements?

When IPAT via IP Aliases is used

The service IP label/address is aliased onto the same network interface as an existing communications interface. 

That is, multiple IP addresses/labels are configured on the same network interface at the same time. In this configuration, all IP addresses/labels that you define must be configured on different subnets.

This method can save hardware, but requires additional subnets.



When IPAT via IP Replacement is used

The service IP label/address replaces the existing IP label/address on the network interface. 

That is, only one IP label/address is configured on the same network interface at the same time. In this configuration, two IP addresses/labels on a node can share a subnet, while a backup IP label/address on the node must be on a different subnet. 

This method can save subnets but requires additional hardware.
-----------------------------------------------------------------

Notes:

IPAT via IP Aliases provides the following advantages over the IPAT via IP Replacement scheme:

**Running IP Address Takeover via IP Aliases is faster than running IPAT via IP Replacement, because 
moving the IP address and the hardware address takes considerably longer than simply moving the IP
address.

**IP aliasing allows co-existence of multiple service labels on the same network interface— you can use 
fewer physical network interface cards in your cluster. Note that upon fallover, HACMP equally

distributes aliases between available network interface cards.


How to deal with NFS Mount issue in aix?

How to deal with NFS Mount issue in aix?


Most of the time we are facing the NFS mount issue. Please follow the below steps to troubleshoot and fix the NFS mount issue.

1) Execute the below command on the nfs client server to confirm which ip the client wil use on its mount.

traceroute <NFS server hostname>

2) Confirm the IP address getting from the above command added on the nfs server's /etc/hosts, if not added the IP address on the /etc/hosts of the nfs server or else added on the dns.

3) Execute the below command on the NFS server to confirm it will show the nfs client hostname

host <ipaddress>

4) check /etc/exports on the nfs server to confirm the hostname (client server)if we want to access.

5) now try with Mount command.



How to monitor the status of the mirrorvg in aix?

How to monitor the status of the mirrorvg in aix?


If you run the mirrorvg command, it will lock the rootvg volume group and also you could not able to identify the status of the mirrorvg and you could not able guess how long it will take to complete the sync process.

But using below, you could able to identify the status of the sync, i mean you can able to identify how many stale pp still there to sync up. 

METHOD 1:

Mirror the rootvg Volume Group by executing below command:
#mirrorvg –S rootvg     (The ‘-S’ option  (Uppercase ‘S’) is for Background sync)

Type the following command to find out whether the disks are synchronized or not
#lsvg rootvg|grep STALE
STALE PVs: 1 STALE PPs: 34

Note: Wait until the ‘STALE PPs’ becomes 0 (zero), the synchronization time depends on the size of the  hard disk


METHOD2:

mirrorvg -s rootvg hdisk1    ('s' is in lower case)

Mirroring complete immediately after executing the below command with -s flag, but we have to execute the syncvg command by ourself.

syncvg -P 4 -v rootvg

-P flag is for number of threads that should be started to perform the sync process. it can not lock the volume group. so we can track the mirroring by another window.

Take the another window:

lsvg rootvg | grep STALE | xargs
STALE PVs: 1 STALE PPs: 95

Note: Wait until the ‘STALE PPs’ becomes 0 (zero), the synchronization time depends on the size of the  hard disk