WO2021098268A1 - 一种mon服务迁移方法、装置、设备及可读存储介质 - Google Patents

一种mon服务迁移方法、装置、设备及可读存储介质 Download PDF

Info

Publication number
WO2021098268A1
WO2021098268A1 PCT/CN2020/104005 CN2020104005W WO2021098268A1 WO 2021098268 A1 WO2021098268 A1 WO 2021098268A1 CN 2020104005 W CN2020104005 W CN 2020104005W WO 2021098268 A1 WO2021098268 A1 WO 2021098268A1
Authority
WO
WIPO (PCT)
Prior art keywords
mon service
disk
mon
node
service
Prior art date
Application number
PCT/CN2020/104005
Other languages
English (en)
French (fr)
Inventor
丁纯杰
孟祥瑞
Original Assignee
浪潮电子信息产业股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 浪潮电子信息产业股份有限公司 filed Critical 浪潮电子信息产业股份有限公司
Priority to US17/778,671 priority Critical patent/US20220413733A1/en
Publication of WO2021098268A1 publication Critical patent/WO2021098268A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • G06F3/0617Improving the reliability of storage systems in relation to availability
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0647Migration mechanisms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • G06F3/0635Configuration or reconfiguration of storage systems by changing the path, e.g. traffic rerouting, path reconfiguration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0674Disk device
    • G06F3/0676Magnetic disk device
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management

Definitions

  • This application relates to the field of computer technology, and in particular to a MON service migration method, device, equipment, and readable storage medium.
  • MON services When deploying a distributed storage system, MON services will be deployed on each node.
  • the MON service on each node is mounted on a fixed disk on the node.
  • the MON service is the Monitor service.
  • the node needs to be removed from the distributed storage system, and then the node is connected to the distributed storage system as a new node , Change the mount disk of the MON service on the node during access, so as to complete the migration of the MON service on the node.
  • the existing technology needs to remove the node from the distributed storage system to migrate the MON service. Among them, node removal will affect the load capacity of the entire distributed storage system, and will have a greater impact on the front-end business when the system is busy, thereby reducing the service capacity and reliability of the distributed storage system.
  • the purpose of this application is to provide a MON service migration method, device, equipment, and readable storage medium, so as to realize the migration of the MON service on the node without affecting the front-end business.
  • the specific plan is as follows:
  • this application provides a MON service migration method, which is applied to any node in a distributed storage system, including:
  • the mounting information of the MON service is created in the configuration file of the distributed storage system, and the mounting information includes: the name of the node, the name of the MON service, and the destination disk in the distributed storage system.
  • said determining the destination disk for migrating the MON service in the node includes:
  • the SSD disk in the mountable disk is determined as the target disk.
  • it also includes:
  • the destination disk is randomly selected from the mountable disks.
  • the restarting the MON service according to the configuration file includes:
  • the method before creating the mounting information of the MON service in the configuration file of the distributed storage system, the method further includes:
  • the original mounting information includes: the name of the node, the name of the MON service, and the original mounted disk of the MON service in the The partition path in the distributed storage system.
  • the method further includes:
  • this application provides a MON service migration device, which is applied to any node in a distributed storage system, including:
  • the obtaining module is used to obtain the historical data of the MON service in the current node
  • An execution module configured to determine a destination disk for migrating the MON service in the node, and migrating the historical data to the destination disk;
  • the creation module is used to create mounting information of the MON service in the configuration file of the distributed storage system, the mounting information includes: the name of the node, the name of the MON service, and the destination disk The partition path in the distributed storage system;
  • the restart module is configured to restart the MON service according to the configuration file, so that the MON service is migrated to the destination disk.
  • the execution module includes:
  • the query unit is used to query the mountable disk in the node by using the lsblk command;
  • the determining unit is configured to determine the SSD disk in the mountable disk as the target disk if there is an SSD disk in the mountable disk.
  • this application provides a MON service migration device, including:
  • Memory used to store computer programs
  • the processor is configured to execute the computer program to implement the MON service migration method disclosed above.
  • the present application provides a readable storage medium for storing a computer program, where the computer program is executed by a processor to implement the MON service migration method disclosed above.
  • this application provides a MON service migration method, which is applied to any node in a distributed storage system, including: obtaining historical data of the MON service in the current node; determining the purpose of migrating the MON service in the node Disk and migrate historical data to the destination disk; create the mount information of the MON service in the configuration file of the distributed storage system.
  • the mount information includes: the name of the node, the name of the MON service, and the destination disk in the distributed storage system The partition path; restart the MON service according to the configuration file to make the MON service migrate to the destination disk.
  • this method does not need to remove the nodes in the distributed storage system, but only needs to migrate the historical data of the MON service on the node to the new destination disk, and recreate the MON service suspension in the configuration file of the distributed storage system. Load information, and then restart the MON service according to the configuration file, so that the MON service can be migrated from the original disk to the destination disk, that is, the destination disk is changed to the mount disk of the MON service on the current node.
  • this application does not need to remove the nodes in the distributed storage system, the migration process of the MON service will not affect the front-end business and will not reduce the load capacity of the distributed storage system. Therefore, this application can improve the distributed storage system Service capability and reliability.
  • a MON service migration device, equipment, and readable storage medium provided in this application also have the above technical effects.
  • Figure 1 is a flowchart of the first MON service migration method disclosed in this application.
  • Figure 2 is a flow chart of the second MON service migration method disclosed in this application.
  • FIG. 3 is a schematic diagram of a MON service migration device disclosed in this application.
  • FIG. 4 is a schematic diagram of a MON service migration device disclosed in this application.
  • this application provides a MON service migration solution, which can migrate the MON service on the node without affecting the front-end business.
  • an embodiment of the present application discloses a first MON service migration method, which is applied to any node in a distributed storage system, and includes:
  • S102 Determine the destination disk for migrating the MON service in the node, and migrate historical data to the destination disk;
  • the mount information of the MON service in the configuration file of the distributed storage system before creating the mount information of the MON service in the configuration file of the distributed storage system, it further includes: deleting the original mount information of the MON service in the configuration file.
  • the original mount information includes: The name, the name of the MON service, and the partition path of the original mounted disk of the MON service in the distributed storage system.
  • deleting the original mounting information of the MON service can avoid the failure of the MON service migration due to the duplication of the mounting information.
  • the mounting information includes: the name of the node, the name of the MON service, and the partition path of the target disk in the distributed storage system.
  • the name of the node can be unique identifying information such as node ID and IP address.
  • restarting the MON service according to the configuration file includes: reading the mounting information, and restarting the MON service according to the mounting information.
  • the embodiment of this application does not need to remove the nodes in the distributed storage system, but only needs to migrate the historical data of the MON service on the node to the new destination disk, and recreate the MON service in the configuration file of the distributed storage system. After restarting the MON service according to the configuration file, the MON service can be migrated from the original disk to the target disk, that is, the target disk is changed to the mounted disk of the MON service on the current node.
  • this application does not need to remove the nodes in the distributed storage system, the migration process of the MON service will not affect the front-end business and will not reduce the load capacity of the distributed storage system. Therefore, this application can improve the distributed storage system Service capability and reliability.
  • an embodiment of the present application discloses a second MON service migration method, which is applied to any node in a distributed storage system, including:
  • a random algorithm can be used to select the destination disk randomly.
  • the mounting information includes: the name of the node, the name of the MON service, and the partition path of the target disk in the distributed storage system.
  • the method further includes: visually displaying the monitoring information in the target disk. After completing the migration process of the MON service, the monitoring information of the target disk can be displayed, which makes it easy for users to query the monitoring information.
  • this embodiment does not need to remove the nodes in the distributed storage system, but only needs to migrate the historical data of the MON service on the nodes to the new destination disk, and recreate the MON in the configuration file of the distributed storage system.
  • the mount information of the service, and restart the MON service according to the configuration file can make the MON service migrate from the original disk to the destination disk, that is, the destination disk is changed to the mount disk of the MON service on the current node.
  • this application does not need to remove the nodes in the distributed storage system, the migration process of the MON service will not affect the front-end business and will not reduce the load capacity of the distributed storage system. Therefore, this application can improve the distributed storage system Service capability and reliability.
  • MON service migration embodiments can be implemented according to the method provided in this application.
  • the specific implementation process is as follows:
  • the MON service on any node in the distributed storage system can be migrated according to the above steps 1-4, and the MON service operation failure can be solved or the MON service capability can be improved without affecting the front-end business. , So as to improve the comprehensive operation ability and anti-risk ability of the distributed storage system.
  • the following describes a MON service migration apparatus provided in an embodiment of the present application.
  • the MON service migration apparatus described below and the MON service migration method described above can be cross-referenced.
  • an embodiment of the present application discloses a MON service migration device, which is applied to any node in a distributed storage system, and includes:
  • the obtaining module 301 is used to obtain historical data of the MON service in the current node;
  • the execution module 302 is used for determining the destination disk for migrating the MON service in the node, and migrating historical data to the destination disk;
  • the creation module 303 is used to create mount information of the MON service in the configuration file of the distributed storage system.
  • the mount information includes: the name of the node, the name of the MON service, and the partition path of the target disk in the distributed storage system;
  • the restart module 304 is used to restart the MON service according to the configuration file, so that the MON service is migrated to the target disk.
  • the execution module includes:
  • the query unit is used to query the mountable disk in the node by using the lsblk command;
  • the determining unit is used to determine the SSD disk in the mountable disk as the target disk if there is an SSD disk in the mountable disk.
  • the execution module further includes:
  • the selection unit is used to randomly select the destination disk among the mountable disks if there is no SSD disk among the mountable disks.
  • the restart module is specifically used for:
  • it further includes:
  • the delete module is used to delete the original mount information of the MON service in the configuration file.
  • the original mount information includes the name of the node, the name of the MON service, and the partition path of the original mounted disk of the MON service in the distributed storage system.
  • it further includes:
  • the display module is used to visually display the monitoring information in the target disk.
  • this embodiment provides a MON service migration device, which does not need to remove the nodes in the distributed storage system. Therefore, the migration process of the MON service will not affect the front-end business and will not reduce the load of the distributed storage system. Therefore, this application can improve the service capability and reliability of the distributed storage system.
  • the following describes a MON service migration device provided in an embodiment of the present application.
  • the MON service migration device described below and the MON service migration method and device described above can be cross-referenced.
  • an embodiment of the present application discloses a MON service migration device, including:
  • the memory 401 is used to store computer programs
  • the processor 402 is configured to execute the computer program to implement the method disclosed in any of the foregoing embodiments.
  • the following introduces a readable storage medium provided by an embodiment of the present application.
  • the readable storage medium described below and the method, apparatus, and device for MON service migration described above can be cross-referenced.
  • a readable storage medium for storing a computer program, where the computer program is executed by a processor to implement the MON service migration method disclosed in the foregoing embodiment.
  • the computer program is executed by a processor to implement the MON service migration method disclosed in the foregoing embodiment.
  • the specific steps of the method reference may be made to the corresponding contents disclosed in the foregoing embodiments, and details are not described herein again.
  • the steps of the method or algorithm described in combination with the embodiments disclosed in this document can be directly implemented by hardware, a software module executed by a processor, or a combination of the two.
  • the software module can be placed in random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs, or all areas in the technical field. Any other form of well-known readable storage medium.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一种MON服务迁移方法、装置、设备及可读存储介质,应用于分布式存储系统中的任一个节点。所述包括:获取当前节点中的MON服务的历史数据(S101);在节点中确定迁移MON服务的目的磁盘,并将历史数据迁移至目的磁盘(S102);在分布式存储系统的配置文件中创建MON服务的挂载信息(S103);按照配置文件重启MON服务,以使MON服务迁移至目的磁盘(S104)。所述方法无需移除分布式存储系统中的节点,因此MON服务的迁移过程不会影响前端业务,从而提高了分布式存储系统的服务能力和可靠性。

Description

一种MON服务迁移方法、装置、设备及可读存储介质
本申请要求于2019年11月22日提交至中国专利局、申请号为201911157782.9、发明名称为“一种MON服务迁移方法、装置、设备及可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机技术领域,特别涉及一种MON服务迁移方法、装置、设备及可读存储介质。
背景技术
在部署分布式存储系统时,其中的各个节点上均会部署MON服务。各个节点上的MON服务挂载在节点上的固定磁盘上。其中,MON服务即监控(Monitor)服务。
目前,若某一节点上的MON服务挂载的磁盘出现故障或被写满时,需要将该节点从分布式存储系统移除,进而以新节点的方式将此节点接入分布式存储系统中,接入时更改该节点上的MON服务的挂载磁盘,从而完成该节点上的MON服务的迁移。可见,现有技术需要从分布式存储系统移除节点才能迁移MON服务。其中,节点移除会影响整个分布式存储系统的负载能力,在系统繁忙时对前端业务影响较大,从而会降低分布式存储系统的服务能力和可靠性。
因此,在不影响前端业务的情况下,如何迁移节点上的MON服务,是本领域技术人员需要解决的问题。
发明内容
有鉴于此,本申请的目的在于提供一种MON服务迁移方法、装置、设备及可读存储介质,以实现在不影响前端业务的情况下,迁移节点上的MON服务。其具体方案如下:
第一方面,本申请提供了一种MON服务迁移方法,应用于分布式存储系统中的任一个节点,包括:
获取当前节点中的MON服务的历史数据;
在所述节点中确定迁移所述MON服务的目的磁盘,并将所述历史数据迁移至所述目的磁盘;
在所述分布式存储系统的配置文件中创建所述MON服务的挂载信息,所述挂载信息包括:所述节点的名称、所述MON服务的名称以及所述目的磁盘在所述分布式存储系统中的分区路径;
按照所述配置文件重启所述MON服务,以使所述MON服务迁移至所述目的磁盘。
优选地,所述在所述节点中确定迁移所述MON服务的目的磁盘,包括:
利用lsblk命令查询所述节点中的可挂载磁盘;
若可挂载磁盘中有SSD盘,则将所述可挂载磁盘中的SSD盘确定为所述目的磁盘。
优选地,还包括:
若所述可挂载磁盘中没有SSD盘,则在所述可挂载磁盘中随机选择所述目的磁盘。
优选地,所述按照所述配置文件重启所述MON服务,包括:
读取所述挂载信息,并按照所述挂载信息重启所述MON服务。
优选地,所述在所述分布式存储系统的配置文件中创建所述MON服务的挂载信息之前,还包括:
删除所述配置文件中的所述MON服务的原挂载信息,所述原挂载信息包括:所述节点的名称、所述MON服务的名称以及所述MON服务的原挂载磁盘在所述分布式存储系统中的分区路径。
优选地,所述按照所述配置文件重启所述MON服务,以使所述MON服务迁移至所述目的磁盘之后,还包括:
将所述目的磁盘中的监控信息进行可视化展示。
第二方面,本申请提供了一种MON服务迁移装置,应用于分布式存储系统中的任一个节点,包括:
获取模块,用于获取当前节点中的MON服务的历史数据;
执行模块,用于在所述节点中确定迁移所述MON服务的目的磁盘,并将所述历史数据迁移至所述目的磁盘;
创建模块,用于在所述分布式存储系统的配置文件中创建所述MON服务的挂载信息,所述挂载信息包括:所述节点的名称、所述MON服务的名称以及所述目的磁盘在所述分布式存储系统中的分区路径;
重启模块,用于按照所述配置文件重启所述MON服务,以使所述MON服务迁移至所述目的磁盘。
优选地,所述执行模块包括:
查询单元,用于利用lsblk命令查询所述节点中的可挂载磁盘;
确定单元,用于若所述可挂载磁盘中有SSD盘,则将所述可挂载磁盘中的SSD盘确定为所述目的磁盘。
第三方面,本申请提供了一种MON服务迁移设备,包括:
存储器,用于存储计算机程序;
处理器,用于执行所述计算机程序,以实现前述公开的MON服务迁移方法。
第四方面,本申请提供了一种可读存储介质,用于保存计算机程序,其中,计算机程序被处理器执行时实现前述公开的MON服务迁移方法。
通过以上方案可知,本申请提供了一种MON服务迁移方法,应用于分布式存储系统中的任一个节点,包括:获取当前节点中的MON服务的历史数据;在节点中确定迁移MON服务的目的磁盘,并将历史数据迁移至目的磁盘;在分布式存储系统的配置文件中创建MON服务的挂载信息,挂载信息包括:节点的名称、MON服务的名称以及目的磁盘在分布式存储系统中的分区路径;按照配置文件重启MON服务,以使MON服务迁移至目的磁盘。
可见,该方法无需移除分布式存储系统中的节点,仅需要将节点上的MON服务的历史数据迁移至新的目的磁盘中,并在分布式存储系统的配置文件中重新创建MON服务的挂载信息,进而按照配置文件重启MON服务,就可使MON服务从原磁盘迁移至目的磁盘,也就是目的磁盘变更为当前节点上的MON服务的挂载磁盘。其中,由于本申请无需移除分布式存储系统中的节点,因此MON服务的迁移过程不会影响前端业务,也就不会降低分布式存储系统的负载能力,因此本申请可以提高分布式存储系统的服务能力和可靠性。
相应地,本申请提供的一种MON服务迁移装置、设备及可读存储介质,也同样具有上述技术效果。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。
图1为本申请公开的第一种MON服务迁移方法流程图;
图2为本申请公开的第二种MON服务迁移方法流程图;
图3为本申请公开的一种MON服务迁移装置示意图;
图4为本申请公开的一种MON服务迁移设备示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
目前,现有技术需要从分布式存储系统移除节点才能迁移MON服务。其中,节点移除会影响整个分布式存储系统的负载能力,在系统繁忙时对前端业务影响较大,从而会降低分布式存储系统的服务能力和可靠性。为此,本申请提供了一种MON服务迁移方案,能够在不影响前端业务的情况下,迁移节点上的MON服务。
参见图1所示,本申请实施例公开了第一种MON服务迁移方法,应用于分布式存储系统中的任一个节点,包括:
S101、获取当前节点中的MON服务的历史数据;
S102、在节点中确定迁移MON服务的目的磁盘,并将历史数据迁移至目的磁盘;
在一种具体实施方式中,在分布式存储系统的配置文件中创建MON 服务的挂载信息之前,还包括:删除配置文件中的MON服务的原挂载信息,原挂载信息包括:节点的名称、MON服务的名称以及MON服务的原挂载磁盘在分布式存储系统中的分区路径。
具体的,在创建MON服务的挂载信息之前,删除MON服务的原挂载信息,可避免因挂载信息重复而导致MON服务迁移失败。
S103、在分布式存储系统的配置文件中创建MON服务的挂载信息;
其中,挂载信息包括:节点的名称、MON服务的名称以及目的磁盘在分布式存储系统中的分区路径。节点的名称可以是节点ID、IP地址等唯一标识性信息。
S104、按照配置文件重启MON服务,以使MON服务迁移至目的磁盘。
在一种具体实施方式中,按照配置文件重启MON服务,包括:读取挂载信息,并按照挂载信息重启MON服务。
可见,本申请实施例无需移除分布式存储系统中的节点,仅需要将节点上的MON服务的历史数据迁移至新的目的磁盘中,并在分布式存储系统的配置文件中重新创建MON服务的挂载信息,进而按照配置文件重启MON服务,就可使MON服务从原磁盘迁移至目的磁盘,也就是目的磁盘变更为当前节点上的MON服务的挂载磁盘。其中,由于本申请无需移除分布式存储系统中的节点,因此MON服务的迁移过程不会影响前端业务,也就不会降低分布式存储系统的负载能力,因此本申请可以提高分布式存储系统的服务能力和可靠性。
需要说明的是,若想要将MON服务挂载在性能更好的磁盘(如SSD盘)上,那么可按照本申请提供的方法完成MON服务的迁移,从而提高MON服务的能力。参见图2所示,本申请实施例公开了第二种MON服务迁移方法,应用于分布式存储系统中的任一个节点,包括:
S201、获取当前节点中的MON服务的历史数据;
S202、利用lsblk命令查询节点中的可挂载磁盘;
S203、若可挂载磁盘中有SSD盘,则将可挂载磁盘中的SSD盘确定为目的磁盘,并执行S205;
S204、若可挂载磁盘中没有SSD盘,则在可挂载磁盘中随机选择目的磁盘,并执行S205;
其中,随机选择目的磁盘时可采用随机算法进行选择。
S205、将历史数据迁移至目的磁盘;
S206、在分布式存储系统的配置文件中创建MON服务的挂载信息;
其中,挂载信息包括:节点的名称、MON服务的名称以及目的磁盘在分布式存储系统中的分区路径。
S207、按照配置文件重启MON服务,以使MON服务迁移至目的磁盘。
在一种具体实施方式中,按照配置文件重启MON服务,以使MON服务迁移至目的磁盘之后,还包括:将目的磁盘中的监控信息进行可视化展示。完成MON服务的迁移流程后,可展示目的磁盘的监控信息,这样可便于用户查询监控信息。
需要说明的是,本实施例中的其他实现步骤与上述实施例相同或类似,故本实施例在此不再赘述。
由上可见,本实施例无需移除分布式存储系统中的节点,仅需要将节点上的MON服务的历史数据迁移至新的目的磁盘中,并在分布式存储系统的配置文件中重新创建MON服务的挂载信息,进而按照配置文件重启MON服务,就可使MON服务从原磁盘迁移至目的磁盘,也就是目的磁盘变更为当前节点上的MON服务的挂载磁盘。其中,由于本申请无需移除分布式存储系统中的节点,因此MON服务的迁移过程不会影响前端业务,也就不会降低分布式存储系统的负载能力,因此本申请可以提高分布式存储系统的服务能力和可靠性。
按照本申请提供的方法可实施如下MON服务迁移实施例。具体实施过程如下:
1、在分布式存储系统中确定任一个节点上的挂载MON服务的目的磁盘,利用lsblk命令获取该磁盘在分布式存储系统中的分区路径。
2、停止当前节点上的MON服务。
3、将该MON服务的历史数据复制到目的磁盘中,并将目的磁盘在分 布式存储系统中的分区路径、当前节点的名称、MON服务的名称写入分布式存储系统中的集群配置文件。
4、启动当前节点上MON服务。
需要说明的是,按照上述1-4步骤可对分布式存储系统中的任一个节点上的MON服务进行迁移,可以在不影响前端业务的前提下解决MON服务运行故障或者实现MON服务能力的提升,从而提升分布式存储系统的综合运行能力和抗风险能力。
下面对本申请实施例提供的一种MON服务迁移装置进行介绍,下文描述的一种MON服务迁移装置与上文描述的一种MON服务迁移方法可以相互参照。
参见图3所示,本申请实施例公开了一种MON服务迁移装置,应用于分布式存储系统中的任一个节点,包括:
获取模块301,用于获取当前节点中的MON服务的历史数据;
执行模块302,用于在节点中确定迁移MON服务的目的磁盘,并将历史数据迁移至目的磁盘;
创建模块303,用于在分布式存储系统的配置文件中创建MON服务的挂载信息,挂载信息包括:节点的名称、MON服务的名称以及目的磁盘在分布式存储系统中的分区路径;
重启模块304,用于按照配置文件重启MON服务,以使MON服务迁移至目的磁盘。
在一种具体实施方式中,执行模块包括:
查询单元,用于利用lsblk命令查询节点中的可挂载磁盘;
确定单元,用于若可挂载磁盘中有SSD盘,则将可挂载磁盘中的SSD盘确定为目的磁盘。
在一种具体实施方式中,执行模块还包括:
选择单元,用于若可挂载磁盘中没有SSD盘,则在可挂载磁盘中随机选择目的磁盘。
在一种具体实施方式中,重启模块具体用于:
读取挂载信息,并按照挂载信息重启MON服务。
在一种具体实施方式中,还包括:
删除模块,用于删除配置文件中的MON服务的原挂载信息,原挂载信息包括:节点的名称、MON服务的名称以及MON服务的原挂载磁盘在分布式存储系统中的分区路径。
在一种具体实施方式中,还包括:
展示模块,用于将目的磁盘中的监控信息进行可视化展示。
其中,关于本实施例中各个模块、单元更加具体的工作过程可以参考前述实施例中公开的相应内容,在此不再进行赘述。
可见,本实施例提供了一种MON服务迁移装置,该装置无需移除分布式存储系统中的节点,因此MON服务的迁移过程不会影响前端业务,也就不会降低分布式存储系统的负载能力,因此本申请可以提高分布式存储系统的服务能力和可靠性。
下面对本申请实施例提供的一种MON服务迁移设备进行介绍,下文描述的一种MON服务迁移设备与上文描述的一种MON服务迁移方法及装置可以相互参照。
参见图4所示,本申请实施例公开了一种MON服务迁移设备,包括:
存储器401,用于保存计算机程序;
处理器402,用于执行所述计算机程序,以实现上述任意实施例公开的方法。
下面对本申请实施例提供的一种可读存储介质进行介绍,下文描述的一种可读存储介质与上文描述的一种MON服务迁移方法、装置及设备可以相互参照。
一种可读存储介质,用于保存计算机程序,其中,所述计算机程序被处理器执行时实现前述实施例公开的MON服务迁移方法。关于该方法的具体步骤可以参考前述实施例中公开的相应内容,在此不再进行赘述。
本申请涉及的“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这 样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法或设备固有的其它步骤或单元。
需要说明的是,在本申请中涉及“第一”、“第二”等的描述仅用于描述目的,而不能理解为指示或暗示其相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。另外,各个实施例之间的技术方案可以相互结合,但是必须是以本领域普通技术人员能够实现为基础,当技术方案的结合出现相互矛盾或无法实现时应当认为这种技术方案的结合不存在,也不在本申请要求的保护范围之内。
本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其它实施例的不同之处,各个实施例之间相同或相似部分互相参见即可。
结合本文中所公开的实施例描述的方法或算法的步骤可以直接用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的可读存储介质中。
本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。

Claims (10)

  1. 一种MON服务迁移方法,其特征在于,应用于分布式存储系统中的任一个节点,包括:
    获取当前节点中的MON服务的历史数据;
    在所述节点中确定迁移所述MON服务的目的磁盘,并将所述历史数据迁移至所述目的磁盘;
    在所述分布式存储系统的配置文件中创建所述MON服务的挂载信息,所述挂载信息包括:所述节点的名称、所述MON服务的名称以及所述目的磁盘在所述分布式存储系统中的分区路径;
    按照所述配置文件重启所述MON服务,以使所述MON服务迁移至所述目的磁盘。
  2. 根据权利要求1所述的MON服务迁移方法,其特征在于,所述在所述节点中确定迁移所述MON服务的目的磁盘,包括:
    利用lsblk命令查询所述节点中的可挂载磁盘;
    若可挂载磁盘中有SSD盘,则将所述可挂载磁盘中的SSD盘确定为所述目的磁盘。
  3. 根据权利要求2所述的MON服务迁移方法,其特征在于,还包括:
    若所述可挂载磁盘中没有SSD盘,则在所述可挂载磁盘中随机选择所述目的磁盘。
  4. 根据权利要求1所述的MON服务迁移方法,其特征在于,所述按照所述配置文件重启所述MON服务,包括:
    读取所述挂载信息,并按照所述挂载信息重启所述MON服务。
  5. 根据权利要求1所述的MON服务迁移方法,其特征在于,所述在所述分布式存储系统的配置文件中创建所述MON服务的挂载信息之前,还包括:
    删除所述配置文件中的所述MON服务的原挂载信息,所述原挂载信息包括:所述节点的名称、所述MON服务的名称以及所述MON服务的原挂载磁盘在所述分布式存储系统中的分区路径。
  6. 根据权利要求1至5任一项所述的MON服务迁移方法,其特征在于,所述按照所述配置文件重启所述MON服务,以使所述MON服务迁 移至所述目的磁盘之后,还包括:
    将所述目的磁盘中的监控信息进行可视化展示。
  7. 一种MON服务迁移装置,其特征在于,应用于分布式存储系统中的任一个节点,包括:
    获取模块,用于获取当前节点中的MON服务的历史数据;
    执行模块,用于在所述节点中确定迁移所述MON服务的目的磁盘,并将所述历史数据迁移至所述目的磁盘;
    创建模块,用于在所述分布式存储系统的配置文件中创建所述MON服务的挂载信息,所述挂载信息包括:所述节点的名称、所述MON服务的名称以及所述目的磁盘在所述分布式存储系统中的分区路径;
    重启模块,用于按照所述配置文件重启所述MON服务,以使所述MON服务迁移至所述目的磁盘。
  8. 根据权利要求7所述的MON服务迁移装置,其特征在于,所述执行模块包括:
    查询单元,用于利用lsblk命令查询所述节点中的可挂载磁盘;
    确定单元,用于若所述可挂载磁盘中有SSD盘,则将所述可挂载磁盘中的SSD盘确定为所述目的磁盘。
  9. 一种MON服务迁移设备,其特征在于,包括:
    存储器,用于存储计算机程序;
    处理器,用于执行所述计算机程序,以实现如权利要求1至6任一项所述的MON服务迁移方法。
  10. 一种可读存储介质,其特征在于,用于保存计算机程序,其中,所述计算机程序被处理器执行时实现如权利要求1至6任一项所述的MON服务迁移方法。
PCT/CN2020/104005 2019-11-22 2020-07-24 一种mon服务迁移方法、装置、设备及可读存储介质 WO2021098268A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/778,671 US20220413733A1 (en) 2019-11-22 2020-07-24 mon service migration method, apparatus, and device, and readable storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911157782.9A CN110989929A (zh) 2019-11-22 2019-11-22 一种mon服务迁移方法、装置、设备及可读存储介质
CN201911157782.9 2019-11-22

Publications (1)

Publication Number Publication Date
WO2021098268A1 true WO2021098268A1 (zh) 2021-05-27

Family

ID=70085979

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/104005 WO2021098268A1 (zh) 2019-11-22 2020-07-24 一种mon服务迁移方法、装置、设备及可读存储介质

Country Status (3)

Country Link
US (1) US20220413733A1 (zh)
CN (1) CN110989929A (zh)
WO (1) WO2021098268A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110989929A (zh) * 2019-11-22 2020-04-10 浪潮电子信息产业股份有限公司 一种mon服务迁移方法、装置、设备及可读存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107656705A (zh) * 2017-10-25 2018-02-02 郑州云海信息技术有限公司 一种计算机存储介质和一种数据迁移方法、装置及系统
CN107728950A (zh) * 2017-10-23 2018-02-23 郑州云海信息技术有限公司 一种存储扩展方法、装置、设备及计算机可读存储介质
WO2018177107A1 (zh) * 2017-03-29 2018-10-04 腾讯科技(深圳)有限公司 数据迁移方法、迁移服务器及存储介质
CN110019123A (zh) * 2017-11-10 2019-07-16 北京京东尚科信息技术有限公司 一种数据迁移方法和装置
CN110399356A (zh) * 2019-06-14 2019-11-01 阿里巴巴集团控股有限公司 一种在线数据迁移方法、装置、计算设备及存储介质
CN110989929A (zh) * 2019-11-22 2020-04-10 浪潮电子信息产业股份有限公司 一种mon服务迁移方法、装置、设备及可读存储介质

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7574443B2 (en) * 2005-07-25 2009-08-11 Parascale, Inc. Scalable clustered storage system
CN103167035A (zh) * 2013-03-15 2013-06-19 汉柏科技有限公司 HDFS中NameNode单点失效的解决方法
CN104468521B (zh) * 2014-11-13 2017-12-29 华为技术有限公司 在线迁移方法、装置和系统
CN105159790B (zh) * 2015-09-30 2018-03-16 成都华为技术有限公司 一种数据抢救方法及文件服务器
US20200034167A1 (en) * 2016-08-10 2020-01-30 Nutanix, Inc. Automatic application migration across virtualization environments
CN106406754A (zh) * 2016-08-31 2017-02-15 北京小米移动软件有限公司 数据迁移方法及装置
CN106933508B (zh) * 2017-02-14 2020-05-12 深信服科技股份有限公司 应用容器的迁移方法及装置
CN109254825A (zh) * 2017-07-12 2019-01-22 中兴通讯股份有限公司 一种纳管虚拟机硬盘的方法及装置
US10402266B1 (en) * 2017-07-31 2019-09-03 Pure Storage, Inc. Redundant array of independent disks in a direct-mapped flash storage system
CN109062670A (zh) * 2018-08-14 2018-12-21 郑州云海信息技术有限公司 一种虚拟机迁移方法和装置
CN109388478A (zh) * 2018-11-01 2019-02-26 郑州云海信息技术有限公司 用于OpenStack环境中迁移虚拟机的方法和装置
CN110321077B (zh) * 2019-06-17 2023-04-14 浩云科技股份有限公司 一种集中存储文件的管理方法及装置

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018177107A1 (zh) * 2017-03-29 2018-10-04 腾讯科技(深圳)有限公司 数据迁移方法、迁移服务器及存储介质
CN107728950A (zh) * 2017-10-23 2018-02-23 郑州云海信息技术有限公司 一种存储扩展方法、装置、设备及计算机可读存储介质
CN107656705A (zh) * 2017-10-25 2018-02-02 郑州云海信息技术有限公司 一种计算机存储介质和一种数据迁移方法、装置及系统
CN110019123A (zh) * 2017-11-10 2019-07-16 北京京东尚科信息技术有限公司 一种数据迁移方法和装置
CN110399356A (zh) * 2019-06-14 2019-11-01 阿里巴巴集团控股有限公司 一种在线数据迁移方法、装置、计算设备及存储介质
CN110989929A (zh) * 2019-11-22 2020-04-10 浪潮电子信息产业股份有限公司 一种mon服务迁移方法、装置、设备及可读存储介质

Also Published As

Publication number Publication date
CN110989929A (zh) 2020-04-10
US20220413733A1 (en) 2022-12-29

Similar Documents

Publication Publication Date Title
US9292217B2 (en) Logical volume space sharing
US10642694B2 (en) Monitoring containers in a distributed computing system
US10838829B2 (en) Method and apparatus for loading data from a mirror server and a non-transitory computer readable storage medium
US20100088468A1 (en) Method for optimizing cleaning of maps in flashcopy cascades containing incremental maps
US8001324B2 (en) Information processing apparatus and informaiton processing method
US10628235B2 (en) Accessing log files of a distributed computing system using a simulated file system
WO2021098267A1 (zh) 一种磁盘处理的方法、系统、设备及可读存储介质
US20070156763A1 (en) Storage management system and method thereof
US20150236974A1 (en) Computer system and load balancing method
CN107870802B (zh) 一种虚拟机迁移方法和装置
WO2021159711A1 (zh) 一种b+树的存取方法、装置和计算机可读存储介质
CN105607962B (zh) 一种虚拟机备份的方法和装置
CN114780252B (zh) 数据仓库系统的资源管理方法及装置
US20230195347A1 (en) Thin-Provisioned File Copying Method, Apparatus and Device, and Readable Storage Medium
CN109271376A (zh) 数据库升级方法、装置、设备及存储介质
US7849264B2 (en) Storage area management method for a storage system
WO2021169163A1 (zh) 一种文件数据存取方法、装置和计算机可读存储介质
WO2021098268A1 (zh) 一种mon服务迁移方法、装置、设备及可读存储介质
US11153173B1 (en) Dynamically updating compute node location information in a distributed computing environment
US9395930B2 (en) Information processing system, control method of information processing system, and recording medium
US11429311B1 (en) Method and system for managing requests in a distributed system
JPWO2013046342A1 (ja) 仮想テープ装置及び仮想テープ装置の制御方法
CN112363980A (zh) 一种分布式系统的数据处理方法及装置
KR102123701B1 (ko) 네트워크 부트 시스템
CN112540873B (zh) 容灾方法、装置、电子设备及容灾系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20888882

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20888882

Country of ref document: EP

Kind code of ref document: A1