CN112162696A - Method and device for allocating head capacity of thin self-compaction volume and computer readable storage medium - Google Patents

Method and device for allocating head capacity of thin self-compaction volume and computer readable storage medium Download PDF

Info

Publication number
CN112162696A
CN112162696A CN202010954947.1A CN202010954947A CN112162696A CN 112162696 A CN112162696 A CN 112162696A CN 202010954947 A CN202010954947 A CN 202010954947A CN 112162696 A CN112162696 A CN 112162696A
Authority
CN
China
Prior art keywords
data storage
storage section
self
volume
capacity value
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.)
Withdrawn
Application number
CN202010954947.1A
Other languages
Chinese (zh)
Inventor
杨敬东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Inspur Data Technology Co Ltd
Original Assignee
Beijing Inspur Data Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Inspur Data Technology Co Ltd filed Critical Beijing Inspur Data Technology Co Ltd
Priority to CN202010954947.1A priority Critical patent/CN112162696A/en
Publication of CN112162696A publication Critical patent/CN112162696A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0608Saving storage space on storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0644Management of space entities, e.g. partitions, extents, pools
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0662Virtualisation aspects
    • G06F3/0665Virtualisation aspects at area level, e.g. provisioning of virtual or logical volumes

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 application discloses a method and a device for allocating head capacity of a self-compaction volume and a computer-readable storage medium. The method comprises the step of obtaining a volume value of space occupied by header data of the new self-reduced volume, namely a target volume value of space occupied when the new self-reduced volume is detected to be created. Judging whether the residual space capacity value of a data storage section storing the head data of the previous self-compaction volume adjacent to the new self-compaction volume is not less than the target occupied space capacity value or not; if the residual space capacity value of the data storage section is not smaller than the target occupied space capacity value, writing the head data of the second self-compaction volume into the data storage section; and if the residual space capacity value of the data storage section is smaller than the target occupied space capacity value, writing the head data of the second self-compaction volume into the newly applied data storage section. The method and the device realize more reasonable storage and distribution of the head data of the self-compaction volume, and can effectively avoid the waste of storage resources.

Description

Method and device for allocating head capacity of thin self-compaction volume and computer readable storage medium
Technical Field
The present application relates to the field of storage technologies, and in particular, to a method and an apparatus for allocating head capacity of a thin volume, and a computer-readable storage medium.
Background
The thin provisioning technology is allocated to an application program for a plurality of times and in a small amount according to the capacity actually required by the current application, and when data generated by the application grows and the allocated capacity space is insufficient, the system can allocate a part of storage space from a back-end storage pool again in a supplementing manner, and the thin provisioning technology is widely applied to various storage systems as a capacity allocation technology. Through thin provisioning techniques, a user may create a thin volume. A thin volume includes virtual capacity and actual capacity. The virtual capacity refers to the total capacity that can be supported on the surface of the thin self-volume, and the total capacity is the capacity specified by a user when the thin self-volume is created, that is, the capacity displayed after the thin self-volume is mapped to the host end; the actual capacity is a capacity corresponding to a physical space actually used by the self-compaction volume, and the capacity reflects an actual situation of data stored in the self-compaction volume. For the actual capacity, the self-compaction volume may allocate a physical space of a certain size in an initial stage, and along with the continuous use of the user, when the previously allocated physical space is insufficient, a capacity expansion interval of a fixed size may be allocated, and similarly, when the capacity expansion interval is used up, the capacity expansion interval of the same size may be continuously allocated.
In the prior art, the size of the header data of the self-compaction volume is a fixed value, which is about 0.75M, and in an environment where the minimum value of the ext parameter attribute of the creation pool is 16, the header data of each self-compaction volume occupies an extent, which actually uses 16M. In actual use, the created self-compaction volumes may be small-capacity self-compaction volumes, the usage ratio of the head data of the self-compaction volumes to the volume data may be 1:1 or 1:2, and the capacity occupied by the head data of the self-compaction volumes is idle, so that the waste of storage resources is caused.
In view of this, how to implement more reasonable storage allocation for the self-compaction volume header data and avoid the waste of storage resources is a technical problem to be solved by those skilled in the art.
Disclosure of Invention
The application provides a method and a device for allocating the head capacity of a self-compaction volume and a computer readable storage medium, which realize more reasonable storage allocation of the head data of the self-compaction volume and effectively avoid the waste of storage resources.
In order to solve the above technical problems, embodiments of the present invention provide the following technical solutions:
an embodiment of the present invention provides a method for allocating head capacity of a self-compaction volume, including:
when detecting that a second self-reduced volume is created, acquiring a target occupied space capacity value of the head data of the second self-reduced volume;
judging whether the residual space capacity value of a data storage section storing the first self-compaction volume header data is not less than the target occupied space capacity value; the first thin volume is a previously created thin volume adjacent to the second thin volume;
if the residual space capacity value of the data storage section is not smaller than the target occupied space capacity value, writing the head data of the second autoregressive volume into the data storage section;
and if the residual space capacity value of the data storage section is smaller than the target occupied space capacity value, writing the head data of the second autoregressive volume into the newly applied data storage section.
Optionally, the determining whether the remaining space capacity value of the data storage segment storing the first thin auto-compaction volume header data is not less than the target occupied space capacity value includes:
presetting a minimum capacity value of space capacity occupied by header data of a self-compaction volume and a tag self-generation strategy, wherein the tag self-generation strategy is used for automatically generating and storing a finished tag for a current data storage section if the residual space capacity value of the current data storage section is smaller than the minimum capacity value so as to mark that the current data storage section cannot continuously store header data;
if the data storage section which does not store the finished label does not exist, automatically sending an application request of a new data storage section;
if the target data storage zone does not store the finished label, the target data storage zone is a data storage zone for storing the first thin self-compaction volume header data, and whether the residual space capacity value of the target data storage zone is not less than the target occupied space capacity value is judged.
Optionally, the determining whether the remaining space capacity value of the data storage segment storing the first thin auto-compaction volume header data is not less than the target occupied space capacity value includes:
presetting a timestamp generation strategy, wherein the timestamp generation strategy is used for automatically generating a timestamp for a corresponding data storage section after one-time header data storage is finished;
determining a target data storage section which is closest to the creation time of the second self-compaction volume according to the time stamp of each data storage section, and using the target data storage section as a data storage section for storing the head data of the first self-compaction volume;
and judging whether the residual space capacity value of the target data storage section is not less than the target occupied space capacity value.
Optionally, before writing the header data of the second thin volume to the newly applied data storage segment, the method further includes:
presetting a minimum capacity value of the space capacity occupied by the head data of the self-simplified roll, and setting a section self-application monitoring thread;
and calling the section self-application monitoring thread to monitor whether the residual space capacity value of the current data storage section is smaller than the minimum capacity value at intervals of preset time, and if the residual space capacity value of the current data storage section is smaller than the minimum capacity value, automatically sending an application request of a new data storage section.
Optionally, the occupied space capacity values of the data storage sections are the same.
Another aspect of an embodiment of the present invention provides a device for allocating head capacity of a self-compaction roll, including:
the information acquisition module is used for acquiring a target occupied space capacity value of the header data of the second self-reduced volume when the second self-reduced volume is detected to be created;
the storage position judging module is used for judging whether the residual space capacity value of a data storage section for storing the first self-compaction volume header data is not less than the target occupied space capacity value or not; the first thin volume is a previously created thin volume adjacent to the second thin volume;
a header data writing module, configured to write header data of the second autoregressive volume to the data storage section if a remaining space capacity value of the data storage section is not less than the target occupied space capacity value; and if the residual space capacity value of the data storage section is smaller than the target occupied space capacity value, writing the head data of the second autoregressive volume into the newly applied data storage section.
Optionally, the storage location determining module includes:
the presetting submodule is used for presetting a minimum capacity value of the space capacity occupied by the head data of the self-compaction volume, and if the residual space capacity value of the current data storage zone is smaller than the minimum capacity value, automatically generating a storage finished label for the current data storage zone so as to mark that the current data storage zone can not continuously store the head data;
the space application submodule is used for automatically sending an application request of a new data storage section if the data storage section which does not store the finished label does not exist;
and the judging submodule is used for judging whether the residual space capacity value of the target data storage section is not less than the target occupied space capacity value or not if the target data storage section which does not store the finished label exists, wherein the target data storage section is a data storage section for storing the first thin auto-compaction volume header data.
Optionally, the storage location determining module includes:
the time stamp generating strategy is used for automatically generating time stamps for corresponding data storage sections after the head data storage is finished once;
the section positioning submodule is used for determining a target data storage section which is closest to the creation time of the second self-compaction volume according to the time stamp of each data storage section, and the target data storage section is used as a data storage section for storing the head data of the first self-compaction volume;
and the judgment submodule is used for judging whether the residual space capacity value of the target data storage section is not less than the target occupied space capacity value.
An embodiment of the present invention further provides a device for allocating a head capacity of a thin provisioning engine, including a processor, where the processor is configured to implement the steps of the method for allocating a head capacity of a thin provisioning engine as described in any one of the preceding paragraphs when executing a computer program stored in a memory.
Finally, an embodiment of the present invention provides a computer-readable storage medium, where a thin-film volume head capacity allocation program is stored on the computer-readable storage medium, and when executed by a processor, the thin-film volume head capacity allocation program implements the steps of the thin-film volume head capacity allocation method according to any of the foregoing.
The technical scheme that this application provided's advantage lies in, adopt the mode to the continuous storage of self-retrenching volume head data set, as long as current data storage section can save a self-retrenching volume head data, continue to save next self-retrenching volume head data on same data storage section, compare with current storage allocation, can greatly increased under the same condition to the use of storage resource, generate more self-retrenching volumes, better use storage space, establish more self-retrenching volumes, effectively promote storage performance, save storage resource, avoid storage capacity to suffer idle, cause the waste.
In addition, the embodiment of the present invention further provides a corresponding implementation apparatus and a computer-readable storage medium for a method for allocating a header capacity of a thin self-compaction volume, so that the method has higher practicability, and the apparatus and the computer-readable storage medium have corresponding advantages.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions of the related art, the drawings required to be used in the description of the embodiments or the related art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic flow chart of a method for allocating head capacity of a thin auto-compaction volume according to an embodiment of the present invention;
FIG. 2 is a flow chart illustrating another method for allocating thin volume header capacity according to an embodiment of the present invention;
fig. 3 is a schematic flow chart illustrating a method for allocating head capacity of a thin auto-compaction volume according to another embodiment of the present invention;
FIG. 4 is a block diagram of an embodiment of a thin film head capacity allocation apparatus according to the present invention;
fig. 5 is a block diagram of another embodiment of a head capacity allocation apparatus for a thin film heater according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the disclosure, the invention will be described in further detail with reference to the accompanying drawings and specific embodiments. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first," "second," "third," "fourth," and the like in the description and claims of this application and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "comprising" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements but may include other steps or elements not expressly listed.
Having described the technical solutions of the embodiments of the present invention, various non-limiting embodiments of the present application are described in detail below.
Referring to fig. 1, fig. 1 is a schematic flow chart of a method for allocating head capacity of a thin auto-compaction volume according to an embodiment of the present invention, where the embodiment of the present invention includes the following:
s101: and when detecting that the second thin self-compaction volume is created, acquiring a target occupied space capacity value of the header data of the second thin self-compaction volume.
In this step, a self-compaction volume creation monitoring thread may be preset, the thread establishes whether a storage system has a self-compaction volume creation request in real time, if the self-compaction volume creation request is monitored, after the request is executed, the size of header data of the created self-compaction volume, that is, the value of the volume of the space occupied by the header data, is, for example, 0.75M.
S102: judging whether the residual space capacity value of a data storage section storing the first self-compaction volume header data is not less than the target occupied space capacity value, if so, executing S103; if not, S104 is executed.
The first thin volume is a previously created thin volume adjacent to the second thin volume, that is, the creation time of the first thin volume is earlier than that of the second thin volume, and no self-thin volume is created between the creation time of the first thin volume and the creation time of the second thin volume. The data storage section in this step is a storage area for storing the first thin auto-thin volume header data. If the first thin volume does not exist, that is, the second thin volume is the first created thin volume, the data storage segment is a storage area initially allocated by the storage system for storing the header data of the thin volume.
S103: the header data of the second self-compaction volume is written to the data storage segment.
That is to say, as long as the data storage section storing the previous head data of the self-thin volume has enough space, the head data of the subsequent respective thin volumes are sequentially stored into the data storage section, instead of creating a self-thin volume, a head data storage section is allocated to the self-thin volume, so that the use of storage resources and the generation of more thin volumes under the same condition are increased, the storage performance is increased, and the storage capacity is prevented from being idle to cause waste.
S104: and writing the header data of the second self-compaction volume into the newly applied data storage section.
If the remaining space of the data storage section storing the header data of the last thin volume is not enough to store the header data of the currently created thin volume, the system allocates a new data storage section storing the header data for the thin volume. And sequentially and intensively storing the head data of the self-compaction volume in the memory space distributed in the same section, and continuously and intensively storing the head data of the self-compaction volume by using the next storage section after the head data of the self-compaction volume is fully stored until all the self-compaction volumes are created. For ease of management, the system may allocate the same amount of space occupied capacity for each data storage segment storing header data, e.g., 16M each.
In the technical scheme provided by the embodiment of the invention, a mode of intensively and continuously storing the head data of the self-compaction volume is adopted, as long as the current data storage section can store one head data of the self-compaction volume, the next head data of the self-compaction volume is continuously stored in the same data storage section, compared with the existing storage allocation, the method can greatly increase the use of storage resources under the same condition, generate more self-compaction volumes, better use the storage space, create more self-compaction volumes, effectively improve the storage performance, save the storage resources and avoid the waste caused by idle storage capacity.
In the above embodiment, how to perform step S102 is not limited, and the embodiment provides a method for locating a first thin volume header data storage segment, as shown in fig. 2, which may include the following steps:
s211: and presetting a minimum capacity value of the space capacity occupied by the head data of the self-compaction volume and a label self-generation strategy.
In this step, the minimum capacity value may be determined according to actual requirements, for example, 0.75M, which is not limited in this application. The tag self-generation strategy is used for automatically generating a storage-completed tag for the current data storage section if the residual space capacity value of the current data storage section is smaller than the minimum capacity value so as to identify that the current data storage section cannot continuously store the head data.
S212: and judging whether a data storage section which does not store the finished label exists, if not, executing S213, and if so, executing S214.
It can be understood that, since the tag self-generation policy is preset, whenever the available space capacity of the data storage section is not less than the minimum capacity value, the data storage section has no tag, and the data storage section can store the header data with the capacity value not greater than the minimum capacity value. It can be understood that the value of the head data occupied space capacity of the self-reduced volume is not less than the minimum capacity value, but as long as the data storage section has the tag, the data storage section cannot store the head data of the self-reduced volume, and a new data storage section needs to be applied for storing the head data of a subsequent self-reduced volume.
S213: and if the data storage section which does not store the finished label does not exist, automatically sending an application request of a new data storage section.
In this step, if the request for sending the new data storage section does not carry the occupied space capacity value of the new data storage section, allocating space for the new data storage section according to the default occupied space capacity value. And if the request for sending the new data storage section has the occupied space capacity value carrying the new data storage section, allocating space for the new data storage section according to the occupied space capacity value in the request.
S214: if the target data storage section which does not store the finished label exists, the target data storage section is a data storage section which stores the first thin self volume header data.
The header data of the self-compaction volume is sequentially stored in the memory space allocated in the same section in a centralized manner, and then the next storage section is used for continuing to store in a centralized manner after the header data is full, so that the data storage section without the label is the storage area for storing the header data of the previous self-compaction volume.
S215: and judging whether the residual space capacity value of the target data storage section is not less than the target occupied space capacity value.
In the embodiment, the tag for identifying whether the data can be stored continuously is set for each data storage section, so that the storage position of the current head data of the self-compaction volume is determined more efficiently, and the storage efficiency of the head data can be effectively improved.
The present application further provides another method for locating a first thin volume header data storage block, which is parallel to the above-mentioned manner, and therefore, as another alternative implementation, please refer to fig. 3, S102 may include:
s221: and presetting a timestamp generation strategy.
In this embodiment, the timestamp generation policy is used to automatically generate a timestamp for the corresponding data storage section after completing one header data storage. That is, all data storage sections in the system have a constantly updated time stamp, and when the time stamp is not updated for a period of time, there is a high probability that the data storage section has not enough space for storing header data. The data storage section with the timestamp closer to the current time of creating the self-compaction volume is the data storage section storing the last head data of the self-compaction volume.
S222: and determining a target data storage section which is closest to the creation time of the second thin self-compaction volume according to the time stamp of each data storage section to serve as the data storage section for storing the head data of the first thin self-compaction volume.
S223: and judging whether the residual space capacity value of the target data storage section is not less than the target occupied space capacity value.
According to the embodiment, the time stamps are set for the data storage sections, so that the storage position of the current self-compaction volume header data can be determined more efficiently, and the storage efficiency of the header data is effectively improved.
As an optional implementation manner, in order to timely store header data of a newly created thin self volume and further improve the efficiency of storing the header data, based on the above embodiment, the application may further include the following:
presetting a minimum capacity value of the space capacity occupied by the head data of the self-simplified roll, and setting a section self-application monitoring thread;
and calling a section self-application monitoring thread to monitor whether the residual space capacity value of the current data storage section is smaller than the minimum capacity value at intervals of preset time, and if the residual space capacity value of the current data storage section is smaller than the minimum capacity value, automatically sending an application request of a new data storage section.
The minimum capacity value of this embodiment and the minimum capacity value of the previous embodiment may be the same value, which may be selected based on actual situations, and this application does not limit this. The preset time interval may also be determined according to the frequency of creating the self-compaction volume in the current application scenario, for example, every 1 min. When the application request is sent, the size of the space of the new data storage section can be carried according to the actual situation, or the new data storage section can not be carried. And under the condition of not carrying, applying according to a default value.
It should be noted that, in the present application, there is no strict sequential execution order among the steps, and as long as a logical order is met, the steps may be executed simultaneously or according to a certain preset order, and fig. 1 to fig. 3 are only schematic manners, and do not represent only such an execution order.
The embodiment of the invention also provides a corresponding device for the self-compaction volume head capacity allocation method, so that the method has higher practicability. Wherein the means can be described separately from the functional module point of view and the hardware point of view. In the following, the following describes a volume head capacity allocation apparatus according to an embodiment of the present invention, and the volume head capacity allocation apparatus described below and the volume head capacity allocation method described above may be referred to correspondingly.
Based on the angle of the functional module, referring to fig. 4, fig. 4 is a block diagram of a head capacity allocation apparatus for a self-compacting roll according to an embodiment of the present invention, where the apparatus may include:
an information obtaining module 401, configured to obtain a target occupied space capacity value of header data of the second thin self-reduced volume when it is detected that the second thin self-reduced volume is created.
A storage location determining module 402, configured to determine whether a remaining space capacity value of a data storage segment storing the first thin-film roll header data is not less than a target occupied space capacity value; the first thin volume is a previously created thin volume adjacent to the second thin volume.
A header data writing module 403, configured to write header data of the second auto-thin volume into the data storage section if the remaining space capacity value of the data storage section is not less than the target occupied space capacity value; and if the residual space capacity value of the data storage section is smaller than the target occupied space capacity value, writing the head data of the second self-compaction volume into the newly applied data storage section.
Optionally, in some implementations of this embodiment, the storage location determining module 402 may include:
the system comprises a presetting submodule and a tag self-generating submodule, wherein the presetting submodule is used for presetting a minimum capacity value of space capacity occupied by self-simplified volume header data and a tag self-generating strategy, and the tag self-generating strategy is used for automatically generating and storing a finished tag for a current data storage zone if the residual space capacity value of the current data storage zone is smaller than the minimum capacity value so as to mark that the current data storage zone cannot continuously store header data;
the space application submodule is used for automatically sending an application request of a new data storage section if the data storage section which does not store the finished label does not exist;
and the judging submodule is used for judging whether the residual space capacity value of the target data storage section is not less than the target occupied space capacity value or not if the target data storage section which does not store the finished label exists and the target data storage section is a data storage section for storing the first thin self-compaction volume header data. Optionally, in other embodiments of this embodiment, the storage location determining module 402 may further include:
the time stamp setting submodule is used for presetting a time stamp generating strategy, and the time stamp generating strategy is used for automatically generating a time stamp for the corresponding data storage section after the head data storage is finished for one time;
the section positioning submodule is used for determining a target data storage section which is closest to the creation time of the second self-compaction volume according to the time stamp of each data storage section, and the target data storage section is used as a data storage section for storing the head data of the first self-compaction volume;
and the judgment submodule is used for judging whether the residual space capacity value of the target data storage section is not less than the target occupied space capacity value.
In some other embodiments of this embodiment, the apparatus may further include an auto space application module, for example, and the auto space application module may include:
the parameter setting submodule is used for presetting a minimum capacity value of the space capacity occupied by the head data of the self-simplified roll and setting a section self-application monitoring thread;
and the thread execution submodule is used for calling the section self-application monitoring thread to monitor whether the residual space capacity value of the current data storage section is smaller than the minimum capacity value at preset time intervals, and automatically sending an application request of a new data storage section if the residual space capacity value of the current data storage section is smaller than the minimum capacity value.
The functions of each functional module of the self-compacting volume head capacity allocation apparatus according to the embodiment of the present invention may be specifically implemented according to the method in the foregoing method embodiment, and the specific implementation process may refer to the related description of the foregoing method embodiment, which is not described herein again.
Therefore, the embodiment of the invention realizes more reasonable storage and distribution of the head data of the self-compaction volume, and effectively avoids the waste of storage resources.
While the above mentioned apparatus for allocating the head capacity of the self-reducing volume is described from the perspective of the functional module, the present application further provides an apparatus for allocating the head capacity of the self-reducing volume, which is described from the perspective of the hardware. Fig. 5 is a block diagram of another apparatus for allocating head capacity of a thin film roll according to an embodiment of the present disclosure. As shown in fig. 5, the apparatus comprises a memory 50 for storing a computer program;
a processor 51, configured to execute a computer program to implement the steps of the method for allocating a head capacity of a thin volume as mentioned in any of the above embodiments.
The processor 51 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 51 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 51 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 51 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the display screen. In some embodiments, the processor 51 may further include an AI (Artificial Intelligence) processor for processing computing operations related to machine learning.
Memory 50 may include one or more computer-readable storage media, which may be non-transitory. Memory 50 may also include high speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In this embodiment, the memory 50 is at least used for storing a computer program 501, wherein the computer program is loaded and executed by the processor 51, and then the relevant steps of the thin volume head capacity allocation method disclosed in any of the foregoing embodiments can be implemented. In addition, the resources stored in the memory 50 may also include an operating system 502, data 503, and the like, and the storage manner may be a transient storage manner or a permanent storage manner. Operating system 502 may include Windows, Unix, Linux, etc. Data 503 may include, but is not limited to, data corresponding to test results, and the like.
In some embodiments, the compact roll head capacity allocation apparatus may further include a display 52, an input/output interface 53, a communication interface 54, a power source 55, and a communication bus 56.
Those skilled in the art will appreciate that the configuration shown in fig. 5 does not constitute a limitation of the self-compacting roll head capacity allocation apparatus and may include more or fewer components than those shown, such as sensor 57.
The functions of each functional module of the self-compacting volume head capacity allocation apparatus according to the embodiment of the present invention may be specifically implemented according to the method in the foregoing method embodiment, and the specific implementation process may refer to the related description of the foregoing method embodiment, which is not described herein again.
Therefore, the embodiment of the invention realizes more reasonable storage and distribution of the head data of the self-compaction volume, and effectively avoids the waste of storage resources.
It is to be understood that, if the thin volume head capacity allocation method in the above embodiments is implemented in the form of software functional units and sold or used as a stand-alone product, it may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application may be substantially or partially implemented in the form of a software product, which is stored in a storage medium and executes all or part of the steps of the methods of the embodiments of the present application, or all or part of the technical solutions. And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), an electrically erasable programmable ROM, a register, a hard disk, a removable magnetic disk, a CD-ROM, a magnetic or optical disk, and other various media capable of storing program codes.
Based on this, an embodiment of the present invention further provides a computer-readable storage medium, which stores a thin-film head volume allocation program, where the thin-film head volume allocation program is executed by a processor, and the method includes the steps of the thin-film head volume allocation method according to any one of the above embodiments.
The functions of the functional modules of the computer-readable storage medium according to the embodiment of the present invention may be specifically implemented according to the method in the foregoing method embodiment, and the specific implementation process may refer to the related description of the foregoing method embodiment, which is not described herein again.
Therefore, the embodiment of the invention realizes more reasonable storage and distribution of the head data of the self-compaction volume, and effectively avoids the waste of storage resources.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. 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 invention.
The foregoing detailed description describes a method, an apparatus, and a computer-readable storage medium for allocating a head capacity of a thin auto-compaction volume. The principles and embodiments of the present invention are explained herein using specific examples, which are presented only to assist in understanding the method and its core concepts. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present application.

Claims (10)

1. A method for allocating head capacity of a self-streamlining volume, comprising:
when detecting that a second self-reduced volume is created, acquiring a target occupied space capacity value of the head data of the second self-reduced volume;
judging whether the residual space capacity value of a data storage section storing the first self-compaction volume header data is not less than the target occupied space capacity value; the first thin volume is a previously created thin volume adjacent to the second thin volume;
if the residual space capacity value of the data storage section is not smaller than the target occupied space capacity value, writing the head data of the second autoregressive volume into the data storage section;
and if the residual space capacity value of the data storage section is smaller than the target occupied space capacity value, writing the head data of the second autoregressive volume into the newly applied data storage section.
2. The method of claim 1, wherein the determining whether the value of the remaining space capacity of the data storage segment storing the first thin film header data is not less than the target occupied space capacity value comprises:
presetting a minimum capacity value of space capacity occupied by header data of a self-compaction volume and a tag self-generation strategy, wherein the tag self-generation strategy is used for automatically generating and storing a finished tag for a current data storage section if the residual space capacity value of the current data storage section is smaller than the minimum capacity value so as to mark that the current data storage section cannot continuously store header data;
if the data storage section which does not store the finished label does not exist, automatically sending an application request of a new data storage section;
if the target data storage zone does not store the finished label, the target data storage zone is a data storage zone for storing the first thin self-compaction volume header data, and whether the residual space capacity value of the target data storage zone is not less than the target occupied space capacity value is judged.
3. The method of claim 1, wherein the determining whether the value of the remaining space capacity of the data storage segment storing the first thin film header data is not less than the target occupied space capacity value comprises:
presetting a timestamp generation strategy, wherein the timestamp generation strategy is used for automatically generating a timestamp for a corresponding data storage section after one-time header data storage is finished;
determining a target data storage section which is closest to the creation time of the second self-compaction volume according to the time stamp of each data storage section, and using the target data storage section as a data storage section for storing the head data of the first self-compaction volume;
and judging whether the residual space capacity value of the target data storage section is not less than the target occupied space capacity value.
4. The method according to any one of claims 1 to 3, wherein before writing the header data of the second thin volume to the newly applied data storage segment, the method further comprises:
presetting a minimum capacity value of the space capacity occupied by the head data of the self-simplified roll, and setting a section self-application monitoring thread;
and calling the section self-application monitoring thread to monitor whether the residual space capacity value of the current data storage section is smaller than the minimum capacity value at intervals of preset time, and if the residual space capacity value of the current data storage section is smaller than the minimum capacity value, automatically sending an application request of a new data storage section.
5. The method of claim 4, wherein the values of the occupied space capacity of the data storage segments are the same.
6. A self-compacting roll head capacity allocation apparatus, comprising:
the information acquisition module is used for acquiring a target occupied space capacity value of the header data of the second self-reduced volume when the second self-reduced volume is detected to be created;
the storage position judging module is used for judging whether the residual space capacity value of a data storage section for storing the first self-compaction volume header data is not less than the target occupied space capacity value or not; the first thin volume is a previously created thin volume adjacent to the second thin volume;
a header data writing module, configured to write header data of the second autoregressive volume to the data storage section if a remaining space capacity value of the data storage section is not less than the target occupied space capacity value; and if the residual space capacity value of the data storage section is smaller than the target occupied space capacity value, writing the head data of the second autoregressive volume into the newly applied data storage section.
7. The apparatus of claim 6, wherein the storage location determining module comprises:
the presetting submodule is used for presetting a minimum capacity value of the space capacity occupied by the head data of the self-compaction volume, and if the residual space capacity value of the current data storage zone is smaller than the minimum capacity value, automatically generating a storage finished label for the current data storage zone so as to mark that the current data storage zone can not continuously store the head data;
the space application submodule is used for automatically sending an application request of a new data storage section if the data storage section which does not store the finished label does not exist;
and the judging submodule is used for judging whether the residual space capacity value of the target data storage section is not less than the target occupied space capacity value or not if the target data storage section which does not store the finished label exists, wherein the target data storage section is a data storage section for storing the first thin auto-compaction volume header data.
8. The apparatus of claim 6, wherein the storage location determining module comprises:
the time stamp generating strategy is used for automatically generating time stamps for corresponding data storage sections after the head data storage is finished once;
the section positioning submodule is used for determining a target data storage section which is closest to the creation time of the second self-compaction volume according to the time stamp of each data storage section, and the target data storage section is used as a data storage section for storing the head data of the first self-compaction volume;
and the judgment submodule is used for judging whether the residual space capacity value of the target data storage section is not less than the target occupied space capacity value.
9. A self-reducing volume head capacity allocation apparatus comprising a processor configured to implement the steps of the self-reducing volume head capacity allocation method according to any one of claims 1 to 5 when executing a computer program stored in a memory.
10. A computer readable storage medium having stored thereon a self-reduced volume header capacity allocation program, which when executed by a processor, performs the steps of the self-reduced volume header capacity allocation method according to any one of claims 1 to 5.
CN202010954947.1A 2020-09-11 2020-09-11 Method and device for allocating head capacity of thin self-compaction volume and computer readable storage medium Withdrawn CN112162696A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010954947.1A CN112162696A (en) 2020-09-11 2020-09-11 Method and device for allocating head capacity of thin self-compaction volume and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010954947.1A CN112162696A (en) 2020-09-11 2020-09-11 Method and device for allocating head capacity of thin self-compaction volume and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN112162696A true CN112162696A (en) 2021-01-01

Family

ID=73858930

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010954947.1A Withdrawn CN112162696A (en) 2020-09-11 2020-09-11 Method and device for allocating head capacity of thin self-compaction volume and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN112162696A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112783683A (en) * 2021-02-05 2021-05-11 北京科银京成技术有限公司 Data processing method, device, equipment and storage medium
CN114610243A (en) * 2022-03-21 2022-06-10 苏州浪潮智能科技有限公司 Thin volume conversion method, system, storage medium and equipment

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112783683A (en) * 2021-02-05 2021-05-11 北京科银京成技术有限公司 Data processing method, device, equipment and storage medium
CN112783683B (en) * 2021-02-05 2024-06-04 北京科银京成技术有限公司 Data processing method, device, equipment and storage medium
CN114610243A (en) * 2022-03-21 2022-06-10 苏州浪潮智能科技有限公司 Thin volume conversion method, system, storage medium and equipment
CN114610243B (en) * 2022-03-21 2024-06-25 苏州浪潮智能科技有限公司 Method, system, storage medium and equipment for converting thin volume

Similar Documents

Publication Publication Date Title
CN112130768B (en) Disk array online capacity expansion method and device and computer readable storage medium
CN111984610A (en) Data compression method and device and computer readable storage medium
CN113377540A (en) Cluster resource scheduling method and device, electronic equipment and storage medium
CN112162696A (en) Method and device for allocating head capacity of thin self-compaction volume and computer readable storage medium
CN112527452B (en) Virtual machine migration method, device and medium crossing OpenStack
CN111143039B (en) Scheduling method and device of virtual machine and computer storage medium
KR20200122364A (en) Resource scheduling method and terminal device
CN111813713B (en) Data acceleration operation processing method and device and computer readable storage medium
CN111857966A (en) Virtual machine snapshot creating method and device and computer readable storage medium
CN113515382A (en) Cloud resource allocation method and device, electronic equipment and program product
CN114860787A (en) Data management method and device, electronic equipment and readable storage medium
CN111159124B (en) Asynchronous write caching method, device and medium for Linux kernel file system
CN112269535A (en) Space resource allocation method and device of storage system and readable storage medium
CN117370107A (en) BIOS log collection method and computing device
CN114647548A (en) Log generation method and device
CN113703678B (en) Method, device, equipment and medium for re-splitting storage bucket index
CN115934999A (en) Video stream data storage method, device and medium based on block file
CN111966301A (en) Migration speed control method, device and medium for distributed object storage system
CN114995770A (en) Data processing method, device, equipment, system and readable storage medium
CN114020717A (en) Method, device, equipment and medium for acquiring performance data of distributed storage system
CN111176571A (en) Method, device, equipment and medium for managing local object
CN112269723A (en) Performance analysis method and device of storage equipment and readable storage medium
EP2386957B1 (en) Apparatus and method for managing memory in consideration of user response time
CN110955644A (en) IO control method, device, equipment and storage medium of storage system
CN108959499A (en) Distributed file system performance analysis method, device, equipment and storage medium

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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20210101