lvm

add new disk to a volume group

what disk will be used, and what group will be extended?

$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 16G 0 disk
|-sda1 8:1 0 1G 0 part /boot
`-sda2 8:2 0 15G 0 part
|-centos-root 253:0 0 29.4G 0 lvm /
`-centos-swap 253:1 0 1.6G 0 lvm
sdb 8:16 0 16G 0 disk
sr0 11:0 1 1024M 0 rom

in my case, i want to add sdb to / (group centos-root). run all as root user.

pvcreate /dev/sdb
lvmdiskscan -l
vgextend centos /dev/sdb
lvm lvextend -l +100%FREE /dev/mapper/centos-root
xfs_growfs /dev/mapper/centos-root