CN111880742B - Distributed storage volume creation method, system, device and computer medium - Google Patents

Distributed storage volume creation method, system, device and computer medium Download PDF

Info

Publication number
CN111880742B
CN111880742B CN202010745292.7A CN202010745292A CN111880742B CN 111880742 B CN111880742 B CN 111880742B CN 202010745292 A CN202010745292 A CN 202010745292A CN 111880742 B CN111880742 B CN 111880742B
Authority
CN
China
Prior art keywords
distributed storage
target
volume
storage volume
creation request
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
CN202010745292.7A
Other languages
Chinese (zh)
Other versions
CN111880742A (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.)
Beijing Inspur Data Technology Co Ltd
Original Assignee
Beijing Inspur Data Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Inspur Data Technology Co Ltd filed Critical Beijing Inspur Data Technology Co Ltd
Priority to CN202010745292.7A priority Critical patent/CN111880742B/en
Publication of CN111880742A publication Critical patent/CN111880742A/en
Application granted granted Critical
Publication of CN111880742B publication Critical patent/CN111880742B/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/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]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/185Hierarchical storage management [HSM] systems, e.g. file migration or policies thereof
    • 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/0644Management of space entities, e.g. partitions, extents, pools

Landscapes

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

Abstract

The application discloses a method, a system, equipment and a computer medium for creating a distributed storage volume, which are used for acquiring a target distributed storage volume creation request; judging whether the target distributed storage volume creation request is legal or not; if the target distributed storage volume creation request is legal, selecting a volume ID with an unused state as a target volume ID from preset volume IDs according to a preset requirement; based on the target volume ID, creating a target volume according to the target distributed storage volume creation request, and marking the state of the target volume ID as being used; judging whether the target volume is successfully created, if so, marking the state of the ID of the target volume as used; if the target volume is failed to be created, the state of the ID of the target volume is marked as unused; the initial state of the preset volume ID is unused. In the application, the unused, in-use and used states are set for each volume ID, so that the conflict situation of the volume IDs is avoided, and the success rate of volume creation can be improved.

Description

Distributed storage volume creation method, system, device and computer medium
Technical Field
The present application relates to the field of distributed storage technologies, and in particular, to a method, a system, a device, and a computer medium for creating a distributed storage volume.
Background
The distributed storage system is used for storing data on a plurality of independent devices in a distributed mode. The traditional network storage system adopts a centralized storage server to store all data, the storage server becomes the bottleneck of the system performance, is also the focus of reliability and safety, and cannot meet the requirement of large-scale storage application. The distributed network storage system adopts an expandable system structure, utilizes a plurality of storage servers to share storage load, utilizes the position server to position storage information, not only improves the reliability, the availability and the access efficiency of the system, but also is easy to expand, and the distributed network storage system is applied more and more.
In the application process of the distributed storage system, a distributed storage volume sometimes needs to be created, however, because there are a plurality of distributed storage nodes in the distributed storage system, a situation that the plurality of distributed storage nodes simultaneously require to create the distributed storage volume may occur, and at this time, a volume ID conflict may occur, so that the creation of the distributed storage volume fails.
In summary, how to increase the creation power of a distributed storage volume is an urgent problem to be solved by those skilled in the art.
Disclosure of Invention
The application aims to provide a method for creating a distributed storage volume, which can solve the technical problem of how to improve the success rate of creating the distributed storage volume to a certain extent. The application also provides a distributed storage volume creation system, a device and a computer readable storage medium.
In order to achieve the above purpose, the present application provides the following technical solutions:
a distributed storage volume creation method, comprising:
acquiring a target distributed storage volume establishing request;
judging whether the target distributed storage volume creation request is legal or not;
if the target distributed storage volume creation request is legal, selecting a volume ID with an unused state as a target volume ID from preset volume IDs according to a preset requirement;
based on the target volume ID, creating a target volume according to the target distributed storage volume creation request, and marking the state of the target volume ID as being used;
judging whether the target volume is successfully created, if so, marking the state of the ID of the target volume as used; if the target volume is failed to be created, the state of the target volume ID is marked as unused;
wherein the initial state of the preset volume ID is unused.
Preferably, after the marking of the status of the target volume ID as unused, the method further includes:
accumulating real-time times of the target volume creation failures;
judging whether the real-time times are smaller than preset times or not;
if the real-time times are smaller than the preset times, returning to execute the step of establishing the target volume according to the target distributed storage volume establishing request based on the target volume ID;
and if the real-time times are more than or equal to the preset times, prompting that the target volume is failed to be established.
Preferably, the obtaining of the target distributed storage volume creation request includes:
and selecting a distributed storage volume creation request from the circular buffer queue as the target distributed storage volume creation request.
Preferably, before selecting one of the requests for creating the distributed storage volume in the ring buffer queue as the request for creating the target distributed storage volume, the method further includes:
receiving a real-time distributed storage volume creation request sent by a distributed storage node;
according to a queue pointer of a distributed storage volume creation request to be processed in the annular buffer queue, creating a request distribution queue pointer for each distributed storage volume in the real-time distributed storage volume creation request;
adding the real-time distributed storage volume creation request to the annular buffer queue according to the queue pointer of the real-time distributed storage volume creation request, and updating the head pointer of the annular buffer queue;
after the marking the status of the target volume ID as unused, the method further includes:
and updating the tail pointer of the circular buffer queue.
Preferably, after the adding the real-time distributed storage volume creation request to the circular buffer queue according to the queue pointer of the real-time distributed storage volume creation request, the method further includes:
and setting the processing mode of the distributed storage volume creation request in the ring buffer queue as multithread processing.
Preferably, the selecting a request for creating a distributed storage volume in the ring buffer queue as the request for creating the target distributed storage volume includes:
judging whether a message representing that a distributed storage volume creation request is inserted into the annular buffer queue is received or not;
and if the message of inserting the characterization distributed storage volume creating request into the annular buffer queue is received, selecting one distributed storage volume creating request from the annular buffer queue as the target distributed storage volume creating request.
Preferably, the determining whether the target distributed storage volume creation request is legal includes:
and judging whether the volume information in the target distributed storage volume establishing request is legal or not.
A distributed storage volume creation system, comprising:
the first acquisition module is used for acquiring a target distributed storage volume creation request;
the first judgment module is used for judging whether the target distributed storage volume creation request is legal or not; if the target distributed storage volume creation request is legal, selecting a volume ID with an unused state as a target volume ID from preset volume IDs according to a preset requirement;
a first creation module, configured to create a target volume according to the target distributed storage volume creation request based on the target volume ID, and mark a state of the target volume ID as being used;
the second judgment module is used for judging whether the target volume is successfully established or not, and if the target volume is successfully established, the state of the ID of the target volume is marked as used; if the target volume is failed to be created, the state of the target volume ID is marked as unused;
wherein the initial state of the preset volume ID is unused.
A distributed storage volume creation device, comprising:
a memory for storing a computer program;
a processor configured to implement the steps of any of the above-described distributed storage volume creation methods when executing the computer program.
A computer readable storage medium having stored thereon a computer program which, when executed by a processor, carries out the steps of the distributed storage volume creation method as described in any one of the above.
According to the method for creating the distributed storage volume, a target distributed storage volume creation request is obtained; judging whether the target distributed storage volume creation request is legal or not; if the creation request of the target distributed storage volume is legal, selecting a volume ID with an unused state as a target volume ID from preset volume IDs according to preset requirements; based on the target volume ID, creating a target volume according to the target distributed storage volume creation request, and marking the state of the target volume ID as being used; judging whether the target volume is successfully created, if so, marking the state of the ID of the target volume as used; if the target volume is failed to be created, the state of the ID of the target volume is marked as unused; the initial state of the preset volume ID is unused. In the application, the unused, in-use and used states are set for each volume ID, and the volume ID in each selection state is set to be the unused volume ID to create the target volume, so that the situation that one volume ID is used for multiple times is avoided, the situation of volume ID conflict is avoided, and the success rate of volume creation can be improved. The system, the device and the computer readable storage medium for creating the distributed storage volume solve the corresponding technical problems.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the embodiments or the prior art descriptions will be briefly described below, it is obvious that the drawings in the following description are only the 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 creating a distributed storage volume according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of a distributed storage volume creation system according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a distributed storage volume creation apparatus according to an embodiment of the present application;
fig. 4 is another schematic structural diagram of a distributed storage volume creation apparatus 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, fig. 1 is a flowchart of a method for creating a distributed storage volume according to an embodiment of the present application.
The method for creating a distributed storage volume provided by the embodiment of the application can comprise the following steps:
step S101: a target distributed storage volume creation request is obtained.
In practical application, a target distributed storage volume creation request, that is, a request to create a distributed storage volume that needs to be processed, may be obtained first, and a data type of the target distributed storage volume creation request may be determined according to actual needs, for example, the target distributed storage volume creation request may include a size, a location, a type, and the like of a created target volume.
Step S102: judging whether the target distributed storage volume creation request is legal or not; if the target distributed storage volume creation request is legal, step S103 is executed.
Step S103: one volume ID that is unused in the state is selected as a target volume ID among preset volume IDs according to preset requirements.
In practical application, a situation that a subsequent target volume creation fails due to an illegal target storage volume creation request may occur, and in order to avoid such a situation, after the target distributed storage volume creation request is acquired, whether the target distributed storage volume creation request is legal or not may be judged; and if the target distributed storage volume creation request is legal, selecting a volume ID with an unused state as a target volume ID from preset volume IDs according to a preset requirement. The preset volume ID is also the ID which can be used by the preset volume, the type of the volume ID can be determined according to the actual requirement, such as numbers, characters and the like, and because the selected volume ID is in an unused state, the target volume ID can be ensured not to be used, and the volume ID collision of the target volume ID can be ensured not to occur.
Step S104: based on the target volume ID, the target volume is created according to the target distributed storage volume creation request, and the state of the target volume ID is marked as being used.
In practical application, after a volume ID with an unused state is selected from preset volume IDs as a target volume ID according to a preset requirement, a target volume can be created according to a target distributed storage volume creation request based on the target volume ID, and the state of the target volume ID is marked as being used. Since the target volume ID is in use, the target volume ID cannot be used by other volumes.
Step S105: judging whether the target volume is successfully created, if so, executing the step S106; if the target volume creation fails, step S107 is executed.
Step S106: the status of the target volume ID is marked as used.
Step S107: marking the status of the target volume ID as unused; the initial state of the preset volume ID is unused.
In practical application, whether the target volume is created successfully or not can influence the final state of the target volume ID, so that whether the target volume is created successfully or not can be judged after the target volume is created according to the target distributed storage volume creation request based on the target volume ID and the state of the target volume ID is marked as being used, and if the target volume is created successfully, the state of the target volume ID is marked as being used; if the target volume is failed to be created, the state of the ID of the target volume is marked as unused; the initial state of the preset volume ID is unused.
According to the method for creating the distributed storage volume, a target distributed storage volume creation request is obtained; judging whether the target distributed storage volume creation request is legal or not; if the creation request of the target distributed storage volume is legal, selecting a volume ID with an unused state as a target volume ID from preset volume IDs according to preset requirements; based on the target volume ID, creating a target volume according to the target distributed storage volume creation request, and marking the state of the target volume ID as being used; judging whether the target volume is successfully created, if so, marking the state of the ID of the target volume as used; if the target volume is failed to be created, the state of the ID of the target volume is marked as unused; the initial state of the preset volume ID is unused. In the application, the unused, in-use and used states are set for each volume ID, and the volume ID in each selection state is set to be the unused volume ID to create the target volume, so that the situation that one volume ID is used for multiple times is avoided, the conflict situation of the volume IDs is avoided, and the success rate of volume creation can be improved.
In the distributed storage volume creation method provided by the embodiment of the present application, because the condition that the state of the target volume ID is marked as unused occurs when the target volume is failed to be created, and the condition that the target volume is failed to be created is a result that is theoretically not allowed and is not desired by a user, in order to ensure that the target volume is successfully created, after the state of the target volume ID is marked as unused, the real-time number of times of the target volume creation failure can be accumulated; judging whether the real-time times are smaller than preset times or not; if the real-time times are less than the preset times, returning to the step of executing the creation of the target volume according to the creation request of the target distributed storage volume based on the ID of the target volume; and if the real-time times are more than or equal to the preset times, prompting that the target volume is failed to be established.
That is, when the target volume is failed to be created, the target volume may be tried to be created for a preset number of times, and the creation power of the target volume may be ensured as much as possible by trying to create the target volume multiple times.
In the method for creating a distributed storage volume provided in the embodiment of the present application, in the process of obtaining a target distributed storage volume creation request, one distributed storage volume creation request may be selected from the circular buffer queue as the target distributed storage volume creation request. That is, in practical applications, each of the distributed storage volume creation requests may be managed by a ring buffer queue.
In practical application, before a distributed storage volume creation request is selected from the annular buffer queue as a target distributed storage volume creation request, a real-time distributed storage volume creation request sent by a distributed storage node can be received; according to a queue pointer of a distributed storage volume creation request to be processed in the annular buffer queue, creating a request distribution queue pointer for each distributed storage volume in the real-time distributed storage volume creation request; adding the real-time distributed storage volume creation request to a circular buffer queue according to the queue pointer of the real-time distributed storage volume creation request, and updating the head pointer of the circular buffer queue; and updates the tail pointer of the ring buffer queue after marking the status of the target volume ID as unused.
In practical application, during the process of creating the distributed storage volume, the distributed storage volume may need to be created in batches, and at this time, in order to improve the success rate of creating the distributed storage volume, after the real-time distributed storage volume creation request is added to the ring buffer queue according to the queue pointer of the real-time distributed storage volume creation request, the processing mode of the distributed storage volume creation request in the ring buffer queue may also be set to be multithreading processing.
That is, the distributed storage volumes may be created in batches by means of multithreading, and in a specific application scenario, in order to facilitate the knowledge that the thread needs to process the distributed storage volume creation request, an insertion message representing the enqueuing of the creation task may be generated after the real-time distributed storage volume creation request is added to the ring buffer queue, and accordingly, after receiving the insertion message, the thread may actively obtain the distributed storage volume creation request that needs to be processed from the ring buffer queue. That is, in the process of selecting a distributed storage volume creation request from the circular buffer queue as a target distributed storage volume creation request, whether a message representing that the distributed storage volume creation request is inserted into the circular buffer queue is received or not can be judged; and if a message representing that the distributed storage volume creation request is inserted into the circular buffer queue is received, selecting one distributed storage volume creation request from the circular buffer queue as a target distributed storage volume creation request.
In the method for creating a distributed storage volume provided in the embodiment of the present application, in the process of determining whether a target distributed storage volume creation request is legal, it may be determined whether volume information in the target distributed storage volume creation request is legal. It may also be determined whether the state of the storage pool used by the target distributed storage volume creation request is legitimate, or the like.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a distributed storage volume creation system according to an embodiment of the present application.
The distributed storage volume creation system provided in the embodiment of the present application may include:
a first obtaining module 101, configured to obtain a target distributed storage volume creation request;
a first judging module 102, configured to judge whether a target distributed storage volume creation request is legal; if the target distributed storage volume creation request is legal, selecting a volume ID with an unused state as a target volume ID from preset volume IDs according to a preset requirement;
a first creating module 103, configured to create a target volume according to a target distributed storage volume creation request based on the target volume ID, and mark a state of the target volume ID as being used;
a second judging module 104, configured to judge whether the target volume is successfully created, and if the target volume is successfully created, mark the state of the target volume ID as used; if the target volume is failed to be created, the state of the ID of the target volume is marked as unused;
the initial state of the preset volume ID is unused.
The distributed storage volume creation system provided in the embodiment of the present application may further include:
the first accumulation module is used for accumulating the real-time times of the target volume creation failure after the second judgment module marks the state of the target volume ID as unused;
the third judging module is used for judging whether the real-time times are smaller than the preset times or not; if the real-time times are less than the preset times, returning to the step of executing the creation of the target volume according to the creation request of the target distributed storage volume based on the ID of the target volume; and if the real-time times are more than or equal to the preset times, prompting that the target volume is failed to be established.
In the distributed storage volume creation system provided in an embodiment of the present application, the first obtaining module may include:
the first obtaining unit is used for selecting one distributed storage volume creating request from the annular buffer queue as a target distributed storage volume creating request.
The system for creating a distributed storage volume provided in the embodiment of the present application may further include:
the first receiving unit is used for receiving a real-time distributed storage volume creation request sent by a distributed storage node before the first obtaining unit selects a distributed storage volume creation request as a target distributed storage volume creation request in the annular buffer queue;
the first allocation unit is used for creating a request allocation queue pointer for each distributed storage volume in the real-time distributed storage volume creation requests according to the queue pointer of the distributed storage volume creation requests to be processed in the annular buffer queue;
the first adding unit is used for adding the real-time distributed storage volume creation request to the annular buffer queue according to the queue pointer of the real-time distributed storage volume creation request and updating the head pointer of the annular buffer queue;
also includes;
and the first updating module is used for updating the queue tail pointer of the annular buffer queue after the first judging module marks the state of the target volume ID as unused.
The distributed storage volume creation system provided in the embodiment of the present application may further include:
and the first setting unit is used for setting the processing mode of the distributed storage volume creation request in the ring buffer queue to be multi-thread processing after the first adding unit adds the real-time distributed storage volume creation request to the ring buffer queue according to the queue pointer of the real-time distributed storage volume creation request.
In the distributed storage volume creation system provided in an embodiment of the present application, the first obtaining unit may include:
the first judging unit is used for judging whether a message representing that a distributed storage volume creation request is inserted into a ring buffer queue is received or not; and if a message representing that the distributed storage volume creation request is inserted into the circular buffer queue is received, selecting one distributed storage volume creation request from the circular buffer queue as a target distributed storage volume creation request.
In the distributed storage volume creation system provided in the embodiment of the present application, the first determining module may include:
and the second judging unit is used for judging whether the volume information in the target distributed storage volume establishing request is legal or not.
The application also provides a distributed storage volume creation device and a computer-readable storage medium, which both have the corresponding effects of the distributed storage volume creation method provided by the embodiment of the application. Referring to fig. 3, fig. 3 is a schematic structural diagram of a distributed storage volume creation apparatus according to an embodiment of the present application.
The distributed storage volume creation device provided by the embodiment of the application includes a memory 201 and a processor 202, where the memory 201 stores a computer program, and the processor 202 implements the following steps when executing the computer program:
acquiring a target distributed storage volume establishing request;
judging whether the target distributed storage volume creation request is legal or not;
if the target distributed storage volume creation request is legal, selecting a volume ID with an unused state as a target volume ID from preset volume IDs according to a preset requirement;
based on the target volume ID, creating a target volume according to the target distributed storage volume creation request, and marking the state of the target volume ID as being used;
judging whether the target volume is successfully created, if so, marking the state of the ID of the target volume as used; if the target volume is failed to be created, the state of the ID of the target volume is marked as unused;
the initial state of the preset volume ID is unused.
The distributed storage volume creation device provided in the embodiment of the present application includes a memory 201 and a processor 202, where the memory 201 stores a computer program, and the processor 202 implements the following steps when executing the computer program: after the status of the target volume ID is marked as unused, accumulating the real-time times of the target volume creation failure; judging whether the real-time times are smaller than preset times or not; if the real-time times are less than the preset times, returning to the step of executing the creation of the target volume according to the creation request of the target distributed storage volume based on the ID of the target volume; and if the real-time times are more than or equal to the preset times, prompting that the target volume is failed to be established.
The distributed storage volume creation device provided by the embodiment of the application includes a memory 201 and a processor 202, where the memory 201 stores a computer program, and the processor 202 implements the following steps when executing the computer program: and selecting one distributed storage volume creation request from the circular buffer queue as a target distributed storage volume creation request.
The distributed storage volume creation device provided by the embodiment of the application includes a memory 201 and a processor 202, where the memory 201 stores a computer program, and the processor 202 implements the following steps when executing the computer program: before selecting a distributed storage volume creation request as a target distributed storage volume creation request in an annular buffer queue, receiving a real-time distributed storage volume creation request sent by a distributed storage node; according to a queue pointer of a distributed storage volume creation request to be processed in the annular buffer queue, creating a request distribution queue pointer for each distributed storage volume in the real-time distributed storage volume creation request; adding the real-time distributed storage volume creation request to a circular buffer queue according to the queue pointer of the real-time distributed storage volume creation request, and updating the head pointer of the circular buffer queue; accordingly, after the status of the target volume ID is marked as unused, the tail pointer of the ring buffer queue is updated.
The distributed storage volume creation device provided by the embodiment of the application includes a memory 201 and a processor 202, where the memory 201 stores a computer program, and the processor 202 implements the following steps when executing the computer program: and according to the queue pointer of the real-time distributed storage volume creation request, after the real-time distributed storage volume creation request is added into the ring buffer queue, setting the processing mode of the distributed storage volume creation request in the ring buffer queue to be multi-thread processing.
The distributed storage volume creation device provided by the embodiment of the application includes a memory 201 and a processor 202, where the memory 201 stores a computer program, and the processor 202 implements the following steps when executing the computer program: judging whether a message representing that a distributed storage volume creation request is inserted into a ring buffer queue is received or not; and if a message representing that the distributed storage volume creation request is inserted into the circular buffer queue is received, selecting one distributed storage volume creation request from the circular buffer queue as a target distributed storage volume creation request.
The distributed storage volume creation device provided by the embodiment of the application includes a memory 201 and a processor 202, where the memory 201 stores a computer program, and the processor 202 implements the following steps when executing the computer program: and judging whether the volume information in the target distributed storage volume creation request is legal or not.
Referring to fig. 4, another distributed storage volume creation apparatus provided in the embodiment of the present application may further include: an input port 203 connected to the processor 202, for transmitting externally input commands to the processor 202; a display unit 204 connected to the processor 202, for displaying the processing result of the processor 202 to the outside; and the communication module 205 is connected with the processor 202 and is used for realizing the communication between the distributed storage volume creation device and the outside world. The display unit 204 may be a display panel, a laser scanning display, or the like; the communication method adopted by the communication module 205 includes, but is not limited to, mobile high definition link technology (HML), Universal Serial Bus (USB), High Definition Multimedia Interface (HDMI), and wireless connection: wireless fidelity technology (WiFi), bluetooth communication technology, bluetooth low energy communication technology, ieee802.11s based communication technology.
A computer-readable storage medium is provided in an embodiment of the present application, in which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the following steps:
acquiring a target distributed storage volume establishing request;
judging whether the target distributed storage volume creation request is legal or not;
if the target distributed storage volume creation request is legal, selecting a volume ID with an unused state as a target volume ID from preset volume IDs according to a preset requirement;
based on the target volume ID, creating a target volume according to the target distributed storage volume creation request, and marking the state of the target volume ID as being used;
judging whether the target volume is successfully created, if so, marking the state of the ID of the target volume as used; if the target volume is failed to be created, the state of the ID of the target volume is marked as unused;
the initial state of the preset volume ID is unused.
A computer-readable storage medium is provided in an embodiment of the present application, in which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the following steps: after the status of the target volume ID is marked as unused, accumulating the real-time times of the target volume creation failure; judging whether the real-time times are smaller than preset times or not; if the real-time times are smaller than the preset times, returning to the step of establishing the target volume according to the establishment request of the target distributed storage volume based on the target volume ID; and if the real-time times are more than or equal to the preset times, prompting that the target volume is failed to be established.
A computer-readable storage medium is provided in an embodiment of the present application, in which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the following steps: and selecting one distributed storage volume creation request from the circular buffer queue as a target distributed storage volume creation request.
A computer-readable storage medium provided in an embodiment of the present application stores a computer program, and when executed by a processor, the computer program implements the following steps: before selecting a distributed storage volume creation request from the annular buffer queue as a target distributed storage volume creation request, receiving a real-time distributed storage volume creation request sent by a distributed storage node; according to a queue pointer of a distributed storage volume creation request to be processed in the annular buffer queue, creating a request distribution queue pointer for each distributed storage volume in the real-time distributed storage volume creation request; adding the real-time distributed storage volume creation request to a circular buffer queue according to the queue pointer of the real-time distributed storage volume creation request, and updating the head pointer of the circular buffer queue; after the status of the target volume ID is marked as unused, the tail pointer of the ring buffer queue is updated.
A computer-readable storage medium is provided in an embodiment of the present application, in which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the following steps: and according to the queue pointer of the real-time distributed storage volume creation request, after the real-time distributed storage volume creation request is added into the ring buffer queue, setting the processing mode of the distributed storage volume creation request in the ring buffer queue to be multi-thread processing.
A computer-readable storage medium is provided in an embodiment of the present application, in which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the following steps: judging whether a message representing that a distributed storage volume creation request is inserted into a ring buffer queue is received or not; and if a message representing that the distributed storage volume creation request is inserted into the circular buffer queue is received, selecting one distributed storage volume creation request from the circular buffer queue as a target distributed storage volume creation request.
A computer-readable storage medium is provided in an embodiment of the present application, in which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the following steps: and judging whether the volume information in the target distributed storage volume creation request is legal or not.
The computer-readable storage media to which this application relates include Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage media known in the art.
For a description of a relevant part in the distributed storage volume creation system, the device, and the computer-readable storage medium provided in the embodiment of the present application, reference is made to detailed descriptions of a corresponding part in the distributed storage volume creation method provided in the embodiment of the present application, and details are not described here again. 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.
It is further 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. Also, 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 only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. 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.
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 creating a distributed storage volume, comprising:
acquiring a target distributed storage volume establishing request;
judging whether the target distributed storage volume creation request is legal or not;
if the target distributed storage volume creation request is legal, selecting a volume ID with an unused state as a target volume ID from preset volume IDs according to a preset requirement;
based on the target volume ID, creating a target volume according to the target distributed storage volume creation request, and marking the state of the target volume ID as being used;
judging whether the target volume is successfully created, if so, marking the state of the ID of the target volume as used; if the target volume is failed to be created, the state of the target volume ID is marked as unused;
wherein the initial state of the preset volume ID is unused.
2. The method of claim 1, wherein after the marking the status of the target volume ID as unused, further comprising:
accumulating real-time times of the target volume creation failures;
judging whether the real-time times are smaller than preset times or not;
if the real-time times are smaller than the preset times, returning to execute the step of establishing the target volume according to the target distributed storage volume establishing request based on the target volume ID;
and if the real-time times are more than or equal to the preset times, prompting that the target volume is failed to be established.
3. The method of claim 1, wherein obtaining the target distributed storage volume creation request comprises:
and selecting a distributed storage volume creation request from the circular buffer queue as the target distributed storage volume creation request.
4. The method of claim 3, wherein before selecting a distributed storage volume creation request in the ring buffer queue as the target distributed storage volume creation request, further comprising:
receiving a real-time distributed storage volume creation request sent by a distributed storage node;
according to a queue pointer of a distributed storage volume creation request to be processed in the annular buffer queue, creating a request distribution queue pointer for each distributed storage volume in the real-time distributed storage volume creation request;
adding the real-time distributed storage volume creation request to the annular buffer queue according to the queue pointer of the real-time distributed storage volume creation request, and updating the head pointer of the annular buffer queue;
after the marking the status of the target volume ID as unused, the method further includes:
and updating the tail pointer of the circular buffer queue.
5. The method of claim 4, wherein after adding the real-time distributed storage volume creation request to the circular buffer queue according to the queue pointer of the real-time distributed storage volume creation request, further comprising:
and setting the processing mode of the distributed storage volume creation request in the ring buffer queue as multithread processing.
6. The method of claim 5, wherein selecting a distributed storage volume creation request in a ring buffer queue as the target distributed storage volume creation request comprises:
judging whether a message representing that a distributed storage volume creation request is inserted into the annular buffer queue is received or not;
and if the message of inserting the characterization distributed storage volume creating request into the annular buffer queue is received, selecting one distributed storage volume creating request from the annular buffer queue as the target distributed storage volume creating request.
7. The method of claim 1, wherein determining whether the target distributed storage volume creation request is legitimate comprises:
and judging whether the volume information in the target distributed storage volume establishing request is legal or not.
8. A distributed storage volume creation system, comprising:
the first acquisition module is used for acquiring a target distributed storage volume creation request;
the first judgment module is used for judging whether the target distributed storage volume creation request is legal or not; if the target distributed storage volume creation request is legal, selecting a volume ID with an unused state as a target volume ID from preset volume IDs according to a preset requirement;
a first creation module, configured to create a target volume according to the target distributed storage volume creation request based on the target volume ID, and mark a state of the target volume ID as being used;
the second judgment module is used for judging whether the target volume is successfully established or not, and if the target volume is successfully established, the state of the ID of the target volume is marked as used; if the target volume is failed to be created, the state of the target volume ID is marked as unused;
wherein the initial state of the preset volume ID is unused.
9. A distributed storage volume creation apparatus, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the distributed storage volume creation method of any of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the distributed storage volume creation method according to any one of claims 1 to 7.
CN202010745292.7A 2020-07-29 2020-07-29 Distributed storage volume creation method, system, device and computer medium Active CN111880742B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010745292.7A CN111880742B (en) 2020-07-29 2020-07-29 Distributed storage volume creation method, system, device and computer medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010745292.7A CN111880742B (en) 2020-07-29 2020-07-29 Distributed storage volume creation method, system, device and computer medium

Publications (2)

Publication Number Publication Date
CN111880742A CN111880742A (en) 2020-11-03
CN111880742B true CN111880742B (en) 2022-06-17

Family

ID=73201085

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010745292.7A Active CN111880742B (en) 2020-07-29 2020-07-29 Distributed storage volume creation method, system, device and computer medium

Country Status (1)

Country Link
CN (1) CN111880742B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105630702A (en) * 2015-12-18 2016-06-01 浪潮(北京)电子信息产业有限公司 Logical volume creation method and system
CN107391224A (en) * 2017-06-09 2017-11-24 华为技术有限公司 A kind of creation method of virtual volume, hanging method and device
CN109284209A (en) * 2018-09-06 2019-01-29 郑州云海信息技术有限公司 The automated testing method of different type Vdisk under a kind of Mcs system
CN109558264A (en) * 2018-12-12 2019-04-02 浪潮(北京)电子信息产业有限公司 A kind of volume information method of calibration, system and the associated component of virtual volume
CN111273869A (en) * 2020-01-20 2020-06-12 苏州浪潮智能科技有限公司 Distributed storage system performance optimization method, system, electronic device and medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9817723B2 (en) * 2014-04-02 2017-11-14 International Business Machines Corporation Efficient FlashCopy backup and mount, clone, or restore collision avoidance using dynamic volume allocation with reuse
US10846116B2 (en) * 2016-03-11 2020-11-24 Red Hat Israel, Ltd. Correcting a volume chain after a volume creation failure is detected
US10379835B2 (en) * 2016-12-19 2019-08-13 International Business Machines Corporation Optimized creation of distributed storage and distributed processing clusters on demand

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105630702A (en) * 2015-12-18 2016-06-01 浪潮(北京)电子信息产业有限公司 Logical volume creation method and system
CN107391224A (en) * 2017-06-09 2017-11-24 华为技术有限公司 A kind of creation method of virtual volume, hanging method and device
CN109284209A (en) * 2018-09-06 2019-01-29 郑州云海信息技术有限公司 The automated testing method of different type Vdisk under a kind of Mcs system
CN109558264A (en) * 2018-12-12 2019-04-02 浪潮(北京)电子信息产业有限公司 A kind of volume information method of calibration, system and the associated component of virtual volume
CN111273869A (en) * 2020-01-20 2020-06-12 苏州浪潮智能科技有限公司 Distributed storage system performance optimization method, system, electronic device and medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Nancy Lange ; Ted Thomas;.Storage: Jurisdictional conflicts and state options.《MRS Energy & Sustainability》.2019,E4. *
面向虚拟机的分布式块存储系统设计及实现;贾博文等;《微型电脑应用》;20150331(第03期);第32-37页 *

Also Published As

Publication number Publication date
CN111880742A (en) 2020-11-03

Similar Documents

Publication Publication Date Title
CN106777164B (en) Data migration cluster and data migration method
CN109379448B (en) File distributed deployment method and device, electronic equipment and storage medium
CN112134763B (en) Method, system, equipment and medium for transmitting layered messages among cluster nodes
WO2016116013A1 (en) Software upgrade method and system
CN110417876B (en) Session method, node server in distributed system and master control equipment
CN108445788A (en) A kind of hotel's scenery control method and relevant apparatus
CN109995595B (en) RGW quota determining method, system, equipment and computer medium
CN107967150B (en) Method, device, equipment and storage medium for determining thread execution sequence
CN111880742B (en) Distributed storage volume creation method, system, device and computer medium
CN103299298B (en) The method and system of process business
CN106790354B (en) Communication method and device for preventing data congestion
US20180069768A1 (en) Method and apparatus for establishing interface between vnfms, and system
CN103634877B (en) Without the management method of access point in the network of access controller and access point apparatus
CN110888892A (en) Block synchronization method, device and storage medium
CN110895521A (en) OSD and MON connection method, device, equipment and storage medium
CN102684865A (en) Method, system and device for data synchronization
CN107710793A (en) A kind of localization method and corresponding intrument
CN108090087B (en) File processing method and device
CN111970091A (en) Communication method, system, equipment and computer readable storage medium
CN106302184B (en) Flow entry issuing method, flow entry storing method, related device and system
EP3346671A1 (en) Service processing method and equipment
CN107506491B (en) OSD data distribution method and device of distributed file system
CN104869532B (en) Group member management method and device
CN110661655B (en) Cluster deployment method and system, electronic device and storage medium
JP2007221522A (en) Polling device, terminal device, polling method and program

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