CN114610243B - Method, system, storage medium and equipment for converting thin volume - Google Patents
Method, system, storage medium and equipment for converting thin volume Download PDFInfo
- Publication number
- CN114610243B CN114610243B CN202210276060.0A CN202210276060A CN114610243B CN 114610243 B CN114610243 B CN 114610243B CN 202210276060 A CN202210276060 A CN 202210276060A CN 114610243 B CN114610243 B CN 114610243B
- Authority
- CN
- China
- Prior art keywords
- volume
- storage capacity
- thin
- equal
- response
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 44
- 230000004044 response Effects 0.000 claims abstract description 38
- 238000006243 chemical reaction Methods 0.000 claims description 28
- 238000004590 computer program Methods 0.000 claims description 8
- 230000008859 change Effects 0.000 claims description 3
- 230000009286 beneficial effect Effects 0.000 abstract description 5
- 238000010586 diagram Methods 0.000 description 8
- 238000002360 preparation method Methods 0.000 description 8
- 230000008901 benefit Effects 0.000 description 4
- 230000006870 function Effects 0.000 description 4
- 230000001360 synchronised effect Effects 0.000 description 3
- 238000013461 design Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000014509 gene expression Effects 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 230000010485 coping Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000005012 migration Effects 0.000 description 1
- 238000013508 migration Methods 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/067—Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0614—Improving the reliability of storage systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0629—Configuration or reconfiguration of storage systems
- G06F3/0631—Configuration or reconfiguration of storage systems by allocating resources to storage systems
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention provides a method, a system, a storage medium and equipment for converting a reduced volume, wherein the method comprises the following steps: acquiring the used storage capacity and pre-allocation storage capacity of the primary volumes in the distributed storage system; acquiring metadata information of the raw rolls, and judging whether the raw rolls are simple rolls or not based on the roll types in the metadata information; comparing whether the used storage capacity and the pre-allocated storage capacity are equal in response to the primary volume being the reduced volume; writing zero data into the primary volume in response to the used storage capacity and the pre-allocated storage capacity being unequal; responding to the completion of writing, obtaining a new volume, obtaining the latest used storage capacity of the new volume, and comparing whether the latest used storage capacity is equal to the pre-allocation storage capacity or not; in response to the latest used storage capacity being equal to the pre-allocated storage capacity, the volume type is changed to a thick provisioning volume to convert the thin volume to a thick provisioning volume. The method and the device are beneficial to selecting proper roll types according to different application scenes, and improve the applicability of the simplified rolls and the thick prepared rolls.
Description
Technical Field
The present invention relates to the field of storage technologies, and in particular, to a method, a system, a storage medium, and an apparatus for converting a thin volume.
Background
The distributed storage system disperses and stores data on a plurality of independent devices. The traditional network storage system adopts a centralized storage server to store all data, and the storage server becomes a bottleneck of system performance, is also a focus of reliability and safety, and cannot meet the requirements of large-scale storage application. The distributed storage system adopts an expandable system structure, and utilizes a plurality of storage servers to share the storage load, so that the reliability, availability and access efficiency of the system are improved, and the system is easy to expand.
Block storage is suitable for data storage in most business scenarios, and users can format and build arbitrary file systems to use block storage as if they were using a physical hard disk, so block storage is becoming more and more widely used. Currently, in a block storage application scenario, the entire mapping of bare disk space to a storage service used by a host is mainly included, and a volume (i.e., a storage volume) assumes a main function implementation and service output.
Current block storage provides a way to create both thin volumes and thick provisioning volumes.
The thin volume is a bare disk with an initial creation occupation space of 0, and actually occupies space only when an IO (data Input Output) is written. The storage size is the size currently used no matter how large the volume is allocated, namely how much is used, when IO exists, the needed space is allocated first, then the zero clearing operation is carried out, namely under the reduced volume, when IO exists, the space is required to be allocated, metadata is written, and then the operation can be carried out. For applications where IO is more frequent, this can degrade performance, but save storage space. Meanwhile, when the thin volume is used, the pre-allocation space can be far more than the total space of the storage cluster, and the whole cluster space is exhausted along with the writing of user data, so that the thin volume cannot be used continuously.
A thick provisioning volume is a bare disk that is initially space-filled, and the used capacity and allocated capacity are completely identical at the completion of the creation. The thick reserve volume is characterized in that zero data is written in an allocation space of the thin volume after the thin volume with the allocation capacity is created, so that the creation time of the thick reserve volume is longer than that of the thin volume, but the space is allocated in advance and the zero setting operation is performed, the volume metadata object is created in advance, the direct operation can be performed without waiting for any operation when IO exists, and the performance of the first time of reading and writing is improved. However, the filling write operation of the thick reserve volume when created occupies a large amount of cluster resources, which may affect the cluster core service.
The simplified volume and the thick prepared volume have advantages and disadvantages respectively, so that the requirements of different scenes on the volumes are different. The occupation space of the simplified volume is small, but the pre-allocation space may exceed the available capacity of the storage pool, and the first write-in performance is weaker; the thick reserve volume occupies large space and has low creation speed, but the pre-allocation capacity is the use capacity, so that the problem of exceeding the capacity of a storage pool cannot occur, and the first-time writing performance is stronger. Therefore, there is a need for a method of converting thin volumes to thick reserve volumes to cope with different usage requirements for both volumes in different scenarios.
Disclosure of Invention
In view of the above, the present invention is directed to a method, a system, a storage medium and a device for converting a thin volume, which are used for coping with different usage requirements of the thin volume and a thick reserve volume in different scenarios.
Based on the above object, the present invention provides a thin volume conversion method, comprising the following steps:
acquiring the used storage capacity and pre-allocation storage capacity of the primary volumes in the distributed storage system;
Acquiring metadata information of the raw rolls, and judging whether the raw rolls are simple rolls or not based on the roll types in the metadata information;
Comparing whether the used storage capacity and the pre-allocated storage capacity are equal in response to the primary volume being the reduced volume;
Writing zero data into the primary volume in response to the used storage capacity and the pre-allocated storage capacity being unequal;
Responding to the completion of writing, obtaining a new volume, obtaining the latest used storage capacity of the new volume, and comparing whether the latest used storage capacity is equal to the pre-allocation storage capacity or not;
in response to the latest used storage capacity being equal to the pre-allocated storage capacity, the volume type is changed to a thick provisioning volume to convert the thin volume to a thick provisioning volume.
In some embodiments, the method further comprises:
and returning prompt information about that the thin volume is not converted into the thick preparation volume in response to the fact that the latest used storage capacity is not equal to the pre-allocation storage capacity.
In some embodiments, the method further comprises:
And returning prompt information about that the storage space of the thin volume is full in response to the fact that the used storage capacity and the pre-allocated storage capacity are equal.
In some embodiments, writing zero data into the reel includes:
zero data is written into the original volume in an asynchronous mode.
In another aspect of the present invention, there is also provided a thin volume conversion system, including:
The acquisition module is configured to acquire the used storage capacity and the pre-allocation storage capacity of the primary volume in the distributed storage system;
The judging module is configured to acquire metadata information of the raw rolls and judge whether the raw rolls are simple rolls or not based on the roll types in the metadata information;
a first comparison module configured to compare whether the used storage capacity and the pre-allocated storage capacity are equal in response to the raw volume being a thin volume;
A data writing module configured to write zero data into the primary volume in response to the used storage capacity and the pre-allocated storage capacity being unequal;
The second comparison module is configured to respond to the completion of writing to obtain a new volume, acquire the latest used storage capacity of the new volume, and compare whether the latest used storage capacity is equal to the pre-allocation storage capacity or not; and
And the thin volume conversion module is configured to change the volume type into a thick preparation volume in response to the latest used storage capacity being equal to the pre-allocation storage capacity so as to convert the thin volume into the thick preparation volume.
In some embodiments, the system further comprises a first return module configured to return a hint information that the thin volume has not been converted to a thick provisioning volume in response to the latest used storage capacity not being equal to the pre-allocated storage capacity.
In some embodiments, the system further comprises a second return module configured to return a hint information that the storage space of the thin volume is full in response to the used storage capacity and the pre-allocated storage capacity being equal.
In some embodiments, the data writing module includes a zero data writing module configured to write zero data into the reel in an asynchronous manner.
In yet another aspect of the present invention, there is also provided a computer readable storage medium storing computer program instructions which, when executed by a processor, implement the above-described method.
In yet another aspect of the present invention, there is also provided a computer device comprising a memory and a processor, the memory storing a computer program which, when executed by the processor, performs the above method.
The invention has at least the following beneficial technical effects:
according to the thin volume conversion method, the used storage capacity and the pre-allocated storage capacity of the original volume in the distributed storage system are obtained, whether the original volume is the thin volume is judged based on the volume type in the metadata information of the original volume, if the original volume is the thin volume, the used storage capacity and the pre-allocated storage capacity are compared to be equal, if the used storage capacity and the pre-allocated storage capacity are not equal, zero data are written into the original volume, then a new volume is obtained, the latest used storage capacity of the new volume is obtained, whether the latest used storage capacity and the pre-allocated storage capacity are equal is compared, and the volume type is changed into the thick storage volume under the condition that the latest used storage capacity and the pre-allocated storage capacity are equal, so that the thin volume is successfully converted into the thick storage volume, the problem that the data reliability of the thin volume is poor when the physical capacity is insufficient is solved, and the read-write performance of the volume is improved after the thin storage volume is converted into the thick storage volume; the method is beneficial to selecting proper roll types according to different application scenes, and improves the applicability of the simplified roll and the thick reserve roll under different conditions.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are necessary for the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention and that other embodiments may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a thin volume conversion method according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a thin volume conversion method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a thin volume conversion system provided in accordance with an embodiment of the present invention;
FIG. 4 is a schematic diagram of a computer readable storage medium implementing a thin volume migration method according to an embodiment of the present invention;
Fig. 5 is a schematic hardware structure of a computer device for performing a thin volume conversion method according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention will be described in further detail with reference to the accompanying drawings.
It should be noted that, in the embodiments of the present invention, all the expressions "first" and "second" are used to distinguish two non-identical entities with the same name or non-identical parameters, and it is noted that the "first" and "second" are only used for convenience of expression, and should not be construed as limiting the embodiments of the present invention. Furthermore, the terms "comprise" and "have," and any variations thereof, are intended to cover a non-exclusive inclusion, such as a process, method, system, article, or other step or unit that comprises a list of steps or units.
Based on the above objects, in a first aspect of the embodiments of the present invention, an embodiment of a thin volume conversion method is provided. Fig. 1 is a schematic diagram of an embodiment of a thin volume conversion method provided by the present invention. As shown in fig. 1, the embodiment of the present invention includes the following steps:
step S10, acquiring the used storage capacity and the pre-allocation storage capacity of the primary volumes in the distributed storage system;
Step S20, acquiring metadata information of the original volume, and judging whether the original volume is a simple volume or not based on the volume type in the metadata information;
step S30, responding to the original volume as the simple volume, and comparing whether the used storage capacity and the pre-allocation storage capacity are equal or not;
Step S40, writing zero data into the original volume in response to the inequality of the used storage capacity and the pre-allocation storage capacity;
Step S50, responding to the completion of writing to obtain a new volume, obtaining the latest used storage capacity of the new volume, and comparing whether the latest used storage capacity is equal to the pre-allocation storage capacity or not;
step S60, in response to the latest used storage capacity being equal to the pre-allocation storage capacity, changing the volume type to the thick provisioning volume so as to enable the thin volume to be converted to the thick provisioning volume.
Storage systems are expanding year by year, ensuring that storage capacity is used adequately for security purposes, users often deploy more physical storage space than is actually needed. But during actual use, deployment capacity is often underutilized. Industry research organizations find that in certain projects, the actual usage capacity is only 20% -30% of the deployment capacity. Thus, thin provisioning (Thin provisioning) techniques have evolved to achieve higher storage capacity utilization and to bring about greater return on investment. Thin provisioning is a volume capacity virtualization technique. The core of thin provisioning is pre-write allocation. When the traditional volume is created, all physical space is allocated, if the volume is created by a user, the actual written data amount is small or the actual written data amount is slowly increased, the allocated space is still fully occupied, and space sharing with other volumes cannot be performed. Unlike conventional volumes, a thin volume is a virtual volume, and when creating a thin volume, it does not allocate all physical capacity for a user, but only when the user performs a write operation on the volume, it is allocated before writing, and the actual physical space is allocated for the address to be written. Therefore, the automatic thin provisioning can reduce the early physical storage deployment, and can furthest improve the utilization rate of the storage space.
With the use of the automatic thin provisioning, all real user capacities are usually stored in a storage pool for unified management, physical capacities are allocated according to actual use conditions when write I/O (data Input/Output) occurs to thin volumes, and when the capacity utilization reaches a predefined threshold (usually configured by a user), an alarm is issued to avoid capacity shortage when an additional physical disk needs to be added. Currently, manufacturers in the industry generally have a design for alarming when the residual capacity is insufficient (reaches a user configuration threshold).
The storage system Cache (Cache) Write mechanism typically has two modes, write-Back (Write-Back) and Write-Through (Witer-Through). Writing back means writing data into a cache, and writing the data into a hard disk when the system is idle; write-through refers to writing data directly to a hard disk, which is accessed every time an operation occurs. Write-back can significantly improve the write performance of the system relative to write-through.
When the thin volume is configured into a write-back mode, the host computer can consider that the data is written successfully after issuing the data, and the data is actually in the system cache and is not actually written into the hard disk. If the physical space of the storage pool where the thin volume is stored is insufficient at this time, and the administrator does not timely perform capacity expansion operation on the storage pool according to the system alarm, the data in the cache cannot be actually written to the hard disk. Thus, not only is data always accumulated in the cache, but also other I/Os which do not need to newly allocate space are affected after the cache is full, and data loss can be caused.
Therefore, in the conventional technology, the data reliability of the thin volume is not high when the physical capacity is insufficient.
According to the thin volume conversion method, the used storage capacity and the pre-allocation storage capacity of the raw volume in the distributed storage system are obtained, whether the raw volume is the thin volume is judged based on the volume type in the metadata information of the raw volume, if the used storage capacity and the pre-allocation storage capacity are equal, zero data are written into the raw volume if the used storage capacity and the pre-allocation storage capacity are not equal, then a new volume is obtained, the latest used storage capacity of the new volume is obtained, whether the latest used storage capacity and the pre-allocation storage capacity are equal is compared, and the volume type is changed into the thick storage volume under the condition that the latest used storage capacity and the pre-allocation storage capacity are equal, so that the thin volume is successfully converted into the thick storage volume, the problem that the data reliability of the thin volume is poor when the physical capacity is insufficient is solved, and the read-write performance of the volume is improved after the thin storage volume is converted into the thick storage volume; the method is beneficial to selecting proper roll types according to different application scenes, and improves the applicability of the simplified roll and the thick reserve roll under different conditions.
In some embodiments, the method further comprises: and returning prompt information about that the thin volume is not converted into the thick preparation volume in response to the fact that the latest used storage capacity is not equal to the pre-allocation storage capacity.
In this embodiment, if the latest used storage capacity has not reached the pre-allocated storage capacity, that is, the latest used storage capacity is not equal to the pre-allocated storage capacity, the thin volume cannot be converted into the thick provisioning volume. While indicating that zero data can continue to be written in the thin volume.
In some embodiments, the method further comprises: and returning prompt information about that the storage space of the thin volume is full in response to the fact that the used storage capacity and the pre-allocated storage capacity are equal.
In this embodiment, if the used storage capacity and the pre-allocated storage capacity are equal, it indicates that the thin volume is full from the beginning, and zero data cannot be written. If the volume expansion of the thin volume that already occupies the storage space is needed later, the volume type of the thin volume may also be changed to a thick provisioning volume at this step. Specifically, the volume type is represented by an identifier in metadata information, and the volume type can be changed by changing the identifier.
In some embodiments, writing zero data into the reel includes: zero data is written into the original volume in an asynchronous mode.
FIG. 2 illustrates a flow diagram of a thin volume conversion method. As shown in FIG. 2, the OSD (Object-based Storage Device, object storage) can be used to write zero data into the raw volume in an asynchronous manner, i.e. by a new thread in the background.
In a second aspect of the embodiment of the present invention, a thin volume conversion system is also provided. FIG. 3 is a schematic diagram illustrating an embodiment of a thin volume conversion system provided by the present invention. As shown in fig. 3, a thin volume conversion system includes: an acquisition module 10 configured to acquire a used storage capacity and a pre-allocated storage capacity of an original volume in a distributed storage system; the judging module 20 is configured to obtain metadata information of the raw roll, and judge whether the raw roll is a thin roll based on a roll type in the metadata information; a first comparison module 30 configured to compare whether the used storage capacity and the pre-allocated storage capacity are equal in response to the raw volume being a thin volume; a data writing module 40 configured to write zero data into the primary volume in response to the used storage capacity and the pre-allocated storage capacity being unequal; a second comparing module 50 configured to obtain a new volume in response to completion of writing, and to acquire a latest used storage capacity of the new volume, and to compare whether the latest used storage capacity is equal to the pre-allocated storage capacity; and a thin volume conversion module 60 configured to change the volume type to a thick provisioning volume in response to the latest used storage capacity being equal to the pre-allocated storage capacity, to convert the thin volume to the thick provisioning volume.
According to the thin volume conversion system, the used storage capacity and the pre-allocation storage capacity of the original volume in the distributed storage system are obtained, whether the original volume is a thin volume is judged based on the volume type in metadata information of the original volume, if the original volume is the thin volume, the used storage capacity and the pre-allocation storage capacity are compared to be equal, if the used storage capacity and the pre-allocation storage capacity are not equal, zero data are written into the original volume, then a new volume is obtained, the latest used storage capacity of the new volume is obtained, whether the latest used storage capacity and the pre-allocation storage capacity are equal is compared, and the volume type is changed into a thick preparation volume under the condition that the latest used storage capacity and the pre-allocation storage capacity are equal, so that the thin volume is converted into the thick preparation volume, the problem that the data reliability of the thin volume is poor when the physical capacity is insufficient is solved, and the read-write performance of the volume is improved after the thin volume is converted into the thick preparation volume; the method is beneficial to selecting proper roll types according to different application scenes, and improves the applicability of the simplified roll and the thick reserve roll under different conditions.
In some embodiments, the system further comprises a first return module configured to return a hint information that the thin volume has not been converted to a thick provisioning volume in response to the latest used storage capacity not being equal to the pre-allocated storage capacity.
In this embodiment, if the latest used storage capacity has not reached the pre-allocated storage capacity, that is, the latest used storage capacity is not equal to the pre-allocated storage capacity, the thin volume cannot be converted into the thick provisioning volume. While indicating that zero data can continue to be written in the thin volume.
In some embodiments, the system further comprises a second return module configured to return a hint information that the storage space of the thin volume is full in response to the used storage capacity and the pre-allocated storage capacity being equal.
In this embodiment, if the used storage capacity and the pre-allocated storage capacity are equal, it indicates that the thin volume is full from the beginning, and zero data cannot be written. If the volume expansion of the thin volume that already occupies the storage space is needed later, the volume type of the thin volume may also be changed to a thick provisioning volume at this step. In particular, the volume type is represented by an identification in the metadata information.
In some embodiments, the data writing module 40 includes a zero data writing module configured to write zero data into the reels in an asynchronous manner.
FIG. 2 illustrates a flow diagram of a thin volume conversion method. As shown in FIG. 2, the OSD (Object-based Storage Device, object storage) can be used to write zero data into the raw volume in an asynchronous manner, i.e. by a new thread in the background.
In a third aspect of the embodiment of the present invention, a computer readable storage medium is provided, and fig. 4 is a schematic diagram of a computer readable storage medium for implementing a thin volume conversion method according to an embodiment of the present invention. As shown in fig. 4, the computer-readable storage medium 3 stores computer program instructions 31. The computer program instructions 31 when executed by a processor implement the steps of:
acquiring the used storage capacity and pre-allocation storage capacity of the primary volumes in the distributed storage system;
Acquiring metadata information of the raw rolls, and judging whether the raw rolls are simple rolls or not based on the roll types in the metadata information;
Comparing whether the used storage capacity and the pre-allocated storage capacity are equal in response to the primary volume being the reduced volume;
Writing zero data into the primary volume in response to the used storage capacity and the pre-allocated storage capacity being unequal;
Responding to the completion of writing, obtaining a new volume, obtaining the latest used storage capacity of the new volume, and comparing whether the latest used storage capacity is equal to the pre-allocation storage capacity or not;
in response to the latest used storage capacity being equal to the pre-allocated storage capacity, the volume type is changed to a thick provisioning volume to convert the thin volume to a thick provisioning volume.
In some embodiments, the steps further comprise: and returning prompt information about that the thin volume is not converted into the thick preparation volume in response to the fact that the latest used storage capacity is not equal to the pre-allocation storage capacity.
In some embodiments, the steps further comprise: and returning prompt information about that the storage space of the thin volume is full in response to the fact that the used storage capacity and the pre-allocated storage capacity are equal.
In some embodiments, writing zero data into the reel includes: zero data is written into the original volume in an asynchronous mode.
It should be appreciated that all of the embodiments, features and advantages set forth above with respect to the thin volume conversion method according to the present invention apply equally to the thin volume conversion system and storage medium according to the present invention, without conflict.
In a fourth aspect of the embodiment of the present invention, there is also provided a computer device, including a memory 402 and a processor 401 as shown in fig. 5, where the memory 402 stores a computer program, and the computer program is executed by the processor 401 to implement the method of any one of the embodiments above.
Fig. 5 is a schematic hardware structure of an embodiment of a computer device for performing the thin volume conversion method according to the present invention. Taking the example of a computer device as shown in fig. 5, a processor 401 and a memory 402 are included in the computer device, and may further include: an input device 403 and an output device 404. The processor 401, memory 402, input device 403, and output device 404 may be connected by a bus or otherwise, for example in fig. 5. The input device 403 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the thin volume conversion system. The output 404 may include a display device such as a display screen.
The memory 402 is used as a non-volatile computer readable storage medium for storing non-volatile software programs, non-volatile computer executable programs, and modules, such as program instructions/modules corresponding to the thin volume conversion method in the embodiment of the present application. Memory 402 may include a storage program area that may store an operating system, at least one application program required for functionality, and a storage data area; the storage data area may store data created using the thin volume conversion method, etc. In addition, memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, memory 402 may optionally include memory located remotely from processor 401, which may be connected to the local module via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The processor 401 executes various functional applications of the server and data processing, that is, implements the thin volume conversion method of the above-described method embodiment, by running nonvolatile software programs, instructions, and modules stored in the memory 402.
Finally, it should be noted that the computer-readable storage media (e.g., memory) herein can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory. By way of example, and not limitation, nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM), which acts as external cache memory. By way of example, and not limitation, RAM may be available in a variety of forms such as synchronous RAM (DRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The storage devices of the disclosed aspects are intended to comprise, without being limited to, these and other suitable types of memory.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as software or hardware depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
The various illustrative logical blocks, modules, and circuits described in connection with the disclosure herein may be implemented or performed with the following components designed to perform the functions herein: a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof. A general purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP and/or any other such configuration.
The foregoing is an exemplary embodiment of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosed embodiments may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
It should be understood that as used herein, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items. The foregoing embodiment of the present invention has been disclosed with reference to the number of embodiments for the purpose of description only, and does not represent the advantages or disadvantages of the embodiments.
Those of ordinary skill in the art will appreciate that: the above discussion of any embodiment is merely exemplary and is not intended to imply that the scope of the disclosure of embodiments of the invention, including the claims, is limited to such examples; combinations of features of the above embodiments or in different embodiments are also possible within the idea of an embodiment of the invention, and many other variations of the different aspects of the embodiments of the invention as described above exist, which are not provided in detail for the sake of brevity. Therefore, any omission, modification, equivalent replacement, improvement, etc. of the embodiments should be included in the protection scope of the embodiments of the present invention.
Claims (4)
1. The method for converting the thin volume is characterized by comprising the following steps of:
acquiring the used storage capacity and pre-allocation storage capacity of the primary volumes in the distributed storage system;
Acquiring metadata information of the raw rolls, and judging whether the raw rolls are simple rolls or not based on the roll types in the metadata information;
comparing whether the used storage capacity and the pre-allocated storage capacity are equal in response to the primary volume being a thin volume;
writing zero data into the primary volume in response to the used storage capacity and the pre-allocated storage capacity being unequal;
Writing zero data into the raw volume in an asynchronous mode;
responding to the completion of writing, obtaining a new volume, obtaining the latest used storage capacity of the new volume, and comparing whether the latest used storage capacity is equal to the pre-allocation storage capacity or not;
in response to the latest used storage capacity being equal to the pre-allocated storage capacity, changing the volume type to a thick provisioning volume to cause the thin volume to be converted to the thick provisioning volume;
Responsive to the latest used storage capacity being unequal to the pre-allocated storage capacity, returning a hint information that the thin volume has not been converted to the thick provisioning volume;
And returning prompt information about that the storage space of the thin volume is full in response to the fact that the used storage capacity and the pre-allocated storage capacity are equal.
2. A thin volume conversion system, comprising:
The acquisition module is configured to acquire the used storage capacity and the pre-allocation storage capacity of the primary volume in the distributed storage system;
The judging module is configured to acquire metadata information of the raw rolls and judge whether the raw rolls are simple rolls or not based on the roll types in the metadata information;
A first comparison module configured to compare whether the used storage capacity and the pre-allocated storage capacity are equal in response to the primary volume being a thin volume;
a data writing module configured to write zero data into the primary volume in response to the used storage capacity and the pre-allocated storage capacity being unequal;
the zero data writing module is configured to write zero data into the raw volume in an asynchronous mode;
A second comparing module configured to obtain a new volume in response to completion of writing, and obtain a latest used storage capacity of the new volume, and compare whether the latest used storage capacity is equal to the pre-allocation storage capacity; and
A thin volume conversion module configured to change the volume type to a thick provisioning volume in response to the latest used storage capacity being equal to the pre-allocated storage capacity, to convert the thin volume to the thick provisioning volume;
A first return module configured to return a hint information regarding the thin volume not being converted to the thick provisioning volume in response to the latest used storage capacity not being equal to the pre-allocated storage capacity;
and the second return module is configured to return prompt information about that the storage space of the thin volume is full in response to the fact that the used storage capacity and the pre-allocation storage capacity are equal.
3. A computer readable storage medium, characterized in that computer program instructions are stored, which, when executed by a processor, implement the method of claim 1.
4. A computer device comprising a memory and a processor, wherein the memory has stored therein a computer program which, when executed by the processor, performs the method of claim 1.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210276060.0A CN114610243B (en) | 2022-03-21 | 2022-03-21 | Method, system, storage medium and equipment for converting thin volume |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210276060.0A CN114610243B (en) | 2022-03-21 | 2022-03-21 | Method, system, storage medium and equipment for converting thin volume |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114610243A CN114610243A (en) | 2022-06-10 |
CN114610243B true CN114610243B (en) | 2024-06-25 |
Family
ID=81864859
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210276060.0A Active CN114610243B (en) | 2022-03-21 | 2022-03-21 | Method, system, storage medium and equipment for converting thin volume |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114610243B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115878049A (en) * | 2023-02-28 | 2023-03-31 | 浪潮电子信息产业股份有限公司 | Thick backup volume creating method, device, equipment and storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112162696A (en) * | 2020-09-11 | 2021-01-01 | 北京浪潮数据技术有限公司 | Method and device for allocating head capacity of thin self-compaction volume and computer readable storage medium |
CN113419672A (en) * | 2021-06-04 | 2021-09-21 | 济南浪潮数据技术有限公司 | Storage capacity management method, system and storage medium |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111007985B (en) * | 2019-10-31 | 2021-10-22 | 苏州浪潮智能科技有限公司 | Compatible processing method, system and equipment for space recovery of storage system |
-
2022
- 2022-03-21 CN CN202210276060.0A patent/CN114610243B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112162696A (en) * | 2020-09-11 | 2021-01-01 | 北京浪潮数据技术有限公司 | Method and device for allocating head capacity of thin self-compaction volume and computer readable storage medium |
CN113419672A (en) * | 2021-06-04 | 2021-09-21 | 济南浪潮数据技术有限公司 | Storage capacity management method, system and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN114610243A (en) | 2022-06-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110413685B (en) | Database service switching method, device, readable storage medium and computer equipment | |
CN104111897A (en) | Data processing method, data processing device and computer system | |
CN109669640A (en) | A kind of date storage method, device, electronic equipment and medium | |
WO2017050064A1 (en) | Memory management method and device for shared memory database | |
US20220214907A1 (en) | Virtual machine memory management method and device | |
CN115794669A (en) | Method, device and related equipment for expanding memory | |
CN103412822A (en) | Operation method of non-volatile RAM, data operation method and relevant device | |
CN109960569B (en) | Virtualization processing method and device | |
CN110019083A (en) | Storage method, device, electronic equipment and the storage medium of distributed file system | |
CN114610243B (en) | Method, system, storage medium and equipment for converting thin volume | |
CN116521608A (en) | Data migration method and computing device | |
US20170300255A1 (en) | Method and Apparatus for Detecting Transaction Conflict and Computer System | |
CN114443223B (en) | Bare computer disk management method, device and medium | |
CN113419672B (en) | Storage capacity management method, system and storage medium | |
CN113434470B (en) | Data distribution method and device and electronic equipment | |
CN115712500A (en) | Memory release method, memory recovery method, memory release device, memory recovery device, computer equipment and storage medium | |
CN110659248A (en) | User mode file system design method and system based on nonvolatile memory | |
CN111831451A (en) | Cloud host memory allocation method, cloud host, cloud device and storage medium | |
CN116483740B (en) | Memory data migration method and device, storage medium and electronic device | |
CN109508140B (en) | Storage resource management method and device, electronic equipment and system | |
CN117170820A (en) | Configuration sharing method, system, terminal and storage medium of cluster node | |
CN111611104B (en) | InfluxDB data backup method, system and terminal equipment | |
CN112748854B (en) | Optimized access to a fast storage device | |
CN110287004B (en) | Basic environment mirror image preheating method and device based on docker container technology | |
CN113704177A (en) | Storage method, system and related components of server firmware upgrade file |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |