【Extended partition】Centos 6 cloud server extended partition step description; abnormal No package, etc.

Extended Partition Common Abnormal Sorting

异常 The requested URL returned error: 404

Same type of exception:

  1. Error Downloading Packages: cloud-utils-growpart-0.27-10.el6.x86_64: failure
  2. [Errno 14] PYCURL ERROR 22 - “The requested URL returned error: 404 Not Found”

Abnormality: Official prompt, you need to replace Alibaba Cloud to solve it; official solution link: Alibaba Cloud replaces the source
According to the official document, people are numb, and there is no solution; you can try the following to solve it:

#1、进入到 /etc/yum.repos.d目录下
cd /etc/yum.repos.d
#2、先备份原来的 CentOS-Base.repo 文件
cp CentOS-Base.repo CentOS-Base.repo.old
#3、修改 CentOS-Base.repo 文件
vi CentOS-Base.repo

The edited content is as follows:

[base]
name=CentOS-$releasever - Base
# mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
# baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
baseurl=https://mirrors.aliyun.com/centos-vault/6.10/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

# released updates
[updates]
name=CentOS-$releasever - Updates
# mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
# baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
baseurl=https://mirrors.aliyun.com/centos-vault/6.10/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

# additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
# mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
# baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
baseurl=https://mirrors.aliyun.com/centos-vault/6.10/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

Copy and paste directly;

Enter the following command and wait:

#3、清理yum 缓存
yum clean all
#执行 yum install 或者 yum update 就一切正常了
yum update

异常 No package cloud-utils-growpart available

Need to execute the following command

#安装扩展包
yum install epel-release

Extend Partition Steps

Aliyun official document address: extended partition address, click me

This case is only for MBR partition reference, for other types, please operate according to the official document

  1. View cloud disk and its partition information.
fdisk -lu
  1. Install growpart; if the installation is abnormal, please refer to the above exception handling;
type growpart || yum install -y cloud-utils-growpart
  1. Enter the following command; /dev/vdb is your partition; use fdisk -lu to check it out;
LC_ALL=en_US.UTF-8 growpart /dev/vda 1

insert image description here
Check out the hint above;

  1. Execute the resize2fs command /dev/vda1 for the same reason
resize2fs /dev/vda1

If you are prompted to be abnormal: The filesystem is already 10485504 blocks long. Nothing to do!

Restart, this is a system problem, there is no way

reboot
  1. The restart is successful, re-execute the fourth
    insert image description here
  2. successful expansion
    insert image description here

Guess you like

Origin blog.csdn.net/qq_1498869403/article/details/131012511