LVM Volume Group Dynamic LUN Expansion (DLE) and Contraction (DLC) (September 2009)

33
*Entries deleted for brevity*
11997 current /dev/vg01/lvol1 11997
11998 current /dev/vg01/lvol1 11998
11999 current /dev/vg01/lvol1 11999
12000 free 00000
12001 free 00000
*Entries deleted for brevity*
13998 free 00000
13999 free 00000
14000 current /dev/vg01/lvol2 00000
14001 current /dev/vg01/lvol2 00001
14002 current /dev/vg01/lvol2 00002
*Entries deleted for brevity*
15997 current /dev/vg01/lvol2 01997
15998 current /dev/vg01/lvol2 01998
15999 current /dev/vg01/lvol2 01999
16000 free 00000
16001 free 00000
*Entries deleted for brevity*
17498 free 00000
17499 free 00000
17500 free 00000
# diskinfo /dev/rdsk/c4t2d0
SCSI describe of /dev/rdsk/c4t2d0:
vendor: HP 73.4G
product id: ST373405FC
type: direct access
size: 71687369 Kbytes
bytes per sector: 512
On disk /dev/dsk/c4t2d0, the first 12000 extents belong to /dev/vg01/lvol1 and the next
2000 extents are free. Extents from 14000 to 15999 are allocated and belong to logical
volume /dev/vg01/lvol2.
2. Run the vgmodify command with the –C option in review mode to determine if you can
reduce the physical volume size to 50 GB. Note: You can run review mode with and without
the –a option. The -a option indicates that the vgmodify command can be run when the
volume group is active (online vgmodify).
# vgmodify -r -C 51200 vg01 /dev/rdsk/c4t2d0
The last 4702 extent(s) on the physical volume "/dev/rdsk/c4t2d0"
have to be made free (see pvmove(1M)) to be able to prepare it for
contraction to 51200 MB.
The physical volume "/dev/rdsk/c4t2d0" can be prepared for
contraction to 64003 MB without having to move any physical extents
on it.
The physical volume "/dev/rdsk/c4t2d0" can be prepared for
contraction to a minimum size of 56003 MB after freeing up the last
3501 physical extents.
An update to the Volume Group IS required
Review complete. Volume group not modified
In the output, the second message shows the minimum size to which the physical volume can
be contracted without having to move any physical extents on it. The third message shows the
minimum size to which the physical volume can be contracted after moving the allocated
extents.
3. Use the pvmove command to move the allocated physical extents. To reduce the size of the
disk to 50 GB, you must move the allocated extents of /dev/vg01/lvol2 to a different disk.