正德厚生,臻于至善

云主机根分区扩容

https://blog.csdn.net/weixin_44147924/article/details/123113648

[root@dehetu ~]# lsblk
NAME   MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
vda    253:0    0  70G  0 disk 
└─vda1 253:1    0  40G  0 part /
[root@dehetu ~]# yum install cloud-utils-growpart -y   
Package cloud-utils-growpart-0.29-5.el7.noarch already installed and latest version
Nothing to do
[root@dehetu ~]# growpart /dev/vda 1
CHANGED: partition=1 start=2048 old: size=83873317 end=83875365 new: size=146798559 end=146800607
[root@dehetu ~]# parted -l /dev/vda
Model: Virtio Block Device (virtblk)
Disk /dev/vda: 75.2GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  75.2GB  75.2GB  primary  ext4         boot

[root@dehetu ~]# resize2fs -f  /dev/vda1
resize2fs 1.42.9 (28-Dec-2013)
Filesystem at /dev/vda1 is mounted on /; on-line resizing required
old_desc_blocks = 3, new_desc_blocks = 5
The filesystem on /dev/vda1 is now 18349819 blocks long.

[root@dehetu ~]# df -h
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        486M     0  486M   0% /dev
tmpfs           496M     0  496M   0% /dev/shm
tmpfs           496M  448K  495M   1% /run
tmpfs           496M     0  496M   0% /sys/fs/cgroup
/dev/vda1        69G   30G   36G  46% /
tmpfs           100M     0  100M   0% /run/user/0
[root@dehetu ~]# 
赞(0) 打赏
未经允许不得转载:徐万新之路 » 云主机根分区扩容

评论 抢沙发

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫

微信扫一扫

登录

找回密码

注册