Operating System - HP-UX
1754355 Members
4771 Online
108813 Solutions
New Discussion

Migrating Raw filesystem to another server

 
SOLVED
Go to solution

Migrating Raw filesystem to another server

We are upgrading one of our customerâ s servers that have a couple of RAW fileystems on it to a new server. I was wondering what would be the best way to migrate the RAW filesystems to the new server. I was hoping for a command like
tar cvf - . |remsh server_a â cd ; tar xvf
8 REPLIES 8
Steven E. Protter
Exalted Contributor

Re: Migrating Raw filesystem to another server

We don't migrate the contents of raw filesystems. fbackup can't back them up, so we use the database utility (rman for oracle adabck for adabas) to backup the files to a normal filesystem or tape.

Then we create a new raw disk area on the target system and restore the data using the utilities.

I have used Ignite to replicate raw disk areas, but the data wasn't usable. They had to be initialized all over again.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Rajeev  Shukla
Honored Contributor
Solution

Re: Migrating Raw filesystem to another server

To backup the raw Dbspaces you need a backup software like omniback or netbackup with the database integration, or if you can attach both the drives to same system then mirror them, split them and move them to another system, buts thats a bit difficult
The other easy way would be to do a dd after you connect both the disks to same system and then move the backedup disk to another system.
Michael Steele_2
Honored Contributor

Re: Migrating Raw filesystem to another server

Use the applications backup utility or 'dd'. For example:

# dd if=/dev/vg##/rlvol# of=/dev/rmt/0m bs=2048

The block size can be 512 or 4096, it depends. Raw blocks are 512 mb but you can go much bigger as long as its octal. 20480?
Support Fatherhood - Stop Family Law
Hein van den Heuvel
Honored Contributor

Re: Migrating Raw filesystem to another server


I would use gzip -c

Raw devices are not all that magically.

dd is not the only thing that can address them.

Depending on the platform you may want to feed gzip with data read by dd though.

On other platforms still I found it recommended to use a private 'rawcopy' tool (attached) as that was slightly more efficient with fifo's than dd.

Your milage will vary. Try first... if you can.

hth,
Hein.


Francis_12
Trusted Contributor

Re: Migrating Raw filesystem to another server

Hello,

To copy raw lvols from one host to another using the network that's what you can do :

#dd if=/dev/vgXX/rlvolYY | gzip -c | remsh target-host "gunzip -c | dd of=/dev/vgXX/rlvolYY

To copy raw lvols from one host to another using a tape, you can do (assuming that 0m is your tape device and that you have several rlvols to copy called rlvol1, rlvol2, etc...) :

#mt -f /dev/rmt/0m rew
#dd if=/dev/vgXX/rlvol1 of=/dev/rmt/0mn bs=4096k
#dd if=/dev/vgXX/rlvol2 of=/dev/rmt/0mn bs=4096k
etc...

and on the destination host :
#mt -f /dev/rmt/0m rew
#dd if=/dev/rmt/0mn of=/dev/vgXX/rlvol1 bs=4096k
#dd if=/dev/rmt/0mn of=/dev/vgXX/rlvol2 of=/dev/rmt/0mn bs=4096k
etc..

The usage of the '0mn' will allow each raw lvol to be sequentially written on the tape with no rewind.

I would also strongly recommend you to issue cksum to check if everything was fine after.

do this on both hosts and compare the results :
#cksum /dev/vgXX/rlvolYY

Hope this helps, Bye.

Francis DERDEYN - HP-UX ASCE.



Francis_12
Trusted Contributor

Re: Migrating Raw filesystem to another server

Sorry for the typo. I forgot the '"' at the end :

#dd if=/dev/vgXX/rlvolYY | gzip -c | remsh target-host "gunzip -c | dd of=/dev/vgXX/rlvolYY"

Re: Migrating Raw filesystem to another server

Thanks everyone for you replies. We do have netbackup and we where planning to use that to move the data to the new servers but I was just thinking there has to be another way.
Alzhy
Honored Contributor

Re: Migrating Raw filesystem to another server

And the best way is to use dd and pipe it accross the LAN to your destination server and o its new raw device on that server. And to optimize the transfer, use gzip or compress on the pipe as illustrated in the examples above.

Or if your new server's disks could be hooked up to the existing server, do the dd's locally. Once done, move the disks back to the new server and your golden.

Hakuna Matata.