CN113419672B - Storage capacity management method, system and storage medium - Google Patents

Storage capacity management method, system and storage medium Download PDF

Info

Publication number
CN113419672B
CN113419672B CN202110625894.3A CN202110625894A CN113419672B CN 113419672 B CN113419672 B CN 113419672B CN 202110625894 A CN202110625894 A CN 202110625894A CN 113419672 B CN113419672 B CN 113419672B
Authority
CN
China
Prior art keywords
storage
capacity
snapshots
storage capacity
volumes
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110625894.3A
Other languages
Chinese (zh)
Other versions
CN113419672A (en
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 Jinan data Technology Co ltd
Original Assignee
Inspur Jinan 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 Inspur Jinan data Technology Co ltd filed Critical Inspur Jinan data Technology Co ltd
Priority to CN202110625894.3A priority Critical patent/CN113419672B/en
Publication of CN113419672A publication Critical patent/CN113419672A/en
Application granted granted Critical
Publication of CN113419672B publication Critical patent/CN113419672B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/0614Improving the reliability of storage systems
    • G06F3/0617Improving the reliability of storage systems in relation to availability
    • 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
    • G06F3/0631Configuration or reconfiguration of storage systems by allocating resources to 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/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a storage capacity management method, a storage capacity management system and a storage medium, wherein the storage capacity management method comprises the following steps: taking the sum of the storage volumes in the storage pool and the allocatable storage capacities of the snapshots as a total allocation capacity, and setting an upper limit for the total allocation capacity based on the total storage capacity of the storage pool; in response to performing a corresponding operation on the storage volumes and/or snapshots, acquiring used storage capacities of the storage volumes and snapshots in the storage pool, and calculating pre-allocated storage capacities of the storage volumes and/or snapshots based on the corresponding operation by the used storage capacities and the upper limit; storage capacity management is based on pre-allocated storage capacity. The invention carries out corresponding operation on the storage volume and the snapshot, calculates the pre-allocation capacity of the storage volume and the snapshot according to the preset rule based on the corresponding operation, reasonably predicts the maximum pre-allocation storage capacity of the storage volume or the snapshot during each operation, avoids the condition of insufficient storage capacity during data writing, and is beneficial to improving the reliability and usability of the data storage of the storage cluster system.

Description

Storage capacity management method, system and storage medium
Technical Field
The present invention relates to the field of storage technologies, and in particular, to a storage capacity management method, system, and storage medium.
Background
Distributed storage systems are systems that store data in a decentralized manner on multiple, independent devices. The traditional network storage system adopts a centralized storage server to store all data, and the storage server becomes a bottleneck of system performance, is relatively weak in reliability and safety, and cannot meet the requirements of large-scale storage application. The distributed network storage system adopts an expandable system structure, and utilizes a plurality of storage servers to share the storage load, so that the reliability, availability and access efficiency of the system are improved, and the system is easy to expand. The block storage mainly maps the whole bare disk space to a storage service used by a host, and the storage volume provided by the distributed block storage system is generally a thin volume. The self-thin-provisioning storage volume can improve the utilization rate of storage space and recycle unused space.
When the thin volume is used, the pre-allocation space may be far more than the total space of the storage cluster, and as the user data is written in, the whole cluster space is gradually exhausted, so that the thin volume cannot be used continuously.
Disclosure of Invention
Accordingly, the present invention is directed to a storage capacity management method, system and storage medium, which are used for solving the problem that the storage capacity management of the storage cluster is poor in the prior art, so that the pre-written data cannot be written continuously due to the lack of available storage capacity.
Based on the above object, the present invention provides a storage capacity management method comprising the steps of:
taking the sum of the storage volumes in the storage pool and the allocatable storage capacities of the snapshots as a total allocation capacity, and setting an upper limit for the total allocation capacity based on the total storage capacity of the storage pool;
in response to performing a corresponding operation on the storage volumes and/or snapshots, acquiring used storage capacities of the storage volumes and snapshots in the storage pool, and calculating pre-allocated storage capacities of the storage volumes and/or snapshots based on the corresponding operation by the used storage capacities and the upper limit;
storage capacity management is performed based on the pre-allocated storage capacity.
In some embodiments, in response to respective operations on the storage volumes and/or snapshots, obtaining the used storage capacity of the storage volumes and snapshots in the storage pool and computing pre-allocated storage capacity of the storage volumes and/or snapshots based on the respective operations and the upper limit comprises:
in response to creating a single snapshot for existing data in the storage volume, the storage capacity occupied by the existing data is taken as the pre-allocated storage capacity of the single snapshot.
In some embodiments, in response to respective operations on the storage volumes and/or snapshots, obtaining the used storage capacities of the storage volumes and snapshots in the storage pools and computing pre-allocated storage capacities of the storage volumes and/or snapshots based on the respective operations and the upper limit further comprises:
in response to creating a plurality of snapshots for existing data in a storage volume, storage capacity occupied by the existing data is taken as pre-allocated storage capacity for one of the plurality of snapshots, and pre-allocated capacity for the remaining snapshots is counted as zero.
In some embodiments, in response to respective operations on the storage volumes and/or snapshots, obtaining the used storage capacities of the storage volumes and snapshots in the storage pools and computing pre-allocated storage capacities of the storage volumes and/or snapshots based on the respective operations and the upper limit further comprises:
in response to deleting a snapshot of the occupied storage capacity, the occupied storage capacity of the snapshot is zeroed out and taken as the pre-allocated storage capacity of the new snapshot.
In some embodiments, in response to respective operations on the storage volumes and/or snapshots, obtaining the used storage capacities of the storage volumes and snapshots in the storage pools and computing pre-allocated storage capacities of the storage volumes and/or snapshots based on the respective operations and the upper limit further comprises:
in response to adding data to the storage volume, a snapshot is created for the added data and the storage capacity it occupies is taken as the pre-allocated storage capacity for the snapshot.
In some embodiments, in response to respective operations on the storage volumes and/or snapshots, obtaining the used storage capacities of the storage volumes and snapshots in the storage pools and computing pre-allocated storage capacities of the storage volumes and/or snapshots based on the respective operations and the upper limit further comprises:
in response to modifying data for a storage volume, a snapshot is created for the modified data and the storage capacity it occupies is taken as the pre-allocated storage capacity for the snapshot.
In some embodiments, in response to respective operations on the storage volumes and/or snapshots, obtaining the used storage capacities of the storage volumes and snapshots in the storage pools and computing pre-allocated storage capacities of the storage volumes and/or snapshots based on the respective operations and the upper limit further comprises:
in response to creating a clone volume for a storage volume, the occupied storage capacity of the storage volume is taken as the pre-allocated storage capacity of the clone volume.
In some embodiments, setting an upper limit for the total allocated capacity based on the total storage capacity of the storage pools comprises:
and setting an upper limit for the total storage capacity of the storage pool according to a preset capacity allocation ratio.
In another aspect of the present invention, there is also provided a storage capacity management system including:
a capacity upper limit setting module configured to take a sum of the storage volumes in the storage pool and the allocatable storage capacities of the snapshots as a total allocation capacity, and set an upper limit for the total allocation capacity based on the total storage capacity of the storage pool;
a capacity pre-allocation module configured to, in response to a corresponding operation on the storage volumes and/or snapshots, obtain used storage capacities of the storage volumes and snapshots in the storage pool, and calculate pre-allocated storage capacities of the storage volumes and/or snapshots based on the corresponding operation by the used storage capacities and the upper limit; and
and a capacity management module configured to perform storage capacity management based on the pre-allocated storage capacity.
In yet another aspect of the present invention, there is also provided a computer readable storage medium storing computer program instructions which, when executed, implement any of the methods described above.
In yet another aspect of the present invention, there is also provided a computer device comprising a memory and a processor, the memory storing a computer program which, when executed by the processor, performs any of the methods described above.
The invention has at least the following beneficial technical effects:
1. the invention can limit the storage capacity of the storage volumes and the snapshots by presetting the upper capacity limit for the storage volumes and the snapshots in the storage pool so that the storage pool has spare storage capacity as a standby, thereby being beneficial to improving the reliability of data storage of the storage cluster system;
2. by performing corresponding operations on the storage volumes and the snapshots and calculating the pre-allocation capacity of the storage volumes and the snapshots according to preset rules based on the corresponding operations, the maximum pre-allocation storage capacity of the storage volumes or the snapshots during each operation can be reasonably estimated, the condition of insufficient storage capacity during data writing is avoided, and the usability of data storage of the storage cluster system is improved.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are necessary for the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention and that other embodiments may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a storage capacity management method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a storage capacity management system provided in accordance with an embodiment of the present invention;
FIG. 3 is a schematic diagram of a computer-readable storage medium implementing a storage capacity management method according to an embodiment of the present invention;
fig. 4 is a schematic hardware structure of a computer device for performing a storage capacity management method according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention will be described in further detail with reference to the accompanying drawings.
It should be noted that, in the embodiments of the present invention, all the expressions "first" and "second" are used to distinguish two non-identical entities with the same name or non-identical parameters, and it is noted that the "first" and "second" are only used for convenience of expression, and should not be construed as limiting the embodiments of the present invention. Furthermore, the terms "comprise" and "have," and any variations thereof, are intended to cover a non-exclusive inclusion, such as a process, method, system, article, or other step or unit that comprises a list of steps or units.
Based on the above object, a first aspect of the embodiments of the present invention proposes an embodiment of a storage capacity management method. Fig. 1 is a schematic diagram of an embodiment of a storage capacity management method provided by the present invention. As shown in fig. 1, the embodiment of the present invention includes the following steps:
step S10, taking the sum of the storage volumes in the storage pool and the allocatable storage capacities of the snapshots as the total allocation capacity, and setting an upper limit for the total allocation capacity based on the total storage capacity of the storage pool;
step S20, responding to corresponding operation on the storage volumes and/or the snapshots, acquiring the used storage capacities of the storage volumes and the snapshots in the storage pool, and calculating the pre-allocation storage capacities of the storage volumes and/or the snapshots through the used storage capacities and the upper limit based on the corresponding operation;
step S30, performing storage capacity management based on the pre-allocated storage capacity.
The embodiment of the invention is mainly applied to a storage cluster system, which is a storage system capable of converging storage spaces in a plurality of storage devices into a unified access interface and management interface for an application server. The storage space aggregate in the storage cluster system is a storage pool. The storage volume in this embodiment mainly refers to a thin volume, which does not occupy space after being created, and occupies space after a user writes data.
The embodiment of the invention can limit the storage capacity of the storage volumes and the snapshots by presetting the upper capacity limit for the storage volumes and the snapshots in the storage pool so that the storage pool has spare storage capacity as a standby, thereby being beneficial to improving the reliability of data storage of the storage cluster system; by performing corresponding operations on the storage volumes and the snapshots and calculating the pre-allocation capacity of the storage volumes and the snapshots according to preset rules based on the corresponding operations, the maximum pre-allocation storage capacity of the storage volumes or the snapshots during each operation can be reasonably estimated, the condition of insufficient storage capacity during data writing is avoided, and the usability of data storage of the storage cluster system is improved.
In some embodiments, in response to respective operations being performed on the storage volumes and/or snapshots, obtaining the used storage capacity of the storage volumes and snapshots in the storage pool and computing pre-allocated storage capacity of the storage volumes and/or snapshots based on the respective operations and the upper limit comprises: in response to creating a clone volume for a storage volume, the occupied storage capacity of the storage volume is taken as the pre-allocated storage capacity of the clone volume.
In this embodiment, since most of the data in the storage volume may need to be reused, in order to improve the data storage efficiency, the storage volume is directly copied, the copied volume is called a clone volume, and then the data to be changed is replaced with new data in the clone volume. When a clone volume needs to be created, storage space is planned for the clone volume in advance, specifically, the occupied storage capacity of a parent volume (storage volume) of the clone volume is taken as the pre-allocation storage capacity of the clone volume.
In some embodiments, in response to respective operations being performed on the storage volumes and/or snapshots, obtaining the used storage capacity of the storage volumes and snapshots in the storage pool and computing pre-allocated storage capacity of the storage volumes and/or snapshots based on the respective operations and the upper limit comprises: in response to creating a single snapshot for existing data in the storage volume, the storage capacity occupied by the existing data is taken as the pre-allocated storage capacity of the single snapshot.
In some embodiments, in response to respective operations being performed on the storage volumes and/or snapshots, obtaining the used storage capacity of the storage volumes and snapshots in the storage pool and computing pre-allocated storage capacity of the storage volumes and/or snapshots based on the respective operations and the upper limit further comprises: in response to creating a plurality of snapshots for existing data in a storage volume, storage capacity occupied by the existing data is taken as pre-allocated storage capacity for one of the plurality of snapshots, and pre-allocated capacity for the remaining snapshots is counted as zero.
In the above embodiment, when a snapshot is first created for existing data in a storage volume, if a single snapshot is created, the storage capacity occupied by the existing data is directly used as the pre-allocation storage capacity of the single snapshot; if a plurality of snapshots are created, one snapshot is selected, the storage capacity occupied by the existing data is used as the pre-allocation storage capacity of the selected snapshot, and if the creation time of the plurality of snapshots is different, the snapshot created first is selected as the pre-allocation storage capacity of the snapshot, and the pre-allocation capacity of the rest snapshots is zero. If the storage volume is a clone volume, the clone volume also calculates the pre-allocation capacity of its snapshot according to the rule.
In some embodiments, in response to respective operations being performed on the storage volumes and/or snapshots, obtaining the used storage capacity of the storage volumes and snapshots in the storage pool and computing pre-allocated storage capacity of the storage volumes and/or snapshots based on the respective operations and the upper limit further comprises: in response to deleting a snapshot of the occupied storage capacity, the occupied storage capacity of the snapshot is zeroed out and taken as the pre-allocated storage capacity of the new snapshot.
In this embodiment, when a snapshot that occupies the storage capacity is deleted, the data in the snapshot is transferred to a new snapshot, so that the occupied storage capacity of the snapshot is cleared, and then the capacity is taken as the pre-allocation capacity of the new snapshot. If the clone volume has a snapshot deleted, the pre-allocation capacity is also calculated according to the rule.
In some embodiments, in response to respective operations being performed on the storage volumes and/or snapshots, obtaining the used storage capacity of the storage volumes and snapshots in the storage pool and computing pre-allocated storage capacity of the storage volumes and/or snapshots based on the respective operations and the upper limit further comprises: in response to adding data to the storage volume, a snapshot is created for the added data and the storage capacity it occupies is taken as the pre-allocated storage capacity for the snapshot.
In this embodiment, when there is new written data in the storage volume, the new written data also needs to create a snapshot, and the storage capacity occupied by the new written data is used as the pre-allocation storage capacity of the created snapshot, which represents the real-time property of the snapshot. If there is a new write of data in the clone volume, the pre-allocation capacity is also calculated according to the rule.
In some embodiments, in response to respective operations being performed on the storage volumes and/or snapshots, obtaining the used storage capacity of the storage volumes and snapshots in the storage pool and computing pre-allocated storage capacity of the storage volumes and/or snapshots based on the respective operations and the upper limit further comprises: in response to modifying data for a storage volume, a snapshot is created for the modified data and the storage capacity it occupies is taken as the pre-allocated storage capacity for the snapshot.
In this embodiment, after the data in the storage volume is changed, the data in the change portion also needs to create a snapshot, where the pre-allocation capacity of the snapshot is the storage capacity occupied by the data in the change portion. If there is a data change in the clone volume, the pre-allocation capacity is also calculated according to the rule.
If some of the newly written data in the storage volume is changed and other data is newly added, creating a snapshot for the newly written data, wherein the pre-allocation storage capacity of the snapshot is the storage capacity occupied by the changed data plus the storage capacity occupied by the newly added data.
In some embodiments, setting an upper limit for the total allocated capacity based on the total storage capacity of the storage pools comprises: and setting an upper limit for the total storage capacity of the storage pool according to a preset capacity allocation ratio.
In this embodiment, a capacity allocation ratio is set for the storage pool, and the total allocation capacity is the product of the total storage capacity of the storage pool and the capacity allocation ratio, and then the total allocable capacity of the storage volume and the snapshot must not exceed the total allocation capacity.
In a second aspect of the embodiment of the present invention, a storage capacity management system is also provided. Fig. 2 is a schematic diagram of an embodiment of a storage capacity management system provided by the present invention. As shown in fig. 2, a storage capacity management system includes: a capacity upper limit setting module 10 configured to take the sum of the allocatable storage capacities of the storage volumes and the snapshots in the storage pool as a total allocation capacity, and set an upper limit for the total allocation capacity based on the total storage capacity of the storage pool; a capacity pre-allocation module 20 configured to, in response to a corresponding operation on the storage volumes and/or snapshots, obtain the used storage capacities of the storage volumes and snapshots in the storage pool and calculate pre-allocated storage capacities of the storage volumes and/or snapshots based on the corresponding operation and the upper limit; and a capacity management module 30 configured to perform storage capacity management based on the pre-allocated storage capacity.
The storage capacity management system of the embodiment of the invention can limit the storage capacity of the storage volumes and the snapshots by presetting the upper limit of the capacity for the storage volumes and the snapshots in the storage pool so that the storage pool has spare storage capacity as a standby, thereby being beneficial to improving the reliability of data storage of the storage cluster system; by performing corresponding operations on the storage volumes and the snapshots and calculating the pre-allocation capacity of the storage volumes and the snapshots according to preset rules based on the corresponding operations, the maximum pre-allocation storage capacity of the storage volumes or the snapshots during each operation can be reasonably estimated, the condition of insufficient storage capacity during data writing is avoided, and the usability of data storage of the storage cluster system is improved.
In some embodiments, the capacity pre-allocation module 20 includes a capacity calculation module configured to, in response to creating a single snapshot for existing data in the storage volume, take the storage capacity occupied by the existing data as the pre-allocated storage capacity for the single snapshot.
In some embodiments, the capacity calculation module is further configured to, in response to creating the plurality of snapshots for existing data in the storage volume, take storage capacity occupied by the existing data as pre-allocated storage capacity for one of the plurality of snapshots, and count pre-allocated capacity for remaining snapshots to zero.
In some embodiments, the capacity calculation module is further configured to zero out the occupied storage capacity of the snapshot and take it as the pre-allocated storage capacity of the new snapshot in response to deleting the snapshot of occupied storage capacity.
In some embodiments, the capacity calculation module is further configured to, in response to adding data to the storage volume, create a snapshot for the added data and take the storage capacity it occupies as the pre-allocated storage capacity for the snapshot.
In some embodiments, the capacity calculation module is further configured to, in response to modifying data for the storage volume, create a snapshot for the modified data and take the storage capacity it occupies as the pre-allocated storage capacity for the snapshot.
In some embodiments, the capacity calculation module is further configured to, in response to creating a clone volume for a storage volume, treat the occupied storage capacity of the storage volume as pre-allocated storage capacity of the clone volume.
In some embodiments, the capacity upper limit setting module 10 includes a capacity allocation ratio module configured to set an upper limit for a total storage capacity of the storage pool according to a preset capacity allocation ratio for the total allocated capacity.
In a third aspect of the embodiments of the present invention, there is further provided a computer readable storage medium, and fig. 3 is a schematic diagram of the computer readable storage medium implementing a storage capacity management method according to an embodiment of the present invention. As shown in fig. 3, the computer-readable storage medium 3 stores computer program instructions 31, which computer program instructions 31 when executed implement the steps of:
taking the sum of the storage volumes in the storage pool and the allocatable storage capacities of the snapshots as a total allocation capacity, and setting an upper limit for the total allocation capacity based on the total storage capacity of the storage pool;
in response to performing a corresponding operation on the storage volumes and/or snapshots, acquiring used storage capacities of the storage volumes and snapshots in the storage pool, and calculating pre-allocated storage capacities of the storage volumes and/or snapshots based on the corresponding operation by the used storage capacities and the upper limit;
and performing storage capacity management based on the pre-allocated storage capacity.
In some embodiments, in response to respective operations being performed on the storage volumes and/or snapshots, obtaining the used storage capacity of the storage volumes and snapshots in the storage pool and computing pre-allocated storage capacity of the storage volumes and/or snapshots based on the respective operations and the upper limit comprises: in response to creating a single snapshot for existing data in the storage volume, the storage capacity occupied by the existing data is taken as the pre-allocated storage capacity of the single snapshot.
In some embodiments, in response to respective operations being performed on the storage volumes and/or snapshots, obtaining the used storage capacity of the storage volumes and snapshots in the storage pool and computing pre-allocated storage capacity of the storage volumes and/or snapshots based on the respective operations and the upper limit further comprises: in response to creating a plurality of snapshots for existing data in a storage volume, storage capacity occupied by the existing data is taken as pre-allocated storage capacity for one of the plurality of snapshots, and pre-allocated capacity for the remaining snapshots is counted as zero.
In some embodiments, in response to respective operations being performed on the storage volumes and/or snapshots, obtaining the used storage capacity of the storage volumes and snapshots in the storage pool and computing pre-allocated storage capacity of the storage volumes and/or snapshots based on the respective operations and the upper limit further comprises: in response to deleting a snapshot of the occupied storage capacity, the occupied storage capacity of the snapshot is zeroed out and taken as the pre-allocated storage capacity of the new snapshot.
In some embodiments, in response to respective operations being performed on the storage volumes and/or snapshots, obtaining the used storage capacity of the storage volumes and snapshots in the storage pool and computing pre-allocated storage capacity of the storage volumes and/or snapshots based on the respective operations and the upper limit further comprises: in response to adding data to the storage volume, a snapshot is created for the added data and the storage capacity it occupies is taken as the pre-allocated storage capacity for the snapshot.
In some embodiments, in response to respective operations being performed on the storage volumes and/or snapshots, obtaining the used storage capacity of the storage volumes and snapshots in the storage pool and computing pre-allocated storage capacity of the storage volumes and/or snapshots based on the respective operations and the upper limit further comprises: in response to modifying data for a storage volume, a snapshot is created for the modified data and the storage capacity it occupies is taken as the pre-allocated storage capacity for the snapshot.
In some embodiments, in response to respective operations being performed on the storage volumes and/or snapshots, obtaining the used storage capacity of the storage volumes and snapshots in the storage pool and computing pre-allocated storage capacity of the storage volumes and/or snapshots based on the respective operations and the upper limit further comprises: in response to creating a clone volume for a storage volume, the occupied storage capacity of the storage volume is taken as the pre-allocated storage capacity of the clone volume.
In some embodiments, setting an upper limit for the total allocated capacity based on the total storage capacity of the storage pools comprises: and setting an upper limit for the total storage capacity of the storage pool according to a preset capacity allocation ratio.
It should be understood that all of the embodiments, features and advantages set forth above with respect to the storage capacity management method according to the present invention equally apply to the storage capacity management system and storage medium according to the present invention, without conflicting therewith.
In a fourth aspect of the embodiments of the present invention, there is also provided a computer device comprising a memory 402 and a processor 401, the memory storing a computer program which, when executed by the processor, implements the method of any of the embodiments described above.
As shown in fig. 4, a schematic hardware structure of an embodiment of a computer device for performing a storage capacity management method according to the present invention is shown. Taking the example of a computer device as shown in fig. 4, a processor 401 and a memory 402 are included in the computer device, and may further include: an input device 403 and an output device 404. The processor 401, memory 402, input device 403, and output device 404 may be connected by a bus or otherwise, for example in fig. 4. The input device 403 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the storage capacity management system. The output 404 may include a display device such as a display screen.
The memory 402 is used as a non-volatile computer readable storage medium for storing a non-volatile software program, a non-volatile computer executable program, and modules, such as program instructions/modules corresponding to the storage capacity management method in the embodiments of the present application. Memory 402 may include a storage program area that may store an operating system, at least one application program required for functionality, and a storage data area; the storage data area may store data created using the storage capacity management method, and the like. In addition, memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, memory 402 may optionally include memory located remotely from processor 401, which may be connected to the local module via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The processor 401 executes various functional applications of the server and data processing, that is, implements the storage capacity management method of the above-described method embodiment, by running nonvolatile software programs, instructions, and modules stored in the memory 402.
Finally, it should be noted that the computer-readable storage media (e.g., memory) herein can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory. By way of example, and not limitation, nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM), which acts as external cache memory. By way of example, and not limitation, RAM may be available in a variety of forms such as synchronous RAM (DRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The storage devices of the disclosed aspects are intended to comprise, without being limited to, these and other suitable types of memory.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as software or hardware depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
The foregoing is an exemplary embodiment of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosed embodiments may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
It should be understood that as used herein, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items. The foregoing embodiment of the present invention has been disclosed with reference to the number of embodiments for the purpose of description only, and does not represent the advantages or disadvantages of the embodiments.
Those of ordinary skill in the art will appreciate that: the above discussion of any embodiment is merely exemplary and is not intended to imply that the scope of the disclosure of embodiments of the invention, including the claims, is limited to such examples; combinations of features of the above embodiments or in different embodiments are also possible within the idea of an embodiment of the invention, and many other variations of the different aspects of the embodiments of the invention as described above exist, which are not provided in detail for the sake of brevity. Therefore, any omission, modification, equivalent replacement, improvement, etc. of the embodiments should be included in the protection scope of the embodiments of the present invention.

Claims (9)

1. A storage capacity management method, comprising the steps of:
taking the sum of the storage volumes in the storage pool and the allocatable storage capacities of the snapshots as a total allocation capacity, and setting an upper limit for the total allocation capacity based on the total storage capacity of the storage pool;
in response to performing a corresponding operation on the storage volumes and/or snapshots, obtaining used storage capacities of the storage volumes and snapshots in the storage pool, and calculating pre-allocated storage capacities of the storage volumes and/or snapshots by the used storage capacities and the upper limit based on the corresponding operation; it comprises the following steps:
in response to creating a plurality of snapshots for existing data in a storage volume, taking storage capacity occupied by the existing data as pre-allocated storage capacity of one snapshot of the plurality of snapshots, and counting pre-allocated capacity of remaining snapshots as zero;
and performing storage capacity management based on the pre-allocated storage capacity.
2. The method of claim 1, wherein, in response to respective operations on storage volumes and/or snapshots, obtaining a used storage capacity of storage volumes and snapshots in the storage pool and calculating a pre-allocated storage capacity of storage volumes and/or snapshots based on the respective operations by the used storage capacity and the upper limit comprises:
in response to creating a single snapshot for existing data in a storage volume, storage capacity occupied by the existing data is taken as pre-allocated storage capacity for the single snapshot.
3. The method of claim 1, wherein, in response to respective operations on storage volumes and/or snapshots, obtaining a used storage capacity of storage volumes and snapshots in the storage pool and calculating a pre-allocated storage capacity of storage volumes and/or snapshots based on the respective operations by the used storage capacity and the upper bound further comprises:
in response to deleting a snapshot of the occupied storage capacity, the occupied storage capacity of the snapshot is zeroed out and taken as the pre-allocated storage capacity of the new snapshot.
4. The method of claim 1, wherein obtaining the used storage capacity of storage volumes and snapshots in the storage pool and calculating pre-allocated storage capacity of storage volumes and/or snapshots based on the corresponding operations by the used storage capacity and the upper limit further comprises:
in response to adding data to a storage volume, a snapshot is created for the added data and the storage capacity occupied by the snapshot is taken as the pre-allocated storage capacity of the snapshot.
5. The method of claim 1, wherein, in response to respective operations on storage volumes and/or snapshots, obtaining a used storage capacity of storage volumes and snapshots in the storage pool and calculating a pre-allocated storage capacity of storage volumes and/or snapshots based on the respective operations by the used storage capacity and the upper bound further comprises:
in response to modifying data for a storage volume, a snapshot is created for the modified data and the storage capacity it occupies is taken as the pre-allocated storage capacity for the snapshot.
6. The method of claim 1, wherein, in response to respective operations on storage volumes and/or snapshots, obtaining a used storage capacity of storage volumes and snapshots in the storage pool and calculating a pre-allocated storage capacity of storage volumes and/or snapshots based on the respective operations by the used storage capacity and the upper bound further comprises:
in response to creating a clone volume for a storage volume, the occupied storage capacity of the storage volume is taken as a pre-allocated storage capacity of the clone volume.
7. The method of claim 1, wherein setting an upper limit for the total allocated capacity based on a total storage capacity of the storage pool comprises:
and setting an upper limit for the total allocation capacity of the storage pool according to a preset capacity allocation ratio.
8. A storage capacity management system, comprising:
a capacity upper limit setting module configured to take a sum of allocatable storage capacities of storage volumes and snapshots in a storage pool as a total allocation capacity, and set an upper limit for the total allocation capacity based on the total storage capacity of the storage pool;
a capacity pre-allocation module configured to, in response to a corresponding operation on a storage volume and/or snapshot, obtain a used storage capacity of the storage volume and/or snapshot in the storage pool, and calculate a pre-allocated storage capacity of the storage volume and/or snapshot from the used storage capacity and the upper limit based on the corresponding operation; it is further configured to, in response to creating a plurality of snapshots for existing data in a storage volume, take storage capacity occupied by the existing data as pre-allocated storage capacity for one snapshot of the plurality of snapshots, and count pre-allocated capacity for remaining snapshots to zero; and
and the capacity management module is configured to perform storage capacity management based on the pre-allocated storage capacity.
9. A computer readable storage medium, characterized in that computer program instructions are stored, which when executed implement the method of any of claims 1-7.
CN202110625894.3A 2021-06-04 2021-06-04 Storage capacity management method, system and storage medium Active CN113419672B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110625894.3A CN113419672B (en) 2021-06-04 2021-06-04 Storage capacity management method, system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110625894.3A CN113419672B (en) 2021-06-04 2021-06-04 Storage capacity management method, system and storage medium

Publications (2)

Publication Number Publication Date
CN113419672A CN113419672A (en) 2021-09-21
CN113419672B true CN113419672B (en) 2023-06-13

Family

ID=77713849

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110625894.3A Active CN113419672B (en) 2021-06-04 2021-06-04 Storage capacity management method, system and storage medium

Country Status (1)

Country Link
CN (1) CN113419672B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114610243B (en) * 2022-03-21 2024-06-25 苏州浪潮智能科技有限公司 Method, system, storage medium and equipment for converting thin volume
CN117236899B (en) * 2023-10-17 2024-05-28 广西北投声远科技股份公司 Electronic file information release system based on mobile terminal

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103020201A (en) * 2012-12-06 2013-04-03 浪潮电子信息产业股份有限公司 Storage pool capable of automatically simplifying configuration for storage system and organization and management method
CN103106150A (en) * 2013-02-22 2013-05-15 浪潮电子信息产业股份有限公司 Method capable of achieving automatic simplifying configuration and automatic simplifying distribution for storage system
CN103744622A (en) * 2014-01-10 2014-04-23 浪潮电子信息产业股份有限公司 Method for realizing asynchronous full allocation of automatic thin provisioning of storage system
CN104731517A (en) * 2013-12-19 2015-06-24 中国移动通信集团四川有限公司 Method and device for allocating capacity of storage pool
CN104915146A (en) * 2014-03-14 2015-09-16 中兴通讯股份有限公司 Resource distribution method and device based on automatic thin provisioning
CN105190567A (en) * 2013-03-06 2015-12-23 戴尔产品有限公司 System and method for managing storage system snapshots
CN106020715A (en) * 2015-03-31 2016-10-12 国际商业机器公司 Storage pool capacity management
CN107436727A (en) * 2016-05-26 2017-12-05 中兴通讯股份有限公司 The memory space management and device of simplification volume
CN109542727A (en) * 2018-11-19 2019-03-29 郑州云海信息技术有限公司 A kind of information cuing method and device
CN109739688A (en) * 2018-12-18 2019-05-10 杭州宏杉科技股份有限公司 Snapshot Resources space management, device, electronic equipment
CN109739778A (en) * 2019-01-08 2019-05-10 郑州云海信息技术有限公司 A kind of memory allocation method, system and the associated component of simplification volume
CN110007858A (en) * 2019-03-13 2019-07-12 新华三技术有限公司成都分公司 Memory allocation method and device
CN111221475A (en) * 2020-01-04 2020-06-02 苏州浪潮智能科技有限公司 Storage space management method, device, equipment and readable medium

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103020201A (en) * 2012-12-06 2013-04-03 浪潮电子信息产业股份有限公司 Storage pool capable of automatically simplifying configuration for storage system and organization and management method
CN103106150A (en) * 2013-02-22 2013-05-15 浪潮电子信息产业股份有限公司 Method capable of achieving automatic simplifying configuration and automatic simplifying distribution for storage system
CN105190567A (en) * 2013-03-06 2015-12-23 戴尔产品有限公司 System and method for managing storage system snapshots
CN104731517A (en) * 2013-12-19 2015-06-24 中国移动通信集团四川有限公司 Method and device for allocating capacity of storage pool
CN103744622A (en) * 2014-01-10 2014-04-23 浪潮电子信息产业股份有限公司 Method for realizing asynchronous full allocation of automatic thin provisioning of storage system
CN104915146A (en) * 2014-03-14 2015-09-16 中兴通讯股份有限公司 Resource distribution method and device based on automatic thin provisioning
CN106020715A (en) * 2015-03-31 2016-10-12 国际商业机器公司 Storage pool capacity management
CN107436727A (en) * 2016-05-26 2017-12-05 中兴通讯股份有限公司 The memory space management and device of simplification volume
CN109542727A (en) * 2018-11-19 2019-03-29 郑州云海信息技术有限公司 A kind of information cuing method and device
CN109739688A (en) * 2018-12-18 2019-05-10 杭州宏杉科技股份有限公司 Snapshot Resources space management, device, electronic equipment
CN109739778A (en) * 2019-01-08 2019-05-10 郑州云海信息技术有限公司 A kind of memory allocation method, system and the associated component of simplification volume
CN110007858A (en) * 2019-03-13 2019-07-12 新华三技术有限公司成都分公司 Memory allocation method and device
CN111221475A (en) * 2020-01-04 2020-06-02 苏州浪潮智能科技有限公司 Storage space management method, device, equipment and readable medium

Also Published As

Publication number Publication date
CN113419672A (en) 2021-09-21

Similar Documents

Publication Publication Date Title
CN107943421B (en) Partition division method and device based on distributed storage system
CN113419672B (en) Storage capacity management method, system and storage medium
CN115543696B (en) Disk array reconstruction task acceleration method, system, storage medium and equipment
CN112269661B (en) Partition migration method and device based on Kafka cluster
CN108694076A (en) Multinode storage operation
CN108319618B (en) Data distribution control method, system and device of distributed storage system
CN112256433B (en) Partition migration method and device based on Kafka cluster
CN113535708A (en) Data deduplication method, system, storage medium and equipment
CN110968647A (en) Data storage method and device, computer equipment and storage medium
CN110750517B (en) Data processing method, device and equipment of local storage engine system
CN113076063B (en) Directory quota pre-application method, system, storage medium and equipment
CN117687569A (en) Disk performance optimization method, system, electronic equipment and storage medium
CN114610243B (en) Method, system, storage medium and equipment for converting thin volume
CN111124751A (en) Data recovery method and system, data storage node and database management node
CN111339144A (en) Method, system, terminal and storage medium for generating distributed unique ID
CN113259474B (en) Storage management method, system, storage medium and equipment
CN110532533B (en) Form precision collocation method, device, computer equipment and storage medium
CN114721814A (en) Task allocation method and device based on shared stack and computer equipment
CN110865901B (en) Method and device for building EC (embedded control) strip
EP3166027A1 (en) Method and apparatus for determining hot page in database
CN114327246A (en) Data storage method in storage medium, storage medium and computer equipment
CN113806011B (en) Cluster resource control method and device, cluster and computer readable storage medium
CN110362510B (en) Dynamic stack allocation method, device, computer equipment and storage medium
CN117291384B (en) Project progress adjustment method, device, equipment and medium based on resource allocation
CN111158605B (en) Method and device for optimizing disk storage policy of operating system and intelligent equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant