Menu Close

Red Hat Training

A Red Hat training course is available for Red Hat Enterprise Linux

4.3.6. 由​​​​​​​卷​​​​​​​冊​​​​​​​群​​​​​​​組​​​​​​​中​​​​​​​移​​​​​​​除​​​​​​​實​​​​​​​體​​​​​​​卷​​​​​​​冊​​​​​​​

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.
在​​​​​​​由​​​​​​​一​​​​​​​個​​​​​​​卷​​​​​​​冊​​​​​​​群​​​​​​​組​​​​​​​中​​​​​​​移​​​​​​​除​​​​​​​實​​​​​​​體​​​​​​​卷​​​​​​​冊​​​​​​​之​​​​​​​前​​​​​​​,您​​​​​​​可​​​​​​​藉​​​​​​​由​​​​​​​使​​​​​​​用​​​​​​​ pvdisplay 指​​​​​​​令​​​​​​​來​​​​​​​確​​​​​​​認​​​​​​​實​​​​​​​體​​​​​​​卷​​​​​​​冊​​​​​​​並​​​​​​​未​​​​​​​被​​​​​​​任​​​​​​​何​​​​​​​邏​​​​​​​輯​​​​​​​卷​​​​​​​冊​​​​​​​使​​​​​​​用​​​​​​​中​​​​​​​。​​​​​​​
# 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
若​​​​​​​實​​​​​​​體​​​​​​​卷​​​​​​​冊​​​​​​​依​​​​​​​然​​​​​​​使​​​​​​​用​​​​​​​中​​​​​​​,您​​​​​​​便​​​​​​​必​​​​​​​須​​​​​​​透​​​​​​​過​​​​​​​使​​​​​​​用​​​​​​​ pvmove 指​​​​​​​令​​​​​​​來​​​​​​​將​​​​​​​資​​​​​​​料​​​​​​​遷​​​​​​​移​​​​​​​至​​​​​​​另​​​​​​​一​​​​​​​個​​​​​​​實​​​​​​​體​​​​​​​卷​​​​​​​冊​​​​​​​上​​​​​​​。​​​​​​​然​​​​​​​後​​​​​​​使​​​​​​​用​​​​​​​ vgreduce 指​​​​​​​令​​​​​​​來​​​​​​​移​​​​​​​除​​​​​​​掉​​​​​​​實​​​​​​​體​​​​​​​卷​​​​​​​冊​​​​​​​:
下​​​​​​​列​​​​​​​指​​​​​​​令​​​​​​​會​​​​​​​將​​​​​​​實​​​​​​​體​​​​​​​卷​​​​​​​冊​​​​​​​ /dev/hda1 由​​​​​​​ my_volume_group 卷​​​​​​​冊​​​​​​​群​​​​​​​組​​​​​​​中​​​​​​​移​​​​​​​除​​​​​​​。​​​​​​​
# vgreduce my_volume_group /dev/hda1