Various ways to increase the size of a LVM partition
Content
By adding a new disk
Identify the new disk
1
lsblk
Initialize the disk
1
pvcreate /dev/vdh
Add the PV to the existing VG
1
vgextend influxdb /dev/vdh
Resize partition and filesystem
1
2
3
4
5
6
7
lvextend -l +100%FREE /dev/influxdb/influxdb
# ext4
resize2fs /dev/influxdb/influxdb
# xfs
xfs_growfs /dev/mapper/influxdb-influxdb
By increasing a PV size
Scan disks for physical volumes
1
pvscan
Resize the PV to the maximum size
1
pvresize /dev/sdh
Resize partition and filesystem
1
2
lvextend -l +100%FREE /dev/influxdb/influxdb
resize2fs /dev/influxdb/influxdb