Category Archives: AIX – En

My notes using AIX

Recovery Point Object and Recovery Time Object

Disaster Recovery always been associated with Recovery Point Objects and Recovery Time Objects (RPO and RTO).

Source: MIMIX Documentation

Recovery Point Object (RPO) is the last point in time that an IT system can be recovered. In this section, the technology used determines how far behind the data or even the loss of a company when there is a disruption to the main system. RPO is used in technologies such as backup, storage replication, data replication and others.

Recovery Time Object (RTO) is related to the time it takes for an IT system to operate normally again when a planned / unplanned interruption occurs. For unplanned interruptions, error detection, data recovery and bringing the application back online are included in RTO.

AIX Create Volume Group, Logical Volume dan File System From New Disk /LUN

Create Volume Group (VG)

Use the cfgmgr command to scan and identify all installed configurations.

#cfgmgr

Use lspv command to see the pv configuration.

#lspv

root@xxx:/>cfgmgr
root@xxx:/>lspv
hdisk18         00f86d5fa9781a05                    rootvg          active
hdisk27         00f86d5fa99e3994                    datavg          active
hdisk30         none                                None            active

Based on the example above, there is a hdisk30 on the system that has not been configured anything. Use the command bootinfo -s hdiskxx to find out the size of the LUN.

#bootinfo -s hdisk30

Continue reading AIX Create Volume Group, Logical Volume dan File System From New Disk /LUN

Backup, Restore and Check the History of DB2 AIX

Backup, restore and check history that I often use. Login using DB2 user.

Interactively backup database and logs:

db2 backup database <dbname> online to </filesystem> include logs

To submit into background job:

nohup db2 backup database <dbname> online to </filesystem> include logs &

To restore, you can use:

db2 restore database RP1 from </filesystem> taken at <yyyymmddhhmmss>
or for background job:
nohup db2 restore database RP1 from </filesystem> taken at <yyyymmddhhmmss> &

To check backup/restore process:

db2top and then press u
or
db2 list utilities show detail

To find out the history of backup activities by:

db2 list history backup since <yyyymmdd> for <dbname>

AIX HADR Reconfiguration

The assumption is that we are going to reconfigure an existing HADR replication.

PRIMARY :
   db2 update db cfg for dbname using HADR_LOCAL_HOST ip_addr_primary
   db2 update db cfg for dbname using HADR_LOCAL_SVC port1
   db2 update db cfg for dbname using HADR_REMOTE_HOST ip_addr_standby
   db2 update db cfg for dbname using HADR_REMOTE_SVC port2
   db2 update db cfg for dbname using HADR_REMOTE_INST instancename
   db2 update db cfg for dbname using HADR_SYNCMODE ASYNC
   db2 update db cfg for dbname using HADR_PEER_WINDOW 120
   
STANDBY :
   db2 update db cfg for dbname using HADR_LOCAL_HOST ip_addr_standby
   db2 update db cfg for dbname using HADR_LOCAL_SVC port2
   db2 update db cfg for dbname using HADR_REMOTE_HOST ip_addr_primary
   db2 update db cfg for dbname using HADR_REMOTE_SVC port1
   db2 update db cfg for dbname using HADR_REMOTE_INST instancename
   db2 update db cfg for dbname using HADR_SYNCMODE ASYNC
   db2 update db cfg for dbname using HADR_PEER_WINDOW 120
   
notes: Port antara DC dan DRC berbeda

Stop and Start HADR Replication on AIX

Stop HADR:

1. Login to Production site as db2 username
2. command: db2 stop hadr on db <dbname>
3. Login to Target site as db2 username
4. command: db2 deactivate db <dbname> (this action not stop your DB2 services)
5. command: db2 stop hadr on db <dbname>

Start HADR:

1. Login to Target site as db2 username
2. command: db2 deactivate db <dbname>
3. command: db2 start hadr on db <dbname> as standby
4. Login to Production site as db2 username
5. command: db2 deactivate db <dbname>
6. command: db2 start hadr on db <dbname> as primary