阿里云ECS磁盘扩容
环境:
OS:Centos 7
1.控制台添加云盘
2.创建pv
pvcreate /dev/sdc
3.扩充VG
[root@19c ~]# vgs
VG #PV #LV #SN Attr VSize VFree
centos 2 2 0 wz--n- 42.99g 0
[root@19c ~]# vgextend centos /dev/sdc
Volume group "centos" successfully extended
4.扩充LV
[root@19c ~]# lvdisplay
--- Logical volume ---
LV Path /dev/centos/swap
LV Name swap
VG Name centos
LV UUID 1s5Iwx-Zr4D-H6Xa-z8wu-VVIC-F7EJ-VkIrxh
LV Write Access read/write
LV Creation host, time 19c, 2023-02-13 02:18:05 -0500
LV Status available
# open 2
LV Size 4.00 GiB
Current LE 1024
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 8192
Block device 253:1
--- Logical volume ---
LV Path /dev/centos/root
LV Name root
VG Name centos
LV UUID AQS4Y1-D6Pn-pGmL-0JUb-KCs5-w8dk-WEulby
LV Write Access read/write
LV Creation host, time 19c, 2023-02-13 02:18:06 -0500
LV Status available
# open 1
LV Size 38.99 GiB
Current LE 9982
Segments 2
Allocation inherit
Read ahead sectors auto
- currently set to 8192
Block device 253:0
[root@19c ~]# lvresize -l +100%FREE /dev/centos/root
Size of logical volume centos/root changed from 38.99 GiB (9982 extents) to <42.99 GiB (11005 extents).
Logical volume centos/root successfully resized.
5.扩充文件系统
[root@19c ~]# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 2.9G 0 2.9G 0% /dev
tmpfs 2.9G 0 2.9G 0% /dev/shm
tmpfs 2.9G 9.0M 2.9G 1% /run
tmpfs 2.9G 0 2.9G 0% /sys/fs/cgroup
/dev/mapper/centos-root 39G 28G 12G 70% /
/dev/sda1 1014M 161M 854M 16% /boot
tmpfs 581M 0 581M 0% /run/user/0
[root@19c ~]# xfs_growfs /
meta-data=/dev/mapper/centos-root isize=512 agcount=5, agsize=2293504 blks
= sectsz=512 attr=2, projid32bit=1
= crc=1 finobt=0 spinodes=0
data = bsize=4096 blocks=10221568, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=1
log =internal bsize=4096 blocks=4479, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
data blocks changed from 10221568 to 11269120
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?
2022-03-28 mongodb执行js命令