A method, apparatus, device and storage medium for volume operation
By generating bitmap information and copying source volume data onto the target volume for expansion, the waiting problem caused by separating volume cloning and expansion operations is solved, achieving efficient business deployment and improved user experience.
Patent Information
- Application Number
- CN202211183177.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-27
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2042-09-27
AI Technical Summary
In existing technologies, volume cloning and expansion operations need to be performed separately, resulting in long user wait times and reducing business deployment efficiency and user experience.
By generating bitmap information, the target volume is first expanded, and then the source volume data is copied to the expanded target volume according to the bitmap information to complete the cloning operation, so that the expanded target volume can still be used during the data copying process.
It reduces user waiting time, improves business deployment efficiency and user experience, and saves business deployment time.
Smart Images

Figure CN115686358B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of system storage technology, and in particular to a volume operation method, apparatus, device and storage medium. Background Technology
[0002] Volume cloning and volume expansion are two fundamental functions of a storage system. Expanding a volume increases its capacity to accommodate larger data volumes. Cloning a volume creates a target volume from a source volume, with the same size and data as the source volume. To clone a target volume larger than the source volume, a two-step process of cloning and expansion is typically required: first, the target volume is cloned, and then its capacity is expanded. Since the target volume cannot be used until the data copying is complete, users experience long wait times, reducing deployment efficiency. Summary of the Invention
[0003] Based on this, this application provides a volume operation method, apparatus, device, and storage medium to reduce user waiting time and service deployment time, and improve service deployment efficiency.
[0004] Firstly, a volume operation method is provided, the method comprising:
[0005] Generate first-order graph information based on the storage information of data within at least one data block in the source volume;
[0006] Create the target volume of the source volume, and then expand the target volume to obtain the expanded target volume;
[0007] Generate second bitmap information based on the storage information of the data within the data blocks of the target volume to be expanded;
[0008] Based on the first bitmap information and the second bitmap information, the data in the source volume is copied to the target volume to complete the cloning operation of the source volume and obtain the final target volume.
[0009] According to one feasible method in an embodiment of this application, data in the source volume is copied to the target volume for expansion based on the first bitmap information and the second bitmap information, including:
[0010] Based on the first bitmap information and the second bitmap information, the third bitmap information is generated. The third bitmap information is used to indicate the storage location of data within the data block in the final target volume.
[0011] Create a local replication relationship between the source volume and the target volume to be expanded, and copy the data from the source volume to the target volume to be expanded based on the third bitmap information.
[0012] According to one achievable method in an embodiment of this application, the first bitmap information includes first location information of data in the source volume, and the second bitmap information includes second location information of data in the target volume to be expanded; based on the first bitmap information and the second bitmap information, third bitmap information is generated, including:
[0013] Based on the first and second position information, the third bitmap information is generated.
[0014] According to one feasible method in an embodiment of this application, after copying data from the source volume to the target volume for expansion, the method further includes:
[0015] Delete the first bitmap information, the second bitmap information, and the third bitmap information;
[0016] Alternatively, after generating the third bitmap information, the method may also include:
[0017] After deleting the second bitmap information and copying the data from the source volume to the target volume for expansion, the method further includes:
[0018] Delete the first and third bitmap information.
[0019] According to one feasible method in an embodiment of this application, during the process of copying data from the source volume to the target volume for expansion, the method further includes:
[0020] In response to the received user request data for expanding the target volume, the copying of data from the source volume to the target volume is paused;
[0021] Based on the business request data, determine the business type corresponding to the business request;
[0022] Depending on the business type, perform operations on the source volume or the target volume to be expanded.
[0023] According to one achievable method in an embodiment of this application, the service type includes a read request, and the service request data includes target request data; based on the service type, operations are performed on the source volume and / or the target volume to be expanded, including:
[0024] When the business type is a read request, check whether the data requested by the user exists in the target volume for expansion based on the third bitmap information;
[0025] When the target volume for expansion does not contain the data requested by the user, the target data is read from the source volume based on the first graph information and returned to the user terminal.
[0026] According to one achievable method in the embodiments of this application, the business type includes a write request, and the business request data includes a request to add data; based on the business type, operations are performed on the source volume or the target volume to be expanded, including:
[0027] When the business type is a write request, the unused data blocks in the target volume to be expanded are determined based on the third bitmap information.
[0028] The requested new data is written to the unused data block to obtain the updated target volume for expansion.
[0029] Update the third bitmap information based on the updated target volume for expansion.
[0030] Secondly, a roll-operating apparatus is provided, the apparatus comprising:
[0031] The generation module is used to generate first-order graph information based on the storage information of data in at least one data block in the source volume;
[0032] The expansion module is used to create a target volume from a source volume and expand the target volume to obtain an expanded target volume.
[0033] The generation module is also used to generate second bitmap information based on the storage information of the data in the data blocks of the target volume to be expanded;
[0034] The cloning module is used to copy data from the source volume to the target volume for expansion based on the first bitmap information and the second bitmap information, so as to complete the cloning operation of the source volume and obtain the final target volume.
[0035] Thirdly, a computer device is provided, comprising:
[0036] At least one processor; and
[0037] A memory that is communicatively connected to at least one processor; wherein,
[0038] The memory stores computer instructions that can be executed by at least one processor to enable the at least one processor to perform the methods involved in the first aspect above.
[0039] Fourthly, a computer-readable storage medium is provided, having stored thereon computer instructions, characterized in that the computer instructions are used to cause a computer to perform the methods involved in the first aspect above.
[0040] According to the technical content provided in the embodiments of this application, a first bitmap information is generated based on the storage information of data in at least one data block in the source volume. A target volume of the source volume is created, and the target volume is expanded to obtain an expanded target volume. A second bitmap information is generated based on the storage information of data in the data block of the expanded target volume. Based on the first bitmap information and the second bitmap information, the data in the source volume is copied to the expanded target volume to complete the cloning operation of the source volume and obtain the final target volume. After expanding the target volume, this application copies the data in the source volume to the expanded target volume based on the bitmap information. The expanded target volume can also be used during the data copying process, eliminating the need for users to wait for a long time for all data to be copied to the expanded target volume, saving business deployment time, improving business deployment efficiency, and enhancing the user experience. Attached Figure Description
[0041] Figure 1 This is a diagram illustrating the application environment of the roll-up operation method in one embodiment;
[0042] Figure 2 This is a flowchart illustrating a roll-up operation method in one embodiment;
[0043] Figure 3 This is a structural block diagram of the roll operation device in one embodiment;
[0044] Figure 4 This is a schematic structural diagram of a computer device in one embodiment. Detailed Implementation
[0045] The present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the scope of the present application.
[0046] Scaling and cloning operations are frequently used in cloud server operations on cloud platforms. Cloning creates a cloud server, which is then ready for use after the data copy is complete. Scaling increases the capacity of a cloud server. In actual use of cloud platforms, scaling and cloning operations are often used in combination; for example, creating a 100GB cloud server from a 40GB image. This method of scaling after cloning is less efficient and easier to use, impacting the user experience. For instance, during the cloning process, the target volume cannot be operated on, meaning it cannot be used by the user until all data is copied and the local copy relationship between the target and source volumes is deleted.
[0047] Furthermore, the data copying time is also related to the volume size, the storage system's current load, the internal copy rate setting, and other types of background tasks. Typically, to ensure front-end business performance, the storage system's internal copy rate is set to a low value, which leads to excessively long data copying times and a reduced user experience. Sometimes, scenarios exist where multiple clones are created from the same source volume, such as cloning dozens, hundreds, or thousands of cloud servers from a single cloud server for user use, or deploying and launching new business systems. If each clone requires waiting for the data copy to complete before the target volume can be used, it will severely slow down business deployment and development, thereby degrading the user experience.
[0048] To address the problems of the prior art, embodiments of this application provide a volume operation method, apparatus, device, and computer storage medium. The volume operation method provided in this application embodiment will be described first below.
[0049] For ease of understanding, the system to which this application applies will first be described. The volume operation method provided in this application can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. Server 104 generates first bitmap information based on the storage information of data in at least one data block in the source volume, creates a target volume for the source volume, and expands the target volume to obtain an expanded target volume. It then generates second bitmap information based on the storage information of data in the data blocks of the expanded target volume. Based on the first and second bitmap information, it copies data from the source volume to the expanded target volume to complete the cloning operation of the source volume and obtain the final target volume. Terminal 102 can be, but is not limited to, various personal computers, laptops, and tablets, and server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers.
[0050] Figure 2 This is a flowchart illustrating a volume operation method provided in an embodiment of this application. Figure 2 As shown, the method may include the following steps:
[0051] S210, Generate first-order graph information based on the storage information of data in at least one data block in the source volume.
[0052] Each data block in the source volume can store data, and storage information indicates the storage status of data within each data block. Storage information can include whether data has been stored or not.
[0053] First-bit map information is generated based on the storage status of data within at least one data block in the volume. This first-bit map information represents the data storage status of the source volume. The first-bit map information may include a first-bit map array and position information, where the position information includes feature values. Each data block has a corresponding position within the bitmap array, and the feature value at that corresponding position is determined based on the storage status of the data within the data block. For example, when data exists within a data block, the value at the corresponding position in the bitmap array is 1; when no data exists within a data block, the value at the corresponding position is 0.
[0054] S220: Create the target volume of the source volume and perform an expansion operation on the target volume to obtain the expanded target volume.
[0055] Create a target volume from the source volume. Both the source and target volumes are of the same type and size. Expand the target volume to the requested capacity. After the expansion operation, the expanded target volume is obtained. The expanded target volume will have two regions: an original region with the same capacity as the source volume, and an expansion region. The bitmap information corresponding to the expansion region is not part of the first bitmap information and is not managed by the first bitmap information.
[0056] S230, Generate second bitmap information based on the storage information of the data in the data block of the target volume to be expanded.
[0057] Since the data in the source volume has not yet been copied to the target volume, the target volume is empty, and the expanded target volume obtained after expanding its capacity is also empty. Therefore, the storage information for the data blocks in the expanded target volume is not stored.
[0058] The second bitmap information may include a second bitmap array, position information, and feature values. In this case, the feature values in the second bitmap array are all values representing the unstored state.
[0059] S240: Based on the first bitmap information and the second bitmap information, copy the data from the source volume to the target volume for expansion.
[0060] Based on the first and second bitmap information, the correspondence between the data in the final target volume and the source volume can be determined. According to this correspondence, the data in the source volume is copied to the target volume to complete the cloning operation of the source volume.
[0061] As can be seen, this embodiment generates a first bitmap based on the storage information of data within at least one data block in the source volume, creates a target volume for the source volume, and performs an expansion operation on the target volume to obtain an expanded target volume. A second bitmap is generated based on the storage information of data within the data blocks in the expanded target volume. Data from the source volume is copied to the expanded target volume based on the first and second bitmap information to complete the cloning operation of the source volume and obtain the final target volume. After expanding the target volume, this application copies data from the source volume to the expanded target volume based on the bitmap information. The expanded target volume can also be used during the data copying process, eliminating the need for users to wait a long time for all data to be copied to the expanded target volume, saving business deployment time, improving business deployment efficiency, and enhancing the user experience.
[0062] The following is a detailed description of each step in the above method flow. First, with reference to the embodiment, the above S240, namely "copying the data in the source volume to the target volume for expansion according to the first bitmap information and the second bitmap information", will be described in detail.
[0063] As one possible approach, a third bitmap is generated based on the first bitmap information and the second bitmap information. The third bitmap information is used to represent the storage location of data within the data block in the final target volume.
[0064] Create a local replication relationship between the source volume and the target volume to be expanded, and copy the data from the source volume to the target volume to be expanded based on the third bitmap information.
[0065] The first bitmap information includes the first location information of the data in the source volume, and the second bitmap information includes the second location information of the data in the target volume to be expanded. The first and second location information are used to indicate the specific location of the data in its corresponding bitmap array.
[0066] The third bitmap information of the final target volume can be calculated based on the first and second bitmap information. The third bitmap information is mainly generated by performing an OR operation on the feature values corresponding to the positions of the data in the source volume and the target volume in the bitmap array. For example, if the first position information is a feature value of 1 in the first row and first column of the bitmap array, and the second position information is a value of 0 in the first row and first column of the bitmap array, then the position information in the third bitmap information will be a value of 1 in the first row and first column of the bitmap array. Following this method, all position information in the final target volume is calculated to form the third bitmap information.
[0067] After generating the third bitmap information, a local replication relationship is created between the source volume and the target volume to be expanded. Data from the source volume is copied to the target volume to obtain the final target volume. This copying task is a background task, at which point the target volume can be used for read and write operations by users.
[0068] To save system storage space and computing resources, bitmap information is deleted after the expansion or cloning operation is completed. One possible approach is to delete the first, second, and third bitmap information after copying the data from the source volume to the target volume.
[0069] As another possible approach, after generating the third bitmap information, the second bitmap information is deleted. Simultaneously, after copying the data from the source volume to the target volume for expansion, both the first and third bitmap information are deleted.
[0070] As one possible approach, the method further includes the following steps during the process of copying data from the source volume to the target volume being expanded:
[0071] In response to the received user request data for expanding the target volume, the copying of data from the source volume to the target volume is paused;
[0072] Based on the business request data, determine the business type corresponding to the business request;
[0073] Depending on the business type, perform operations on the source volume or the target volume to be expanded.
[0074] If no read / write request is received from the user, the backend will copy the data from the source volume to the target volume block by block according to the third bitmap information. If a data block has already been copied to the target volume, the data block will be skipped and the data in the next data block will be copied.
[0075] If a user's read / write request is detected, the background copy task will be paused after copying the data in the currently running data block, prioritizing the processing of the user's read / write requests. Once the user's read / write request is completed, if no further read / write request is received from the user within a preset time, the block-by-block data copy task will resume from the previously paused data block. This prevents a data block from being simultaneously in the background copy and the target data block of a user's read / write request, which could lead to data loss or corruption.
[0076] Business request data can include business type, request location, and request content. Business type includes read requests and write requests. After the user enters a business request through the terminal, the storage system receives the business request data and first determines the corresponding business type based on the data. Then, it performs operations on different volumes according to the different business types.
[0077] As one possible approach, when the business type is a read request, the third bitmap information is used to check whether the data requested by the user exists in the target volume for expansion.
[0078] When the target volume for expansion does not contain the data requested by the user, the target data is read from the source volume based on the first graph information and returned to the user terminal.
[0079] The location of the user's request content within the bitmap array can be quickly found based on the third bitmap information. Examining the characteristic value at that location reveals whether the value is stored (e.g., the user's request content exists on the target volume) or not (e.g., the user's request content does not exist on the target volume).
[0080] If the requested data is not present in the target volume for expansion, the requested content is read from the source volume, and the target requested data is returned to the user's terminal.
[0081] When the target volume for expansion contains the data requested by the user, the requested content is directly read from the target volume for expansion and returned to the user's terminal.
[0082] By obtaining the user's requested content from the source volume or the target volume to be expanded, the read pressure on the source volume is reduced, the response speed of user business requests is accelerated, and the user experience is improved.
[0083] As another possible approach, when the business type is a write request, the unused data blocks in the target volume to be expanded are determined based on the third bitmap information.
[0084] The requested new data is written to the unused data block to obtain the updated target volume for expansion.
[0085] Update the third bitmap information based on the updated target volume for expansion.
[0086] When the request type is write, the feature values in the third bitmap information clearly indicate the usage of data blocks in the target volume, identifying unused data blocks. If the user does not specify the block location to write data, the requested new data can be randomly written to unused data blocks, resulting in an updated target volume. Based on the updated target volume, the third bitmap information is updated to prevent data copying errors during subsequent data copying processes.
[0087] As an alternative approach to responding to user read / write requests, besides the methods described above, the following method can also be used: After the storage system receives a user's read / write request, it first determines the region of the data block corresponding to the requested data. If it is located in the original region of the target volume, it first checks whether the data block is empty. If empty, it copies the data at the corresponding location on the source volume to the data block in the target volume based on the third bitmap information, and then performs read / write operations on this data block in the target volume, ensuring that the source volume data is not damaged. After the read / write operation is completed, the read / write result is returned to the user terminal. If the data block is not empty, it directly reads and writes the data within the data block. After the read / write operation is completed, the read / write result is returned to the user terminal. If the region of the data block corresponding to the requested data is the expansion region, it directly reads and writes the data block, and after the read / write operation is completed, the read / write result is returned to the user terminal.
[0088] After the data copy is complete, disconnect the local replication relationship between the source volume and the target volume to be expanded.
[0089] This application also provides another volume operation method, which includes: creating a target volume from a source volume; creating a local replication relationship between the source volume and the target volume; generating fourth bitmap information based on the storage information of the data on the source volume; and not initiating the local replication relationship. The target volume is then expanded; after the expansion is complete, the local replication relationship is initiated to copy the data from the source volume to the target volume.
[0090] It should be understood that, although Figure 2 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated in this application, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Furthermore, Figure 2 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
[0091] Figure 3 This is a schematic diagram of a roll operation device provided in an embodiment of this application. Figure 3 As shown, the device may include: a generation module 310, a capacity expansion module 320, and a cloning module 330, and may further include: a deletion module and a response module. The main functions of each component module are as follows:
[0092] The generation module 310 is used to generate first-order graph information based on the storage information of data in at least one data block in the source volume;
[0093] The expansion module 320 is used to create a target volume from the source volume and perform expansion operations on the target volume to obtain the expanded target volume;
[0094] The generation module 310 is also used to generate second bitmap information based on the storage information of the data in the data block in the target volume to be expanded;
[0095] The cloning module 330 is used to copy data from the source volume to the target volume for expansion based on the first bitmap information and the second bitmap information, so as to complete the cloning operation of the source volume and obtain the final target volume.
[0096] In one possible implementation, the cloning module 330 is specifically used for:
[0097] Based on the first bitmap information and the second bitmap information, the third bitmap information is generated. The third bitmap information is used to indicate the storage location of data within the data block in the final target volume.
[0098] Create a local replication relationship between the source volume and the target volume to be expanded, and copy the data from the source volume to the target volume to be expanded based on the third bitmap information.
[0099] In one possible implementation, the first bitmap information includes the first location information of the data in the source volume, and the second bitmap information includes the second location information of the data in the target volume to be expanded; the generation module 310 is also used for:
[0100] Based on the first and second position information, the third bitmap information is generated.
[0101] In one possible implementation, the device also includes a deletion module for deleting the first bitmap information, the second bitmap information, and the third bitmap information after copying data from the source volume to the target volume for expansion; or deleting the second bitmap information after generating the third bitmap information; and deleting the first bitmap information and the third bitmap information after copying data from the source volume to the target volume for expansion.
[0102] In one possible implementation, the device also includes a response module, which, in response to a received user service request data for the target volume being expanded, pauses the copying of data from the source volume to the target volume during the process of copying data from the source volume to the target volume being expanded.
[0103] Based on the business request data, determine the business type corresponding to the business request;
[0104] Depending on the business type, perform operations on the source volume or the target volume to be expanded.
[0105] In one feasible approach, the business type includes read requests, and the business request data includes the target request data; the response module is specifically used for:
[0106] When the business type is a read request, check whether the data requested by the user exists in the target volume for expansion based on the third bitmap information;
[0107] When the target volume for expansion does not contain the data requested by the user, the target data is read from the source volume based on the first graph information and returned to the user terminal.
[0108] In one feasible approach, the business type includes write requests, and the business request data includes requests to add new data; the response module is specifically used for:
[0109] When the business type is a write request, the unused data blocks in the target volume to be expanded are determined based on the third bitmap information.
[0110] The requested new data is written to the unused data block to obtain the updated target volume for expansion.
[0111] Update the third bitmap information based on the updated target volume for expansion.
[0112] It is understood that implementing any method or product of this application does not necessarily require achieving all of the advantages described above simultaneously.
[0113] The same or similar parts among the above embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the device embodiments are basically similar to the method embodiments, so the description is relatively simple, and the relevant parts can be referred to the description of the method embodiments.
[0114] It should be noted that the embodiments of this application may involve the use of user data. In practical applications, user-specific personal data may be used in the scheme described herein within the scope permitted by applicable laws and regulations, provided that it complies with the applicable laws and regulations of the country (e.g., explicit consent from the user, actual notification to the user, explicit authorization from the user, etc.).
[0115] According to embodiments of this application, this application also provides a computer device and a computer-readable storage medium.
[0116] like Figure 4 The diagram shown is a block diagram of a computer device according to an embodiment of this application. The term "computer device" is intended to represent various forms of digital computers or mobile devices. The digital computer may include a desktop computer, a portable computer, a workbench, a personal digital assistant, a server, a mainframe computer, and other suitable computers. The mobile device may include a tablet computer, a smartphone, a wearable device, etc.
[0117] like Figure 4As shown, device 400 includes a computing unit 401, a ROM 402, a RAM 403, a bus 404, and an input / output (I / O) interface 405. The computing unit 401, ROM 402, and RAM 403 are interconnected via the bus 404. The input / output (I / O) interface 405 is also connected to the bus 404.
[0118] The computing unit 401 can execute various processes in the method embodiments of this application according to computer instructions stored in the read-only memory (ROM) 402 or computer instructions loaded from the storage unit 408 into the random access memory (RAM) 403. The computing unit 401 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. The computing unit 401 can include, but is not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. In some embodiments, the methods provided in the embodiments of this application can be implemented as computer software programs, which are tangibly contained in a computer-readable storage medium, such as the storage unit 408.
[0119] RAM 403 may also store various programs and data required for the operation of device 400. Part or all of the computer program may be loaded and / or installed on device 400 via ROM 802 and / or communication unit 409.
[0120] The input unit 406, output unit 407, storage unit 408, and communication unit 409 in device 400 can be connected to I / O interface 405. The input unit 406 can be, for example, a keyboard, mouse, touchscreen, or microphone; the output unit 407 can be, for example, a display, speaker, or indicator light. Device 400 can exchange information and data with other devices through the communication unit 409.
[0121] It should be noted that the device may also include other components necessary for normal operation. It may also include only the components necessary for implementing the solution of this application, without necessarily including all the components shown in the figures.
[0122] Various implementations of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SOCs), payload programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof.
[0123] The computer instructions used to implement the methods of this application may be written in any combination of one or more programming languages. These computer instructions may be provided to the computing unit 401 such that when executed by the computing unit 401, such as a processor, the computer instructions cause the execution of the steps involved in the embodiments of the methods of this application.
[0124] The computer-readable storage medium provided in this application can be a tangible medium that can contain or store computer instructions for performing the steps involved in the method embodiments of this application. The computer-readable storage medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, and other forms of storage media.
[0125] The specific embodiments described above do not constitute a limitation on the scope of protection of this application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A method of roll operation, characterized by, The method comprises: generating first bitmap information according to storage information of data in at least one data block in a source volume; creating a target volume of the source volume and performing an expansion operation on the target volume to obtain an expanded target volume; generating second bitmap information according to storage information of data in a data block in the expanded target volume; copying data in the source volume into the expanded target volume according to the first bitmap information and the second bitmap information to complete a cloning operation on the source volume to obtain a final target volume; in the process of copying data in the source volume into the expanded target volume, the method further comprises: suspending copying data from the source volume into the expanded target volume in response to received user service request data for the expanded target volume; determining a service type corresponding to the service request according to the service request data; performing an operation on the source volume or the expanded target volume according to the service type.
2. The method of claim 1, wherein, The copying of data in the source volume into the expanded target volume according to the first bitmap information and the second bitmap information comprises: generating third bitmap information according to the first bitmap information and the second bitmap information, the third bitmap information being used to indicate a storage location of data in a data block in the final target volume; creating a local replication relationship of the source volume and the expanded target volume and copying data in the source volume into the expanded target volume based on the third bitmap information.
3. The method of claim 2, wherein, The first bitmap information comprises first location information of data in the source volume, and the second bitmap information comprises second location information of data in the expanded target volume; generating third bitmap information according to the first bitmap information and the second bitmap information comprises: generating third bitmap information according to the first location information and the second location information.
4. The method of claim 2, wherein, After copying data in the source volume into the expanded target volume, the method further comprises: deleting the first bitmap information, the second bitmap information and the third bitmap information; or, after generating the third bitmap information, the method further comprises: deleting the second bitmap information; and after copying data in the source volume into the expanded target volume, the method further comprises:
5. The method of claim 3, wherein, deleting the first bitmap information and the third bitmap information. The service type comprises a read request, and the service request data comprises target request data; the operation on the source volume and / or the expanded target volume according to the service type comprises: when the service type is a read request, checking whether there is user-requested data in the expanded target volume according to the third bitmap information; 6. The method of claim 3, wherein, when there is no user-requested data in the expanded target volume, reading the target request data from the source volume according to the first bitmap information and returning the target request data to a user terminal. The service type comprises a write request, and the service request data comprises requested new data; the operation on the source volume or the expanded target volume according to the service type comprises: when the service type is a write request, determining an unused data block in the expanded target volume according to the third bitmap information; write the request new data into the unused data block to obtain an updated expansion target volume; update the third bitmap information according to the updated expansion target volume.
7. A roll handling apparatus characterized by, The device comprises: a generation module configured to generate first bitmap information according to storage information of data in at least one data block in a source volume; an expansion module configured to create a target volume of the source volume and perform an expansion operation on the target volume to obtain an expansion target volume; the generation module is further configured to generate second bitmap information according to storage information of data in a data block in the expansion target volume; a cloning module configured to copy data in the source volume into the expansion target volume according to the first bitmap information and the second bitmap information to complete a cloning operation on the source volume to obtain a final target volume; the device further comprises a response module configured to, in response to received service request data of the expansion target volume from a user, suspend copying data from the source volume into the expansion target volume; determine a service type corresponding to the service request according to the service request data; and perform an operation on the source volume or the expansion target volume according to the service type.
8. A computer device comprising: at least one processor; and a memory connected in communication with the at least one processor; wherein the memory stores computer instructions executable by the at least one processor, and the computer instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.
9. A computer readable storage medium having stored thereon computer instructions, wherein, The computer instructions are used to enable the computer to perform the method of any one of claims 1 to 6.
Citation Information
Patent Citations
Copy preparation device and copy preparation method
JP2008225699A