Tanti Technology

My photo
Bangalore, karnataka, India
Multi-platform UNIX systems consultant and administrator in mutualized and virtualized environments I have 4.5+ years experience in AIX system Administration field. This site will be helpful for system administrator in their day to day activities.Your comments on posts are welcome.This blog is all about IBM AIX Unix flavour. This blog will be used by System admins who will be using AIX in their work life. It can also be used for those newbies who want to get certifications in AIX Administration. This blog will be updated frequently to help the system admins and other new learners. DISCLAIMER: Please note that blog owner takes no responsibility of any kind for any type of data loss or damage by trying any of the command/method mentioned in this blog. You may use the commands/method/scripts on your own responsibility. If you find something useful, a comment would be appreciated to let other viewers also know that the solution/method work(ed) for you.

Sunday, 5 January 2014

NFS Interview Questions :



Q: - Explain this entry /shared 192.168.1.0/255.255.255.0(sync,rw)
allows all systems with 192.168.1.* IP addresses read-write access to the /shared/ directory:

Q: - What will happened if a space is given inbetween allowed_hosts and (options)

If a space is included, the options are applied to any and all IP addresses, which can be quite dangerous if write permission is granted.



Q: - What is the role of "sync" option for NFS server

If sync is specified, the server waits until the request is written to disk before responding to the client. The sync option is recommended because it follows the NFS protocol.

Q: - How to retrieve a list of clients connected to the NFS server ?

To retrieve a list of clients connected to the NFS server, use the showmount command
from a shell prompt. To also show the directories the clients are connected to, use the
showmount -a command.

Q: - Name of Configuration file for NFS Server ?

/etc/exports


Q: - What is meaning of "no_root_squash" option ?

Treat remote root user as local root. Do not map requests from root to the anony-
mous user and group ID.

Q: - What is NFS ?

NFS stands for Network File System. NFS was originally developed by Sun Microsystems in the 1980's. NFS allows remote hosts to mount file systems over a network and interact with those file systems as though they are mounted locally. This enables system administrators to consolidate resources onto centralized servers on the network.


Q: - Which NFS versions are available ?

NFS Version 2
NFS Version 3
NFS Version 4


Q: - What is different between NFS Version 2 & 3 ?

nfs 2 default 8kb transfer rate,it did not check the authentication at the time connection.client wants to access unauthorized file it shows error messages like "write error","read error" nfs 3 32kb transfer rate. It check at the time connection- ACL Support

Q: - Can we grant access by Username and password for nfs share?
No, access is granted only for IP address.

Q: - What is the role of "all_squash" option?
Treat all client users as anonymous users. Map all user and group IDs to the anonymous user and group ID.

Q: - Explain "exportfs" command?
The exportfs command is used to maintain the current table of exported file systems for NFS.

Q: - Explain command "/usr/sbin/exportfs -f"?
It will flush everything out of the kernels export table. Any clients that are active will get new entries added by mountd when they make their next request

Q: - Which option is used with exportfs command to display the current export list, also displays the list of export options?
exportfs -v

Q: - Which option is used with exportfs command to re-export all directories?
exportfs -r

Q: - How you will export directory (/data) to host 192.168.1.51, allowing asynchronous writes without adding the entry in /etc/exports file?
 # exportfs -o async 192.168.1.51:/data

Q: - Which kernel module is used by "rpc.nfsd"?
nfsd.o kernel module

Q: - Explain the working of NFS mount daemon "rpc.mountd"?
The rpc.mountd program implements the NFS mount protocol. When receiving a MOUNT request from an NFS client, it checks the request against the list of currently exported file systems. If the client is permitted to mount the file system, rpc.mountd obtains a file handle for requested directory and returns it to the client.

Q: - What is the role of "rmtab" File for NFS Server?
For every mount request received from an NFS client, rpc.mountd adds an entry to the /var/lib/nfs/rmtab file. When receiving an unmount request, that entry is removed.

Q: - Explain "Soft Mounting" option at NFS Client?

if a file request fails, the NFS client will report an error to the process on the client machine requesting the file access. if it cannot be satisfied (for example, the server is down), then it quits. This is called soft mounting.

Q: - Explain "Hard Mounting" option at NFS Client?
If a file request fails, the NFS client will report an error to the process on the client machine requesting the file access. if it cannot be satisfied, then it will not quit until the request is satisfied. This is called Hard mounting.

Q: - What is "portmap"?
The portmapper keeps a list of what services are running on what ports. This list is used by a connecting machine to see what ports it wants to talk to access certain services.

Q: - How you will check "portmap" service is running or not?
rpcinfo -p

Q: - I am unable to mount a NFS share. How will you trace out the reason?
Firstly, check that you have permissions to mount nfs share or not. Check /etc/exports file.
Secondly you can get RPC error: Program Not Registered (or another "RPC" error)
For this check your NFS server and portmap service running or not by "rpcinfo -p"

Q: - Can I modify export permissions without needing to remount clients in order to have them take effect?
Yes. The safest thing to do is edit /etc/exports and run "exportfs -r".

Q: - Is rpc.mountd daemon supports TCP_WRAPPERS?
Yes, The rpc.mountd daemon is protected by the tcp_wrappers. You have to give the clients access to rpc.mountd if they should be allowed to use NFS Server.

Q: - Explain "nfsstat" command?
The nfsstat command displays the statistics about NFS client and NFS server activity.

Q: - What do you understand by "nfsstat -o all -234" command?
It will Show all information about all versions of NFS.

Paging Space...............

 

Paging Space

  • What is Paging Space:
    • Its a secondary storage area for
      • Inactive memory
      • Over-committed memory
    • Hold the Inactive pages on disk
    • It is the substitute for real memory




Commands for Paging Space

  • Checking the Paging space
    • User lsps command with options -a (details information about paging) and -s (summary of paginig space)
               

  • Adding a Paging Space
    • We can add the pagging space by using mkps command or by using smit mkps
         Example:  mkps  [-a] [-n] [-t type] -s NumLPs Vgname [PVnames]
      • Options Used:
        • -s NumLPs : Set the size of the new paging in logical partitions
        • -a      : Activate the aging space at next restart (adds it to /etc/swapsspaces)
        • -n     : Activate the paging space immediately
        • -t type : Specifies the type of paging space (lv or nfs)
                                 mkps -s 5 -n -a rootvg hdisk0

  • Changing Paging Space:
    • We can change the Paging space using command chps   or   smit chps
        Example :  chps [-s] [-d] [number of PP] [Paging name]

    • Options Used:
      • -d  : delete the logical PP from given Paging space
      • -s  : add the LPS to the Paging space
                chps -d 1 paging00   ---It will delete 1 LP from Paging space
                chps  -s 1 paging00   ---It will add 1 LP to paging space



  • Removing the Paging Space:  We can remove the paging space by using rmps command
    • Syntax  :  rmps 
    •  Example   rmps paging01

File System Administration

 

Journaled file System

Two type supported by AIX

    • JFS    : Journaled File System
    • JFS2  : Enhanced JFS

Journaling :

  •  Before writing the actual data, a journaling file system logs the metadata to a circular JFS log on disk.
  • In the event of an OS crash, journaling retores consistencu by processing the information in the JFS log file.

JFS

  • Original AIX file system
  • Developed for transaction-oriented, high performance Power system
  • Both scaleable and robust
  • Logging feature available.
  • Its recoverable file system which means that even if the system crash, no fle system transaction will be  in an inconsistence state.

JFS2

  • Default file system on AIX since version 5.3
  • Filesystem can be dynamically increased and decreased.
  • Data encryption
  • Both internal and external  logging available
  • Support Snapshot.
  • Support for larger enable filesystem
  • Minium Size of JFS2 file is 16MB

Steps involve in making FS

  • Create a file system on volume group using crfs command
  • mount it on directory   ( In order to activate that file system)

***  Each time we do any FS command, an entry is made in /etc/filesystems file


Command related to File system

Most important file system :  /etc/filesystems
  • Creating a JFS2 file system : 

    • The crfs creates a file system on a logical volume within a previously created volume group. We can also use smit crfs_j2  for same operation.
    • A new logical volume is created for the filessystem and a entry is made into /etc/filesystems. 
    • The Options include:
      • -v   : Filesystem type ( Example: jfs2)
      • -m  : mount point
      • -A  : mount automatically on reboot or not
      • -p   : Mount as ro/rw
      • -l    : size of log volume in case of jfs
      • -g   : volume group name
      • -d   : logical volume group name
      • -a   : size of file system
 
    • Example:  Creating a file system without mentioning a Logical Volume name
      • crfs -v jfs2  -g  rootvg  -a size=16M  -m  /data

                         

By default a logical volume name : fslv02 is created

We have to mount the FS over the mount point in order to user the FS



 

    • Example:  Creating a file system by mentioning a logical volume name
      • crfs -v jfs2 -d datalv1 -a size=20M  -m  /data




  • Changing the size of File system:

    •  We can increase (+), decrease(-) the size of File system by using chfs command with -a size options
    • The minium size you can decrease by is 16M
                               chfs -a size=* 

    • Example: Increaing the File System :   chfs -a size=+21M /data 



    • Example:  Decreaing the size of file sytem :  chfs -a size=-128M /data




  • Removing the JFS2 file system

    • The file system must first be unmounted.
    • We can remove the FS  by using smitty rmfs2   or   rmfs
    • Options for rmfs command are :
      • -r    : Remove the mountpoint of the system
      • -i    : Display warning and prompt the user to remove the file system




AIX LVM Concept

 


Components Of AIX Storage System



As a front user, we always work on Files and Directories. But as we also work as System Admin, we have to work with Physical Storage, Logical Storage and File System. These thing are manage with help of Logical Volume Manager i.e LVM

Definition of  LVM :  Set of commands and other tools that allow user to create and manage Logical Volume Storage.

  • LVM helps in storing data on logical volumes across multiple physical volumes (Physical volume is also called Physical hardisk)
  • Non Contiguous data on physical volume appears to be contiguous on logical volumes.
Advantages of Using LVM:
  • Data Integrity
  • Mirroring of LV can be done
  • Speed
  • Flexibility  in term of expansion, deletion.
  • LV size can be increase on demand.
  • Size of file system can be increaed or decreased as per application requirement.
Comman Terms used in LVM:
  • Physical Volume (PV)       : Physical hard disk which we can see and touch.
  • Volume Group    (VG)       : Two or more group of Physical hard disk forms Volume Group.
  • Physical Partition (PP)      : Data on PV is store in small unit of equal size called PP
  • Logical Partition (LP)        : Data on LV is store in smaller unit called LP
  • Logical Volume (LV)         : Creating Logical layer (i.e group of LP) on VG.
  • Volume Group Descriptor Area:  Small storage area on each PV of a VG which contain information about the Volume Group






Types of Volume Group: There are three type of Volume group present. By default if we are using SMIT for making Volume Group then Original VG is created.





Points to keep in Mind
  • Size of LP is equal to that of PP. Higher the number of PP's allocatd, lower is the performance.
  • LP and PP are always configure in 1:1,  1:2,  1:3  ratio (respectively) depending upon the requirement of application mirroring done.
                                                  LP     :   PP
                                                    1     :    1
                                                    1      :   2
                                                    1      :   3
  • Mirroring of data is done in order to increaese the DATA AVAILABILITY but the performance is reduce.
  • A mirror LV is slower in perfomance as compared to unmirrored LV as the data is written in 2 or 3 place.
  • Maxium we can make only 3 copies of same data.

Volume Group Commands


We can used both SMIT or command for creating Volume group, LV etc

SMIT : System Management Interface Tool 
  • It provides menu driven interface that provides access to most of common system management function within one consistent environment.

  1. #smit lvm : It will give four options. Move the cursor to desire item and press Enter.
      • Volume Group
      • Logical Volume 
      • Physical Volume
      • Paging space
  2. #smit mkvg   or  mkvg -y : Used to create a Vg
             Example:     mkvg -y  testvg1 hdisk1 hdisk2          Its Original Vg
                                mkvg -S  testvg1 hdisk1 hdisk2         Its Scalable Vg
              
     3.  #lsvg   or  #lsvg -o    or   #lsvg    : List all the volume group

            Example:     lsvg                                                    It will give all the Vg in the system.
                               lsvg -o                                               Show all the active VG.
                               lsvg rootvg                                        Give details about the rootvg.
                               lsvg -p rootvg                                    Gives all physical hdisk in the rootvg.
                               lsvg -l rootvg                                     Gives details about logical volume

     4.  #smit chvg   or    #chvg < attribute value >  < VG name>  : Used to change the properties of VG

            Example:     chvg -a y -Q y datavg                       It will activate and QUORUM is set.


      5. #extendvg -f   < hdiskn >  :We can add extra hdisk to volume group using this comd.

            Example:     extendvg -f rootvg  hdisk3                 It will add hdisk3 to rootvg 
                               lsvg -p rootvg                                   It will show the all hdisk of rootvg

     6.  #reducevg -f   : We can remove a hdisk from a volume group.

            Example:     reducevg -f rootvg hdisk3                  It will remove the hdisk3 from rootvg.
                               lsvg -p rootvg                                   We will not able to see hdisk3
                                            
                               reducevg -df rootvg hdisk3               We are deallocating the hdisk3 for vg

     7. #smit varyonvg    or     varyonvg     : To activate the Volume group

            Example:     varyonvg datavg                               Datavg will be online and we can used it

    8.  #smit varyoffvg   or   varyoffvg     :  To deactivate the Volume Group

            Exmple:      varyoffvg  datavg                              Datavg will be offline and we cannot used it
  
     9.  #smit exportvg  or    exportvg   : If we are having volume group on one or more external disks that we want to access on another system, we must first export the volume group from the current system using the exportvg command. This will remove all the information about volume group from the system. To export a volume group,it must be inactive 
  
            Example:   exportvg datavg                              It will remove the entry from the system

   10.  #smit importvg    or   importvg  -y : To access an exported volume group on a system, it must be imported to the system using the importvg command. Never attempt to import rootvg

           Example:   importvg  -y  datavg  hdisk3          It will make the entry on other system.

Logical Volume Commands

  • #smit  lv : This will show the various options related to Logical Volume. It include following these options.
        • List All Logical Volume by Volume Group.
        • Add a Logical Volume.
        • Set characteristic of a Logical Volume
        • Shown characteristic of a Logical Volume.
        • Remove a Logical Volume.
        • Copy a Logical volume.
           Select above mention options and press Enter to continue.

  • Adding a Logical Volume:
    • #smit  mklv      or
    • mklv -y -t -c
         Example:  mklv -y testlv -t jfs2 -c 2 testvg 10 hdisk2 hdisk3
    • The name of logical volume can be specified or a system generated name is userd.
    • The volume group the logical volume belong to and the size must be specified
      •  : This factor decide the size of LV.
  • Show LV characteristic:
    • lslv       : Show details of LV
    • lslv  -l   : Show the PV to which LV belong.
  • Show the LP to PP relationship on the disk :
    • lslv -m    : It will shown the LP to which PP it is mapped.
           Example:   #lslv  -m  testlv
                             testlv :N/A

  • Reorganizing logical volume in a volume group
    • # reorgvg  
              Example :  reorgvg  testvg  hd2 hd4
    • reorgvg command is used to redistribute the PP of the LV of a VG according to their preferred allocation policies.

  • Add copies to a Logical Volume
    • smit mklvcopy
    • #mklv  -k  
            Example:    mklvcopy -k  testlv  3  hdisk4

    • mklv command is used to add up to 3 copies to a logical volume
    • We should synchronizing the LV so that we get a consistence data.
      • It can be done using   -k   option while creating the copies
      • or   syncvg command in order to synchronize it later.

  • Increasing the size of a Logical Volume :
    • smit extendlv
    • #extendlv    
           Example:     extendlv  testlv  20                    : It will add 20 PP to LV.

  • Remove a logical volume :
    • smit  rmlv
    • #rmlv -f  

  • List all the logical volume by volume group :
    • lsvg -o  |  lsvg -il      

  • Mirroring volume group :
    • smit mirrorvg
    • mirrorvg    
      • mirrorvg command takes all the logical  volume on a given volume group and mirror those logical volumes
      • Same thing can be done using mklvcopy command for each individual logical volume present in a volume group
      • Before mirroring, target disk should be the part of volume group ( Use  extendvg testvg hdisk9)
      • While doing mirroring,we have to do synchronization of mirror.
      • Use  -S ( background Sync)  or  -s  (disable sync) options.
      • If we are having only two disk in a volume group to be mirror, Keep Quorum Checking On should be false 
  • Mirroring rootvg : Steps involves


      1. Add the target hdisk to rootvg before mirroring
          • extendvg rootvg hdisk3 
      2. Create a mirror for rootvg
          • mirrorvg -S rootvg hdisk3
      3. Create a boot image on mirrored disk,using bosboot command.
          • bosboot -ad /dev/hdisk3
      4. Add the newly mirrored to the bootlist
          • bootlist -m normal hdisk0 hdisk3
      5. Shutdown and reboot the system ( not required with AIX6 and later)
          • shutdown -Fr 



Physical Volume Commands

  • Physical Volume ( PV )  : It can be hard disk, a virtual disk or a LUN
  • Physical Partition ( PP )  : Smallest unit of allocation on a Physical disk
    • PP is a fixed size , contiguous set of bytes on a PV
    • PP must be same across an entire volume group.
    • Each Volume group can have different size of PP

  • Menu for Physical Volume in SMIT
    • smit pv    : It will show following options. Choose one and press enter to continues
      • List all Physical Volume in System.
      • Add a disk
      • Change characteristic of a Physical Volume
      • List Content of a Physical Volume
      • Move Content of a Physical Volume

  • To list the physical volume information.
    • lspv               : It will display all the physical volume present in the system
    • lspv hdisk3    : It will show the properties for hdisk3

  • To list  all the logical volume on a physical volume:
    • lspv  -l  hdisk3  : It will show all the logical volume present on physical hard disk 3

  • To list a physical volume partition map
    • lspv  -p  hdisk0


  • To Add or Move the content of Physical Volume
    • Disk are configure to AIX through Configure Manager  ( or run cfgmgr )
    • To move the contents of a physical volume
      • # migratepv  -l    
      • Example      migrate -l  testlv  hdisk0  hdisk7

    • migratepv command can be used to 
      • move  paritions from  selected physical volume to other physical volume in same volume group

Exercise on LVM

 

This section will contain 3 section on various topics which we have cover in LVM blog. It will contain questions along with there command  in blue color.It will be step by step process so that you can easily understand the concept.  Hope this will be fruitful for new commers who want to learn AIX.    
                                                             ......Happy Learning........

Section 1 : Creating and Modifying Volume Groups 

  • Create a new Original volume group on hdisk2 called OrigVg
    • mkvg -y OrigVg hdisk2     or   mkvg -fy OrigVg hdisk2
  • Add free disk, hdisk1 into rootvg and hdisk3 into OrigVg
    • extendvg rootvg hdisk1     or  extendvg -f rootvg hdisk1
    • extendvg OrigVg hdisk3   or   extendvg -f  OrigVg hdisk3
  • Check that hdisk1 is associated with rootvg and hdisk3 is associated with OrigVg
    • lsvg -p rootvg                  or    lspv
    • lsvg -p OrigVg                 or   lspv
  • Remove the disk hdisk3 from OrigVg 
    • reducevg OrigVg hdisk3
  • Verify that disk is no longer associated with OrigVg
    • lsvg -p OrigVg 
  • We will now transfer of the OrigVg physical volume to another system. Deactivate OrigVg and then remove knowledge of the volume group from the ODM.
    • lsvg -o                             (the OrigVg should be in the list) (Show all the active VG)
    • varyoffv OrigVg               (Deactivate the VG)
    • lsvg -o                             (the OrigVg should not be in the list)
    • lsvg                                  (the OrigVg should be in the list)
    • exportvg OrigVg              (Remove the entry from ODM)
    • lspv                                  (the OrigVg should not be in the list)
  • Reimport and activate the volume group. Assign the OrigVg volume group name.
    • importvg  -y  OrigVg hdisk2     (It will reimport and activate Vg)
    • lspv                                          ( To see the physical volume)
    • lsvg -o
  • Convert and rename OrigVg as follows:
    • Type: OrigVg to Scalable
    • Name: OrigVg to ScaleVg
    • **The Volume Group must be deactivated before doing the above operation
      • varyoffvg OrigVg
      • chvg -G OrigVg    and answer yes to convert
      • exportvg OrigVg
      • importvg -y ScaleVg hdisk2

Section 2 : Creating and manipulating logical volume

  • Extend ScaleVg to include disk hdisk3 and hdisk4
    • extendvg  ScaleVg hdsk3 hdisk4
  • Add a logical volume to Scalevg with Name= datalv1, No of copies=1, Type=jfs2, Size=10 Lps
    • mklv -y datalv1 -t jfs2 -c 1 ScaleVg 10
  • Increase the size of datalv1 by 10 LPs
    • extendlv datalv1 10
  • Create a mirror copy of datalv1 on hdisk3. Ensure that LP copies will be synchronized
    • mklvcopy -k datalv1 2 hdisk3
    • lslv datalv1                   ->We will see that ration of LP:PP is 1:2
  • On ScaleVg, create striped (RAID 0) logical volume name Striplv.  It should be done across all the three disk   volume group.  Type=jfs2, Size=24LPs, Stripe Size=64K
    • mklv -y stripelv -t jfs2 -S64K Scalelv 2 hdisk2 hdisk3 hdisk4
  • Check the number of PPs created on all the three disk.
    • lslv -l striplv                      (It will show 8 PPs on each disk)
  • Check the LPs in striplv
    • lslv -m stripelv                   ( shows that the LPs are distributed)
    • lslv striplv                          (shows the stripe size and stripe width)
  • Delete logical volue , striplv
    • rmlv striplv
  • Add another LV to ScaleVg on hdisk4 with Name=datalv2, Type=jfs2, Size=10LPs
    • mklv -y datalv2 -t jfs2 ScaleVg 10 hdisk4
  • Migrate the LV datalv2 to hdisk2
    • lslv -l datalv2                                         (It will show datalv2 on hdisk4)
    • migratepv -l datalv2 hdisk4 hdisk2
    • lslv -l datalv2                                         (It will show datalv2 on hdisk2)
  • Reduce the ScaleVg to not include hdisk4
    • reducevg ScaleVg hdisk4

Section 3: Mirroring rootvg

  • Mirror the rootvg on hdisk1
    • extendvg rootvg hdisk1                (Add the hdisk1 to rootvg before mirroring)
    • mirrorvg rootvg hdisk1
    • syncvg -v rootvg                          (For synchronization)
  • Create a boot image on hdisk1
    • bosboot -ad /dev/hdisk1
  • Update the normal bootlist to include hdisk1
    • bootlist -m normal hdisk0 hdisk1
  • Unmirror the rootvg
    • unmirrorvg rootvg hdisk1


 

How to move a cdrom from one lpar to another lpar?


How to move a cdrom from one LPAR to another LPAR?

1. Find the lpar which is currently holding the cdrom:


Login to the HMC, Select the Managed System and open "Properties", Look for the I/O device with the description "Other Mass Storage Controller" and read the "Owner" field. This will show the LPAR currently owning that device.


2. On the currently assigned lpar:


1. Find the parent adapter of the CD device:

$ lsdev -Cl cd0 -F parent
ide0

2. Find the slot containing the IDE bus:

$ lsslot -c slot
# Slot Description Device(s)
U787B.001.DNWG2AB-P1-T16 Logical I/O Slot pci1 ide0
U9133.55A.105C2EH-V7-C0 Virtual I/O Slot vsa0
U9133.55A.105C2EH-V7-C2 Virtual I/O Slot ent0
U9133.55A.105C2EH-V7-C3 Virtual I/O Slot vscsi0

so PCI1 is the slot containing the IDE adapter and CD drive.

3. Remove the slot from this host:

# rmdev -dl pci1 -R
cd0 deleted
ide0 deleted
pci1 deleted



3: Moving the cdrom to the target lpar using HMC:


Login to the HMC
Go to lpar 
(select) Dynamic lpar 
(select) Physical Adapters
(select) Move or remove


Now one box will open, on there you have to select the (cdrom) adapter to remove and provide the destination server details on the "Move to partition" option.



4: Verfication on the target lpar:


Now login to the target lpar and verfiy the cdrom has been moved successfully, with the help of below steps.

#cfgmgr
#lsdev -Cc cd0   ("cd0 available" -Here we have to confirm that the cdrom has been moved)
#mkdir /cdrom
#mount -v cdrfs -o ro /dev/cd0 /cdrom
#umount /cdrom

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


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



Hard link
Soft link
inode same
inode vary
inode count increase
inode count not increased
If source file deleted means, destination file should  available
If Source file deleted then destination also deleted
If destination file deleted, souce file should be available
If destination file deleted, source will be available

How to add a hot swappable PCI adapter to AIX server?


How to add a hot swappable PCI adapter to AIX server?

Step 1:  Login into root via the hmc or if vio server padmin, oem_setup_env to go up to root.

Log into the server you wish to add the adapters to. You will need root or padmin when adding to a VIO server. If logging in as padmin do a oem_setup_env to get to the root prompt.

Step 2:  Diag

Step 3:  Task Selection (Diagnostics, Advanced Diagnostics, Service Aids, etc.)

Step 4:  Hot Plug Task

Step 5:  PCI Hot Plug Manager

Step 6:  Add a PCI Hot Plug Adapter

Step 7:  Pick the right location verifying your serial number of the server and correct slot.

Step 8:  After picking the location of the card (as performed in above step 7), the card selected will begin to flash on the back of the server. Verify that the correct slot is linking visually.

Step 9:  If the slot is correct, hit return only once, and let onsite facilities install the card. Once they have installed the card and turn it back over to you, Hit return and let it finish, you should finish with ok.

Step 10: If you are adding more cards repeat the process 1 through 10. If you are finished you can run cfgmgr to pick up the new devices

Step 11: Verify the new devices
# lsslot –C pci

Step 12: Check errpt for any new errors

How to apply ACL (Access Control List) for a file?


What is ACL (Access Control List)?


We all know that by default every file contains permissions for the owner, group and other(world). If we want to set something like read only for 1 user, read/write for a group, read/write/execute for another set of users for a particular file, then We can use ACL.


We can use the below commands to do the ACL for a file.

aclget  - To display ACL for a file
acledit - To edit the ACL for a file
aclput  - To set the ACL for a file using a ACL control file

Few examples,

Let us take file1 as the target file.

To display the current ACL values for file1,
# aclget file1

To edit the ACL for a file,  (How to apply acl for a file)
# acledit file1

This will open a editor with ACL values showing some values like below

attributes: SUID
base permissions:
   owner  (frank): rw-
   group (system): r-x
   others        : ---
extended permissions:
   disabled

If you want to enable and set ACL values, just change the stanza "extended permissions" like below

attributes: SUID
base permissions:
   owner  (frank): rw-
   group (system): r-x
   others        : ---
extended permissions:
enabled
       permit    rw-    u:user1
       deny      r--    u:user2, g:group1
       permit    rw-    g:user3, g:group2