Operating System - HP-UX
1855741 Members
6692 Online
104103 Solutions
New Discussion

Re: Moving raw lv's to another machine.

 
Galen Scalone
Occasional Advisor

Moving raw lv's to another machine.

Hi all,
My first post, and here it is.

I need to move raw logical volumes from one machine to another. On the host machine, the volumes are 2 gb, and I created 2gb lv's on the target machine. I used dd if=/dev/vg02/rraw1|remsh target of=/dev/vg10/rraw1. It took about 2 seconds to complete. I tried the same with a block size entry, and it still took about 2 seconds. I received no errors. Since i cannot really 'SEE' the data on the raw volumes, and it took only 2 seconds, I doubt the data is there. Any ideas?
pipin and greppin
9 REPLIES 9
Jeff Schussele
Honored Contributor

Re: Moving raw lv's to another machine.

Hi Galen,

You need to complete the dd command locally to a local file, then rcp the file over to remote system & remsh the dd from file to device remotely.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
hpuxrox
Respected Contributor

Re: Moving raw lv's to another machine.

Try

dd if=/dev/vg00/lvol1 | remsh host dd of=/dev/vg00/lvol1
Jeff Schussele
Honored Contributor

Re: Moving raw lv's to another machine.

Galen,

Something like this

dd if=/dev/vg02/rraw1 of=/path/to/filename

rcp /path/to/filename newhost:/path/to/filename

remsh newhost dd if=/path/to/filename of =/dev/vg10/rraw1

Of course these can be combined into a single script & blocking is up to you.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Galen Scalone
Occasional Advisor

Re: Moving raw lv's to another machine.

Thanks Jeff and Yates ( I hope thats your first name, and I'm sorry if I'm calling you by your last name, as you can see I have the same problem sometimes)
I have tried your idea Yates, and it wont work. I am in the middle of trying Jeffs idea, and I'll keep you all posted.

Thanks
pipin and greppin
Galen Scalone
Occasional Advisor

Re: Moving raw lv's to another machine.

Jeff, it took about 10 minutes for the first dd, and the file that was created is about 2 gb. The dd shows me an I/O error, and says
262+1 records in
262+1 records out
But the file is around2 gb. Kinda crazy.
pipin and greppin
pap
Respected Contributor

Re: Moving raw lv's to another machine.

Hi,
Just take backup of those two volumes using fbackup and then try to restore the same on new machine.
That is the simplest solution.
Otherwise you can export the file systems from host machine and import on new machine ./ before importing filewsystems, disconnect the drives from old machine and place it to new machine.

Import using map file and -s option of vgexport command.

Let me know if you have further questions.
-pap
"Winners don't do different things , they do things differently"
Galen Scalone
Occasional Advisor

Re: Moving raw lv's to another machine.

Hi pap,
Your gonna love this. The machine I am dd'ing from is an old g-40, and the new machine is an R390 (new d390). The R has no tape drives, and the g only has dds-2 drives.

I'm just wondering why I got the I/O error even though the file that was created with the original dd looks like it may have come over OK.
To make things worse..These are Informix raw volumes, and the Informix DBA is gone...for good.

Thanks for your help.
I'll keep diggin.
pipin and greppin
Carlos Fernandez Riera
Honored Contributor

Re: Moving raw lv's to another machine.

I use this every week.... on destination box:


timex remsh source_box " dd if=/dev/vga/rlv3 bs=1024k | gzip "| gunzip >/dev/vga/rlv3
unsupported
Jeff Schussele
Honored Contributor

Re: Moving raw lv's to another machine.

Hi Galen,

You may need to enable largefiles support on the system giving the error for the FS you're creating/copying in.
It's possible that even though the LVs are 2Gb, the file being created is slightly exceeding the limit.
Probably should go ahead & enable it on both - just to be safe.
Sorry I didn't point that out earlier.

You can check if supported, do
fsadm /mountpoint
If it comes back nolargefiles then do
fsadm -o largefiles /mountpoint

Then try to create again.

HTH,
Jeff

PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!