Chapter 13. Miscellaneous tasks 211
13.3 Extending an existing logical volume
This section describes the process of adding a new minidisk to an existing LVM. This is useful
when your logical volume has run out of space.
First, repeat the steps described in 13.1, “Adding DASD” on page 204 to add a new minidisk.
In this example, a minidisk at virtual address 104 is added with a size of 3338 cylinders. Do
not forget to log off and log back on to LINUX02 so the new directory entry is read.
When your system comes back, enable the new 104 disk, run dasdfmt on it and create a
single partition:
# chccwdev -e 104
Setting device 0.0.0104 online
Done
# lsdasd
Bus-ID Status Name Device Type BlkSz Size Blocks
==============================================================================
0.0.0100 active dasda 94:0 ECKD 4096 2347MB 600840
0.0.0101 active dasdb 94:4 ECKD 4096 2347MB 600840
0.0.0300 active dasdc 94:8 FBA 512 256MB 524288
0.0.0301 active dasdd 94:12 FBA 512 512MB 1048576
0.0.0102 active dasde 94:16 ECKD 4096 1173MB 300420
0.0.0103 active dasdf 94:20 ECKD 4096 1173MB 300420
0.0.0104 active dasdg 94:24 ECKD 4096 2347MB 600840
# dasdfmt -b 4096 -y -f /dev/dasdg
Finished formatting the device.
Rereading the partition table... ok
# fdasd -a /dev/dasdg
reading volume label ..: VOL1
reading vtoc ..........: ok
auto-creating one partition for the whole disk...
writing volume label...
writing VTOC...
rereading partition table...
13.3.1 Creating a physical volume
Use the pvcreate command to create a physical volume from the minidisk:
# pvcreate /dev/dasdg1
Physical volume "/dev/dasdg1" successfully created
13.3.2 Extending the volume group
Use the vgextend command to extend the volume group into the new physical volume. Then,
use vgdisplay to verify that the volume group has free space.
# vgdisplay homevg
--- Volume group ---
VG Name homevg
System ID
Format lvm2
Metadata Areas 2
Commenti su questo manuale