Data migration method and device, electronic equipment and readable storage medium

By using the filename and device name as input parameters to the hash function and selecting the device with the largest hash value as the migration destination, the problem of resource waste and performance degradation when storage system devices fail is solved, and efficient data migration is achieved.

CN113886365BActive Publication Date: 2025-11-07JINAN INSPUR DATA TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111227746.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-21
Publication Date
2025-11-07
Estimated Expiration
2041-10-21

AI Technical Summary

Technical Problem

Existing storage systems typically use hash and crush algorithms for data migration when devices fail, leading to data migration between normally functioning devices, resulting in resource waste, inefficiency, and even cluster unavailability.

Method used

By using filename and device name as input parameters to the hash function, the device with the largest hash value is selected as the migration destination, thus avoiding data migration between normal devices and only migrating data from faulty devices.

Benefits of technology

It effectively reduces the amount of data to be migrated from the storage system, reduces resource consumption, avoids system performance degradation, and improves fault recovery efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113886365B_ABST
    Figure CN113886365B_ABST
Patent Text Reader

Abstract

The application discloses a data migration method and device, electronic equipment and a readable storage medium. The method comprises the following steps: when it is detected that a target device of a storage system fails, a target storage file of the target device is acquired; for each target storage file, a hash value between a file name of the current target storage file and a device name of a normal device of the storage system is calculated, and a normal device corresponding to the maximum hash value is selected as a migration destination of the current target storage file; a corresponding relationship between each target storage file and the corresponding migration destination is recorded; and each target storage file is backed up to the corresponding migration destination. The application can migrate data of the failed device of the storage device to the normal device, and the phenomenon of data migration between the normal devices does not occur.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computers, in particular to a data migration method and device, electronic equipment and readable storage medium. BACKGROUND

[0002] In the era of big data, the data to be processed and stored is massive. This makes many enterprises and research units that need to store data maintain one or more large storage clusters in the background. However, the larger the storage cluster is, the higher the probability of device failure is. This puts forward higher requirements for the storage system to handle the device failure scenario, that is, on the one hand, the impact of the failure on the upper-layer application access to data should be as small as possible, and the cluster should continue to provide services; on the other hand, the impact caused by the failure should be recovered as quickly as possible with as few resources as possible. In the whole process, the performance of the data migration method will greatly affect the recovery speed of the cluster.

[0003] At present, Hash algorithm and Crush algorithm are usually used in the storage system to perform data migration operations. The Crush algorithm is also essentially a Hash algorithm. Although the Crush algorithm can migrate the data of the failed device to other normal devices, it often causes the migration of data between normal working devices, resulting in resource waste and low efficiency, and even causing the cluster to be unavailable for a period of time.

[0004] Therefore, how to avoid the migration of data between normal devices on the basis of migrating the data of the failed device of the storage device to the normal device is a technical problem to be solved by those skilled in the art. SUMMARY

[0005] The present application provides a data migration method, device, electronic equipment and readable storage medium, which can migrate the data of the failed device of the storage device to the normal device without causing the migration of data between normal devices.

[0006] To solve the above technical problems, the embodiments of the present application provide the following technical solutions:

[0007] The embodiments of the present application provide a data migration method, comprising:

[0008] When it is detected that a target device of a storage system fails, a target storage file of the target device is obtained;

[0009] For each target storage file, the hash value between the file name of the current target storage file and the device name of a normal device of the storage system is calculated, the normal device corresponding to the maximum hash value is selected as the migration destination of the current target storage file, and the correspondence between each target storage file and the corresponding migration destination is recorded;

[0010] backup each target storage file to a corresponding migration destination.

[0011] Optionally, after the backup of each target storage file to a corresponding migration destination, the method further comprises:

[0012] storing a corresponding relationship between each target storage file and a corresponding migration destination into a database.

[0013] Optionally, before the obtaining of the target storage file of the target device, the method further comprises:

[0014] pre-numbering each device of the storage system according to a preset identification rule as a device name of each device.

[0015] Optionally, when detecting that a target device of the storage system fails, the obtaining of the target storage file of the target device comprises:

[0016] if there are multiple target devices that fail in the storage system, a priority setting page is displayed; the priority setting page comprises a device display area and a sequential drag adjustment area.

[0017] adjusting the sequence of each target device in the device display area in response to a user drag instruction.

[0018] according to the sequence in the device display area, sequentially performing the operation of obtaining the target storage file of each target device.

[0019] Optionally, when detecting that a target device of the storage system fails, the obtaining of the target storage file of the target device comprises:

[0020] pre-setting a priority for each device of the storage system.

[0021] if there are multiple target devices that fail in the storage system, sorting the target devices according to the priority of each target device.

[0022] according to the priority from high to low, sequentially performing the operation of obtaining the target storage file of each target device.

[0023] Optionally, when detecting that a target device of the storage system fails, the obtaining of the target storage file of the target device comprises:

[0024] if there are multiple target devices that fail in the storage system, a user setting page is displayed; the user setting page comprises an execution sequence customization option and a default option.

[0025] In response to a selection instruction of the execution order customization option of the user, a task execution order tag is set for each target device, and an operation of obtaining a target storage file of each target device is performed on each target device according to the task execution order tag;

[0026] In response to a selection instruction of the default option of the user, a current processing device is randomly selected from each target device, and a target storage file of the current processing device is obtained.

[0027] Another aspect of the embodiment of the present application provides a data migration device, comprising:

[0028] A fault detection module is configured to monitor whether there is a device with a fault in the storage system;

[0029] A file obtaining module is configured to obtain a target storage file of each target device;

[0030] A migration end determination module is configured to calculate a hash value between a file name of a current target storage file and a device name of a normal device of the storage system for each target storage file, select a normal device corresponding to a maximum hash value as a migration destination of the current target storage file, and record a corresponding relationship between each target storage file and the corresponding migration destination.

[0031] A data migration module is configured to backup each target storage file to the corresponding migration destination.

[0032] The embodiment of the present application further provides an electronic device, comprising a processor configured to implement the steps of the data migration method according to any one of the preceding embodiments when executing a computer program stored in a memory.

[0033] The embodiment of the present application further provides a readable storage medium, wherein the readable storage medium stores a computer program, and the computer program is configured to implement the steps of the data migration method according to any one of the preceding embodiments when executed by a processor.

[0034] The technical scheme provided by the present application has the advantages that the device name and the file name are used as the input parameters of the hash function, and the device name with the maximum hash result is used as the specific device for storing the file, so that the data can be evenly distributed, the data migration between normal devices can be controlled to avoid the data migration phenomenon between normal devices, only the data on the faulty node is migrated, the number of migrated data of the entire storage system is reduced, and thus the consumption of resources can be effectively reduced and the performance of the system can be improved.

[0035] In addition, the embodiment of the present application further provides a corresponding implementation device, an electronic device and a readable storage medium for the data migration method, so that the method is more practical, and the device, the electronic device and the readable storage medium have corresponding advantages.

[0036] It should be understood that the general description above and the detailed description below are only exemplary and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF DRAWINGS

[0037] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the related art, the drawings needed to be used in the embodiments or the related art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor.

[0038] Figure 1 A flowchart of a data migration method provided by an embodiment of the present application;

[0039] Figure 2 A framework diagram of an exemplary application scenario in the prior art provided by an embodiment of the present application;

[0040] Figure 3 A framework diagram of an exemplary application scenario provided by an embodiment of the present application;

[0041] Figure 4 A specific embodiment structure diagram of a data migration device provided by an embodiment of the present application;

[0042] Figure 5 A specific embodiment structure diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0043] In order to make the technical personnel in the art better understand the present application scheme, the present application will be further described in detail below in conjunction with the drawings and specific embodiments. Obviously, the described embodiments are only some of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0044] The terms "first", "second", "third", "fourth" and the like in the specification and claims of the present application and the above-mentioned drawings are used to distinguish different objects, not to describe a specific order. In addition, the terms "include" and "have" and their any variants are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but can include steps or units not listed.

[0045] After introducing the technical solutions of the embodiments of the present application, the various non-limiting embodiments of the present application will be described in detail.

[0046] Referring first to Figure 1 , Figure 1 A flowchart of a data migration method provided by an embodiment of the present application, which can include the following content:

[0047] S101: When a failure of a target device of a storage system is detected, a target storage file of the target device is acquired.

[0048] In this embodiment, the target device can be one or multiple, which does not affect the implementation of the present application. The target device refers to a device that has failed in the storage system, and the target storage file refers to a file of the target device. The target storage file can include multiple files or one file. As for the failure detection method, any failure detection method in related technologies can be used, and the present application does not make any limitation in this regard.

[0049] S102: For each target storage file, a hash value between a file name of the current target storage file and a device name of a normal device of the storage system is calculated, a normal device corresponding to the maximum hash value is selected as a migration destination of the current target storage file, and a corresponding relationship between each target storage file and the corresponding migration destination is recorded.

[0050] The prior art method for determining the migration destination of the file of the failed device is: a hash calculation is performed on the file name, and then a device id=hash(file name) % device number is determined to determine the storage location of the file, i.e., the device id. This method is very useful when there is no device failure, but when the cluster fails, the number of devices changes, i.e., the divisor changes, so that the final storage device of the same file also changes with a high probability. This results in the data stored on the normal working device also needing to be migrated to another normal working device due to the failure of other devices, as shown in Figure 2 , which leads to unnecessary resource waste and performance degradation of the storage system. Compared with the conventional method of taking the file to be stored as the input parameter of the Hash function and determining the specific device for storing the file by taking the remainder of the Hash result and the total number of devices, the present step takes the file name and the device name as the input parameters of the Hash function, which can control the data migration between the normal working nodes and only migrate the data on the failed nodes.

[0051] In the embodiment, if there are multiple target storage files, S102 needs to be performed once for each target storage file to determine the corresponding migration destination. The normal device in the embodiment refers to a device in the storage system that is running normally and can accommodate the target storage file on the faulty device with sufficient storage space. The migration destination refers to the normal device that accommodates the target storage file. In order to identify each device in the storage system, each device of the storage system can also be numbered in advance according to a preset identification rule as the device name of each device. The preset identification rule can be flexibly selected according to the actual application scenario.

[0052] S103: Backup each target storage file to the corresponding migration destination.

[0053] After determining the corresponding migration destination for each target storage file in the previous step, multiple threads can be called to simultaneously migrate each target storage file to the corresponding migration destination, or only one thread can be used to migrate each target storage file to the corresponding migration destination in a certain fixed order or randomly. In order to facilitate subsequent data maintenance or data tracing, the correspondence between each target storage file and the corresponding migration destination can also be stored in the database after the step is performed. The correspondence between the target storage file and the corresponding migration destination can also be stored in the database after the migration of one target storage file is completed.

[0054] In the technical solution provided in the embodiment of the application, the device name and the file name are used as the input parameters of the hash function, and the device name with the largest hash result is used as the specific device for storing the file. This not only enables the data to be roughly evenly distributed, but also avoids the phenomenon of data migration between normal devices by controlling the data migration between normal working nodes, only migrates the data on the faulty node, and reduces the number of migrated data in the entire storage system, thereby effectively reducing the consumption of resources and avoiding the decline of system performance.

[0055] It should be noted that there is no strict execution order between the steps in the present application. As long as the logical order is met, these steps can be executed simultaneously or in a certain preset order. Figure 1 This is only an illustrative manner and does not mean that only this execution order can be used.

[0056] It is inevitable that multiple devices in the storage system will fail at the same time, and the above embodiment does not limit this application scenario. Based on the above embodiment, the present application further provides multiple alternative embodiments that can be flexibly selected by users according to actual needs to improve the user experience, which can include:

[0057] As an optional embodiment, if there are multiple target devices in the storage system that have faults, a priority setting page is displayed; the priority setting page includes a device display area and a sequential drag adjustment area; in response to a user drag instruction, the order of each target device in the device display area is adjusted; and according to the order in the device display area, the operation of obtaining the target storage file of each target device is performed in sequence. In this embodiment, the sequential drag condition area refers to that the user selects a target device and adjusts the front and back or the order by moving up, down, left and right. After determining the execution order of each target device, the above S101-S103 are sequentially performed for each target device.

[0058] As another optional embodiment, the priority of each device of the storage system is set in advance; if there are multiple target devices in the storage system that have faults, the target devices are sorted according to the priority of each target device; and according to the priority from high to low, the operation of obtaining the target storage file of each target device is performed in sequence. After determining the execution order of each target device, the above S101-S103 are sequentially performed for each target device.

[0059] As another optional embodiment, if there are multiple target devices in the storage system that have faults, a user setting page is displayed; the user setting page includes an execution order customization option and a default option; in response to a user selection instruction of the execution order customization option, a task execution order tag is set for each target device, and the operation of obtaining the target storage file of each target device is performed in sequence according to the task execution order tag; and in response to a user selection instruction of the default option, a current processing device is randomly selected from the target devices, and the target storage file of the current processing device is obtained. After determining the execution order of each target device, the above S101-S103 are sequentially performed for each target device.

[0060] In order to make the skilled in the art more clearly understand the technical solutions of the present application, the present application also combines Figure 3 An illustrative example can include:

[0061] A1: All storage devices of the storage system are numbered, such as Bucket1, Buecket2, Bucket3…

[0062] A2: When there is a faulty device Bucket3, the optimized Hash function is performed on the stored file Files3 and all other available devices: hash(File3, Bucket1), hash(File3, Bucket2), hash(File3, Bucket4)…

[0063] A3: Take the device with the largest Hash result in A2: as the device name after File3 migration, such as Bucket4, and record the correspondence between Bucket4 and File3.

[0064] A4: Copy the backup of File3 file to the migrated device Bucket4, and save the correspondence to the database after completion.

[0065] As can be seen from the above, the embodiment improves the Hash algorithm, takes the file name and the device name stored together as the input parameter of the function, and takes the device with the largest result as the corresponding file storage location. When some devices in the storage system fail, the data migration between the normal working devices can be effectively reduced, and the resource consumption and performance decline of the storage system can be reduced.

[0066] The embodiment of the application also provides a corresponding device for the data migration method, and the method is further practical. The device can be described from the perspective of functional modules and hardware. The data migration device provided by the embodiment of the application is introduced below, and the data migration device described below can be correspondingly referred to the data migration method described above.

[0067] Based on the perspective of functional modules, refer to Figure 4 , Figure 4 The structure diagram of the data migration device provided by the embodiment of the application in a specific implementation manner can include:

[0068] The fault detection module 401 is configured to monitor whether there is a device that fails in the storage system.

[0069] The file acquisition module 402 is configured to acquire the target storage file of the target device.

[0070] The migration end determination module 403 is configured to calculate the Hash value between the file name of each target storage file and the device name of the normal device of the storage system, select the normal device corresponding to the largest Hash value as the migration destination of the current target storage file, and record the correspondence between each target storage file and the corresponding migration destination.

[0071] The data migration module 404 is configured to backup each target storage file to the corresponding migration destination.

[0072] Optionally, in some embodiments of the embodiment, the device can include a storage module configured to store the correspondence between each target storage file and the corresponding migration destination in the database.

[0073] Optionally, in some other embodiments of the present embodiment, the device can further comprise a numbering module, configured to number each device of the storage system according to a preset identification rule, as a device name of each device.

[0074] Optionally, in some other embodiments of the present embodiment, the device can further comprise a concurrent processing module, configured to: if there are multiple target devices in the storage system that have faults, display a priority setting page; the priority setting page comprises a device display area and a sequential dragging adjustment area; in response to a user dragging instruction, adjust the sequence of each target device in the device display area; and according to the sequence in the device display area, sequentially execute the operation of obtaining the target storage file of each target device.

[0075] As an optional embodiment parallel to the above embodiment, the concurrent processing module can be further configured to: set a priority for each device of the storage system in advance; if there are multiple target devices in the storage system that have faults, sort the target devices according to the priority; and according to the priority from high to low, sequentially execute the operation of obtaining the target storage file of each target device.

[0076] As another optional embodiment parallel to the above embodiment, the concurrent processing module can be further configured to: if there are multiple target devices in the storage system that have faults, display a user setting page; the user setting page comprises an execution sequence customization option and a default option; in response to a user selection instruction of the execution sequence customization option, set a task execution sequence tag for each target device, and according to the task execution sequence tag, sequentially execute the operation of obtaining the target storage file of each target device; and in response to a user selection instruction of the default option, randomly select a current processing device from the target devices, and obtain the target storage file of the current processing device.

[0077] The functions of each functional module of the data migration device of the present embodiment can be implemented according to the method in the above method embodiment, and the specific implementation process can be referred to the related description of the above method embodiment, which will not be described here.

[0078] As can be seen from the above, the present embodiment can migrate the data of the faulty device of the storage device to the normal device, and the phenomenon of data migration between normal devices will not occur.

[0079] The data migration device mentioned above is described from the perspective of functional modules, and further, the present application also provides an electronic device, which is described from the perspective of hardware. Figure 5 The structure of the electronic device provided by the present embodiment in an embodiment is shown in the structure diagram. Figure 5As shown, the electronic device includes a memory 50 for storing a computer program, and a processor 51 for implementing the steps of the data migration method mentioned in any of the above embodiments when executing the computer program.

[0080] The processor 51 can include one or more processing cores, such as a 4-core processor, an 8-core processor, and the processor 51 can also be a controller, a microcontroller, a microprocessor, or other data processing chips, etc. The processor 51 can be implemented in at least one of the following hardware forms: a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 51 can also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, also known as a CPU (Central Processing Unit). The coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 51 can be integrated with a GPU (Graphics Processing Unit) for rendering and drawing the content required to be displayed by the display screen. In some embodiments, the processor 51 can also include an AI (Artificial Intelligence) processor for processing machine learning-related computing operations.

[0081] The memory 50 can include one or more computer-readable storage media. The computer-readable storage media can be non-transitory. The memory 50 can also include high-speed random access memory and non-volatile memory, such as one or more magnetic disk storage devices, flash memory devices. In some embodiments, the memory 50 can be an internal storage unit of an electronic device, such as a hard disk of a server. In other embodiments, the memory 50 can also be an external storage device of an electronic device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. Further, the memory 50 can include both an internal storage unit and an external storage device of an electronic device. The memory 50 can be used to store not only application software and various data installed in an electronic device, such as code of a program for performing a vulnerability processing method, but also to temporarily store data that has been output or will be output. In the present embodiment, the memory 50 is used to store at least the following computer program 501, wherein the computer program is loaded and executed by the processor 51, and can implement the related steps of the data migration method disclosed in any of the preceding embodiments. In addition, the resources stored in the memory 50 can also include an operating system 502 and data 503, etc., and the storage mode can be temporary storage or permanent storage. The operating system 502 can include Windows, Unix, Linux, etc. The data 503 can include, but is not limited to, data corresponding to the data migration result, etc.

[0082] In some embodiments, the electronic device described above can further include a display screen 52, an input / output interface 53, a communication interface 54, or a network interface, a power supply 55, and a communication bus 56. Among them, the display screen 52 and the input / output interface 53 such as a keyboard belong to a user interface, and the optional user interface can further include a standard wired interface, a wireless interface, and the like. Optionally, in some embodiments, the display can be an LED display, a liquid crystal display, a touch liquid crystal display, an OLED (Organic Light-Emitting Diode) touch, and the like. The display can also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device and to display a visualized user interface. The communication interface 54 can optionally include a wired interface and / or a wireless interface, such as a WI-FI interface, a Bluetooth interface, and the like, which is usually used to establish a communication connection between the electronic device and other electronic devices. The communication bus 56 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, or the like. The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, Figure 5 In the figure, only one thick line is used to represent, but it does not mean that there is only one bus or only one type of bus.

[0083] Those skilled in the art can understand that Figure 5 The structure shown in the figure does not constitute a limitation on the electronic device, and can include more or fewer components than the figure, for example, it can further include sensors 57 for implementing various functions.

[0084] The functions of each functional module of the electronic device described in the embodiments of the present application can be specifically implemented according to the methods in the above method embodiments, and the specific implementation process can refer to the related description of the above method embodiments, which will not be described here.

[0085] As can be seen from the above, the embodiments of the present application can migrate the data of the faulty device of the storage device to the normal device, and the phenomenon of data migration between normal devices will not occur.

[0086] It can be understood that if the data migration method in the above embodiments is implemented in the form of a software function unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application or the entire or part of the technical solutions that essentially contribute to the prior art can be embodied in the form of a software product. The computer software product is stored in a storage medium, and performs all or part of the steps of the method of each embodiment of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), an electrically erasable programmable ROM, a register, a hard disk, a multimedia card, a card memory (such as an SD or DX memory), a magnetic storage, a removable magnetic disk, a CD-ROM, a magnetic disk or an optical disk, and various media that can store program codes.

[0087] Based on this, the embodiment of the present application further provides a readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of the data migration method according to any one of the above embodiments are performed.

[0088] Each embodiment in the specification is described in a progressive manner, and each embodiment focuses on the difference from other embodiments. The same or similar parts of each embodiment can be referred to each other. For the hardware disclosed in the embodiments, including devices and electronic equipment, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and the related parts can be referred to the method part.

[0089] The skilled person can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized by electronic hardware, computer software or a combination of both. In order to clearly show the interchangeability of hardware and software, the composition and steps of each example have been described in the above description. Whether the functions are executed in hardware or software depends on the specific application and design constraints of the technical solutions. The skilled person can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0090] The above describes in detail the data migration method, device, electronic equipment and readable storage medium provided by the present application. The principles and implementation modes of the present application are described by applying specific examples, and the above description of the embodiments is only used to help understand the method of the present application and its core idea. It should be pointed out that, for those skilled in the art, without departing from the principles of the present application, the present application can be improved and modified in several ways, and these improvements and modifications also fall within the protection scope of the claims of the present application.

Claims

1. A data migration method, characterized by, The method comprises the following steps: When detecting that a target device of a storage system fails, obtaining target storage files of the target device; For each target storage file, calculating a hash value between a file name of the current target storage file and a device name of a normal device of the storage system, and selecting a normal device corresponding to a maximum hash value as a migration destination of the current target storage file; And recording a corresponding relationship between each target storage file and the corresponding migration destination; The normal device refers to a device of the storage system that is running normally and can accommodate target storage files on the failed device with sufficient storage space; the migration destination refers to the normal device that accommodates the target storage files; Backup each target storage file to the corresponding migration destination; After the step of backing up each target storage file to the corresponding migration destination, the method further comprises the steps of: Storing the corresponding relationship between each target storage file and the corresponding migration destination into a database.

2. The data migration method of claim 1, wherein, Before the step of obtaining the target storage files of the target device, the method further comprises the step of: Pre-numbering each device of the storage system according to a preset identification rule as a device name of the device.

3. The data migration method according to any one of claims 1 to 2, characterized in that, The step of obtaining the target storage files of the target device comprises the steps of: If there are multiple target devices that fail in the storage system, a priority setting page is displayed; the priority setting page comprises a device display area and a sequential drag adjustment area; Adjusting the sequence of each target device in the device display area in response to a user drag instruction; According to the sequence in the device display area, sequentially performing the operation of obtaining the target storage files of each target device.

4. The data migration method according to any one of claims 1 to 2, characterized by, The step of obtaining the target storage files of the target device comprises the steps of: Pre-setting a priority for each device of the storage system; If there are multiple target devices that fail in the storage system, sorting the target devices according to the priority of each target device; According to the priority from high to low, sequentially performing the operation of obtaining the target storage files of each target device.

5. The data migration method according to any one of claims 1 to 2, wherein, The step of obtaining the target storage files of the target device comprises the steps of: If there are multiple target devices that fail in the storage system, a user setting page is displayed; the user setting page comprises an execution sequence customization option and a default option; In response to a selection instruction of the execution sequence customization option of the user, setting a task execution sequence tag for each target device, and sequentially performing the operation of obtaining the target storage files of each target device according to the task execution sequence tag; In response to a default option selection instruction of the user, randomly selecting a current processing device from the target devices, and obtaining the target storage files of the current processing device.

6. A data migration apparatus, characterized by comprising: The method comprises the following steps: A fault detection module for monitoring whether there is a failed device in the storage system; A file acquisition module for obtaining target storage files of a target device; The migration end determination module is configured to calculate, for each target storage file, a hash value between a file name of the current target storage file and a device name of a normal device of the storage system, and select a normal device corresponding to a maximum hash value as a migration destination of the current target storage file. The migration end determination module is configured to calculate, for each target storage file, a hash value between a file name of the current target storage file and a device name of a normal device of the storage system, and select a normal device corresponding to a maximum hash value as a migration destination of the current target storage file. The normal device refers to a device in the storage system that is running normally and can accommodate target storage files on a failed device with sufficient storage space; and the migration destination refers to a normal device that accommodates target storage files. The data migration module is configured to back up each target storage file to the corresponding migration destination. The storage module is configured to store the correspondence between each target storage file and the corresponding migration destination in a database.

7. An electronic device, comprising: The readable storage medium stores a computer program, and the computer program is executed by the processor to implement the steps of the data migration method according to any one of claims 1 to 5.

8. A readable storage medium, characterized by, The readable storage medium stores a computer program, and the computer program is executed by the processor to implement the steps of the data migration method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Distributed data caching method and system

    CN111274310A