|
|
To make a copy, use either the cpio(1) or volcopy(1M) command. These two commands accomplish the work of moving filesystems in very different ways. cpio copies each file in one filesystem to another, whereas volcopy makes a literal copy of the filesystem as a whole.
The cpio and volcopy commands are not equivalent. You should be aware of the consequences of using either one and choose whichever makes more sense for your situation.
Once the destination filesystem is complete, you can remove the source. Follow the instructions under ``Steps 2 and 3: Removing the source filesystem and editing vfstab''.
Using cpio presumes that a destination filesystem already exists, whether newly created or not. The files of the source filesystem are installed into this existing destination filesystem.
cpio does not move a filesystem as a single unit; it moves a filesystem by transferring its constituent files one at a time. Thus, you can use this command when transferring a filesystem between disks of different sizes. As long as the destination disk has enough free space to accommodate the files it's receiving, you can transfer that filesystem to it with cpio.
To move a filesystem with cpio, enter:
find . -mount -print | cpio -pdm dest_directory
If you are moving a filesystem between two disks of the same size, we recommend running volcopy because it is the faster of the two commands. volcopy owes its speed, however, to the fact that it moves a filesystem as a single unit, overwriting the destination disk completely with the contents of the source disk. Any preexisting contents on the destination disk are destroyed when you move a filesystem to that disk with volcopy.
The volcopy options are not identical for the different types of filesystems that might be on your system. For details on the options, see the appropriate volcopy. (Separate versions exist for the vxfs, ufs, sfs, and s5 filesystem types.)
The following example shows how to run volcopy to move a vxfs-type filesystem (/home2):
volcopy fsname src_dev volname1 dest_dev volname2Because a filesystem type has not been specified on the command line, volcopy will get the filesystem type from /etc/vfstab. If the filesystem type is not defined in /etc/vfstab, it must be specified on the command line as an argument to the -F option.
The arguments take the following values:
volcopy /home2 /dev/rdsk/c0b0t1d0s4 home2 /dev/rdsk/c0b0t2d0s3 bhome2