ceph 报警 [ low disk space] 解决

参考报警信息

[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
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值