CN111190549A - Method, device, equipment and medium for acquiring available capacity of shared volume - Google Patents

Method, device, equipment and medium for acquiring available capacity of shared volume Download PDF

Info

Publication number
CN111190549A
CN111190549A CN201911398255.7A CN201911398255A CN111190549A CN 111190549 A CN111190549 A CN 111190549A CN 201911398255 A CN201911398255 A CN 201911398255A CN 111190549 A CN111190549 A CN 111190549A
Authority
CN
China
Prior art keywords
state
block storage
shared volume
target block
available capacity
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
CN201911398255.7A
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.)
Inspur Electronic Information Industry Co Ltd
Original Assignee
Inspur Electronic Information Industry 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 Inspur Electronic Information Industry Co Ltd filed Critical Inspur Electronic Information Industry Co Ltd
Priority to CN201911398255.7A priority Critical patent/CN111190549A/en
Publication of CN111190549A publication Critical patent/CN111190549A/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/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
    • 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/0629Configuration or reconfiguration of 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/064Management of blocks

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, a device, equipment and a computer readable storage medium for acquiring available capacity of a shared volume, wherein the method comprises the following steps: creating a bitmap which corresponds to the shared volume and contains the storage state of each block in the shared volume; wherein the states include a present data state and an absent data state; receiving customer service and sending the customer service to a target block storage in a shared volume; judging whether the state of the target block storage needs to be updated according to the client service, if so, updating the state of the target block storage; and replacing the state corresponding to the target block storage in the bitmap by using the updated state, and acquiring the available capacity of the shared volume according to the state of each block storage in the bitmap. According to the technical scheme disclosed by the application, the available capacity of the shared volume is acquired by utilizing the storage state of each block in the created bitmap, so that the acquisition rate of the available capacity of the shared volume is increased, and the acquisition time of the available capacity of the shared volume is shortened.

Description

Method, device, equipment and medium for acquiring available capacity of shared volume
Technical Field
The present application relates to the field of distributed block storage technologies, and in particular, to a method, an apparatus, a device, and a computer-readable storage medium for acquiring available capacity of a shared volume.
Background
The distributed block storage provides block services for applications through corresponding lib library interfaces in a distributed storage system, and virtual disks are mainly provided for virtual machines of a cloud platform and used for providing access of data block levels, wherein the block storage can be applied to various different scenes, and the shared volumes and the block storage in the shared volumes are mainly applied to virtualization scenes so that multiple clients can access simultaneously.
Currently, statistics of the available capacity of a shared volume are often performed as follows: the method comprises the steps of obtaining specific positions of all blocks contained in a shared volume, wherein the blocks are stored in a distributed block storage cluster, respectively checking the size of available capacity stored by all the blocks, and then overlapping the size of the available capacity stored by all the blocks to obtain the size of the available capacity of the shared volume. However, since the specific location of each block storage needs to be obtained and then the available capacity of the corresponding block storage needs to be obtained, and since the distribution of each block storage is relatively discrete, multiple interactions with the distributed block storage cluster are needed, which may result in a relatively slow acquisition rate and a relatively long acquisition time of the available capacity of the shared volume, which may result in a relatively long processing time of the entire system, and further may reduce user experience.
In summary, how to accelerate the acquisition rate of the available capacity of the shared volume and shorten the acquisition time of the available capacity of the shared volume is a technical problem to be solved by those skilled in the art.
Disclosure of Invention
In view of the above, an object of the present application is to provide a method, an apparatus, a device, and a computer-readable storage medium for acquiring an available capacity of a shared volume, which are used to accelerate an acquisition rate of the available capacity of the shared volume and shorten an acquisition time of the available capacity of the shared volume.
In order to achieve the above purpose, the present application provides the following technical solutions:
a method for acquiring available capacity of a shared volume comprises the following steps:
creating a bitmap which corresponds to the shared volume and contains the storage state of each block in the shared volume; wherein the states include a present data state and an absent data state;
receiving customer service and sending the customer service to a target block storage in the shared volume;
judging whether the state of the target block storage needs to be updated according to the client service, if so, updating the state of the target block storage;
and replacing the state corresponding to the target block storage in the bitmap by using the updated state, and acquiring the available capacity of the shared volume according to the state of each block storage in the bitmap.
Preferably, when the client service is write data, after receiving the client service, the method further includes:
judging whether the size of the written data is larger than the capacity of the block storage;
if so, splitting the write data into sub-write data with the size smaller than or equal to the capacity of the block storage;
accordingly, sending the customer traffic to a target block store in the shared volume includes:
and sending the sub-write data to a target block storage in the shared volume.
Preferably, the determining whether the state of the target block storage needs to be updated according to the client service includes:
judging whether data is written into the target block storage for the first time;
and if so, determining that the state of the target block storage needs to be updated.
Preferably, when the client service is delete data, determining whether the state of the target block needs to be updated according to the client service includes:
judging whether all the data in the target block storage are deleted or not;
and if so, determining that the state of the target block storage needs to be updated.
Preferably, the determining, according to the client service, whether the state of the target block storage needs to be updated, and if yes, updating the state of the target block storage includes:
judging whether the state of the target block storage needs to be updated or not according to the client service by using the target block storage, if so, updating the state of the target block storage by using the target block storage, and sending the updated state to a service layer;
accordingly, replacing the state in the bitmap corresponding to the target block store with the updated state includes:
and writing the updated state into the bitmap by using the service layer, and replacing the state corresponding to the target block storage in the bitmap.
Preferably, the obtaining the available capacity of the shared volume according to the state of each block storage in the bitmap includes:
and acquiring the available capacity of the shared volume according to the number of the block storages with the states of no data in the bitmap and the capacity of the block storages.
A shared volume available capacity acquisition apparatus comprising:
the system comprises a creating module, a storage module and a processing module, wherein the creating module is used for creating a bitmap which corresponds to a shared volume and contains the state stored by each block in the shared volume; wherein the states include a present data state and an absent data state;
the receiving module is used for receiving customer service and sending the customer service to the target block storage in the shared volume;
the first judgment module is used for judging whether the state of the target block storage needs to be updated according to the client service, and if so, updating the state of the target block storage;
and the acquisition module is used for replacing the state corresponding to the target block storage in the bitmap by using the updated state and acquiring the available capacity of the shared volume according to the state of each block storage in the bitmap.
Preferably, the method further comprises the following steps:
a second judging module, configured to, when the client service is write data, judge, after receiving the client service, whether the size of the write data is larger than the block storage capacity;
a splitting module, configured to split the write data into sub-write data having a size smaller than or equal to the capacity of the block storage when it is determined that the size of the write data is larger than the capacity of the block storage;
accordingly, the receiving module comprises:
and the sending unit is used for sending the sub-write data to a target block storage in the shared volume.
A shared volume available capacity acquisition apparatus comprising:
a memory for storing a computer program;
a processor for implementing the steps of the shared volume available capacity acquisition method as claimed in any one of the above when executing the computer program.
A computer-readable storage medium having stored thereon a computer program which, when being executed by a processor, carries out the steps of the shared volume available capacity acquisition method according to any one of the preceding claims.
The application provides a method, a device, equipment and a computer readable storage medium for acquiring available capacity of a shared volume, wherein the method comprises the following steps: creating a bitmap which corresponds to the shared volume and contains the storage state of each block in the shared volume; wherein the states include a present data state and an absent data state; receiving customer service and sending the customer service to a target block storage in a shared volume; judging whether the state of the target block storage needs to be updated according to the client service, if so, updating the state of the target block storage; and replacing the state corresponding to the target block storage in the bitmap by using the updated state, and acquiring the available capacity of the shared volume according to the state of each block storage in the bitmap.
The technical scheme disclosed by the application creates a bitmap which corresponds to the shared volume and contains the storage state of each block in the shared volume, after sending the client traffic to the target block store in the shared volume, determining whether the state of the target block store needs to be updated, replacing the state corresponding to the target block store with the updated state when an update is required, and then, compared with the current method that the specific position of each block stored in the distributed block storage needs to be obtained and the available capacity of the shared volume needs to be obtained through multiple interactions with the distributed block storage cluster, the method and the device for obtaining the available capacity of the shared volume can directly obtain the available capacity of the shared volume by using the created bitmap, therefore, the method can accelerate the acquisition rate of the available capacity of the shared volume and shorten the acquisition time of the available capacity of the shared volume.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a method for acquiring available capacity of a shared volume according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of an apparatus for acquiring available capacity of a shared volume according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a shared volume available capacity obtaining device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. 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 application.
Referring to fig. 1, which shows a flowchart of a method for acquiring an available capacity of a shared volume according to an embodiment of the present application, a method for acquiring an available capacity of a shared volume according to an embodiment of the present application may include:
s11: creating a bitmap which corresponds to the shared volume and contains the storage state of each block in the shared volume;
wherein the states may include a present data state and an absent data state.
Creating a bitmap corresponding to the shared volume, wherein the created bitmap includes the storage state of each block in the shared volume, and the state mentioned here specifically includes two states, namely a data-present state and a data-absent state, so as to obtain the size of the available capacity of the shared volume according to the storage state of each block. In addition, the absence of data state may be represented by 0 and the presence of data state may be represented by 1, so as to improve convenience of state recording and updating.
It should be noted that, since the shared volume does not perform corresponding operations on the block storage included in the shared volume after being created, the initial state of each block storage may be set to be a data-absent state, so as to improve the accuracy of obtaining the available capacity of the shared volume as much as possible.
S12: customer traffic is received and sent to the target block storage in the shared volume.
After creating the bitmap corresponding to the shared volume, the client service may be received and sent to a target block storage in the shared volume, and specifically, the service layer may be used to receive the client service and send the client service to the target block storage in the shared volume.
S13: judging whether the state of the target block storage needs to be updated according to the client service; if so, step S14 is executed, otherwise, the original state of the target block storage is kept unchanged, and then step S16 is executed.
S14: the state of the target block store is updated.
And judging whether the state corresponding to the target block storage in the bitmap needs to be updated according to the received client service, if so, updating the state of the target block storage, and if not, keeping the original state of the target block storage unchanged, namely, determining whether the state of the target block storage needs to be updated according to the client service so as to improve the accuracy and reliability of obtaining the available capacity of the shared volume.
S15: replacing the state corresponding to the target block storage in the bitmap by using the updated state;
s16: and acquiring the available capacity of the shared volume according to the storage state of each block in the bitmap.
After the state of the target block storage is updated, the original state stored in the bitmap and corresponding to the target block storage is replaced by the updated state, and then the available capacity of the shared volume is obtained according to the state of each block storage in the bitmap.
Therefore, compared with the prior art that the available capacity of the shared volume is acquired by acquiring the specific position of each block stored in the distributed storage cluster and then acquiring the available capacity of each block to acquire the available capacity of the shared volume, the method and the device for acquiring the available capacity of the shared volume can improve the convenience of acquiring the available capacity of the shared volume, shorten the time taken for acquiring the available capacity of the shared volume, and improve the rate of acquiring the available capacity of the shared volume, so that a user can quickly acquire the use condition of the shared volume, the user can determine whether to perform operations such as capacity expansion on the shared volume in time according to the size of the available capacity of the shared volume, and the use performance and the user experience of the shared volume are improved.
The technical scheme disclosed by the application creates a bitmap which corresponds to the shared volume and contains the storage state of each block in the shared volume, after sending the client traffic to the target block store in the shared volume, determining whether the state of the target block store needs to be updated, replacing the state corresponding to the target block store with the updated state when an update is required, and then, compared with the current method that the specific position of each block stored in the distributed block storage needs to be obtained and the available capacity of the shared volume needs to be obtained through multiple interactions with the distributed block storage cluster, the method and the device for obtaining the available capacity of the shared volume can directly obtain the available capacity of the shared volume by using the created bitmap, therefore, the method can accelerate the acquisition rate of the available capacity of the shared volume and shorten the acquisition time of the available capacity of the shared volume.
When the client service is write data, after receiving the client service, the method for acquiring the available capacity of the shared volume, provided by the embodiment of the application, may further include:
judging whether the size of the written data is larger than the capacity of the block storage;
if yes, splitting the write data into sub write data with the size smaller than or equal to the capacity of the block storage;
accordingly, sending customer traffic to the target block storage in the shared volume may include:
the sub-write data is sent to a target block store in the shared volume.
When the client service is write data, after the client service is received, it may be determined whether the size of the write data is larger than the capacity of the block storage (the capacity of each block storage in the shared volume is the same), if so, in order to enable the shared volume to smoothly receive and process the corresponding write data, correspondingly, the write data may be split into sub-write data whose size is smaller than or equal to the capacity of the block storage, and then, each sub-write data obtained by splitting may be sent to a corresponding target block storage, so that the target block storage in the shared volume may sequentially receive the client service.
The method for acquiring the available capacity of the shared volume, provided by the embodiment of the application, for judging whether the state of the target block storage needs to be updated according to the client service, may include:
judging whether data is written into the target block storage for the first time;
and if so, determining that the state of the target block storage needs to be updated.
When the client service is data writing, whether data are written into the target block storage for the first time can be judged, if the data are written into the target block storage for the first time, the state of the target block storage is determined to be updated, and at the moment, the state of the target block storage is updated from a data-nonexistent state to a data-existing state; if the data is not written into the target block storage for the first time, the state of the target block storage does not need to be updated, namely, the original state of the target block storage is kept unchanged.
Whether the state of the target block storage needs to be updated or not is determined by judging whether data are written into the target block storage for the first time or not, so that the accuracy of the state of the target block storage is ensured as much as possible, and the accuracy of obtaining the available capacity of the shared volume is improved as much as possible.
In the method for acquiring the available capacity of the shared volume according to the embodiment of the present application, when the client service is data deletion, determining whether the state of the target block storage needs to be updated according to the client service may include:
judging whether all data in the target block storage are deleted or not;
and if so, determining that the state of the target block storage needs to be updated.
When the client service is data deletion, whether the data in the target block storage is completely deleted can be judged, if the data in the target block storage is completely deleted, the state of the target block storage needs to be updated, namely the state of the target block storage can be updated from the existing data state to the non-existing data state, and if the data in the target block storage is not completely deleted, the state of the target block storage does not need to be updated, namely the original state of the target block storage is kept unchanged.
Whether the state of the target block storage needs to be updated is determined by judging whether all data in the target block storage are deleted or not, so that the accuracy of the state of the target block storage is ensured as much as possible, and the accuracy of obtaining the available capacity of the shared volume is improved as much as possible.
The method for acquiring the available capacity of the shared volume, provided by the embodiment of the application, judges whether the state of the target block storage needs to be updated according to the client service, and if so, updates the state of the target block storage, and may include:
judging whether the state of the target block storage needs to be updated or not according to the client service by using the target block storage, if so, updating the state of the target block storage by using the target block storage, and sending the updated state to a service layer;
accordingly, replacing the state in the bitmap corresponding to the target block store with the updated state may include:
and writing the updated state into the bitmap by using the service layer, and replacing the state corresponding to the target block storage in the bitmap.
The target block storage can be directly utilized to judge whether the self state of the target block storage needs to be updated according to the client service, if so, the self state is directly updated by utilizing the target block storage, the updated state is sent to the service layer, then, the updated state is written into the bitmap by utilizing the service layer, and the state corresponding to the target block storage in the bitmap is replaced, so that the efficiency of state judgment, updating and replacement is improved, and the acquisition efficiency of the available capacity of the shared volume is improved.
The method for acquiring the available capacity of the shared volume according to the state of each block storage in the bitmap provided by the embodiment of the present application may include:
and acquiring the available capacity of the shared volume according to the number of the block storages with the states of no data in the bitmap and the capacity of the block storages.
When the available capacity of the shared volume is acquired according to the state of each block storage in the bitmap, the available capacity of the shared volume can be acquired according to the number of the block storages in the state of no data in the bitmap and the capacity of the block storages, and specifically, the available capacity of the shared volume can be acquired by overlapping the capacity of the block storages in the state of no data in the bitmap, so that the efficiency of acquiring the available capacity of the shared volume is improved.
An embodiment of the present application further provides a device for acquiring available capacity of a shared volume, referring to fig. 2, which shows a schematic structural diagram of the device for acquiring available capacity of a shared volume according to the embodiment of the present application, and the device may include:
a creating module 21, configured to create a bitmap, which corresponds to the shared volume and includes states stored in each block in the shared volume; wherein the states may include a present data state and an absent data state;
a receiving module 22, configured to receive a client service and send the client service to a target block storage in the shared volume;
the first judging module 23 is configured to judge whether the state of the target block storage needs to be updated according to the client service, and if yes, update the state of the target block storage;
and the obtaining module 24 is configured to replace the state corresponding to the target block storage in the bitmap with the updated state, and obtain the available capacity of the shared volume according to the state of each block storage in the bitmap.
The apparatus for acquiring available capacity of a shared volume provided in an embodiment of the present application may further include:
the second judging module is used for judging whether the size of the written data is larger than the block storage capacity or not after receiving the client service when the client service is the written data;
the splitting module is used for splitting the write-in data into sub write-in data with the size smaller than or equal to the capacity of the block storage when the size of the write-in data is determined to be larger than the capacity of the block storage;
accordingly, the receiving module 22 may include:
and the sending unit is used for sending the sub-write data to the target block storage in the shared volume.
In the apparatus for acquiring available capacity of a shared volume according to an embodiment of the present application, the first determining module 23 may include:
the first judging unit is used for judging whether data are written into the target block storage for the first time;
the first determining unit is used for determining that the state of the target block storage needs to be updated when the data is determined to be written into the target block storage for the first time.
In the apparatus for acquiring available capacity of a shared volume according to an embodiment of the present application, the first determining module 23 may include:
the second judgment unit is used for judging whether all the data in the target block storage are deleted or not when the client service is the deleted data;
and the second determining unit is used for determining that the state of the target block storage needs to be updated when the data in the target block storage is determined to be completely deleted.
In the apparatus for acquiring available capacity of a shared volume according to an embodiment of the present application, the first determining module 23 may include:
the third judging unit is used for judging whether the state of the target block storage needs to be updated according to the client service by using the target block storage, if so, updating the state of the third judging unit by using the target block storage, and sending the updated state to the service layer;
accordingly, the obtaining module 24 may include:
and the replacing unit is used for writing the updated state into the bitmap by utilizing the service layer and replacing the state corresponding to the target block storage in the bitmap.
In an apparatus for acquiring available capacity of a shared volume provided in an embodiment of the present application, an acquiring module 24 may include:
and acquiring the available capacity of the shared volume according to the number of the block storages with the states of no data in the bitmap and the capacity of the block storages.
Referring to fig. 3, a schematic structural diagram of an apparatus for acquiring available capacity of a shared volume according to an embodiment of the present application is shown, and the apparatus may include:
a memory 31 for storing a computer program;
the processor 32, when executing the computer program stored in the memory 31, may implement the following steps:
creating a bitmap which corresponds to the shared volume and contains the storage state of each block in the shared volume; wherein the states may include a present data state and an absent data state; receiving customer service and sending the customer service to a target block storage in a shared volume; judging whether the state of the target block storage needs to be updated according to the client service, if so, updating the state of the target block storage; and replacing the state corresponding to the target block storage in the bitmap by using the updated state, and acquiring the available capacity of the shared volume according to the state of each block storage in the bitmap.
The computer-readable storage medium provided in the embodiments of the present application stores a computer program thereon, and when executed by a processor, the computer program can implement the following steps:
creating a bitmap which corresponds to the shared volume and contains the storage state of each block in the shared volume; wherein the states may include a present data state and an absent data state; receiving customer service and sending the customer service to a target block storage in a shared volume; judging whether the state of the target block storage needs to be updated according to the client service, if so, updating the state of the target block storage; and replacing the state corresponding to the target block storage in the bitmap by using the updated state, and acquiring the available capacity of the shared volume according to the state of each block storage in the bitmap.
The computer-readable storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
For a description of relevant parts in the shared volume available capacity obtaining apparatus, the device, and the computer-readable storage medium provided in the embodiments of the present application, reference may be made to detailed descriptions of corresponding parts in the shared volume available capacity obtaining method provided in the embodiments of the present application, and details are not described herein again.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Furthermore, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include elements inherent in the list. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element. In addition, parts of the above technical solutions provided in the embodiments of the present application, which are consistent with the implementation principles of corresponding technical solutions in the prior art, are not described in detail so as to avoid redundant description.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method for acquiring available capacity of a shared volume is characterized by comprising the following steps:
creating a bitmap which corresponds to the shared volume and contains the storage state of each block in the shared volume; wherein the states include a present data state and an absent data state;
receiving customer service and sending the customer service to a target block storage in the shared volume;
judging whether the state of the target block storage needs to be updated according to the client service, if so, updating the state of the target block storage;
and replacing the state corresponding to the target block storage in the bitmap by using the updated state, and acquiring the available capacity of the shared volume according to the state of each block storage in the bitmap.
2. The method for acquiring the available capacity of the shared volume according to claim 1, wherein when the client service is write data, after receiving the client service, the method further comprises:
judging whether the size of the written data is larger than the capacity of the block storage;
if so, splitting the write data into sub-write data with the size smaller than or equal to the capacity of the block storage;
accordingly, sending the customer traffic to a target block store in the shared volume includes:
and sending the sub-write data to a target block storage in the shared volume.
3. The method for acquiring the available capacity of the shared volume according to claim 2, wherein the determining whether the state of the target block storage needs to be updated according to the client service includes:
judging whether data is written into the target block storage for the first time;
and if so, determining that the state of the target block storage needs to be updated.
4. The method for acquiring the available capacity of the shared volume according to claim 1, wherein when the client service is delete data, determining whether the state of the target block storage needs to be updated according to the client service includes:
judging whether all the data in the target block storage are deleted or not;
and if so, determining that the state of the target block storage needs to be updated.
5. The method according to claim 1, wherein the determining, according to the client service, whether the state of the target block storage needs to be updated, and if so, updating the state of the target block storage includes:
judging whether the state of the target block storage needs to be updated or not according to the client service by using the target block storage, if so, updating the state of the target block storage by using the target block storage, and sending the updated state to a service layer;
accordingly, replacing the state in the bitmap corresponding to the target block store with the updated state includes:
and writing the updated state into the bitmap by using the service layer, and replacing the state corresponding to the target block storage in the bitmap.
6. The method according to claim 1, wherein acquiring the available capacity of the shared volume according to the state of each block storage in the bitmap comprises:
and acquiring the available capacity of the shared volume according to the number of the block storages with the states of no data in the bitmap and the capacity of the block storages.
7. An apparatus for acquiring a capacity available for a shared volume, comprising:
the system comprises a creating module, a storage module and a processing module, wherein the creating module is used for creating a bitmap which corresponds to a shared volume and contains the state stored by each block in the shared volume; wherein the states include a present data state and an absent data state;
the receiving module is used for receiving customer service and sending the customer service to the target block storage in the shared volume;
the first judgment module is used for judging whether the state of the target block storage needs to be updated according to the client service, and if so, updating the state of the target block storage;
and the acquisition module is used for replacing the state corresponding to the target block storage in the bitmap by using the updated state and acquiring the available capacity of the shared volume according to the state of each block storage in the bitmap.
8. The shared volume available capacity acquisition apparatus according to claim 7, further comprising:
a second judging module, configured to, when the client service is write data, judge, after receiving the client service, whether the size of the write data is larger than the block storage capacity;
a splitting module, configured to split the write data into sub-write data having a size smaller than or equal to the capacity of the block storage when it is determined that the size of the write data is larger than the capacity of the block storage;
accordingly, the receiving module comprises:
and the sending unit is used for sending the sub-write data to a target block storage in the shared volume.
9. A shared volume available capacity acquisition apparatus, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the shared volume available capacity acquisition method according to any one of claims 1 to 6 when executing said computer program.
10. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, carries out the steps of the shared volume available capacity acquisition method according to any one of claims 1 to 6.
CN201911398255.7A 2019-12-30 2019-12-30 Method, device, equipment and medium for acquiring available capacity of shared volume Withdrawn CN111190549A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911398255.7A CN111190549A (en) 2019-12-30 2019-12-30 Method, device, equipment and medium for acquiring available capacity of shared volume

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911398255.7A CN111190549A (en) 2019-12-30 2019-12-30 Method, device, equipment and medium for acquiring available capacity of shared volume

Publications (1)

Publication Number Publication Date
CN111190549A true CN111190549A (en) 2020-05-22

Family

ID=70707875

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911398255.7A Withdrawn CN111190549A (en) 2019-12-30 2019-12-30 Method, device, equipment and medium for acquiring available capacity of shared volume

Country Status (1)

Country Link
CN (1) CN111190549A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111857583A (en) * 2020-07-10 2020-10-30 苏州浪潮智能科技有限公司 Distributed storage volume updating method, system, equipment and computer medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100106688A1 (en) * 2008-10-23 2010-04-29 Hitachi, Ltd. Computer system storage device and date updating method
CN104065906A (en) * 2014-07-09 2014-09-24 珠海全志科技股份有限公司 Video recording method and device of digital video recording equipment
CN104346357A (en) * 2013-07-29 2015-02-11 中国科学院声学研究所 File accessing method and system for embedded terminal
CN105205160A (en) * 2015-09-29 2015-12-30 浙江宇视科技有限公司 Data write-in method and device
CN106021466A (en) * 2016-05-17 2016-10-12 浙江大华技术股份有限公司 Data storage method and apparatus
CN107948248A (en) * 2017-11-01 2018-04-20 平安科技(深圳)有限公司 Distributed storage method, control server and computer-readable recording medium
US20190065096A1 (en) * 2017-08-25 2019-02-28 Vmware, Inc. Distributed file storage system supporting accesses from multiple container hosts
CN110399102A (en) * 2019-07-19 2019-11-01 苏州浪潮智能科技有限公司 Method for writing data, device, equipment and the storage medium of distributed memory system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100106688A1 (en) * 2008-10-23 2010-04-29 Hitachi, Ltd. Computer system storage device and date updating method
CN104346357A (en) * 2013-07-29 2015-02-11 中国科学院声学研究所 File accessing method and system for embedded terminal
CN104065906A (en) * 2014-07-09 2014-09-24 珠海全志科技股份有限公司 Video recording method and device of digital video recording equipment
CN105205160A (en) * 2015-09-29 2015-12-30 浙江宇视科技有限公司 Data write-in method and device
CN106021466A (en) * 2016-05-17 2016-10-12 浙江大华技术股份有限公司 Data storage method and apparatus
US20190065096A1 (en) * 2017-08-25 2019-02-28 Vmware, Inc. Distributed file storage system supporting accesses from multiple container hosts
CN107948248A (en) * 2017-11-01 2018-04-20 平安科技(深圳)有限公司 Distributed storage method, control server and computer-readable recording medium
CN110399102A (en) * 2019-07-19 2019-11-01 苏州浪潮智能科技有限公司 Method for writing data, device, equipment and the storage medium of distributed memory system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111857583A (en) * 2020-07-10 2020-10-30 苏州浪潮智能科技有限公司 Distributed storage volume updating method, system, equipment and computer medium
CN111857583B (en) * 2020-07-10 2022-07-29 苏州浪潮智能科技有限公司 Distributed storage volume updating method, system, equipment and computer medium

Similar Documents

Publication Publication Date Title
US20200210381A1 (en) Optimized content object storage service for large scale content
EP3522042A1 (en) Method and apparatus for information processing, server and computer readable medium
CN113568582B (en) Data management method, device and storage equipment
CN111638995A (en) Metadata backup method, device and equipment and storage medium
CN110673800A (en) Data operation method, device and equipment of file system and readable storage medium
US10042570B2 (en) Tape backup and restore in a disk storage environment with intelligent data placement
US11157456B2 (en) Replication of data in a distributed file system using an arbiter
CN111638853A (en) Data storage method and device, storage cluster, gateway equipment and main equipment
CN111382011A (en) File data access method and device and computer readable storage medium
CN113467719B (en) Data writing method and device
CN111190537A (en) Method and system for managing sequential storage disks in write-addition scene
CN113590027B (en) Data storage method, data acquisition method, system, device and medium
US11429311B1 (en) Method and system for managing requests in a distributed system
CN111026331A (en) Request response method, device, equipment and computer readable storage medium
CN112000971B (en) File permission recording method, system and related device
CN111190549A (en) Method, device, equipment and medium for acquiring available capacity of shared volume
US11314732B2 (en) Database migration technique
CN111400248A (en) Method for writing data and recovering data and file system
CN109508140B (en) Storage resource management method and device, electronic equipment and system
CN109857519A (en) The processing method and relevant apparatus of virtual disk
CN111399753B (en) Method and device for writing pictures
US20220413733A1 (en) mon service migration method, apparatus, and device, and readable storage medium
CN109241011B (en) Virtual machine file processing method and device
CN111444114B (en) Method, device and system for processing data in nonvolatile memory
CN113625952A (en) Object storage 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: 20200522