温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

cephfs 文件空间重建

发布时间:2020-06-30 13:10:56 来源:网络 阅读:4551 作者:无锋剑 栏目:大数据
重置cephfs

清理现有cephfs 所有文件,重建空间:

清理删除 cephfs

关闭所有mds服务
systemctl stop ceph-mds@$HOSTNAME  
systemctl status ceph-mds@$HOSTNAME  
查看cephfs 信息
## ceph fs ls 
name: leadorfs, metadata pool: cephfs_metadata, data pools: [cephfs_data ]

## ceph mds stat
e392: 0/1/1 up, 1 failed

## ceph mon dump
dumped monmap epoch 1
设置mds状态为失败
ceph mds fail 0    
删除mds文件系统
ceph fs rm leadorfs --yes-i-really-mean-it      
删除元数据文件夹
ceph osd pool delete cephfs_metadata cephfs_metadata --yes-i-really-really-mean-it   
ceph osd pool delete cephfs_data cephfs_data --yes-i-really-really-mean-it   
再次查看集群状态
## ceph mds stat
e394:

## eph mds  dump
dumped fsmap epoch 397
fs_name cephfs
epoch   397
flags   0
created 0.000000
modified        0.000000
tableserver     0
root    0
session_timeout 0
session_autoclose       0
max_file_size   0
last_failure    0
last_failure_osd_epoch  0
compat  compat={},rocompat={},incompat={}
max_mds 0
in
up      {}
failed
damaged
stopped
data_pools
metadata_pool   0
inline_data     disabled

重建 cephfs

启动所有mds服务
systemctl start ceph-mds@$HOSTNAME
systemctl status ceph-mds@$HOSTNAME

#验证:
ceph mds stat

e397:, 3 up:standby
重建cephfs
ceph osd pool create cephfs_data 512

ceph osd pool create cephfs_metadata 512

ceph fs new ptcephfs cephfs_metadata cephfs_data
验证集群状态
## ceph mds stat

e400: 1/1/1 up {0=jp33e502-4-13.ptengine.com=up:active}, 2 up:standby

## ceph mds dump

dumped fsmap epoch 400
fs_name ptcephfs
epoch   400
flags   0
created 2018-09-11 12:48:26.300848
modified        2018-09-11 12:48:26.300848
tableserver     0
root    0
session_timeout 60
session_autoclose       300
max_file_size   1099511627776
last_failure    0
last_failure_osd_epoch  0
compat  compat={},rocompat={},incompat={1=base v0.20,2=client writeable ranges,3=default file layouts on dirs,4=dir inode in separate object,5=mds uses versioned encoding,6=dirfrag is stored in omap,8=file layout v2}
max_mds 1
in      0
up      {0=25579}
failed
damaged
stopped
data_pools      3
metadata_pool   4
inline_data     disabled
25579:  172.19.4.13:6800/2414848276 'jp33e502-4-13.ptengine.com' mds.0.399 up:active seq 834
集群健康状态
ceph -w
    cluster fe946afe-43d0-404c-baed-fb04cd22d20d
     health HEALTH_OK
     monmap e1: 3 mons at {jp33e501-4-11=172.19.4.11:6789/0,jp33e501-4-12=172.19.4.12:6789/0,jp33e502-4-13=172.19.4.13:6789/0}
            election epoch 12, quorum 0,1,2 jp33e501-4-11,jp33e501-4-12,jp33e502-4-13
      fsmap e400: 1/1/1 up {0=jp33e502-4-13.ptengine.com=up:active}, 2 up:standby
     osdmap e2445: 14 osds: 14 up, 14 in
            flags sortbitwise,require_jewel_osds
      pgmap v876685: 1024 pgs, 2 pools, 2068 bytes data, 20 objects
            73366 MB used, 12919 GB / 12990 GB avail
                1024 active+clean
向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI