Centos 7 在线磁盘扩容

l sblk df -Th 查看磁盘信息

df -Th

1 查看物理卷 pvs 或者 pvdisplay 或者 pvscan

[root@oracledb Thu Mar 13 13:53:44 /]# pvs

PV VG Fmt Attr PSize PFree

/dev/sda3 centos lvm2 a-- <237.28g 0

/dev/sdb1 centos lvm2 a-- <1.82t 0

/dev/sdd2 centos00 lvm2 a-- <464.76g 0

2 查看卷组 vgs vgdisplay vgscan

[root@oracledb Thu Mar 13 13:58:29 /]# vgs

VG #PV #LV #SN Attr VSize VFree

centos 2 5 0 wz--n- 2.05t 0

centos00 1 3 0 wz--n- <464.76g 0

3 查看逻辑卷 lvs lvdisplay lvscan

root@oracledb Thu Mar 13 13:59:25 /\]# lvs LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert big-data centos -wi-a----- \<1.71t home centos -wi-a----- 200.00g root centos -wi-a----- 50.00g swap centos -wi-a----- 4.00g temp_home_data centos -wi-ao---- 100.00g home centos00 -wi-a----- \<410.76g root centos00 -wi-ao---- 50.00g swap centos00 -wi-a----- 4.00g 701 lvs 702 vgs 704 df -h / 705 lvextend -L +10g /dev/mapper/centos00-root 707 lvextend -L +40g /dev/mapper/centos00-root 711 df -Th 712 xfs_growfs /dev/mapper/centos00-root resize2fs 针对文件系统 ext2 ext3 ext4 xfs_growfs 针对文件系统 xfs ### ******. 常用命令---格式化逻辑卷****** #### ******4.**** ****将逻辑卷lv1格式化(xfs格式)****** mkfs.xfs /dev/vg01/lv1 #### ******5.**** ****将逻辑卷lv1格式化(ext4格式)****** mkfs.ext4 /dev/vg01/lv1 6、启动自动挂载 vim /etc/fstab /dev/mapper/centos-temp_home_data /home ext4 defaults 0 0 /dev/mapper/centos-big_data /big_data ext4 defaults 0 0

相关推荐
Kaede62 小时前
如何应对Linux云服务器磁盘空间不足的情况
linux·运维·服务器
Kookoos5 小时前
Dynamics 365 Finance + Power Automate 自动化凭证审核
运维·自动化·dynamics 365·power automate
apocelipes7 小时前
Linux c 运行时获取动态库所在路径
linux·c语言·linux编程
努力学习的小廉8 小时前
深入了解linux系统—— 进程池
linux·运维·服务器
秃头菜狗8 小时前
各个主要目录的功能 / Linux 常见指令
linux·运维·服务器
2301_793102498 小时前
Linux——MySql数据库
linux·数据库
jiunian_cn10 小时前
【Linux】centos软件安装
linux·运维·centos
睡觉待开机10 小时前
0. MySQL在Centos 7环境安装
数据库·mysql·centos
藥瓿亭10 小时前
K8S认证|CKS题库+答案| 6. 创建 Secret
运维·ubuntu·docker·云原生·容器·kubernetes·cks
程序员JerrySUN10 小时前
[特殊字符] 深入理解 Linux 内核进程管理:架构、核心函数与调度机制
java·linux·架构