[root@redhat6 ~]# vgdisplay --- Volume group --- VG Name vg_redhat6 System ID Format lvm2 Metadata Areas 1 Metadata Sequence No 3 VG Access read/write VG Status resizable MAX LV 0 Cur LV 2 Open LV 2 Max PV 0 Cur PV 1 Act PV 1 VG Size 14.51 GiB PE Size 4.00 MiB Total PE 3714 Alloc PE / Size 3714 / 14.51 GiB Free PE / Size 0 / 0 VG UUID E6cA2U-TL1x-ScCV-UnGU-3Kq4-1u6V-WUb5L4
[root@redhat6 ~]# vgdisplay --- Volume group --- VG Name vg_redhat6 System ID Format lvm2 Metadata Areas 2 Metadata Sequence No 4 VG Access read/write VG Status resizable MAX LV 0 Cur LV 2 Open LV 2 Max PV 0 Cur PV 2 Act PV 2 VG Size 18.50 GiB PE Size 4.00 MiB Total PE 4737 Alloc PE / Size 3714 / 14.51 GiB Free PE / Size 1023 / 4.00 GiB VG UUID E6cA2U-TL1x-ScCV-UnGU-3Kq4-1u6V-WUb5L4
备注: VG vg_redhat6 扩容成功。
2.4 停用 swap
1 2
[root@redhat6 ~]# swapoff -v /dev/vg_redhat6/lv_swap swapoff on /dev/vg_redhat6/lv_swap
[root@redhat6 ~]# mkswap /dev/vg_redhat6/lv_swap mkswap: /dev/vg_redhat6/lv_swap: warning: dont erase bootbits sectors on whole disk. Use -f to force. Setting up swapspace version 1, size = 1998844 KiB nolabel, UUID=47f6e518-6189-4231-9aed-9f7ad01c29ca
2.7 启用 swap
1 2 3 4
[root@redhat6 ~]# swapon -v /dev/vg_redhat6/lv_swap swapon on /dev/vg_redhat6/lv_swap swapon:/dev/mapper/vg_redhat6-lv_swap: found swap signature: version 1, page-size 4, same byte order swapon:/dev/mapper/vg_redhat6-lv_swap: pagesize=4096, swapsize=2046820352, devsize=2046820352