LVM 扩容磁盘
1、查看新增加的磁盘
[root@vrdapavn02wmsp3 ~]
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 100G 0 disk
├─sda1 8:1 0 500M 0 part /boot
└─sda2 8:2 0 99.5G 0 part
├─rhel-root 253:0 0 78.5G 0 lvm /
├─rhel-swap 253:1 0 1G 0 lvm [SWAP]
└─rhel-home 253:2 0 20G 0 lvm /home
sdb 8:16 0 300G 0 disk
sr0 11:0 1 1024M 0 rom
[root@vrdapavn02wmsp3 ~]
2、创建PV物理卷
[root@vrdapavn02wmsp3 bin]
Physical volume "/dev/sdb" successfully created
[root@vrdapavn02wmsp3 bin]
PV VG Fmt Attr PSize PFree
/dev/sda2 rhel lvm2 a-- 99.51g 0
/dev/sdb lvm2 --- 300.00g 300.00g
[root@vrdapavn02wmsp3 bin]
3、扩展VG卷组
//使用vgs命令查看卷组信息
[root@vrdapavn02wmsp3 bin]
VG
rhel 1 3 0 wz--n- 99.51g 0
[root@vrdapavn02wmsp3 bin]
Volume group "rhel" successfully extended
[root@vrdapavn02wmsp3 bin]
//使用lvextend命令扩展逻辑卷
[root@vrdapavn02wmsp3 bin]
Insufficient free space: 76800 extents needed, but only 76799 available
[root@vrdapavn02wmsp3 bin]
Rounding size to boundary between physical extents: 299.99 GiB
Size of logical volume rhel/root changed from 78.51 GiB (20098 extents) to 378.50 GiB (96896 extents).
Logical volume root successfully resized.
4、使用xfs_growfs命令使扩容生效
[root@vrdapavn02wmsp3 bin]