计算机工程与应用 ›› 2019, Vol. 55 ›› Issue (13): 72-77.DOI: 10.3778/j.issn.1002-8331.1802-0006

• 大数据与云计算 • 上一篇    下一篇

MooseFS热备元数据节点设计与实现

林炳东1,2,赵旦谱1,3,台宪青4   

  1. 1.中国科学院物联网研究发展中心 智慧城市与智能交通研究中心,江苏 无锡 214135
    2.中国科学院大学 微电子学院,北京 101407
    3.中国科学院电子学研究所 中国科学院空间信息处理与应用系统技术重点实验室,北京 100190
    4.中国科学院电子学研究所 苏州研究院地理空间信息系统研究室,江苏 苏州 215121
  • 出版日期:2019-07-01 发布日期:2019-07-01

Design and Implementation of MooseFS Hot Standby Master

LIN Bingdong1,2, ZHAO Danpu1,3, TAI Xianqing4   

  1. 1.Research Center of Intelligent City and Intelligent Transportation, CAS R&D Center for Internet of Things, Wuxi, Jiangsu 214135, China
    2.School of Microelectronics, University of Chinese Academy of Sciences, Beijing 101407, China
    3.Key Laboratory of Technology in Geospatial Information Processing and Application System, Institute of Electronics, Chinese Academy of Sciences, Beijing 100190, China
    4.Laboratory of Geospatial Information Systems, Institute of Electronics, Chinese Academy of Sciences, Suzhou, Jiangsu 215121, China
  • Online:2019-07-01 Published:2019-07-01

摘要: 针对MooseFS元数据节点的单点故障问题,对MooseFS源码进行改造,为其增加一个热备的备元数据节点,并通过主备之间同步元数据,备节点回放操作日志等技术使得备元数据节点内存中的元数据时刻跟主元数据节点保持一致。当主元数据节点发生故障切换到备元数据节点后,备元数据节点无需从本地加载元数据即可快速接替主元数据节点对外提供服务。测试结果表明,备元数据节点本地和内存中的元数据均与主元数据节点保持一致,且故障恢复时间小于1 s。

关键词: MooseFS元数据节点, 热备, 元数据, 数据一致性, 日志回放

Abstract: Aiming at the single point of failure problem of the MooseFS master, a hot standby master is added for MooseFS through modifying the source code. By synchronizing the metadata between the primary and standby master and the standby master replay log, the standby master’s metadata in memory are always consistent with the master’s. After the primary master fails over to the standby master, the standby master can quickly take over services from the primary master without loading the metadata from the local. Test results show that the metadata of the standby master in the local and in memory are consistent with the primary master, and the time of failure recovery is less than 1 second.

Key words: MooseFS master, hot standby, metadata, data consistency, log replay