cdp集群主节点根目录磁盘扩容

查看挂载点

df -h

在这里插入图片描述

可以看到,根目录容量只有37G,现在对根目录进行扩容

查看根目录挂载的磁盘大小

lsblk

在这里插入图片描述

挂载磁盘名字为vda,磁盘容量有80G,现在磁盘使用量为vda下面三个分区vda1,vda2,vda3容量之和,也就是说vda这块磁盘还有大约40G的容量未使用,现在增加一个分区,在把根目录挂上去就可以实现对根目录扩容了。

添加磁盘分区

fdisk /dev/vda

在这里插入图片描述

刷新磁盘分区

partprobe

出现报错:

这里是引用
Error: 备份 GPT 表不像应该的那样出现在磁盘的末尾。这可能意味这其它操作系统相信磁盘小一些。通过将备份移动到末尾 (并删除旧备份) 来修正?
Warning: Not all of the space available to /dev/vda appears to be used, you can fix the GPT to use all of the space (an extra 83886080 blocks) or continue with the current setting?

采用另一种分配资源的方式

划分磁盘

#安装gdisk磁盘分配工具
yum install gdisk -y
#划分磁盘
gdisk /dev/vda
[root@cloudcdp01 ~]# gdisk /dev/vda
GPT fdisk (gdisk) version 0.8.10Partition table scan:MBR: hybridBSD: not presentAPM: not presentGPT: presentFound valid GPT with hybrid MBR; using GPT.Command (? for help): p  
Disk /dev/vda: 167772160 sectors, 80.0 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 2591E18B-299A-44C7-9070-551E8E4FA2F6
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 83886046
Partitions will be aligned on 2048-sector boundaries
Total free space is 4029 sectors (2.0 MiB)Number  Start (sector)    End (sector)  Size       Code  Name1            2048          411647   200.0 MiB   EF00  EFI System Partition2          411648         2508799   1024.0 MiB  0700  3         2508800        83884031   38.8 GiB    8E00  Command (? for help): n
Partition number (4-128, default 4): 4
First sector (34-83886046, default = 83884032) or {+-}size{KMGTP}: 
Last sector (83884032-83886046, default = 83886046) or {+-}size{KMGTP}: 
Current type is 'Linux filesystem'
Hex code or GUID (L to show codes, Enter = 8300): 
Changed type of partition to 'Linux filesystem'Command (? for help): p
Disk /dev/vda: 167772160 sectors, 80.0 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 2591E18B-299A-44C7-9070-551E8E4FA2F6
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 83886046
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)Number  Start (sector)    End (sector)  Size       Code  Name1            2048          411647   200.0 MiB   EF00  EFI System Partition2          411648         2508799   1024.0 MiB  0700  3         2508800        83884031   38.8 GiB    8E00  4        83884032        83886046   1007.5 KiB  8300  Linux filesystemCommand (? for help): w
Warning! Secondary header is placed too early on the disk! Do you want to
correct this problem? (Y/N): Y
Have moved second header and partition table to correct location.Warning! Mismatched GPT and MBR partition! MBR partition 4, of type 0x83,
has no corresponding GPT partition! You may continue, but this condition
might cause data loss in the future!Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!Do you want to proceed? (Y/N): Y
OK; writing new GUID partition table (GPT) to /dev/vda.
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot.
The operation has completed successfully.
[root@cloudcdp01 ~]# 

刷新磁盘分区

partprobe

可以看到新加的磁盘分区加上了

在这里插入图片描述

大小有点少,重新分配一下

[root@cloudcdp01 ~]# gdisk /dev/vda
GPT fdisk (gdisk) version 0.8.10Partition table scan:MBR: hybridBSD: not presentAPM: not presentGPT: presentFound valid GPT with hybrid MBR; using GPT.Command (? for help): d
Partition number (1-4): 4Command (? for help): p
Disk /dev/vda: 167772160 sectors, 80.0 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 2591E18B-299A-44C7-9070-551E8E4FA2F6
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 167772126
Partitions will be aligned on 2048-sector boundaries
Total free space is 83890109 sectors (40.0 GiB)Number  Start (sector)    End (sector)  Size       Code  Name1            2048          411647   200.0 MiB   EF00  EFI System Partition2          411648         2508799   1024.0 MiB  0700  3         2508800        83884031   38.8 GiB    8E00  Command (? for help): n
Partition number (4-128, default 4): 4
First sector (34-167772126, default = 83884032) or {+-}size{KMGTP}: 
Last sector (83884032-167772126, default = 167772126) or {+-}size{KMGTP}: 
Current type is 'Linux filesystem'
Hex code or GUID (L to show codes, Enter = 8300): 
Changed type of partition to 'Linux filesystem'Command (? for help): p
Disk /dev/vda: 167772160 sectors, 80.0 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 2591E18B-299A-44C7-9070-551E8E4FA2F6
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 167772126
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)Number  Start (sector)    End (sector)  Size       Code  Name1            2048          411647   200.0 MiB   EF00  EFI System Partition2          411648         2508799   1024.0 MiB  0700  3         2508800        83884031   38.8 GiB    8E00  4        83884032       167772126   40.0 GiB    8300  Linux filesystemCommand (? for help): wWarning! Mismatched GPT and MBR partition! MBR partition 4, of type 0x83,
has no corresponding GPT partition! You may continue, but this condition
might cause data loss in the future!Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!Do you want to proceed? (Y/N): Y
OK; writing new GUID partition table (GPT) to /dev/vda.
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot.
The operation has completed successfully.
[root@cloudcdp01 ~]# 

在这里插入图片描述

在刷新一下磁盘分区

partprobe

可以看到,4号分区(vda4)已经加进去了

在这里插入图片描述

接下来把根目录挂上去

创建物理卷

lvm
lvm> pvcreate /dev/vda4
lvm> pvdisplay

在这里插入图片描述

显示系统中所有卷组的信息

lvm> vgdisplay

在这里插入图片描述

/dev/vda4 中的空间添加到 centos 卷组中

lvm> vgextend centos /dev/vda4
lvm> vgdisplay

在这里插入图片描述

扩展逻辑卷 /dev/centos/root,并将其大小增加了100% 的可用空间。

lvm> lvextend -l +100%FREE /dev/centos/root
lvm> exit

在这里插入图片描述

添加成功

在这里插入图片描述

扩展文件系统,/dev/centos/root 是逻辑卷的路径,关联的 XFS 文件系统扩展到逻辑卷的整个大小.

xfs_growfs /dev/centos/root

在这里插入图片描述

查看根目录大小,根目录扩容成功

df -h

在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://xiahunao.cn/news/2979404.html

如若内容造成侵权/违法违规/事实不符,请联系瞎胡闹网进行投诉反馈,一经查实,立即删除!

相关文章

AI测试干货!实例讲解AI自动生成测试用例

1.引言 在软件开发过程中,测试用例的生成是至关重要的一步。测试用例是用于验证软件功能、性能和安全性的具体测试方法,是确保软件质量的关键手段。 随着人工智能(AI)技术的发展,基于AI的测试用例生成技术逐渐成为未…

报销管理如何秒变高效神器?

一、客户介绍 易快报作为业界知名的企业报销管理平台,一直致力于为企业提供高效、便捷的报销服务。随着业务的不断扩展,易快报面临着与多个外部系统进行数据交互的需求,以提升工作效率和减少数据差错。中信建投作为国内领先的金融机构&#…

Docker镜像与容器操作

一、Docker 镜像操作 1.1 搜索镜像 格式:docker search 关键字 docker search nginx 1.2 获取镜像nginx 格式:docker pull 仓库名称[:标签] 如果下载镜像时不指定标签,则默认会下载仓库中最新版本的镜像,即选择标签为 latest…

DOM4标准的事件监听与滚屏优化

EventTarget.addEventListener() 我们在学习addEventListener()时都只是知道它是用来给事件注册事件处理函数的。但是这种描述并不是很准确,MDN上给我们准确的描述了它的定义。EventTarget.addEventListener()方法将指定的监听器注册到EventTarget上,当…

字符长、看不懂、费率飙升|Runes协议上线后发生了什么?

作者:比特里里 X/推:lilyanna_btc 1、字符数长了,单词都完整了,反而看不懂了 由于 Runes 协议的字符长度限制,大部分的票都在 13 个字符及以上,人名、域名、slogan,各类玩法都出来了。很多人适…

文本向量化模型新突破——acge_text_embedding勇夺C-MTEB榜首

在人工智能的浪潮中,以GPT4、Claude3、Llama 3等大型语言模型(LLM)无疑是最引人注目的潮头。这些模型通过在海量数据上的预训练,学习到了丰富的语言知识和模式,展现了出惊人的能力。在支撑这些大型语言模型应用落地方面…

JS----前端不同格式的 UUID生成

前端 UUID生成 export const generateUUID () > {let timestamp new Date().getTime()let performanceNow (typeof performance ! undefined && performance.now && performance.now() * 1000) || 0return xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx.replac…

免费好用的AI绘画生成器推荐,建议收藏!

AI绘画生成器可以根据设计师的需求生成各种风格、主题的绘画作品,无论是现代抽象,还是古典风景,都能应有尽有。任何人只需几步简单操作,都可以轻松使用这款工具,就能生成出令人惊艳的作品。那么免费好用的AI绘画生成器…

docker部署通义千问-7B-Chat的openai-api环境

服务器环境: 显卡驱动:Driver Version: 530.30.02 CUDA版本:CUDA Version: 12.1 显卡:NVIDIA GeForce RTX 3090共4张 注意:最好把显卡驱动升级到530,CUDA版本之前使用11.7有问题。 一、下载模型文件 …

Linux之安装Nginx

目录 传送门前言一、快速安装二、反向代理语法1、基本语法2、location语法1. 基本语法2. 匹配规则3. 修饰符4. 权重5. 嵌套location6. 其他指令7.案例 三、配置反向代理 传送门 SpringMVC的源码解析(精品) Spring6的源码解析(精品&#xff0…

2024年深圳杯东三省数学建模联赛A题论文首发第二种思路

深圳杯A题论文代码分享资料链接:链接:https://pan.baidu.com/s/1L2NVgoefSW-yuqZjEB3wcw 提取码:sxjm 问题一 数据转换: 首先,我们将监测站的经纬度坐标转换为基于米的笛卡尔坐标系。这是因为在地面上的大尺度距离…

selenium‘拟人包装‘设置

1、设置header,proxy 1.1关于user-agent 输入about:version 找到user-agent: import requests # 引用requests库 from selenium import webdriver#载入浏览器驱动#header,proxy设置 optionswebdriver.ChromeOptions()#实例化浏览器参数设置options.add_argument…

探索深度与广度的平衡:迭代加深深度优先搜索技术解析

探索深度与广度的平衡:迭代加深深度优先搜索技术解析 迭代加深深度优先搜索(IDDFS)的基本原理伪代码C语言实现讨论结论 迭代加深(Iterative Deepening Depth-First Search, IDDFS)是一种用于解决搜索问题的方法&#x…

解决配置Tomcat时,找不到war和war exploded问题

解决配置Tomcat时,找不到war和war exploded问题 文章目录 解决配置Tomcat时,找不到war和war exploded问题前言一、解决方法:1. war exploded2. war 总结 前言 提示:以下是本篇文章正文内容: 一、解决方法:…

spring的跨域问题

跨域问题 什么是跨域解决跨域 什么是跨域 跨域问题本质是浏览器的一种保护机制,它的初衷是为了保证用户的安全,防止恶意网站窃取数据。如果出现了以下情况中的任意一种,那么它就是跨域请求: 1、协议不同,如 http 和 h…

网站想实现HTTPS访问需要有哪些步骤?

网站要实现HTTPS访问,以确保数据传输安全和提升用户信任度,主要需按以下步骤操作: 1. 购买或申请SSL证书: - 根据网站类型和需求,选择合适的SSL证书:DV(域名验证)、OV(组…

翻页电子图书制作小技巧分享给你

当今社会,二维码已经成为了信息传递的重要方式之一,其在电子商务、广告营销、活动推广等领域广泛应用。而如何将二维码巧妙地融入电子画册中,制作出高端、具有吸引力的作品,成为了许多设计师和营销人员关注的焦点 但是很多人却不知…

TCP协议核心一文搞懂<随手笔记>

1.简介 传输控制协议,是一种面向连接的、可靠的、基于IP的传输层协议。 TCP工作于传输层,IP在网络层,ARP在数据链路层 源端口和目的端口: 各占两个字节,这两个值加上IP首部中的源端IP地址和目的端IP地址唯一确定一个T…

华为sr-mpls policy配置案例

SR-MPLS POLICY在ensp上面做不了,这是官方上的配置

解压RPM包---rpm2cpiocpio的使用

RPM包括是使用cpio格式打包的,因此可以先转成cpio然后解压,如下所示: rpm2cpio xxx.rpm | cpio -div