Method, electronic device and computer program product for migrating data
By selecting and migrating specific folders in the storage system, the high cost and inefficiency problems caused by overall migration in the existing technology are solved, and faster and more economical data migration is achieved.
Patent Information
- Application Number
- CN202310905940.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-21
- Publication Date
- 2025-01-21
AI Technical Summary
When storage systems encounter emergency situations, the prior art usually requires overall migration of file systems, resulting in high migration costs and slow speeds, and the inability to effectively reduce business interruption time and resource waste.
Migrate by selecting one or more folders from the file system on the storage system, scoring and sorting to identify folders with less cost to migrate, and migrating them to the target storage system, redirecting the folder's links to ensure Data access continuity.
The overall cost and time of data migration is reduced, migration speed is increased, business interruption time is reduced, and resource usage is optimized.
Smart Images

Figure CN119336707A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure generally relate to the field of computers, and more particularly to methods, electronic devices, and computer program products for migrating data. Background Art
[0002] With the continuous development of science and technology, the application scope of storage services and storage products is expanding, playing a key role in all walks of life. From individual users to large enterprises, they all rely on storage services and storage products to handle the growing data demand. Efficient and reliable storage solutions have become a key factor in promoting innovation and improving efficiency. The continuous development of storage services and products can create more convenience for digital life and enterprise development.
[0003] When storage products encounter emergencies (such as insufficient storage space, excessive load, etc.), data migration is very important. Migrating data can protect important information in a timely manner and ensure business continuity and stability. In addition, the size of the migration cost is also crucial. Reducing the migration cost means a more efficient recovery process, reducing business interruption time, and reducing costs and resource waste in emergencies. Therefore, it is very important to find and adopt solutions that can quickly, safely, and efficiently complete data migration to ensure the reliability and stability of the storage system. Summary of the invention
[0004] Embodiments of the present disclosure provide a method, device, and computer program product for migrating data.
[0005] In one aspect of the present disclosure, a method for migrating data is provided. The method includes, in response to determining that a source storage system satisfies a migration condition, determining a set of migration scores for a set of folders based on a set of used spaces of a set of folders in a source file system on the source storage system. The method also includes determining one or more folders to be migrated from the set of folders by sorting the set of migration scores. The method also includes selecting a target storage system from a set of target storage systems. The method also includes migrating the one or more folders to be migrated to a target file system in the target storage system. In addition, the method also includes redirecting one or more links of the one or more folders to be migrated to the target file system.
[0006] In another aspect of the present disclosure, an electronic device is provided. The device includes a processing unit and a memory, wherein the memory is coupled to the processing unit and stores instructions. When the instructions are executed by the processing unit, the following actions are performed: in response to determining that the source storage system meets the migration condition, based on the used space set of a group of folders in the source file system on the source storage system, a group of migration scores for a group of folders are determined; by sorting the group of migration scores, one or more folders to be migrated from the group of folders are determined; a target storage system is selected from a set of target storage systems; one or more folders to be migrated are migrated to a target file system in the target storage system; and one or more links of the one or more folders to be migrated are redirected to the target file system.
[0007] In yet another aspect of the present disclosure, a computer program product is provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, which, when executed, cause a computer to perform a method or process according to an embodiment of the present disclosure.
[0008] This summary is provided to introduce a selection of concepts in a simplified form, which are further described in the detailed description below. This summary is not intended to identify key features or essential features of the disclosure, nor is it intended to limit the scope of the various embodiments of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] The above and other objects, features and advantages of the present disclosure will become more apparent through a more detailed description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, wherein like reference numerals generally represent like elements throughout the exemplary embodiments of the present disclosure.
[0010] Figure 1 A schematic diagram showing an example environment in which embodiments of the present disclosure can be implemented;
[0011] Figure 2 A flowchart of a method for migrating data according to some embodiments of the present disclosure is shown;
[0012] Figure 3A-3B A schematic diagram of a service file system according to some embodiments of the present disclosure is shown;
[0013] Figure 3C A schematic diagram showing a process of storing incoming data according to some embodiments of the present disclosure;
[0014] Figure 4 A flowchart of a method for migrating data according to some embodiments of the present disclosure is shown;
[0015] Figure 5A-5DA diagram showing a storage system and a file system according to some embodiments of the present disclosure;
[0016] Figure 6 A flowchart showing a method for migrating data according to some embodiments of the present disclosure; and
[0017] Figure 7 A schematic block diagram of a device that can be used to implement an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0018] The preferred embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although some specific embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.
[0019] As used herein, the term "including" and its variations mean open inclusion, i.e., "including but not limited to". Unless otherwise stated, the term "or" means "and / or". The term "based on" means "based at least in part on". The terms "an example embodiment" and "an embodiment" mean "at least one example embodiment". The term "another embodiment" means "at least one additional embodiment". The terms "first", "second", etc. may refer to different or the same objects, unless explicitly indicated to be different.
[0020] When a storage system encounters an emergency and needs to migrate the file system on the storage system, the entire file system is usually migrated to alleviate the problem of the storage system. This will result in excessively high migration costs. At the same time, since the entire file system needs to be migrated, the migration speed will also be very slow.
[0021] To this end, an embodiment of the present application provides a solution for migrating data, which can avoid migrating the entire file system by selecting one or more folders from the file system on the storage system for migration during data migration. In addition, by scoring and sorting the folders, one or more optimal folders with a lower migration cost are selected for migration, thereby reducing the overall data migration cost and increasing the speed of data migration.
[0022] Figure 1 1 is a schematic diagram of an example environment 100 in which embodiments of the present disclosure can be implemented. Figure 1As shown in the example environment 100, the storage service 110 includes an analysis agent 120, a migration initiator 130, a space manager 140, and a service file system 150. The analysis agent 120 can create multiple criteria to track various scenarios that trigger data migration, such as load balancing and storage space balancing, to trigger the migration initiator 130 to perform migration of folders. In some embodiments, the analysis agent 120 can track the service of the storage system operation status to continuously monitor whether the storage system may have insufficient storage space in the future, or the IO load of each storage system continues to exceed the load threshold for a long time. In some embodiments, the analysis agent 120 determines one or more folders to be migrated from a group of folders in the file system 152 on the source storage system 156. By migrating one or more folders in the file system 152 on the source storage system 156 to the file system 154 on the target storage system 158, the problem of insufficient space or excessive IO load on the source storage system 156 is alleviated.
[0023] After the analysis agent 120 determines that a folder migration is to be performed, the migration initiator 130 performs the migration on one or more folders, and the space manager 140 performs a space assessment to confirm the space occupancy on the source storage system 156 and the target storage system 158. The service file system 150 is a file system for management. For example, the service file system 150 includes a file system 152 and a file system 154. It should be understood that two file systems are shown here as examples, and the service file system 150 may include a greater number of file systems. For example, file system 152 is the source file system, and file system 154 is the target file system. The migration initiator 130 migrates one or more folders of the file system 152 to the file system 154 (if it does not exist, the file system 154 is created). Therefore, the file system 152 and the file system 154 are corresponding file systems, and the collection of files stored together on the file system 152 before the migration. The service file system 150 manages multiple file systems. It should be understood that the file system 150 does not include a storage system. As Figure 1 As shown, file system 152 is on source storage system 156, and file system 154 is on target storage system 158. Upon receiving IO 160-1, IO 160-2, IO 160-3, IO 160-4, and IO 160-5 (individually or collectively referred to as IO 160) from different hosts, storage service 110 may send IO 160 to folders of corresponding file systems.
[0024] Figure 2A flow chart of a method 200 for migrating data according to some embodiments of the present disclosure is shown. In response to determining that a source storage system meets a migration condition, a set of migration scores for a set of folders is determined based on a set of used spaces of a set of folders in a source file system on the source storage system. For example, a migration score for each folder is calculated based on the used spaces of the folders in the set of folders, so that the used spaces of the folders are taken into account when calculating the migration scores of the folders.
[0025] At 204, one or more folders to be migrated are determined from a group of folders by sorting a group of migration scores. For example, when it is determined that the source storage system meets the migration condition, one or more folders on the file system are selected for migration instead of migrating the entire file system.
[0026] At 206, a target storage system is selected from the target storage system set. For example, when performing migration, there are often multiple target storage systems that can be used as migration destinations, so it is necessary to select a suitable target storage system to ensure that the migrated one or more folders do not affect the normal operation of the target file system.
[0027] At 208, one or more folders to be migrated are migrated to the target file system in the target storage system. For example, one or more folders to be migrated are migrated to the target file system to alleviate the emergency of the source storage system and ensure the normal operation of the source storage system and the source file system. At 210, one or more links of the one or more folders to be migrated are redirected to the target file system. For example, when one or more folders are migrated to the target file system, a group of folders originally belonging to the same file system are stored across storage systems, so one or more links of the one or more folders need to be redirected to ensure that data IO can access the corresponding folders.
[0028] Therefore, according to the data migration solution of the embodiment of the present disclosure, one or more folders can be selected from the file system on the storage system for migration, avoiding the migration of the entire file system. In addition, by scoring and sorting the folders, one or more optimal folders with a smaller migration cost are selected for migration, thereby reducing the data migration cost and improving the speed of data migration.
[0029] Figure 3A FIG. 3 shows a schematic diagram of a service file system 300A according to some embodiments of the present disclosure. Figure 3AAs shown, the service file system 300A includes a file system 305, and the file system 305 includes a root 310 and folders 311, 312, and 313. IO 301 may be an access IO pointing to the folder 311, IO 302 may be an access IO pointing to the folder 312, and IO 303 may be an access IO pointing to the folder 313. Figure 3A As shown, the file system 305 is stored on the source storage system 315. In some embodiments, since the source storage system 315 does not have an emergency, such as insufficient storage space or a long-term high IO load, the folders on the file system 305 are not migrated to other storage systems, so the service file system 300A only has the file system 305 on the source storage system 315.
[0030] Figure 3B FIG. 3 shows a schematic diagram of a service file system 300B according to some embodiments of the present disclosure. Figure 3B As shown, the analysis agent (e.g., Figure 1 The analysis agent 120 shown in the figure monitors the state of the source storage system 335 and determines that the source storage system 335 is about to encounter an emergency situation (for example, insufficient storage space or excessive IO load), and chooses to migrate the folder 331 on the file system 325 to the file system 345 on the target storage system 355. After the migration, the folder 331 is as shown in FIG. Figure 3B That is, folder 351 is obtained by migrating folder 331. Since folder 331 is migrated to target storage system 355, possible emergency situations of source storage system 335 are alleviated, such as storage space is reduced, and load IO is also reduced.
[0031] In some embodiments, the link root directory 360 can be used to redirect access IO to the corresponding folder. It is understood that when one or more folders in the file system are migrated for the first time, the link root directory 360 will be created accordingly. Figure 3B As shown, IO 321 is redirected to folder 351 on file system 345 through folder link 361 in link root directory 360, IO 322 is redirected to folder 332 on file system 325 through folder link 362, and IO 321 is redirected to folder 333 on file system 325 through folder link 363.
[0032] Figure 3C FIG. 3 shows a schematic diagram of a process 300C for storing incoming data according to some embodiments of the present disclosure. Data 370 includes a plurality of data blocks 1, 2, and 3. Figure 3A and Figure 3BDescribe, where data block 1 indicates that the data block is to be written Figure 3A Similarly, data block 2 indicates that the data block is to be written to folder 312, and data block 3 indicates that the data block is to be written to folder 313. By analyzing agent 372 and migration initiator 374, data 376 is stored in source storage system 335 (i.e. Figure 3B 335 in the source storage system 335), since the folder 332 and the folder 331 are on the source storage system 335, the data 376 associated with the folder 332 and the folder 331 is stored on the source storage system 335. In addition, the data 378 associated with the folder 335 is stored on the target storage system 355.
[0033] Figure 4 A flow chart of a method 400 for migrating data according to some embodiments of the present disclosure is shown. The analysis agent monitors and analyzes the storage space of the source storage system, and when it is predicted that the storage space of the source storage system will be insufficient at a certain point in time, an alarm is issued to trigger the migration service. The problem of insufficient storage space can be alleviated by selecting one or more folders for migration through method 400. For example, the analysis agent (e.g., Figure 1 The analysis agent 120 shown determines that the source storage system will run out of storage space within a period of time, triggering the folder migration process. Figures 5A to 5D A diagram showing a storage system and a file system during the execution of method 400 is shown below. Figures 5A to 5D , to describe the process of method 400. In block 402, a spatial maximum variation set for a set of folders is calculated. For example, t s is the current time point, t o is the predicted time point when insufficient storage space will occur, where t s +T <t o <t s +α*T, α is the expansion parameter, T is the time interval parameter. H[n] is used to represent a set of folders in the source file system on the source storage system n, where the length of H[n] is K. In other words, there are K folders in a set of folders in the source file system. The maximum space change set is calculated by formula 1:
[0034]
[0035] Where delta_space[k] represents the maximum space change set, used_space[k](t) represents the used space set at time t, and used_space[k](t s ) indicates that at t s The collection of used space at a certain moment.
[0036] Combination Figure 5A As shown, Figure 5A A schematic diagram of a file system 500A according to some embodiments of the present disclosure is shown. s At this moment, the used space of folder 511 may be 0.5TB, the used space of folder 512 may be 2.0TB, the used space of folder 513 may be 1.2TB, and the used space of folder 514 may be 0.3TB. It can be seen that the used space of folder 512 and folder 513 is larger. Figure 5B , Figure 5B A graph set 500B is shown showing the change of available storage space of a storage system over time according to some embodiments of the present disclosure. For example, graph 516 shows the predicted change trend of available space of a source storage system over time. The available storage space of the source storage system becomes less and less as time goes by. o The available space of the target storage system will be insufficient at the moment t. o There is always enough free space, so you can migrate folders in the file system from the source storage system to the target storage system to alleviate the problem of insufficient free space in the source storage system. In general, folders with large used space are migrated, for example, Figure 5A , the used space of folder 512 is 2.0TB, and the used space of folder 513 is 1.2TB. Therefore, the conventional storage system will give priority to migrating folder 512 and folder 513. In this way, the migration cost is often relatively high and the effect is not good. The embodiment of the present disclosure migrates the folder based on the migration score. How to calculate the migration score will be described in 404 below. It should be understood that these available space change curves and used space change curves are predicted. The analysis agent predicts that the source storage system will have insufficient storage space to trigger the migration service. Therefore, when the analysis agent determines that the current used space is too large, or the used space is growing at a fast rate, the migration service may be triggered.
[0037] Return to reference Figure 4 , a set of migration scores for a set of folders is calculated at 404. For example, a set of migration scores may be calculated by the following formula 2:
[0038]
[0039] Where MQ[k] represents a set of migration scores, when delta space[k]When ≤0, MQ[k] is -1, that is, when the used space of the folder becomes smaller and smaller over time, the corresponding migration score is -1. In addition, when delta-space[k]>0, it can be seen from Formula 2 that used-space[k](t s ), the smaller MQ[k] is, that is, the larger the used space of the folder is, the smaller the corresponding migration score is, because the larger the used space of the folder is, the higher the migration cost is. Figure 5C , Figure 5C A graph set 500C is shown showing how the used space of a folder changes over time according to some embodiments of the present disclosure. It should be understood that each of the graphs in the graph 500C is predicted. Figure 5A The used space of the folder 511 in FIG. 522 corresponds to the used space of the folder 511 in FIG. Figure 5A The used space of the folder 512 in FIG. 5 corresponds to the used space of the folder 512 in FIG. 5 . The curve 523 and Figure 5A The used space of the folder 513 in the graph 524 corresponds to Figure 5A The used space of folder 514 in . Figure 5C As shown, at t o At time t, the space change of folder 511 is 1TB (i.e., 1.5TB-0.5TB), similarly, the space change of folder 512 is 0.2TB, the space change of folder 513 is 1.9TB, and the space change of folder 511 is 0TB. As mentioned above, folders 512 and 513 are usually migrated first, which often results in high migration cost and poor effect. For example, although the used space of folder 512 is larger than that of folder 511 at the current time, at t o The space change of folder 512 at the moment is smaller than that of folder 511 , so migrating folder 511 is a better choice, which has a lower migration cost and can better alleviate the problem of insufficient storage space.
[0040] Return to reference Figure 4 , one or more folders to be migrated are selected by sorting a group of migration scores at 406. For example, by sorting a group of migration scores, one or more folders D in a group of folders are selected for migration, and folders with higher migration scores are selected for migration during migration, and at the same time, the storage space of the source storage system after migration is greater than the storage space threshold, and the one or more folders to be migrated can be selected in combination with the following formula 3:
[0041]
[0042] where D = [d1, d2, ..., d I ], indicating one or more folders to be migrated, ts <t≤t s +α*T, which means that at t s With t s +α*T ensures that the storage space of the source storage system is sufficient by migrating one or more folders.
[0043] At 408, a target storage system is selected from the target system set. For example, when selecting a target storage system, it is necessary to ensure that the storage space of the target storage system is greater than a predetermined threshold. For example, the target storage system can be determined by the following formula 4:
[0044]
[0045] Wherein S_LWM is a threshold value used to determine whether the target storage system has enough storage space. In addition, in some embodiments, when there are multiple target storage systems that meet the conditions, a target storage system with high bandwidth can be selected to migrate the folder faster.
[0046] At 410, one or more folders are migrated to the target storage system and the links to the folders are redirected. For example, after determining one or more folders to be migrated, the migration initiator migrates the one or more folders and redirects the access IO through the link file root directory. Figure 5D Describe, Figure 5D FIG. 5 shows a schematic diagram of a service file system 500D according to some embodiments of the present disclosure. Figure 5D As shown, the file system 535 on the source storage system 530 has a folder 542 and a folder 544, and the file system 555 on the target storage system 550 has a folder 561 and a folder 563, where the folder 561 and the folder 563 are migrated from the file system 535 to the file system 555. The folder 581, the folder 582, the folder 583, and the folder 584 on the link file root directory 580 redirect the corresponding IO 571, IO 572, IO 573, and IO 574 to the corresponding folders. For example, IO 573 is redirected to the folder 563 through the folder 583.
[0047] Figure 6 A flow chart of a method 600 for migrating data according to some embodiments of the present disclosure is shown. When the IO load of the source storage system is too high, some data of the source storage system needs to be migrated to relieve the pressure of the IO load of the source storage system and avoid causing the system IO speed to decrease and affect user use. At 602, a normalized input and output operations per second (IOPS) set for a group of folders is calculated. For example, the normalized IOPS can be calculated by the following formula 5:
[0048]
[0049] Where average_iops(k) represents IOPS, and average_iops_norm[k] represents the normalized IOPS. IOPS can represent the degree of IO load of the storage system.
[0050] At 604, a set of migration scores for a set of folders is calculated. For example, in a scenario where the IO load is too high, the migration score can be calculated using the following formula 6:
[0051]
[0052] where used_space[k](t s ) is the used space of the folder at the current moment, so the higher the used space of the folder, the smaller the migration score is, so as to increase the possibility of migrating the folder with smaller used space and reduce the cost of migration. At 606, one or more folders to be migrated are selected by sorting a set of migration scores. For example, a set of migration scores is sorted by sorting a set of migration scores, and then one or more folders of a predetermined proportion (for example, the first 10%) of the sorted set of migration scores are selected for migration.
[0053] At 608, a target storage system is selected from the target storage system set. For example, the target storage system may be determined by the following formula 7 and formula 8:
[0054]
[0055]
[0056] Where load_level(n) represents the IO load level of the source storage system, and load_level(m) represents the IO load level of the target storage system. If the ratio of the two is greater than 2, the IO load of the target storage system needs to be less than half of the IO load of the source storage system to avoid excessive IO load of the target storage system, and the storage space of the target storage system is avoided by formula 8. In addition, in formula 8, t needs to satisfy t s <t≤t s +α*T, to s With t s+α*T ensures that the storage space of the source storage system is sufficient by migrating one or more folders. In addition, in some embodiments, when there are multiple target storage systems that meet the conditions, a target storage system with high bandwidth can be selected to migrate the folders faster. At 610, one or more folders are migrated to the target storage system and the links of the folders are redirected.
[0057] Figure 7 1 shows a schematic block diagram of a device 700 that can be used to implement an embodiment of the present disclosure. The device 700 may be a device or apparatus described in an embodiment of the present disclosure. Figure 7 As shown, the device 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) 702 or computer program instructions loaded from a storage unit 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the device 700 can also be stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0058] A number of components in the device 700 are connected to the I / O interface 705, including: an input unit 706, such as a keyboard, a mouse, etc.; an output unit 707, such as various types of displays, speakers, etc.; a storage unit 708, such as a disk, an optical disk, etc.; and a communication unit 709, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 709 allows the device 700 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0059] The various methods or processes described above may be performed by the processing unit 701. For example, in some embodiments, the methods may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as the storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 700 via the ROM 702 and / or the communication unit 709. When the computer program is loaded into the RAM 703 and executed by the CPU 701, one or more steps or actions in the methods or processes described above may be performed.
[0060] In some embodiments, the methods and processes described above may be implemented as a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present disclosure.
[0061] Computer readable storage medium can be a tangible device that can hold and store instructions used by an instruction execution device. Computer readable storage medium can be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (non-exhaustive list) of computer readable storage medium include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, for example, a punch card or a convex structure in a groove on which instructions are stored, and any suitable combination thereof. The computer readable storage medium used here is not interpreted as a transient signal itself, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagated by a waveguide or other transmission medium (for example, a light pulse by an optical fiber cable), or an electrical signal transmitted by a wire.
[0062] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0063] The computer program instructions for performing the disclosed operation may be assembler instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, and conventional procedural programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, executed as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., utilizing an Internet service provider to connect via the Internet). In certain embodiments, by utilizing the state information of a computer-readable program instruction to customize an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), the electronic circuit may execute a computer-readable program instruction, thereby realizing various aspects of the present disclosure.
[0064] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more blocks in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more blocks in the flowchart and / or block diagram.
[0065] Computer-readable program instructions may be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more blocks in the flowchart and / or block diagram.
[0066] The flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the equipment, methods and computer program products according to multiple embodiments of the present disclosure. In this regard, each block in the flow chart or block diagram can represent a part of a module, a program segment or an instruction, and a part of the module, a program segment or an instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the blocks can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous blocks can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flow chart, and the combination of the blocks in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0067] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The choice of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A method for migrating data, comprising: In response to determining that the source storage system satisfies the migration condition, determining a set of migration scores for the set of folders based on a set of used spaces of the set of folders in a source file system on the source storage system; determining one or more folders to be migrated from the set of folders by sorting the set of migration scores; Select a target storage system from the target storage system collection; Migrating the one or more folders to be migrated to a target file system in the target storage system; as well as One or more links of the one or more folders to be migrated are redirected to the target file system.
2. The method according to claim 1, wherein determining that the source storage system satisfies the migration condition comprises determining that the source storage system will have insufficient storage space at a predicted time point, and determining the set of migration scores for the set of folders comprises: Based on the predicted time point and the current time point, determining a spatial maximum change set for the group of folders, wherein the spatial maximum change in the spatial maximum change set is related to the predicted usage space of the folders in the group of folders between the current time point and the predicted time point; as well as The set of migration scores for the set of folders is determined based on the set of used space and the set of maximum space changes.
3. The method of claim 2, wherein determining the spatially largest set of changes for the set of folders comprises: Determine the maximum predicted usage space for a folder in the group of folders between the current time point and the predicted time point; as well as Based on the largest predicted usage space, the space maximum variation set is determined.
4. The method of claim 3, determining the set of migration scores for the set of folders comprises: In response to determining that the spatial maximum change in the spatial maximum change set is a positive number, determining the set of migration scores based on the used space set and the spatial maximum change set; as well as In response to determining that the spatial maximum variation in the set of spatial maximum variations is a non-positive number, a migration score in the set of migration scores is determined to be a given value.
5. The method of claim 3, wherein determining the one or more folders to be migrated comprises: The one or more folders to be migrated are determined based on the predicted used space of the source storage system at the predicted time point and the sorted set of migration scores.
6. The method according to claim 5, wherein determining the target storage system from the set of target storage systems comprises: Determine, from the set of target storage systems, a plurality of target storage systems having storage space greater than a predetermined space threshold; as well as The target storage system is determined based on a transmission bandwidth of each target storage system among the multiple target storage systems.
7. The method of claim 1 , wherein determining that the source storage system satisfies the migration condition comprises determining that an input / output (IO) load of the source storage system continuously exceeds a predetermined IO threshold within a predetermined period of time, and determining the set of migration scores for the set of folders comprises: Determine a normalized IOPS set for the set of folders by normalizing the IOPS set for the set of folders; as well as The set of migration scores for the set of folders is determined based on the set of used space and the set of normalized IOPS.
8. The method of claim 7, wherein determining the one or more folders to be migrated comprises: The one or more folders to be migrated are determined based on a predetermined migration ratio and the sorted set of migration scores.
9. The method according to claim 8, wherein determining the target storage system from the set of target storage systems comprises: Determine, from the target storage system set, a plurality of target storage systems having storage spaces greater than a predetermined space threshold and IO loads less than the IO loads of the source storage systems; as well as The target storage system is determined based on a transmission bandwidth of each target storage system among the multiple target storage systems.
10. An electronic device comprising: Processing unit; as well as A memory coupled to the processing unit and storing instructions that, when executed by the processing unit, perform the following actions: In response to determining that the source storage system satisfies the migration condition, determining a set of migration scores for the set of folders based on a set of used spaces of the set of folders in a source file system on the source storage system; determining one or more folders to be migrated from the set of folders by sorting the set of migration scores; Select a target storage system from the target storage system collection; Migrating the one or more folders to be migrated to a target file system in the target storage system; as well as One or more links of the one or more folders to be migrated are redirected to the target file system.
11. The device according to claim 10, wherein determining that the source storage system satisfies the migration condition comprises determining that the source storage system will have insufficient storage space at a predicted time point, and determining the set of migration scores for the set of folders comprises: Based on the predicted time point and the current time point, determining a spatial maximum change set for the group of folders, wherein the spatial maximum change in the spatial maximum change set is related to the predicted usage space of the folders in the group of folders between the current time point and the predicted time point; as well as The set of migration scores for the set of folders is determined based on the set of used space and the set of maximum space changes.
12. The apparatus of claim 11, wherein determining the spatially largest set of variations for the set of folders comprises: Determine the maximum predicted usage space for a folder in the group of folders between the current time point and the predicted time point; as well as Based on the largest predicted usage space, the space maximum variation set is determined.
13. The apparatus of claim 12, determining the set of migration scores for the set of folders comprising: In response to determining that the spatial maximum change in the spatial maximum change set is a positive number, determining the set of migration scores based on the used space set and the spatial maximum change set; as well as In response to determining that the spatial maximum variation in the set of spatial maximum variations is a non-positive number, a migration score in the set of migration scores is determined to be a given value.
14. The apparatus of claim 12, wherein determining the one or more folders to be migrated comprises: The one or more folders to be migrated are determined based on the predicted used space of the source storage system at the predicted time point and the sorted set of migration scores.
15. The apparatus of claim 14, wherein determining the target storage system from the set of target storage systems comprises: Determine, from the set of target storage systems, a plurality of target storage systems having storage space greater than a predetermined space threshold; as well as The target storage system is determined based on a transmission bandwidth of each target storage system among the multiple target storage systems.
16. The device according to claim 10, wherein determining that the source storage system satisfies the migration condition comprises determining that an IO load of the source storage system continuously exceeds a predetermined IO threshold within a predetermined time period, and determining the set of migration scores for the set of folders comprises: Determine a normalized IOPS set for the set of folders by normalizing the IOPS set for the set of folders; as well as The set of migration scores for the set of folders is determined based on the set of used space and the set of normalized IOPS.
17. The apparatus of claim 16, wherein determining the one or more folders to be migrated comprises: The one or more folders to be migrated are determined based on a predetermined migration ratio and the sorted set of migration scores.
18. The apparatus of claim 17, wherein determining the target storage system from the set of target storage systems comprises: Determine, from the target storage system set, a plurality of target storage systems having storage spaces greater than a predetermined space threshold and IO loads less than the IO loads of the source storage systems; as well as The target storage system is determined based on a transmission bandwidth of each target storage system among the multiple target storage systems.
19. A computer program product tangibly stored on a non-transitory computer readable medium and comprising machine executable instructions which, when executed, cause a machine to perform the following actions: In response to determining that the source storage system satisfies the migration condition, determining a set of migration scores for the set of folders based on a set of used spaces of the set of folders in a source file system on the source storage system; determining one or more folders to be migrated from the set of folders by sorting the set of migration scores; Select a target storage system from the target storage system collection; Migrating the one or more folders to be migrated to a target file system in the target storage system; as well as One or more links of the one or more folders to be migrated are redirected to the target file system.
20. The computer program product of claim 19, wherein determining that the source storage system satisfies the migration condition comprises determining that the source storage system will run out of storage space at a predicted point in time, and determining the set of migration scores for the set of folders comprises: Based on the predicted time point and the current time point, determining a spatial maximum change set for the group of folders, wherein the spatial maximum change in the spatial maximum change set is related to the predicted usage space of the folders in the group of folders between the current time point and the predicted time point; as well as The set of migration scores for the set of folders is determined based on the set of used space and the set of maximum space changes.