本文介绍: Centos分区快接近100%,如果根分区逻辑卷,那么可以增加额外磁盘通过逻辑卷扩容的方式增加到根分区空间。6.检查分区所在卷组,把新建的物理卷加入到根分区的卷组。3.把磁盘格式化为lvm类型文件分区。7.扩展根分区,并扩展文件系统。1.检查当前根分区大小。8.验证扩容后的根分区。

Centos根分区快接近100%,如果根分区是逻辑卷,那么可以增加额外磁盘通过逻辑卷扩容的方式增加到根分区空间

1.检查当前根分区大小

df -Th

2.检查额外磁盘

3.把磁盘格式化为lvm类型文件分区。

[root@localhost ~]# fdisk /dev/sdb
Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0xd430b089.

Command (m for help): n
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-209715199, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-209715199, default 209715199):
Using default value 209715199
Partition 1 of type Linux and of size 100 GiB is set

Command (m for help): t
Selected partition 1
Hex code (type L to list all codes): 8e
Changed type of partition 'Linux' to 'Linux LVM'

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

4.重载分区表

partprobe /dev/sdb

5.创建物理卷

pvcreate /dev/sdb1

6.检查根分区所在卷组,把新建的物理卷加入到根分区的卷组

7.扩展根分区,并扩展文件系统

8.验证扩容后的根分区

根分区扩容结束

原文地址:https://blog.csdn.net/Cisco_hw_zte/article/details/134745106

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任

如若转载,请注明出处:http://www.7code.cn/show_23888.html

如若内容造成侵权/违法违规/事实不符,请联系代码007邮箱suwngjj01@126.com进行投诉反馈,一经查实,立即删除

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注