1831676 Members
2169 Online
110029 Solutions
New Discussion

Re: RAW DEVICE COPY

 
Julio Porras_1
Occasional Advisor

RAW DEVICE COPY

I have a SAP R/3 Informix database stored on a Symmetrix 3330 array using HP-UX 11.0 raw devices. I am buying a va-7410 to replace the symmetrix and would like to copy the database to the new array. I take database backups using Legato Networker. What sould I do? Should I go with the Backup/Restore alternative, or can I use a command to copy raw devices from one array to the other? What would the copy command be?

Please be specific. Short HP-UX knowledge available here.

Thanks,
Julio.
4 REPLIES 4
Pete Randall
Outstanding Contributor

Re: RAW DEVICE COPY

Julio,

I think you would be better off to use the backup/restore method. Using dd to copy will only work well when transferring between identical devices.


Pete


Pete
Pete Randall
Outstanding Contributor

Re: RAW DEVICE COPY

Julio,

Acutally, I should probably amend that to say "Using dd to copy works best when transferring between identical devices."


Pete


Pete
Sridhar Bhaskarla
Honored Contributor

Re: RAW DEVICE COPY

Hi Julio,

Raw devices can be dd'ed to other raw devices if you are not comfortable with your backup/restore. A simple example is as follows.
Say your current Volume group is vg01 with the raw devices rlvol1, rlvol2 etc.,

Get the new LUns of VA7410 onto the the system. Either by adding new cards or by removing the alternate links to the Symmetrix and connecting them to VA7410. Create volume groups (say vgnew01). Create logical volumes of exactly the same size as of the existing logical volumes. Then do a "dd". Export the old volume groups. Import the new volume groups with the old names. Start the DB.

Take a good backup. Make make_tape_recovery tapes. Halt the application and the DB.

1. Reduce alternate links

vgreduce vg01 /dev/dsk/c7t0d0
vgreduce vg01 /dev/dsk/c7t0d1

2. Connect the alternate path to VA and verify the LUNs.

ioscan -f
ioscan -fnC disk
The instances may change, say you got them as c9t0d0,c9t0d1 etc now.

3. Create new volume groups

pvcreate /dev/rdsk/c9t0d0
pvcreate /dev/rdsk/c9t0d1

mkdir /dev/vgnew01
mknod /dev/vgnew01/group c 64 0x0?0000
(replace ? with a unique number. Find it out by using ll /dev/*/group command)
vgcreate -s 16 -p 255 -l 255 /dev/dsk/c9t0d0
vgextend vgnew01 /dev/dsk/c9t0d1

4. Create new logical volumes of the same size as of old ones (use lvdisplay).

lvcreate -n lvol1 -L 1000 -r N vgnew01
newfs -F vxfs /dev/vgnew01/rlovl1

DD the data

dd if=/dev/vg01/rlvol1 of=/dev/vgnew01/rlvol1 bs=1024k

Repeat the creation of new volume groups and logical volumes for all the existing volume groups and dd the data.

5. Export the old VGs and the new VGs.

vgchagne -a n vg01
vgexport -v -p -s -m /tmp/vg01.s.map vg01
vgexport -v -m /tmp/vg01.map -f /tmp/vg01.disks vg01

vgchange -a n vgnew01
vgexport -v -p -s -m /tmp/vgnew01.s.map vgnew01
vgexport -v -m /tmp/vgnew01.map -f /tmp/vgnew01.disks vgnew01

6. Take out the other path and connect it to VA.

ioscan -f
ioscan -fnC disk

make sure you see the alternate links

6. Import the new vgs as old vgs.

mkdir /dev/vg01
mkdir /dev/vg01/group c 64 0x0100000
vgimport -v -s -m /tmp/vgnew01.s.map vg01
vgchange -a y vg01

Repeat it for all the new VGs.

Start your DB and see if it works.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Julio Porras_1
Occasional Advisor

Re: RAW DEVICE COPY

Sridhar Bhaskarla:

Is there something I have to do when creating the volume groups in order for them to be cluster (MC/Serviceguard) aware?