This document describes how to move data between two AIX servers using shared file system. The concept used is that one machine share a file system over the network and allow other machines to access this file system. In our example the source machine that we move data from, is called Production Server and the destination machine that we move data to, is called Test Server, so we are moving data from Production to Test. Note that this approach can be used with clone purpose of Oracle Applications or database (Like In our case) or any other task that requires moving data between two server. The steps are as follows…
Preparing the Target
Machine
1. Create directory
on target machine to work as shared directory.
2. Start the nfs
daemon (to allow sharing file systems on the network).
3. Export the File
system.
4. Add source
machine to hosts file of target machine (to allow access to target machine).
Preparing Source Machine
1. Creating mount
points (Directories) on the source System (to mount the shared file system to).
2. Start the nfs
daemon.
3. Add Target
machine to hosts file of the source machine.
4. Mount the shared
directory of the Target machine to the mount Point on the source machine. (So
when we move any data from any directory on the source system, it well be moved
to the target system automatically).
5. Copy any data
you want to move to the target system to this mount points or shared director.
Following
are the actual steps using AIX 5.3 on Power 520 Machines
Part 2: Moving Data
between two AIX Servers [From Production Server to Test Server]
In this section
·
Preparing the Target System.
·
Preparing the source System.
·
Moving data from the Source system to the Target
System.
·
Finishing Tasks.
Preparing the Target
System (The System we want to move data to)
This is the TEST Server with IP Address 172.10.1.100
In this case, we want to move the contents of /oraprod and /applprod directories from the production server to /oratest and / appltest directories on the test server. We will create two shared directories on the target system and export them to move data to them from the source system. At the source system we will mount these directories to two local directories /shared_oratest and /shared_appltest.
1. Create two shared directories that will be used to move data to, with required size.
# mkdir –p /oratest
# mkdir –p /appltest
2. Start the NFS
Daemons:
# startsrc -g nfs
3. Export the two directories
used:
# smitty mknfsexp
Path name of directory to export [/oratest]
# smitty mknfsexp
Path name of directory to export [/appltest]
4. Edit /etc/hosts
file to include the source system – add entry for the source system (you need
to edit /etc/hosts file for both source and target server):
# vi /etc/hosts
172.10.1.101 oraprod.lordshave.com oraprod
Preparing the Source
System (The System we want to move data from)
This is the PROD server with IP Address 172.10.1.101
We create two directories to work as mount points for the shared directories on the target system. Then we mount the shared directories on the target system to these two directories.
1. Create two
directories to serve as mount points for shared directories on the target
system:
# mkdir –p /u01/shared_oratest
#mkdir –p /u01/shared_appltest
2. Start the NFS
Daemons:
# startsrc -g nfs
3. Edit hosts file,
add entry for the target system:
# vi /etc/hosts
172.10.1.100 oratest.lordshave.com oratest
4. Mount the shared
file systems from the target system (Test) to the two mount points on the
source system:
# mount 172.10.1.100:/oratest /u01/shared_oratest
# mount 172.10.1.100:/appltest
/u01/shared_appltest
Moving data from the
source to the target system
Simply move data from any directory on the source system (PROD) to the mount points created so t will be automatically moved to the target system (TEST)
# cp -R /oraprod/* /u01/shared_oratest
# cp -R /applprod/*
/u01/shared_appltest
You can monitor the
progress of the copying process on the test server:
# du -sg /oratest --
during copying the /oraprod folder contents
# du -sg /appltest -- during copying the
/applprod folder contents
After finish copying data, optionally perform the following steps:
1. Un-mount the shared file systems on the source (production) system:
# umount /u01/shared_oratest
# umount /u01/shared_appltest
2. Remove the two shared
directories from the source system.
3. Stop the NFS Daemon
on both servers.
Regards
Mostafa Mahmoud
No comments:
Post a Comment