This post will describe how to create a bootable backup of the rootvg to another hdisk using the command alt_disk_copy. The command execution will be performed in 2 phases which are described below. The phase 1 and 3 are used in this example. There is also a possibility to use the phase 2 with alt_disk_copy where you can run your own customization sripts against the rootvg copy. For more information aks your good friend google.

Phase 1- Creates the altinst_rootvg VG, alt_ LV’s, /alt_inst file systems and restores rootvg to hdisk1.

                  Disk to backup to.
                  |
 # alt_disk_copy -d hdisk1 -P1  
                            |
                            Phase 1

Calling mkszfile to create new /image.data file.
Checking disk sizes.
Creating cloned rootvg volume group and associated logical volumes.
Creating logical volume alt_fslv06
Creating logical volume alt_hd6
Creating logical volume alt_hd8
Creating logical volume alt_hd5
Creating logical volume alt_hd4
Creating logical volume alt_hd2
Creating logical volume alt_hd3
Creating logical volume alt_hd1
Creating logical volume alt_hd9var
Creating logical volume alt_livedump
Creating logical volume alt_fslv08
Creating logical volume alt_loglv00
...
...
...
Creating /alt_inst/home file system.
Creating /alt_inst/opt file system.
Creating /alt_inst/tmp file system.
Creating /alt_inst/usr file system.
Creating /alt_inst/usr/sys/inst.images file system.
Generating a list of files
for backup and restore into the alternate file system...
Backing-up the rootvg files and restoring them to the 
alternate file system...
Phase 1 complete.

Read More

Edit /etc/iscsi/targets and add the target system information

             Port Number
             |
192.168.2.93 3260 iqn.2012-02.local.cosmos:st.h1
|                 |
iscsi target host  Unique iscsi identifier

Now configure the iscsi0 device

smitty iscsi
 >iSCSI Protocol Device
  > Change / Show Characteristics of an iSCSI Protocol Device
    > iSCSI Initiator Name [iqn.2012-02.power1.st.h1]
    > Discovery policy: file

Run cfgmgr against the iscsi0 device

cfgmgr -l iscsi0

After this you should see the drives exported from the iscsi target host

# lspv
hdisk0          00c0e90dce6c290a                    rootvg          active              
hdisk1          00cf405ea5c630a9                    rootvg          active              
hdisk2          00cf405ea25a9e70                    None                                
hdisk3          00cf405ea25a9f84                    None                                
hdisk4          00cf405ea5ce7f72                    None                                
hdisk5          00cf405ea5ce8085                    None

If a VG has been exported from the system using exportvg and you don’t know the name of a VG, it is possible to get the name of the VG from the specified hdisk by importing the VG without activating it using the command importvg with the -n flag.

# lspv 
hdisk0          00c0e90dce6c290a                    rootvg          active              
hdisk1          00cf405ea5c630a9                    rootvg          active              
hdisk2          00cf405ea25a9e70                    None                                
hdisk3          00cf405ea25a9f84                    None                    

Now we import the vg from hdisk2.

             Does not varry on the VG 
            |
# importvg -n hdisk2
vg00

# lspv
hdisk0          00c0e90dce6c290a                    rootvg          active              
hdisk1          00cf405ea5c630a9                    rootvg          active              
hdisk2          00cf405ea25a9e70                    vg00                                
hdisk3          00cf405ea25a9f84                    vg00

The VG vg00 is now imported but not activated.

Using the rendev command is it possible to change the name of a device such as a hdisk or an ent adapter. The new desired name must NOT exist in the system. If you are renaming an active device beware that the rendev command will uncofigure the device using rmdev -dl before the name will be changed. Also if you are renaming a ent adapter make sure you are not connected to the system using the ent adapter you are attempting to rename. After a name change on a ent adapter it might be nacessary to run cfgmgr.

          Device to be renamed
          |  
# rendev -l hdisk4 -n hdisk44
hdisk44             |
                    New device name

Here are some TCP/IP related commands, might be usefull.
Generally by using ifconfig and route commands your settings will not be preserved after the reboot, because the settings will not be stored in the ODM.
So to make the settings persistent across reboots use mktcpip or chdev for IP configuration and for the routing table smit route, /etc/rc.net or chdev

List routes stored in ODM

# odmget -q "attribute=route" CuAt

View curent routing table

# netstat -rn

Delete default route (persistent)

# chdev -l inet0 -a delroute=net,-hopcount,0,,0,192.168.2.2

Define default route (persistent)

# chdev -l inet0 -a route=net,-hopcount,0,,0,192.168.2.1

Lookup route information

# route get 

To permanently assign a IP to the en1 interface:

# chdev -l en1 -a netaddr=192.168.2.98 -a netmask=255.255.255.0

The following command sets the IP configuration on the specified adpter, adds an entry into /etc/hosts, and adds a static route to the routing table.

                  | Hostname           
# mktcpip -i en2 -h power1 -g 192.168.2.2 -a 192.168.4.6 -m 255.255.255.0
           |                |              |              |
           Interface        Gateway        Address        Netmask

View inet0 configuration

# lsattr -El inet0

To create a persistent IP alias:

         Interface name
         | 
# chdev -l en0 -a alias4=192.168.4.77,255.255.255.0
en0 changed     |
                Attribute

To permanently remove an IP alias

         Interface name     IP and netmask as shwon in `lsattr -El en0`
         |                  | 
# chdev -l en0 -a delalias4=192.168.2.77,255.255.255.0
en0 changed     |
                Attribute

Media link speed for the en0 interface

# entstat -d en0 | grep "Media Speed"

Show all listening ports

netstat -anf inet | grep LISTEN

Show domain name server settings

# namerslv -s

This post will describe how to define on a AIX NFS server a pseudo-root and mount it form a client. The pseudo-root will be changes from / to /exports

First check the current settings

# nfsd -getnodes
#root:public
/:/

Unexport the currently exported filesystems:

# exportfs -ua

Define pseudo-root in /etc/exports.

# cat /etc/exports
/exports -nfsroot
/fixes -vers=4,rw,access=cosmos,exname=/exports/fixes
/home  -vers=4,rw,access=cosmos,exname=/exports/home
/LP    -vers=4,rw,access=cosmos,exname=/exports/LP

-vers=4    This option exports the share using the NFSv4 protocol
rw            Read/write
exname    Export as the specified external name beginning with nfsroot
access     Access restriction, to mount the FS only by the specified hostname.

Now export the NFS exports and check the current nfsroot:

# exportfs -a
# nfsd -getnodes
#root:public
/exports:/exports

Now we can on the client mount all the exported dir’s using one command /mount request:

# mount -o vers=4 power1:/ /mi
# ls /mi
fixes  home  LP

To configure a AIX box as a NTP client first set the correct time zone using `smitty chtz_date`. Also set the system time manually as accurate as possible, if the system time would be way out of the reality, the xntpd daemon will not handle this and end with the following error in the error log:

---------------------------------------------------------------------------
LABEL:          SRC_SVKO
IDENTIFIER:     BC3BE5A3
Sequence Number: 4298
Class:           S
Type:            PERM
WPAR:            Global
Resource Name:   SRC
escription
SOFTWARE PROGRAM ERROR

Probable Causes
APPLICATION PROGRAM

Failure Causes
SOFTWARE PROGRAM

        Recommended Actions
        MANUALLY RESTART SUBSYSTEM IF NEEDED

Detail Data
SYMPTOM CODE
         256
SOFTWARE ERROR CODE
       -9017
ERROR CODE
           0
DETECTING MODULE
'srchevn.c'@line:'376'
FAILING MODULE
xntpd

Also there will be no error recorded in the syslog, nor will there be any error if xntpd will be run manually with the debug option enabled.

Back to the configuration. This is how my /etc/ntp.conf file looks like:

server 93.184.71.155 prefer
server 176.28.8.111
driftfile /etc/ntp.drift
tracefile /etc/ntp.trace

Now we start the xntpd daemon:

# lssrc -s xntpd
Subsystem         Group            PID          Status
 xntpd            tcpip                         inoperative
# startsrc -s xntpd
0513-059 The xntpd Subsystem has been started. Subsystem PID is 3997772.
# lssrc -s xntpd
Subsystem         Group            PID          Status
 xntpd            tcpip            3997772      active

The time synchronization may take some time. So don’t worry to wait for 15 min. to check the synchronization status using ntpq.

# ntpq -p
     remote           refid      st t when poll reach   delay   offset    disp
==============================================================================
*dns2.vnet.sk    ntp.bts.sk       2 u   62   64  377    39.51    4.800    0.98
+176.28.8.111    187.95.28.233.n  3 u   42   64  357    60.24   -0.091    0.64

Ntpq output explained

Now in order to let xntpd start each time the system boots edit /etc/rc.tcpip and uncomment the ntp entry as follows:

# Start up Network Time Protocol (NTP) daemon
start /usr/sbin/xntpd "$src_running"