Managing Systems and Workgroups: A Guide for HP-UX System Administrators
Administering a System: Managing Disks and Files
Managing Disks
Chapter 6 587
If you are using the disk space for a new purpose and do not need the
data contained in the logical volume, no backup is necessary. If, however,
you want to retain the data that will go into the smaller logical volume,
you must back it up first and then restore it once the smaller logical
volume has been created.
As an alternate to using lvreduce, you can also use the lvremove
command instead to remove the logical volume followed by lvcreate to
create a new one.
CAUTION Reduce the size of a logical volume ONLY if you no longer need its
current contents, or if you have safely backed up the contents to tape or
to another logical volume.
After reducing the size of a logical volume to a size smaller than a file
system contained within the logical volume, you must re-create the file
system as described in “Creating a File System” on page 603, and restore
the files. Thus, it is critical to be aware of the size of the contents of a
logical volume when you plan to reduce the size of the logical volume. See
“Problems After Reducing the Size of a Logical Volume” on page 597 for
more information.
It is not a simple task to reduce the size of a given file system once it has
been created. See “Reducing a Logical Volume” on page 868 and
“Replacing an Existing File System with a Smaller One” on page 619 for
more information.
Setting Up Alternate Links to a Physical Volume
Alternate links to a physical volume were described earlier under
“Increasing Availability with Alternate Links” on page 568. To use an
alternate link, you can create a volume group with vgcreate specifying
both the primary link and the alternate link device file names. Both
must represent paths to the same physical volume. (Do not run
pvcreate on the alternate link; it must already be the same physical
volume as the primary link.) When you indicate two device file names
both referring to the same disk using vgcreate, LVM configures the first
one as the primary link and the second one as the alternate link.
For example, if a disk has two cables and you want to make one the
primary link and the other an alternate link, enter:
vgcreate /dev/vg01 /dev/dsk/c3t0d0 /dev/dsk/c5t0d0