Managing Systems and Workgroups: A Guide for HP-UX System Administrators
Administering a System: Managing Printers, Software, and Performance
Managing System Performance
Chapter 7 735
The example that follows shows an alternative method, using dcopy, and
assumes you have enough disk space to create a new logical volume at
least as large as /dev/vg01/lvol8. We’ll operate on the /work file
system, which resides on the logical volume /dev/vg01/lvol8.
Step 1. Back up the file system; for example,
tar cv /work
backs up /work to the system default tape device, /dev/rmt/0m.
Step 2. Create a new logical volume (see “Adding a Logical Volume” on page 862)
but do not mount it to any file system.
We’ll assume this new logical volume is /dev/vg01/lvol9.
Step 3. Make sure no one has files open in /work and that it is no one’s current
working directory, for example:
fuser -cu /work
Step 4. Unmount /work:
umount /work
Step 5. Write out the contents of /work to /dev/vg01/lvol9:
dcopy -v /dev/vg01/rlvol8 /dev/vg01/lvol9
NOTE The source file system should be a raw device (/dev/vg01/rlvol8) and
the destination file system should be a block device (/dev/vg01/lvol9).
Step 6. Mount the new logical volume to the mount point of the original file
system, /work:
mount /dev/vg01/lvol9 /work
You can now reuse the original logical volume /dev/vg01/lvol8) or
remove it (see “Removing a Logical Volume” on page 870).