"Clean up the system"
You have suddenly been appointed as AIX
administrator after the previous admin disappeared in mysterious circumstances. You've logged onto the AIX system once before. You've been told to do a final tidy-up of the new 24X7 production system before it goes live tomorrow morning. Someone you met at a party once suggested that a very effective way of cleaning up your Unix system was running the command
You log in as root and try it. It takes a while. Your commands don't seem to work any more. Some instinct tells you things are not right. You look up the rm command. Everything is gone. All files. And directories. And your job. The Wikipedia entry for "rm" tells you that it is frequently used in jokes and anecdotes about Unix disasters.
You consider your career options. Maybe you could train camels or design soppy greeting cards.You find a note from your predecessor. It reads "mksysb cron". You look up the mksysb command. You learn it creates a backup of the operating system (that is, the root volume group). You can use this backup to reinstall a system to its original state if it is corrupted.
Your future depends on one question:
"Do I have a mksysb?"
You do. It's a week old, but the OS hasn't changed much in the last few days before going live. You discover it was set up using crontab -e. You realise that the disks - whether physical or virtual - that were assigned to the system before your "cleanup" are still available. No need to rebuild the profile of the LPAR via the HMC or IVM. You will need to reinstall the rootvg - the root volume group - which is the group of disks assigned for the AIX OS. After that you can look at other volume groups which may have contained data, but first:
Operation: Recover rootvg (and career)
You need to know how the mksysb was done, so you can work out the recovery steps. Was it backed up
- over the network using NIM? If your NIM server is still available, you can install the system as a NIM client.
- directly to a device (tape / DVD / USB disk)
- backed up to a file on the (now extinct) LPAR and then copied to a remote host. And if this was the method used, was it done
Maybe you will restore mksysb from tape or restore from a DVD-RAM. You could use mkdvd to convert a mksysb file to ISO. If the mksysb was created in ISO format, you could install the ISO image via the VIO server
.Time to exhale
Soon enough you'll have a rootvg restored, a login prompt and a system ready to configure network communications if you need to. There'll be files which didn't get restored in the mksysb, such as those that are excluded via the -e flag in your mksysb / mkcd / mkdvd. You might have some data volume groups to resurrect using importvg
, and then some files and databases to restore. But all in all, you've replaced a nice "clean" system with one that's going to work again.
Two things have saved your skin:
- You had a mksysb.
- You knew how to use it.
You have learned that prevention is better than cure. You dig out your resume and decide to make some small changes. You add in the line "Experience in AIX System recovery". You decide not to emphasise your ability to write soppy poetry in your breaks from camel training.