Showing posts with label DIFFERENCE. Show all posts
Showing posts with label DIFFERENCE. Show all posts

Thursday, February 25, 2016

Difference between 5.3 and 6.1 and 7.1 in aix?

Difference between 5.3 and 6.1 and 7.1 in aix?



AIX 5L 5.3, August 13, 2004
AIX V6.1, November 9, 2007
AIX V7.1, September 10, 2010



NFS Version 4
Workload Partitions (WPARs)
Support for 256 cores / 1024 threads in a single LPAR
Advanced Accounting
Live Application Mobility
The ability to run AIX V5.2 or V5.3 inside of a Workload Partition
Virtual SCSI
Live Partition Mobility
An XML profile based system configuration management utility
Virtual Ethernet
Role Based Access Control RBAC
Support for export of Fibre Channel adapters to WPARs
Exploitation of SMT
Encrypting JFS2 filesystem
VIOS disk support in a WPAR
Micro-Partitioning enablement
Trusted AIX
Cluster Aware AIX
POWER5 exploitation
Trusted Execution
AIX Event infrastructure
JFS2 quotas
Concurrent Kernel Maintenance
Live update for Interim Fixes
Ability to shrink a JFS2 filesystem
Systems Director Console for AIX
Flash based filesystem caching
 end of support April 30, 2012
 End of support April, 2017
Yet to announced










Sunday, December 13, 2015

How to export and mount the nfs filesystem in aix?

How to export and mount the nfs filesystem in aix?


1. Ground work:
We need the below information in hand and confirm the required deamon status.
            ü  Nfs Server name
            ü  Exported directory
            ü  Nfs Client name
            ü  Nfs local mount point name.
            ü  check showmount -e  --> To confirm the exported directory list.
            ü  showmount -a  --> To confirm the list of nfs client server names.

Server Side Configuration: Start the NFS and portmap daemon

# lslpp –L | grep bos.net*  --> Check the nfs server and client installed.
# startsrc –g nfs  --> start the nfs group deamon
# startsrc -s nfsd   --> start the nfsd deamon
# startsrc -s mountd  --> start the mountd deamon
# lssrc -g nfs  --> check the nfs group deamon in active state
# lssrc -s  nfsd  --> Check the nfsd deamon
# lssrc -s mountd  --> check the mountd deamon

•   Client Side Configuration:      Start the NFS and portmap daemon

# lslpp –L | grep bos.net*  --> Check the nfs server and client installed
# startsrc –g nfs   --> start the nfs group deamon
# startsrc –s portmap  --> start the portmap deamon.
# lssrc -s nfsd  --> check the nfs group deamon in active state
# lssrc -s portmap  --> Check the protmap deamon in active state.
# lssrc -s biod   --> Check the biod deamon in active state.


2. Exporting an NFS filesystem

Using Smitty:
# ls -l /etc/exports  --> Check exports file exits.
# cp -p /etc/exports /etc/exports_bak   --> Take the backup of the exports file.
# smitty mknfsexp  --> Exporting the nfs filesystem.
            Specify appropriate values in the PATHNAME of directory to export
             MODE to export directory,
            EXPORT directory now, system restart or both fields.
# cat /etc/exports  --> To confirm the exported directory are present on the /etc/exports.

Using Command line:

# cp -p /etc/exports /etc/exports_bak   --> Take the backup of the exports file.
# vi /etc/exports  --> To Create an entry for each directory to be exported, using the full path name of the directory.
# exportfs -a  --> To read the /etc/exports file and exports all the directories listed.
# showmount -e  --> To confirm the exported directory listed.
# showmount -a  --> To confirm the nfs client name and directory list.


3. Mounting the NFS filesystem on the client.

Using Smitty:
# showmount -e <server_name>  --> To verify the NFS server has exported the directory.
# mkdir /local_directory    --> To create the mounting directory if not already exist.
#  smitty mknfsmnt  --> mount the NFS filesystem.
            PATHNAME of mount point.
            PATHNAME of remote directory.
            HOST where remote directory resides.
            MOUNT now, add entry to /etc/filesystems or both?
            /etc/filesystems entry will mount the directory on system RESTART.
            MODE for this NFS file system.
 #df -gt <NFS mount_name>  --> To confirm the nfs filesystem has been mounted

Using Command line:
# showmount -e <server_name>  --> To verify the NFS server has exported the directory.
# mkdir /local_directory    --> To create the mounting directory if not already exist.
# mount ServerName:/remote/directory /local/directory 
 #df -gt <NFS mount_name>  --> To confirm the nfs filesystem has been mounted



4. Roll back

Unexporting the NFS filesystem on the NFS server

Using Smitty:

Login to the NFS server and follw the below procedure.
# cp -p /etc/exports  --> To copy the exports directory.
# smitty rmnfsexp  --> To unexport the nfs directory.

Using command line:
# vi /etc/exports --> To Find the entry for the directory you wish to unexport, and the delete that line.
# cat /etc/exports   --> To check the directory now is removed and unexported.
If NFS is current running,
#exportfs -u <directory_name  --> where dirname is the full path name of the directory you just deleted from the /etc/exports file.


Removing the NFS mount on the NFS client server.

Using Smitty:
#smitty rmnfsmnt
# cat /etc/filesystems  --> To confirm the entry has been deleted properly.

Using command line:
#umount <directoryname>   --> To unmount the directory.
# cp -p /etc/filesystems /etc/filesystems_bak   --> To take the backup of the /etc/filesytems file.
# vi /etc/filesystems  --> Find the entry for the directory you just unmounted, and then delete it.
# cat /etc/filesystems  --> To confirm the entry for the directory you just unmounted properly.


Note: If you happy about the above article, please leave your comments / Reactions.

Thursday, August 27, 2015

How to deal with SUID and SGID?

How to deal with SUID and SGID?


SUID

If you own an executable, and another person issues the executable, then it runs with your permission and not his.

A Good example of the use of suid is "whoami” command.

$ whoami
lee


$ sudo chmod u+s /usr/bin/whoami

$ whoami
root


$ sudo chmod u-s /usr/bin/whoami


Example: 2

Another Good example of the use of SUID bit is /usr/bin/passwd.

Only root user has permission to modify the /etc/passwd file. If that’s the case, how can a normal user change his password.

# ls -l /etc/passwd
-rw-r–r– 1 root sys 6001 Aug 27 10:00 /etc/passwd

#ls -l /usr/bin/passwd
-r-sr-sr-x root sys 27228 Aug 16 2007 /usr/bin/passwd


 /usr/bin/passwd has it’s SUID bit set. That means, irrespective of the user who is invoking the passwd program, the program always executes as the owner of the file (here root), granting it permission to modify /etc/passwd file.


Example: 3

             -rwxrwxrwx       lee     admin                 test1
           -rwx------            lee     admin                 test2

  Here, the test1 is the script which is intended to write some content to the test2.   Because test1 have exe permissions for others, others can run this script but others dont have write permissions to test2 and hence it will give error    .

Solution is to enable the suid.
   .

                      -rwsrwxrwx        lee     admin      test1
                   -rwx------           lee      admin         test2


Now the program runs as if the owner is executing hence the others can write data to the test2


And what is SGID used for ?

 It is used when you want a program to execute always as a member of it’s owners group.

# chmod 2754 test.sh
# ls -l
total 2 -rwxr-sr– 1 a435104 ccusers 50 Oct 17 05:28 test.sh

 * 4000 (chmod u+s) is suid; for files execute as owning user (often root).
 * 2000 (chmod g+s) is sgid; for files execute as owning group (often root); 

for directories the group on newly created files will be set to the directory’s group rather than the creator’s group. Typically used for shared directories.




If you happy with the above topic, please leave a comments/reactions.

Tuesday, August 25, 2015

getconf vs bootinfo commands in aix?

getconf vs bootinfo commands in aix?


We are not suppose to use bootinfo commads as it is deprecated. Some of the banking project, they wont use bootinfo commands. Lets see the equvalent command for bootinfo.


Description
GETCONF
BOOTINFO
To find out last boot device
getconf BOOT_DEVICE 
bootinfo -b
To find out the size of the disks
getconf DISK_SIZE /dev/hdisk0   
bootinfo -s hdisk0
To find out the real memory
getconf REAL_MEMORY
bootinfo -r
To find hardware bit mode
getconf HARDWARE_BITMODE   
bootinfo –K
To find out the kernal bit mode
getconf KERNEL_BITMODE
bootinfo -y



if you happy with the above article, please leave your reactions/comments

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.