Clone of AIX image and clone learning Notes

Source: Internet
Author: User
When will the cloning technology be used! Generally, in the production environment, most of my rootvg is mirror. if the ML upgrade fails or some operation is incorrect, it will take me to restore the rootvg, whether it's using tape mksysb recovery or network boot recovery... when will the cloning technology be used! Generally, in the production environment, most of the rootvg in our portal is mirror. if the ML upgrade fails
Or some wrong operations, resulting in unrecoverable
This requires our door speed to restore rootvg, whether it is to use the tape mksysb recovery, or network boot recovery, this speed is not ideal in all aspects. The fastest time to restore rootvg using alt_disk_copy.
The alt_disk utility consists of the following commands:
• Alt_disk_copy: Clone the disk.
• Alt_rootvg_op performs maintenance on the cloned rootvg.
• Alt_disk_mysysb: perform mksysb replication
The alt_disk_copy command is to copy the running rootvg to another disk, so as long as it belongs to rootvg and the mounted file system will place copy. You do not need to perform other operations to execute this command, but it takes a long time to execute this command.
After the replication is complete, an altinst_rootvg is added. when the replication is complete, the altinst_rootvg is not activated. If it is activated, it will automatically become rootvg, and the previous rootvg will become old_rootvg. On the contrary, it will look at the boot from that hard disk.
If the upgrade is normal and runs well, we need to destroy the newly generated altinst _ rootvg, run the alt_rootvg_op command to destroy the clone, and then run it with rootvgmirror.
If the upgrade fails, you only need to create a snapshot required by a third party, and then boot from the original rootvg. For login users, there is no impact. When you receive repair suggestions from third-party support, you only need to reboot and correct the problem from the cloned rootvg. You do not need to apply the upgrade again because the upgrade has been applied to the cloned rootvg. Test the upgrade result. if everything is normal, destroy the original rootvg and recreate the mirror.
You can use alt_rootvg_op to wake up the cloned altinst _ rootvg to mount the file system. You can perform any operation on the cloned file system, such as correcting links, collecting information for a third party, and then sleep the disk. This will also uninstall the file system.
Note:
1. the operating system of the first server must be completely installed and patched. the machines in the cluster must be able to install oracle and other software, and patch the required software. Avoid repetitive work.
2. after you unplug the hard disk or use a partition to mount the hard disk to another server or partition, you may be prompted to find a hard disk that can be started for the first time, at this time, you can enter sms to set the boot sequence. when setting the boot sequence, sms can scan the hard disk and find the operating system above. In the LPAR environment, especially when you need to perform operations similar to DLPAR, alt_disk_copy is the same ct_node_id due to replication reasons. in this case, you need to refresh ....
(Versions may vary)
Lab
Our experiment here is to simulate the upgrade.
I. system check
# Lsvg-l rootvg
# Unmirrorvg rootvg hdisk1
# Performancevgrootvg hdisk1
The above operation may be required (the above operation is not required if there is no mirror)
# Lspv
# Bootlist-m normal-o
Hdisk0blv = hd5 pathid = 0
II. Clone rootvg
# Alt_disk_copy-d hdisk1 clone rootvg to hdisk1
After cloning, the system boot list is changed back to the original settings, because the system automatically sets the boot to hdisk1.
# Bootlist-m normal-o
Hdisk1blv = hd5 pathid = 0
 
Change the startup list to hdisk0.
# Bootlist-m normal hdisk0
 
# Bootlist-m normal-O or # bootlist-m normal hdisk0
(Note: Unplug hdisk2 and put it in the new machine/partition. then you can start it. in this way, change one server to two servers, and change two servers to four servers, which is very fast)
III. upgrade
Put the upgrade package in/usr/sys/inst. images
# Install_all_updates-d/usr/sys/inst. images
Restart the system www.2cto.com
# Shutdonwn-Fr
4. delete/use a cloned disk
If the system is enabled. You can delete the cloned disk.
# Alt_rootvg_op-X altinst_rootvg
If the disk cannot be started properly, the cloned disk is used.
# Bootlist-m normal-o hdisk1
# Bootlist-m normal-o
# Shutdown-Fr
Delete the original rootvg
# Lspv
# Alt_rootvg_op-X old_rootvg
Perform mirror to ensure system security, locate the wrong update error, and update again.

From wolf

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.