- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- OS commands in moving oracle binaries and datafile...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-11-2004 08:45 PM
тАО09-11-2004 08:45 PM
Our Oracle and applications binaries and oracle datafiles are residing in old external storage. We will move those files while database is offline in a new storage that are faster and larger space. Kindly assist us of what is the appropriate command we have to use to achieve the database and application are still working fine after moving of those files.
Please also consider the following:
preserve the permission and date and time of the files
symbolic link files
Oracle datafiles is beyond 2 Gb
Thank you very much in advance for your assistance.
Regards,
Adriatico
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-11-2004 09:01 PM
тАО09-11-2004 09:01 PM
Re: OS commands in moving oracle binaries and datafiles while db is offline
Not sure about the symbolic link files, you may need to redo them.
Methdology:
lets say the old logical volume is /dev/vg02/oracle mounted at /oracle
make a new filesystem for data and binaries on the new array, say /dev/vg03/oracle and mount it as /oracle_temp
cd /oracle
mv * /oracle_temp
umount /oracle_temp
change /etc/fstab to make/dev/vg03/oracle to automount as /oracle
umount /oracle
mount -a
Done.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-11-2004 09:04 PM
тАО09-11-2004 09:04 PM
Re: OS commands in moving oracle binaries and datafiles while db is offline
1) because my fingers are all thumbs, I'd take an fbackup of everything just in case I mess up.
2) newfs -F vxfs -o largefiles will create the new filesystem to handle files bigger than 2 GB
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-11-2004 09:31 PM
тАО09-11-2004 09:31 PM
SolutionSay if you are copying the data from /data1/db to /data2/db then I would do
#cd /data1/db;/usr/sbin/fbackup -i . -f - |(cd /data2/db; /usr/sbin/frecover -v -r -f -)
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-11-2004 09:51 PM
тАО09-11-2004 09:51 PM
Re: OS commands in moving oracle binaries and datafiles while db is offline
Thank you from your replies.
How about other OS command that could help us the database and the applications are still working fine after moving to new storage.
Thanks.
Adriatico
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-11-2004 09:52 PM
тАО09-11-2004 09:52 PM
Re: OS commands in moving oracle binaries and datafiles while db is offline
fbackup is native to HP-UX. It's an excellent alternative if one doesn't want to purchase any third party backup tool for day-to-day backup activities. It will take care of all the three requirements of yours. Once the copy is done using fbackup, unmount old filesystems, mount the new filesystems on the old mount points and start the database. If everything goes well, simply remove the old LVs and VGs. If not, you can always go back.
But still ensure a good tape backup prior to any work you do on the system.
Also, note SEP's second point in his second post. You must create the filesystems to support "largefiles".
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-11-2004 10:14 PM
тАО09-11-2004 10:14 PM
Re: OS commands in moving oracle binaries and datafiles while db is offline
Not sure if I understood your question completely. I will briefly describe what I would do with one example filesystem.
Say you have a file system /data1/db in volume group vg01 with disks c1t0d0,c1t0d1, c2t0d0 and c2t0d1. c2t0d0 and c2t0d1 are the alternate paths.
1. Reduce the alternate paths
vgreduce vg01 /dev/dsk/c2t0d0
vgreduce vg01 /dev/dsk/c2t0d1
2. Disconnect the cable corresponding to the above path. Connect the cable from the new storage.
3. Run ioscan and ioscan -fnC to find the new devices.
ioscan -f
insf
ioscan -fnC disk
Find out the new devices. For ex., say c4t0d0 and c4t0d1.
4. Create new volume groups with the new devices.
pvcreate /dev/rdsk/c4t0d0
pvcreate /dev/rdsk/c4t0d1
mkdir /dev/vg01new
mknod /dev/vg01new/group c 64 0x0?0000 (Use a unique number in place of ?. To find the next number in sequence, do 'll /dev/*/group)
vgcreate -l 255 -p 255 -s 16 vg01new /dev/dsk/c4t0d0
(Chagne the options with vgcreate as necessary)
vgextend /dev/vg01new /dev/sdk/c4t0d1
5. Create new logical volumes of exactly the same size as of the odl logical volumes.
lvcreate -n data1db -L
newfs -F vxfs -o largefiles /dev/vg01new/rdata1db
6. Mount the new logical volume on a new mount point.
#mkdir /data2/db
#mount /dev/vg01new/data1db /data2/db
7. Stop the database.
8. Use the 'fbackup' command or any other command of your choice to copy the data from old filesystem to new filesystem.
9. Unmount both old and new filesystems. Mount the new filesystem on the old mount.
#umount /data1/db
#umount /data2/db
#mount /dev/vg01new/data1db /data1/db
10. Start the database. Ensure the everything is fine.
11. Remove the old VG.
#ll /dev/vg01/group (note the minor number say 0x010000)
#vgchange -a n vg01
#vgexport vg01
cleanup: Here you will be importing the new VG as old VG and also connect the the other path for redundancy.
1. Unmount the new filesystems and export new VG.
#umount /dev/vg01new/data1db
#vgexport -p -v -s -m /tmp/vg01new.map vg01new
#vgchange -a n vg01new
#vgexport vg01new
2. Disconnect the primary path corresponding to the OLD storage and connect the path of new storage.
ioscan -f
insf
ioscan -fnC disk
Make sure you see the disks on the new storage from both the paths.
3. Import the fresh created VG as vg01.
#mkdir /dev/vg01
#mknod /dev/vg01/group c 64 0x010000
(minor number from step 11)
#vgimport -v -s -m /tmp/vg01new.map vg01
#vgchange -a y vg01
#mount -a
4. Start the database.
I gave the commands for one filesystem and one VG and two PVs.. You will need to repeat the above steps for all the filesystems, VGs and PVs. If you are using 'raw' devices for the database, then you cannot use 'fbackup' command. You will need to use 'dd'.
-Sri