ceph 报警 [ low disk space] 解决

简介: 参考报警信息[root@hh-yun-puppet-129021 ~]# ceph health detailHEALTH_WARN mon.hh-yun-ceph-cinder026-128076 low disk spacemon.hh-yun-ceph-cinder026-128076 low disk space -- 30% avail参考磁盘空间

参考报警信息

[root@hh-yun-puppet-129021 ~]# ceph health detail
HEALTH_WARN mon.hh-yun-ceph-cinder026-128076 low disk space
mon.hh-yun-ceph-cinder026-128076 low disk space -- 30% avail

参考磁盘空间 , 故障原因: / 磁盘空间少于 70%

[root@hh-yun-ceph-cinder026-128076 ~]# df -h | grep -E 'root|home'
/dev/mapper/centos-root   50G   35G   16G   70% /
/dev/mapper/centos-home  3.6T   33M  3.6T    1% /home

注: 如 home 有重要数据, 需先进行备份, 缩减会导致 home 目录中数据不可用 ( 很有可能 )

缩减 HOME 磁盘空间

[root@hh-yun-ceph-cinder026-128076 /]# lvreduce -L100g /dev/centos/home
  WARNING: Reducing active and open logical volume to 100.00 GiB
  THIS MAY DESTROY YOUR DATA (filesystem etc.)
Do you really want to reduce home? [y/n]: y
  Size of logical volume centos/home changed from 2.64 TiB (691200 extents) to 100.00 GiB (25600 extents).
  Logical volume home successfully resized

查询 lvm 空间

[root@hh-yun-ceph-cinder026-128076 /]# lvs
  LV   VG     Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  home centos -wi-ao---- 100.00g
  root centos -wi-ao----  50.00g
  swap centos -wi-ao----  31.44g

[root@hh-yun-ceph-cinder026-128076 /]# vgs
  VG     #PV #LV #SN Attr   VSize VFree
  centos   1   3   0 wz--n- 3.64t 3.46t

扩容 root 空间

[root@hh-yun-ceph-cinder026-128076 /]# lvextend -l +100%FREE /dev/centos/root
  Size of logical volume centos/root changed from 50.00 GiB (12800 extents) to 3.51 TiB (919900 extents).
  Logical volume root successfully resized

检查 LVM

[root@hh-yun-ceph-cinder026-128076 /]# lvs
  LV   VG     Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  home centos -wi-ao---- 100.00g
  root centos -wi-ao----   3.51t
  swap centos -wi-ao----  31.44g

查询文件系统

[root@hh-yun-ceph-cinder026-128076 /]# df -h | grep -E 'root|home'
/dev/mapper/centos-root   50G   35G   16G   70% /
/dev/mapper/centos-home  3.6T   33M  3.6T    1% /home

[root@hh-yun-ceph-cinder026-128076 /]# mount | grep -E 'root|home'
/dev/mapper/centos-root on / type xfs (rw,relatime,attr2,inode64,noquota)
/dev/mapper/centos-home on /home type xfs (rw,relatime,attr2,inode64,noquota)

扩容文件系统

[root@hh-yun-ceph-cinder026-128076 /]#  xfs_growfs -d /
meta-data=/dev/mapper/centos-root isize=256    agcount=4, agsize=3276800 blks
         =                       sectsz=4096  attr=2, projid32bit=1
         =                       crc=0        finobt=0
data     =                       bsize=4096   blocks=13107200, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=0
log      =internal               bsize=4096   blocks=6400, version=2
         =                       sectsz=4096  sunit=1 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
data blocks changed from 13107200 to 941977600
[root@hh-yun-ceph-cinder026-128076 /]# df -h
文件系统                 容量  已用  可用 已用% 挂载点
/dev/mapper/centos-root  3.6T   35G  3.5T    1% /

home 目录已经破坏, 需要进行重新格式化. 并进行数据恢复

参考ceph 信息

[root@hh-yun-ceph-cinder026-128076 ~]# ceph health detail
HEALTH_OK
目录
相关文章
|
jenkins 持续交付 Docker
Jenkins - 插件安装失败处理方法
Jenkins - 插件安装失败处理方法
12015 1
Jenkins - 插件安装失败处理方法
|
11月前
|
Kubernetes 容器 API
【k8s-1.34.2安装部署】四.kubernets master组件kube-apiserver,kube-controller-manager,kube-scheduler安装
本章介绍k8s-1.34.2中master组件的安装,涵盖kube-apiserver、kube-controller-manager、kube-scheduler的部署流程,包括文件准备、服务启动、状态验证及权限授权,为构建高可用集群奠定基础。
607 1
|
11月前
|
Kubernetes 数据库 容器
【k8s-1.34.2安装部署】三.etcd-v3.6.6 TLS版集群安装
本章节主要讲解etcd-v3.6.6集群的安装过程,并通过脚本etcd.sh来查看etcd的集群状态以及etcd的数据库中存放数据的情况,也可以通过etcd.sh脚本来进行etcd的备份和还原。上一章中我们准备了etcd安装所需要的证书、配置、启动脚步、检测脚本。
735 1
|
7月前
|
安全 IDE Shell
【全网最详细】Python3.10下载安装使用保姆级教程(看不懂打我)
Python 3.10(2021年10月发布)是已结束支持的旧LTS版本,以稳定性著称。核心新特性为结构模式匹配,显著提升数据处理能力;同时优化错误提示、类型注解等。适合维护老项目或对稳定性要求高的生产环境。
|
11月前
|
Kubernetes 网络安全 容器
【k8s-1.34.2安装部署】五.worker端containerd2.2.1、kubelet-1.34.2安装
本章介绍k8s-1.34.2 worker节点组件安装,涵盖containerd(含CNI、runc等)、kubelet部署与配置,完成节点验证及证书申请批准流程。
763 1
|
Kubernetes 应用服务中间件 nginx
Kubernetes 使用Rook-Ceph作为持久化存储PV
本文介绍如何在 Kubernetes 中使用 Rook-Ceph 作为 PV,重点演示 CephFS 的配置与部署流程。内容涵盖前提条件、Rook-Ceph 安装、StorageClass 设置、PVC 使用示例、Ceph Dashboard 配置、测试应用(如 Nginx 和 Alpine)、ConfigMap 挂载、服务暴露、跨可用区高可用方案等关键步骤,并附有命令行操作示例和验证方法。
Kubernetes 使用Rook-Ceph作为持久化存储PV
|
存储 算法 开发工具
git文件夹内容详解
git文件夹内容详解
1371 1
|
移动开发 小程序 前端开发
小程序接入微信支付V3接口开发教程
最近做了一个小程序对接微信支付的需求,查看微信支付文档,还是感觉有点凌乱,所以做一个统一整理,供大家参考。
1986 0
小程序接入微信支付V3接口开发教程
|
传感器 算法 物联网
智能停车解决方案之停车场室内导航系统(二):核心技术与系统架构构建
随着城市化进程的加速,停车难问题日益凸显。本文深入剖析智能停车系统的关键技术,包括停车场电子地图编辑绘制、物联网与传感器技术、大数据与云计算的应用、定位技术及车辆导航路径规划,为读者提供全面的技术解决方案。系统架构分为应用层、业务层、数据层和运行环境,涵盖停车场室内导航、车位占用检测、动态更新、精准导航和路径规划等方面。
1720 4