Managing Systems and Workgroups: A Guide for HP-UX System Administrators

Administering a System: Managing Disks and Files
Managing Disks
Chapter 6 577
Extending a Logical Volume to a Specific Disk
Suppose you want to create a 300 MB logical volume and put 100 MB on
your first disk, another 100 MB on your second disk, and 100 MB on your
third disk. To do so, follow these steps:
Step 1. After making the disks physical volumes and creating your volume
group, create a logical volume named lvol1 of size 0.
lvcreate -n lvol1 /dev/vg01
Step 2. Now allocate a total of 25 extents to the logical volume on the first
physical volume. (We are assuming in this example that each physical
extent is 4MB, the default value.)
lvextend -l 25 /dev/vg01/lvol1 /dev/dsk/c1t0d0
Step 3. Then increase the total number of physical extents allocated to the
logical volume for the remaining physical volumes by 25. In each case,
the additional 25 extents are allocated to the disk specified.
lvextend -l 50 /dev/vg01/lvol1 /dev/dsk/c2t0d0
lvextend -l 75 /dev/vg01/lvol1 /dev/dsk/c3t0d0
Note that when you use the -l option (lowercase L) of lvextend, you
specify space in logical extents.
Now suppose you have two disks in a volume group, both identical
models. You currently have a 275 MB logical volume that resides on only
one of the disks. You want to extend the logical volume size to 400 MB,
making sure the 125 MB increase is allocated to the other disk.
Again you extend the logical volume to a specific disk.
lvextend -L 400 /dev/vg01/lvol2 /dev/dsk/c2t0d0
Here, when you use the -L option (uppercase), you are specifying space
in megabytes, not logical extents.
See lvextend (1M) for complete information on command options.