how to move devices using disk mirroring
DESCRIPTION
Sybase How to move Decvices Using Disk MirroringTRANSCRIPT
How to move
data and log devices
using disk mirroring
in Sybase12.0
Version ID Date: 06-07-2008 Document ID: How to move data and log devices using disk mirroring in Sybase 12.0
Version ID: 1
Sybase ASE 12.0 Data & Log Migration
Author: Sarosh Siddiqui [email protected] Page 2 of 5
Revision History
Version Date Author Description
Draft 1 06-07-2008 Sarosh Siddiqui Sybase Consultant
How to move data and log devices using disk mirroring in Sybase 12.0
Sybase ASE 12.0 Data & Log Migration
Author: Sarosh Siddiqui [email protected] Page 3 of 5
Introduction
This document covers steps involved in migrating data and log devices from old Storage to New Storage. The assumption here is that the ASE 12.0 is up and running without any error.
Steps Taken to Move Data and Log Devices using disk mirroring in Sybase ASE 12.0:
1. Dump database (systems and users databases )
2. Execute dbcc checks and update statistics in order to make sure that the ASE12 server
does not have any pre-existing corruption or issues that might result in mirroring failure.
All the results should come out clean
Note: dbcc checks and update statistics for several databases can be run in parallel to minimize elapsed time. Note: For production, consider dump and load of large databases to another server with ample time prior to move and performing full dbcc there.
a. dbcc checkdb
b. dbcc checlalloc
c. dbcc checkcatalog
d. dbcc checkstorage (If dbccdb is there and properly configure)
e. update statistics against large tables
3. bcp the following system tables
a. master..sysdevices
b. master..sysdatabases
c. master..sysusages
d. master..syslogins
e. master..sysconfigures
f. master..syscharsets
Sybase ASE 12.0 Data & Log Migration
Author: Sarosh Siddiqui [email protected] Page 4 of 5
4. Enable Disk Mirroring
sp_configure ‘disable disk mirroring’, 0
go
shutdown with nowait
go
5. Re-Start Sybase ASE
startserver –f RUN_Server
6. Mirror Data/Log Device
Example: move audit01 device from /dir1/datafile1 to /dir2/datafile2
disk mirror
name = audit01,
mirror = "/dir2/datafile2"
go
7. Confirm the Device Mirrored:
sp_helpdevice audit01
go
8. Remove the Primary Device:
disk unmirror
name = audit01,
side = "primary",
mode = remove
go
9. Confirm the Device Removed:
sp_helpdevice audit01
go
10. Disable the Mirroring and Shutdown Sybase ASE
sp_configure 'disable disk mirroring", 1
go
shutdown with nowait
go
11. Re-Start Sybase ASE
startserver –f RUN_Serve
Sybase ASE 12.0 Data & Log Migration
Author: Sarosh Siddiqui [email protected] Page 5 of 5
Mirroring the master device:
When mirroring the master device:
1. Retain the Mirroring:
Add new device physical location in –r parameter of RUN_Server file.
Example of RUN_Server file:
#!/bin/sh
#
# Adaptive Server name: JUPSYB001_PROD
# Master device path: /dev/vg80/rsybmaster
# Master Mirror device path: /dev/vg28/rsybmaster
# Error log path: /sybase12/ASE-
12_0/install/WANG05_PROD.log
# Directory for shared memory files: /sybase12
#
/sybase12/ASE-12_0/bin/dataserver \
-sWANG05_PROD \
-d/dev/vg80/rsybmaster \
-r/dev/vg28/rsybmaster \
-e/sybase12/ASE-12_0/install/ JUPSYB001_PROD.log \
-M/sybase12 \
disk mirror name = 'master', mirror = '/dev/vg28/rsybmaster' go
2. Remove the Mirroring:
Replace new device physical location in –d parameter of RUN_Server file.
Example of RUN_Server file:
#!/bin/sh
#
# Adaptive Server name: JUPSYB001_PROD
# Master device path: /dev/vg28/rsybmaster
# Error log path: /sybase12/ASE-
12_0/install/WANG05_PROD.log
# Directory for shared memory files: /sybase12
#
/sybase12/ASE-12_0/bin/dataserver \
-sWANG05_PROD \
-d/dev/vg28/rsybmaster \
-e/sybase12/ASE-12_0/install/ JUPSYB001_PROD.log \
-M/sybase12 \