1. Vcenter 添加磁盘

      1. 查看新建的磁盘
        1. []# fdisk -l | grep Disk
        2. Disk /dev/sda: 107.4 GB, 107374182400 bytes, 209715200 sectors
        3. Disk label type: dos
        4. Disk identifier: 0x000c1df3
        5. Disk /dev/mapper/centos-root: 79.8 GB, 79771467776 bytes, 155803648 sectors
        6. Disk /dev/mapper/centos-swap: 4294 MB, 4294967296 bytes, 8388608 sectors
        7. Disk /dev/sdb: 322.1 GB, 322122547200 bytes, 629145600 sectors
    2. 建立pv ```bash []# pvcreate /dev/sdb Physical volume “/dev/sdb” successfully created.

    []# pvs PV VG Fmt Attr PSize PFree
    /dev/sda2 centos lvm2 a— <98.00g 19.60g /dev/sdb centos lvm2 a— <300.00g <300.00g

    1. 4. 扩容vg
    2. ```bash
    3. [root@prd-second-DBslaver ~]# vgs
    4. VG #PV #LV #SN Attr VSize VFree
    5. centos 1 3 0 wz--n- <98.00g 19.60g
    6. [root@prd-second-DBslaver ~]# vgextend centos /dev/sdb
    7. Volume group "centos" successfully extended
    8. [root@prd-second-DBslaver ~]# vgs
    9. VG #PV #LV #SN Attr VSize VFree
    10. centos 2 3 0 wz--n- 397.99g <319.60g
    1. 扩容lv

      1. [root@prd-second-DBslaver ~]# lvs
      2. LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
      3. pool00 centos twi-aotz-- 74.29g 86.98 71.76
      4. root centos Vwi-aotz-- 74.29g pool00 86.98
      5. swap centos -wi-ao---- 4.00g
      6. [root@prd-second-DBslaver ~]# lvextend -l +100%FREE /dev/centos/root
      7. WARNING: Sum of all thin volume sizes (393.89 GiB) exceeds the size of thin pool centos/pool00 and the amount of free space in volume group (<319.60 GiB).
      8. WARNING: You have not turned on protection against thin pools running out of space.
      9. WARNING: Set activation/thin_pool_autoextend_threshold below 100 to trigger automatic extension of thin pools before they get full.
      10. Size of logical volume centos/root changed from 74.29 GiB (19019 extents) to 393.89 GiB (100836 extents).
      11. Logical volume centos/root successfully resized.
    2. 校验

      1. xfs_growfs /dev/mapper/centos-root

      image.png