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.

Tuesday, 10 December 2013

How to do Cloning in AIX


AIX has the ability to copy the contents of the root Volume Group to another physical volume (harddisk). The disk that is being copied to will be completely erased and must be present in the system and not assigned to a Volume Group.

#lspv 8
hdisk0     000573927xxxx3c6        rootvg         active
hdisk1     000xxxxxeef16b88        None

Clone the rootvg to new disk
As seen in the previous step the new harddisk added is hdisk1. To copy the rootvg type the following command:

# alt_disk_install -C -O hdisk18

Or
# alt_disk_install -C hdisk18
The -C option is to indicate that copy must be made to another harddisk rather than a mksysb. The -O option indicates that all server specific data (such as TCP/IP configuration) is to be removed.
After about 30 minutes to an hour the cloning should be compleet but this is mainly dependent on the system being cloned.
Check that the alternate disk was created, by running the following:
# lspv 8
Output similar to the following displays:
hdisk0         0009710fa9c79877    rootvg            
hdisk1         0009710f0b90db93    altinst_rootvg    

By default, the alternate-disk-installation process changes the boot list to the alternate disk. To check this run the following:
# bootlist -m normal -o8  

Output similar to the following displays:
hdisk1

Reboot the system. Type:
# shutdown –r 8

When the system reboots, it will be running off the alternate disk. To check this, type the following:
# lspv 8
Output similar to the following displays:
hdisk0         0009710fa9c79877    old_rootvg 
hdisk1         0009710f0b90db93    rootvg     

# alt_disk_install -X8               Set the bootlist to hdisk1


# alt_disk_install –X old_rootvg 8   Remove the old_rootvg

#lspv 8                              output show like this
Output similar to the following displays:
hdisk0         0009710fa9c79877    None 
hdisk1         0009710f0b90db93    rootvg              active   


 Restore LPAR1 to the original settings

alt_disk_install moves the boot partition to the new harddisk1 and has to be moved back to the original harddisk0.

# alt_rootvg_op -X8    This command will revert back rootvg to hdisk0.              

Note: the bove command can only be used before #shutdown –r  8   command. other wise it will not work.


No comments:

Post a Comment