You didn't state that you need to change the instance name so I suspect
that you discovered that the /home filesystem isn't large enough to hold
your database, forcing you to "move the HOME directory".
A simple approach is to offline backup the database(s) and do a
redirected restore to another location. Don't forget to change the
location of the log files. This will, however keep the existing home
directory and all of its references to the DB2 ececutables.
If you really need to move the entire home directory then you could try
the following:
1. Make an offline backup of the database(s).
2. Shut down the instance.
3. Double check that the instance is down.
4. Mount your new disk drive/partition on a temporary directory
5. Copy the home directory and all subdirectories to the temporary
directory. This must be done keeping existing ownership and permissions
for all files. All hidden files (starting with a ".") must also be
copied. Two piped copies of the tar utility should do this.
6. Unmount the temporary directory.
7. Mount the new disk drive/partition at the home directory of the
instance. browse through it and make sure that all links and files
appear present. Use the "df" command to verify the mount worked.
8. Start the instance in maintenance mode. verify that your tables are
accessable using only select statements. Shutdown the instance.
9. Unmount the disk/partition mounted on the home directory. Verify that
the unmount worked properly.
10. Delete all of the files and subdirectories of the home directory.
11. Remount the new disk drive/partition at the home directory.
12. Modify fstab to automount this at boot time.
The final step is to reboot the system and verify that the new
drive/partition is correctly mounted, allowing instance startup.
Phil Sherman
Hemant Shah wrote:
Folks,
I need to move HOME directory of an instance to another directory.
What is the best way of doing it?
Is changing password file enough? or dies DB2 store this info in it's own
config?
I am running UDB 8.2 on Linux and AIX.
Thanks.