Skip to content

阿里云系统盘扩容 #85

Open
Open
@yangweijie

Description

@yangweijie

0.如果yum出问题则更换aliyun的源
cd /etc/yum.repos.d
mv CentOS-Base.repo CentOS-Base.repo.bak
wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

1.安装软件
yum install cloud-utils-growpart
yum install xfsprogs

2.Check磁盘
df -h
fdisk -l

3.执行(根据阿里云硬盘特性,参数为1 vda1为系统盘)
growpart /dev/[设备] 1 (sda) 如果这个命令报错了,可执行LANG=en_US.UTF-8命令
growpart /dev/vda 1
4.更新
resize2fs /dev/[分区] (sda1)
resize2fs /dev/vda1
5.完成确认
df -h
reboot

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions