- Check Available Disk
[root@testsvr01~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 60G 0 disk
├─sda1 8:1 0 1G 0 part /boot
└─sda2 8:2 0 59G 0 part
├─rhel-root 253:0 0 35.6G 0 lvm /
├─rhel-swap 253:1 0 6G 0 lvm [SWAP]
└─rhel-home 253:2 0 17.4G 0 lvm /home
sdb 8:16 0 250G 0 disk
sdc 8:32 0 250G 0 disk
sr0 11:0 1 376K 0 rom
sr1 11:1 1 1024M 0 rom
- Create Physical Disk Group
[root@testsvr01~]# pvcreate /dev/sdb /dev/sdc
Physical volume "/dev/sdb" successfully created.
Physical volume "/dev/sdc" successfully created.
- Extend Volumn Group
[root@testsvr01~]# vgextend vg_data /dev/sdb /dev/sdc
Volume group "vg_data" successfully extended
- Resize / Extend Logical Volumn
[root@testsvr01~]# lvresize -L +300g /dev/vg_data/lv_data
Size of logical volume vg_data/lv_data changed from 199.29 GiB (51019 extents) to 499.29 GiB (127819 extents).
Logical volume vg_data/lv_data successfully resized.
[root@testsvr01~]#
OR
[root@testsvr01~]# lvextend -L +300G /dev/vg_data/lv_data
Size of logical volume vg_data/lv_data
changed from 199.29 GiB (51019 extents) to 499.29 GiB (127819 extents).
Logical volume vg_data/lv_data successfully resized.
- List Logical Volumn
[root@testsvr01~]# lvdisplay
--- Logical volume ---
LV Path /dev/vg_data/lv_data
LV Name lv_data
VG Name vg_data
LV UUID Wbnxhc-fh6E-pqfh-TtXZ-edYe-S2w1-Abxtgk
LV Write Access read/write
LV Creation host, time testsvr01, 2022-12-15 15:06:22 +0530
LV Status available
# open 0
LV Size 499.99 GiB
Current LE 127998
Segments 2
Allocation inherit
Read ahead sectors auto
- currently set to 8192
Block device 253:3
- Extend XFS Partition
[root@testsvr01~]# xfs_growfs /dev/vg_data/lv_data
meta-data= /dev/vg_data/lv_data isize=512 agcount=8, agsize=26214400 blks
= sectsz=512 attr=2, projid32bit=1
= crc=1 finobt=0 spinodes=0
data = bsize=4096 blocks=209715200, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=1
log =internal bsize=4096 blocks=51200, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
data blocks changed from 209715200 to 393216000
[root@testsvr01~]#
- XFS Info
[root@testsvr01~]# xfs_info /dev/vg_data/lv_data
meta-data=/dev/vg_data/lv_data isize=512 agcount=21, agsize=6488064 blks
= sectsz=512 attr=2, projid32bit=1
= crc=1 finobt=0 spinodes=0
data = bsize=4096 blocks=130886656, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=1
log =internal bsize=4096 blocks=12672, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
[root@testsvr01~]#