LVM Device Scans with Filters”
.
The following example shows the output of a
vgscan
command.
# vgscan
Reading all physical volumes.
This may take a while...
Found volume group "new_vg" using metadata type lvm2
Found volume group "officevg" using metadata type lvm2
3.5. Removing Physical Volumes from a Volume Group
To remove unused physical volumes from a volume group, use the
vgreduce
command. The
vgreduce
command shrinks a volume group's capacity by removing one or more empty
physical volumes. This frees those physical volumes to be used in different volume groups or to
be removed from the system.
Before removing a physical volume from a volume group, you can make sure that the physical
volume is not used by any logical volumes by using the
pvdisplay
command.
# pvdisplay /dev/hda1
-- Physical volume ---
PV Name
/dev/hda1
VG Name
myvg
PV Size
1.95 GB / NOT usable 4 MB [LVM: 122 KB]
PV#
1
PV Status
available
Allocatable
yes (but full)
Cur LV
1
PE Size (KByte)
4096
Total PE
499
Free PE
0
Allocated PE
499
PV UUID
Sd44tK-9IRw-SrMC-MOkn-76iP-iftz-OVSen7
If the physical volume is still being used you will have to migrate the data to another physical
volume using the
pvmove
command. Then use the
vgreduce
command to remove the physical
volume:
The following command removes the physical volume
/dev/hda1
from the volume group
my_volume_group
.
# vgreduce my_volume_group /dev/hda1
3.6. Changing the Parameters of a Volume Group
Group
29
Содержание GLOBAL FILE SYSTEM 5.0
Страница 1: ...LVM Administrator s Guide Configuration and Administration 5 0 ISBN N A Publication date...
Страница 4: ...LVM Administrator s Guide...
Страница 8: ...viii...
Страница 18: ...6...
Страница 28: ...16...
Страница 32: ...20...
Страница 80: ...68...
Страница 90: ...78...
Страница 92: ...80...
Страница 94: ...82...
Страница 112: ...100...