# mount /dev/lv00 /mnt
# cd /data
# find . -print | cpio -pdmuv /mnt
.
.
.
# umount /mnt
# umount /data
# mount /dev/lv00 /data
For the example above, the following considerations can apply:
v Assume that you made a file system on the /dev/lv00 logical volume. AIX LVM
uses this file system to view part or all the virtual disks that the storage unit has
made available to the system.
v Mount the logical volume on a temporary mount point, in this case/mnt.
v Change directories to the directory at the top of the file system that you want to
move (cd/data).
v Use the find command to produce a list of file names, which a pipe (|) passes to
the cpio command.
v Unmount both file systems and mount the new file system over the original
mount point directory when the migration is complete.
You
will probably be unable to use the volume management methods if the
database uses volume serial numbers in its licensing code or validity checking. If
the database uses licensing methods or validity checking, you might be able to only
export the database from its old locations or import the database to its new location.
The database software provides the mechanism to move the data. This can take
the form of a standard database backup and restore if it does not have any specific
tools for moving data.
Using backup and restore methods to migrate data
Use the following information as a guide for how to use the backup and restore
methods to migrate data.
In some cases, the only method that is available to transfer data is to back it up to
tape and then restore it to the new disk. This method is slower because tape
devices require that you move the data twice. However, if you are removing disks
before you install the DS8000, the only way to move the data is with a tape device.
You can find a number of different archive utilities on UNIX systems. The cpio
command can also create and read archives on tape devices. Use the -o (output)
option to create archives, and use the -i (input) option to read and extract data from
archives.
AIX provides a pair of commands: backup and restore. The backup command has
two different methods of creating archives, either by file name or by the i-node. Use
the restore command to read any archive that is created by the backup command.
Solaris and HP-UX provide the dump and restore commands, which backup and
restore data by the i-node.
The tar command is available on all UNIX systems that support the DS8000 and is
another way to create and extract tape archives. Use the c option to create
archives. Use the x option to extract files from archives.
Chapter 9. Migrating data to a storage unit 133