Vcenter 添加磁盘
- 查看新建的磁盘
[]# fdisk -l | grep DiskDisk /dev/sda: 107.4 GB, 107374182400 bytes, 209715200 sectorsDisk label type: dosDisk identifier: 0x000c1df3Disk /dev/mapper/centos-root: 79.8 GB, 79771467776 bytes, 155803648 sectorsDisk /dev/mapper/centos-swap: 4294 MB, 4294967296 bytes, 8388608 sectorsDisk /dev/sdb: 322.1 GB, 322122547200 bytes, 629145600 sectors
- 查看新建的磁盘
建立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
4. 扩容vg```bash[root@prd-second-DBslaver ~]# vgsVG #PV #LV #SN Attr VSize VFreecentos 1 3 0 wz--n- <98.00g 19.60g[root@prd-second-DBslaver ~]# vgextend centos /dev/sdbVolume group "centos" successfully extended[root@prd-second-DBslaver ~]# vgsVG #PV #LV #SN Attr VSize VFreecentos 2 3 0 wz--n- 397.99g <319.60g
扩容lv
[root@prd-second-DBslaver ~]# lvsLV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convertpool00 centos twi-aotz-- 74.29g 86.98 71.76root centos Vwi-aotz-- 74.29g pool00 86.98swap centos -wi-ao---- 4.00g[root@prd-second-DBslaver ~]# lvextend -l +100%FREE /dev/centos/rootWARNING: 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).WARNING: You have not turned on protection against thin pools running out of space.WARNING: Set activation/thin_pool_autoextend_threshold below 100 to trigger automatic extension of thin pools before they get full.Size of logical volume centos/root changed from 74.29 GiB (19019 extents) to 393.89 GiB (100836 extents).Logical volume centos/root successfully resized.
校验
xfs_growfs /dev/mapper/centos-root

