问题描述:CentOS8安装growpart时,报404错误,导致后续操作无法执行。

 

 

 

操作流程 

1.备份原有yum源配置:

cd /etc/yum.repos.d/  
mkdir bak 
mv * bak

2.在/etc/yum.repos.d目录下新建CentOS-Base.repo文件:

 vi /etc/yum.repos.d/CentOS-Base.repo

3.在/etc/yum.repos.d/CentOS-Base.repo文件中编辑以下内容:

# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
  
[base]
name=CentOS-8-stream - Base - mirrors.aliyun.com
failovermethod=priority
baseurl=https://mirrors.aliyun.com/centos/8-stream/BaseOS/$basearch/os/
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official
  
#additional packages that may be useful
[extras]
name=CentOS-8-stream - Extras - mirrors.aliyun.com
failovermethod=priority
baseurl=https://mirrors.aliyun.com/centos/8-stream/extras/$basearch/os/
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official
  
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-8-stream - Plus - mirrors.aliyun.com
failovermethod=priority
baseurl=https://mirrors.aliyun.com/centos/8-stream/centosplus/$basearch/os/
gpgcheck=1
enabled=0
gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official
  
[PowerTools]
name=CentOS-8-stream - PowerTools - mirrors.aliyun.com
failovermethod=priority
baseurl=https://mirrors.aliyun.com/centos/8-stream/PowerTools/$basearch/os/
gpgcheck=1
enabled=0
gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official
 
 
[AppStream]
name=CentOS-8-stream - AppStream - mirrors.aliyun.com
failovermethod=priority
baseurl=https://mirrors.aliyun.com/centos/8-stream/AppStream/$basearch/os/
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official

 

4.更新yum:

yum clean all
yum makecache

5.再次尝试安装growpart

 

6.后续磁盘扩容操作

growpart /dev/vda 1

xfs_growfs /dev/vda1(meta-data值)

 

 

 

 

 

 

 

 

相关链接:

1.centos8 停止服务后yum报错解决(https://cloud.tencent.com/developer/article/1942870)

2.在线扩容云盘(Linux系统)(https://help.aliyun.com/document_detail/113316.html?spm=5176.11346930configuration.help.64.49fd586dHXqFpm#concept-syg-jxz-2hb)

 

posted on 2022-03-05 16:02  缈影  阅读(526)  评论(0编辑  收藏  举报