分布式文件系统日志更新方法、系统、装置及存储介质制造方法及图纸

技术编号:19342327 阅读:45 留言:0更新日期:2018-11-07 13:57
本申请公开了一种分布式文件系统日志更新方法,包括:在第一硬盘上运行LogMonitor,以在所述第一硬盘写入并存储当前日志;判断所述第一硬盘是否繁忙;若是,将所述LogMonitor切换至第二硬盘运行,以在所述第二硬盘写入并存储当前日志。本申请在第一硬盘繁忙的时候,将LogMonitor切换至第二硬盘运行,避免或减少LogMonitor写速度降低、Mon写日志受到阻塞的情况,从而LogMonitor和Mon的运行速度都能得到保证,提高分布式文件系统的响应速度。相应的,本申请还公开了一种分布式文件系统日志更新系统、装置及存储介质,具有相同的有益效果。

Distributed file system log updating method, system, device and storage medium

This application discloses a distributed file system log updating method, which includes: running LogMonitor on the first hard disk to write and store the current log on the first hard disk; determining whether the first hard disk is busy; and if so, switching the LogMonitor to the second hard disk to run in order to write and coexist on the second hard disk. Save the current log. In this application, when the first hard disk is busy, the LogMonitor is switched to the second hard disk to avoid or reduce the slowdown of LogMonitor writing speed and the blocking of Mon log writing. Thus, the running speed of LogMonitor and Mon can be guaranteed and the response speed of distributed file system can be improved. Accordingly, the application also discloses a distributed file system log update system, device and storage medium with the same beneficial effect.

【技术实现步骤摘要】
分布式文件系统日志更新方法、系统、装置及存储介质
本专利技术涉及分布式文件系统领域,特别涉及一种分布式文件系统日志更新方法、系统、装置及存储介质。
技术介绍
在分布式文件系统中,Mon(monitor,管理者)模块负责维护分布式文件系统的一致性、响应用户命令、监控系统状态等。LogMonitor为Mon模块的子模块,负责维护各Mon的一致性。LogMonitor会将系统状态变化、操作记录等信息以日志文件的形式保存在本地磁盘中。当本地磁盘IO繁忙、压力较大时,LogMonitor写入日志的速度会大幅度降低。根据Mon的处理流程,当Mon完成议案流程,LogMonitor就会将最新的日志更新到磁盘的日志文件中去。如果LogMonitor的写入速度降低,Mon的主流程会受到阻碍,此时Mon无法响应用户输入的命令,同时Mon会因为租约超时而引发选举流程,影响系统性能。因此,如何提供一种解决上述技术问题的方案是目前本领域技术人员需要解决的问题。
技术实现思路
有鉴于此,本专利技术的目的在于提供一种能够保证磁盘繁忙时LogMonitor写入日志速度的分布式文件系统日志更新方法、系统、装置及存储介质。本文档来自技高网...

【技术保护点】
1.一种分布式文件系统日志更新方法,其特征在于,包括:在第一硬盘上运行LogMonitor,以在所述第一硬盘写入并存储当前日志;判断所述第一硬盘是否繁忙;若是,将所述LogMonitor切换至第二硬盘运行,以在所述第二硬盘写入并存储当前日志。

【技术特征摘要】
1.一种分布式文件系统日志更新方法,其特征在于,包括:在第一硬盘上运行LogMonitor,以在所述第一硬盘写入并存储当前日志;判断所述第一硬盘是否繁忙;若是,将所述LogMonitor切换至第二硬盘运行,以在所述第二硬盘写入并存储当前日志。2.根据权利要求1所述分布式文件系统日志更新方法,其特征在于,所述第二硬盘为固态硬盘。3.根据权利要求2所述分布式文件系统日志更新方法,其特征在于,所述LogMonitor在所述第二硬盘运行的同时,还包括:判断所述第一硬盘是否繁忙;若否,将所述LogMonitor切换至所述第一硬盘运行。4.根据权利要求3所述分布式文件系统日志更新方法,其特征在于,所述在第一硬盘上运行LogMonitor之前,包括:优化所述LogMonitor的代码,并精简所述LogMonitor的日志条目。5.根据权利要求4所述分布式文件系统日志更新方法,其特征在于,所述第一硬盘和所述第二硬盘的挂载目录均包括供所述LogMonitor在写入并存储当前日志时使用的日志目录。6.根据权利要求1至5任一项所述分布式文件系统日志更新方法,其特征在于,还包括:对所述第一硬盘和/或所述第二...

【专利技术属性】
技术研发人员:王庆海
申请(专利权)人:郑州云海信息技术有限公司
类型:发明
国别省市:河南,41

网友询问留言 已有0条评论
  • 还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。

1