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