Copying an LV over a network


Env:  4.1

Problem:  The customer has a file system on one machine, knows that he
could back up the file system and restore it to another machine, but
wants to know how to copy the logical volume contents over the network
to the LV on the other system, and create the file system.

Action taken:  In our example, the source machine is systemA, and the
target machine is called systemB.  The following points are important:

1.  The target LV's logical volume control block (LVCB) must be preserved.

2.  You don't want to create a new file system on the target LV when
finished; this will overwrite the file system structure you have just

3.  The LVs need to be the same size (in MB) on each machine.

4.  The file system on systemA MUST be unmounted while this is taking

5.  The proper .rhosts files must be in place so that an rsh command
    will work.

That noted, here is the process to copy an LV called sourcelv from
systemA to an LV called targetlv on systemB:

dd if=/dev/sourcelv bs=512 skip=1 conv=sync | rsh systemB 
        "dd of=/dev/targetlv bs=512 seek=1 conv=sync"

(Note:  this is run from a single command line.  It is split here for
ease in reading).

The file system entry for the new file system in targetlv is created
by putting an entry in /etc/filesystems, similar to:

        dev     = /dev/targetlv
        vfs     = jfs
        log     = /dev/loglv00  (put the appropriate log device name)
        mount   = true

Then, run "chfs /target" to update the LVCB on targetlv with this

Though the above steps will work for most cases, this procedure is better
supported and more efficient if the source filesystem is NFS mounted to the
desired node, and commands to move the files from one filesystem to another
local filesystem are used.

These steps are more applicable to moving a raw logical volume from a local
machine to a remote machine, using just the single "dd" command line given

Action plan:  Close.

Support Line: Copying an LV over a network ITEM: DC0853L
Dated: June 1997 Category: N/A
This HTML file was generated 99/06/24~13:30:16
Comments or suggestions? Contact us