+

CN114168074A - Mirror image storage method, device, storage medium and electronic equipment - Google Patents

Mirror image storage method, device, storage medium and electronic equipment Download PDF

Info

Publication number
CN114168074A
CN114168074A CN202111415476.8A CN202111415476A CN114168074A CN 114168074 A CN114168074 A CN 114168074A CN 202111415476 A CN202111415476 A CN 202111415476A CN 114168074 A CN114168074 A CN 114168074A
Authority
CN
China
Prior art keywords
mirror image
storage space
target
client
storage
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.)
Granted
Application number
CN202111415476.8A
Other languages
Chinese (zh)
Other versions
CN114168074B (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 Kingsoft Cloud Network Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network 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 Kingsoft Cloud Network Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN202111415476.8A priority Critical patent/CN114168074B/en
Publication of CN114168074A publication Critical patent/CN114168074A/en
Application granted granted Critical
Publication of CN114168074B publication Critical patent/CN114168074B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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 OR CALCULATING; 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 OR CALCULATING; 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 OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45504Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Human Computer Interaction (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明公开了一种镜像存储方法、装置、存储介质以及电子设备。该方法包括:接收客户端的镜像上传请求,其中,镜像上传请求用于请求上传目标镜像;向云磁盘管理模块发送创建请求,其中,创建请求用于请求云磁盘管理模块在存储区域网络中创建用于存储目标镜像的第一存储空间;在云磁盘管理模块创建第一存储空间后,将第一存储空间与客户端本地连接;将客户端本地的目标镜像的镜像数据写入到第一存储空间中;在镜像数据写入完成后,断开第一存储空间与客户端本地的连接,将目标镜像的镜像元数据写入到数据库中。本发明解决了存储镜像效率低的技术问题。

Figure 202111415476

The invention discloses a mirror storage method, device, storage medium and electronic equipment. The method includes: receiving an image upload request from a client, wherein the image upload request is used for requesting to upload a target image; sending a creation request to a cloud disk management module, wherein the creation request is used for requesting the cloud disk management module to create an image in the storage area network in the first storage space for storing the target image; after the cloud disk management module creates the first storage space, the first storage space is locally connected to the client; the mirror data of the local target image of the client is written into the first storage space in; after the mirror data is written, disconnect the local connection between the first storage space and the client, and write the mirror metadata of the target mirror into the database. The invention solves the technical problem of low storage mirror efficiency.

Figure 202111415476

Description

Mirror image storage method, device, storage medium and electronic equipment
Technical Field
The invention relates to the field of computers, in particular to a mirror image storage method, a mirror image storage device, a mirror image storage medium and electronic equipment.
Background
In the prior art, when the mirror image is uploaded to the storage space, the mirror image is generally stored in the distributed storage or the mirror image is stored in a third-party storage, and a method for uploading the mirror image in the storage area network does not exist in the prior art, so that the efficiency of storing the mirror image is low.
Disclosure of Invention
The embodiment of the invention provides a mirror image storage method, a mirror image storage device, a storage medium and electronic equipment, and aims to at least solve the technical problem of low mirror image storage efficiency.
According to an aspect of an embodiment of the present invention, there is provided a mirror storage method for a storage area network, including: receiving a mirror image uploading request of a client, wherein the mirror image uploading request is used for requesting to upload a target mirror image; sending a creation request to a cloud disk management module, wherein the creation request is used for requesting the cloud disk management module to create a first storage space for storing the target image in a storage area network; after the cloud disk management module creates the first storage space, locally connecting the first storage space with the client; writing mirror image data of the target mirror image local to the client into the first storage space; and after the mirror image data is written, disconnecting the first storage space from the local client, and writing the mirror image metadata of the target mirror image into a database.
According to another aspect of the embodiments of the present invention, there is provided a mirror storage device of a storage area network, including: the system comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving a mirror image uploading request of a client, and the mirror image uploading request is used for requesting to upload a target mirror image; the system comprises a sending module, a creating module and a storage area network, wherein the sending module is used for sending a creating request to a cloud disk management module, and the creating request is used for requesting the cloud disk management module to create a first storage space for storing the target image in the storage area network; the first creating module is used for locally connecting the first storage space with the client after the cloud disk management module creates the first storage space; a write-in module, configured to write mirror image data of the target mirror image local to the client into the first storage space; and the processing module is used for disconnecting the first storage space from the local connection of the client after the mirror image data is written in, and writing the mirror image metadata of the target mirror image into a database.
As an optional example, the processing module includes: the first processing unit is used for disconnecting the connection when the writing of the last byte of the mirror image data is finished, and writing the mirror image metadata of the mirror image data into a database; or the second processing unit is used for disconnecting the connection after a preset time after the last byte of the mirror image data is written into the database, and writing the mirror image metadata of the mirror image data into the database.
As an optional example, the creating module includes: the identification unit is used for identifying a target field in the mirror image uploading request, wherein the target field is used for marking a target object for creating the first storage space; a sending unit, configured to send the creation request to the cloud disk management module when the target field indicates that the target object is the cloud disk management module.
As an optional example, the apparatus further includes: the configuration module is used for configuring the corresponding relation between the fields and the objects in the configuration file;
the storage module is used for storing the newly added corresponding relation into the configuration file under the condition of receiving a newly added instruction for newly adding the corresponding relation; or the deleting module is used for deleting the corresponding relation indicated by the deleting instruction in the configuration file under the condition of receiving the deleting instruction for deleting the corresponding relation.
As an optional example, the apparatus further includes: an obtaining module, configured to obtain a creation request after writing image data of the target image local to a client into the first storage space, where the creation request is used to request to create a virtual machine; a determining module, configured to determine, among all images in the storage area network, a first image used for creating the virtual machine; and the second creating module is used for creating the virtual machine by using the first image.
As an optional example, the determining module includes: a searching unit, configured to search, according to a target identifier of a mirror image included in the creation request, a mirror image of which a mirror image identifier is the same as the target identifier, from among all mirror images in the storage area network; and the determining unit is used for determining the searched mirror image as the first mirror image.
As an optional example, the second creating module includes: a mapping unit, configured to map the first image in the first storage space into a second storage space, so as to create the virtual machine.
In the embodiment of the invention, a mirror image uploading request of a receiving client is adopted, wherein the mirror image uploading request is used for requesting to upload a target mirror image; sending a creation request to a cloud disk management module, wherein the creation request is used for requesting the cloud disk management module to create a first storage space for storing the target image in a storage area network; after the cloud disk management module creates the first storage space, locally connecting the first storage space with the client; writing mirror image data of the target mirror image local to the client into the first storage space; in the method, when the mirror image is stored, a creation request is sent to a cloud disk management module, the cloud disk management module sends the creation request to open up a first storage space in a storage area network, connection is established between the first storage space and the client, and the mirror image is written into the first storage space to store the mirror image, so that the aim of improving the efficiency of the storage mirror image is fulfilled, and the technical problem of low efficiency of the storage mirror image is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a flow chart of an alternative storage area network mirroring method according to an embodiment of the present invention;
FIG. 2 is a flow diagram of an alternative storage area network mirroring method according to an embodiment of the present invention;
fig. 3 is a schematic view of an upload mirror of an alternative mirror storage method of a storage area network according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a generative virtual machine of an alternative storage area network mirroring storage method according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an alternative storage area network mirror storage device according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, 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 invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to a first aspect of the embodiments of the present invention, there is provided a mirror storage method for a storage area network, optionally, as shown in fig. 1, the method includes:
s102, receiving a mirror image uploading request of a client, wherein the mirror image uploading request is used for requesting to upload a target mirror image;
s104, sending a creation request to a cloud disk management module, wherein the creation request is used for requesting the cloud disk management module to create a first storage space for storing a target image in a storage area network;
s106, after the cloud disk management module creates the first storage space, the first storage space is locally connected with the client;
s108, writing mirror image data of a local target mirror image of the client into a first storage space;
and S110, after the mirror image data is written, disconnecting the first storage space from the local client, and writing the mirror image metadata of the target mirror image into the database.
Optionally, the present embodiment may be, but is not limited to, applied to a process of storing an image. The image in this embodiment may be a template in which an operating system has been installed for creating virtual machines, and the virtual machines may be created in batch by the image.
Optionally, a Storage Area Network (SAN) in this embodiment adopts a Fibre Channel (Fibre Channel) technology, and connects the Storage array and the server host through a Fibre Channel switch, so as to establish an Area Network dedicated to data Storage.
Optionally, in this embodiment, when the client wants to upload the image, the client may receive an image upload request of the client, send a creation request to the cloud disk management module, create a first storage space in the storage area network by the cloud disk management module, connect the first storage space with the client, and write image data of the client into the first storage space after the connection. And after the writing is finished, disconnecting the connection, and writing the mirror pixel data into the database.
In the method, when the mirror image is stored, the creation request is sent to the cloud disk management module, the cloud disk management module sends the creation request to open up the first storage space in the storage area network, the connection is established between the first storage space and the client, and the mirror image is written into the first storage space to store the mirror image, so that the aim of improving the efficiency of the storage mirror image is fulfilled.
As an alternative example, after the mirror image data is written, disconnecting the first storage space from the local client, and writing the mirror image metadata of the target mirror image into the database includes:
when the last byte of the mirror image data is written, disconnecting the connection, and writing the mirror image metadata of the mirror image data into the database; or
And after the preset time after the last byte of the mirror image data is written, disconnecting the connection, and writing the mirror image metadata of the mirror image data into the database.
Optionally, in this embodiment, if the target image is uploaded to the first storage space, the connection relationship may be disconnected immediately, or may be disconnected after a predetermined time period. The immediate disconnection relation can reduce the occupation of bandwidth, and the disconnection relation after a preset time can improve the accuracy of uploading the target mirror image.
As an optional example, sending the creation request to the cloud disk management module includes:
identifying a target field in the mirror image uploading request, wherein the target field is used for marking a target object for creating the first storage space;
and sending a creation request to the cloud disk management module under the condition that the target field indicates that the target object is the cloud disk management module.
In this embodiment, the storage location to which the first storage space is to be allocated may be marked by a character flag in the allocation statement. For example, the allocation statement is analyzed, the character mark in the allocation statement is analyzed, and if the character mark is the target character mark, the first storage space is allocated in the storage area network. If the character tag is other character tags, for example, the first character tag, then the first storage space is allocated in the distributed network. For example, if the character mark is the second character mark, the first storage space is allocated in the direct connection type storage. The allocation of the first storage space to the storage target image is determined by setting different character flags in the allocation statement.
Optionally, in this embodiment, the location of the first storage space in the storage area network or the size of the first storage space may also be determined according to characters in the allocation statement. Different characters correspond to different positions or sizes.
As an optional example, the method further includes:
configuring the corresponding relation between the fields and the objects in the configuration file;
under the condition that a new instruction for adding the corresponding relation is received, the newly added corresponding relation is stored in a configuration file; or
And in the case of receiving a deleting instruction for deleting the corresponding relation, deleting the corresponding relation indicated by the deleting instruction in the configuration file.
Optionally, the configuration file in this embodiment includes an allocation statement, and a character flag in the allocation statement may be adjusted. In this embodiment, before the first storage space is allocated, the character flag in the allocation statement may be adjusted to be the target character flag, so that the adjusted allocation statement may be used to allocate the first storage space for the target mirror image. The content in the configuration file may be modified according to the add instruction and the delete instruction.
As an optional example, after writing the image data of the target image local to the client into the first storage space, the method further includes:
acquiring a creating request, wherein the creating request is used for requesting to create a virtual machine;
determining a first image for creating a virtual machine in all images in a storage area network;
a virtual machine is created using the first image.
Optionally, in this embodiment, after the target image is stored in the first storage space, a creation request may be received, where the creation request is used to request creation of a virtual machine. After receiving a creation request to create a virtual machine, an image corresponding to the virtual machine to be created may be determined. Different images correspondingly create different virtual machines. And determining a first image of the virtual machine to be created according to the creation request, and then creating the virtual machine through the first image.
As an alternative example, determining the first image for creating the virtual machine among all images in the storage area network comprises:
searching the mirror image with the mirror image mark same as the target mark in all the mirror images in the storage area network according to the target mark of the mirror image contained in the creating request;
and determining the searched mirror image as a first mirror image.
Optionally, in this embodiment, the first image to be used for creating the virtual machine may be determined according to a target flag of the image included in the creation request. After the creation request is acquired, acquiring a target mark of a mirror image in the creation request, then comparing the mark with mirror image marks of all mirror images, determining a mirror image with the same mark as the target mark from all mirror images, and using the mirror image as a first mirror image to create the virtual machine.
As an alternative example, creating a virtual machine using a first image includes:
the first image in the first storage space is mapped into the second storage space, thereby creating a virtual machine.
Optionally, in this embodiment, after determining to create the first image of the virtual machine, the first image is stored in the first storage space. The first image may be mapped into a second storage space, thereby creating a virtual machine.
Optionally, in this embodiment, the management system includes a work service, which is used to manage the image, and a shader component, which is used to manage the cloud disk. A cloud disk (volume) is a hard disk device that can provide storage space for a virtual machine.
Fig. 2 is a flowchart of the present embodiment. As shown in S202 to S212 in fig. 2, after receiving a request for uploading an image sent by a client, reading, by the angle, to the store according to the aforementioned angle. conf file, that the store configuration is ring, sending a create volume request to the ring, waiting for the completion of creating the volume by the ring, connecting the volume to the local by the angle, then writing the image file data into the volume, and after the completion of writing, disconnecting the volume connection and writing the image metadata into the database. The mirror metadata stores attribute information of the mirror file written into the volume, and the attribute information may include various attributes such as the size, storage location, and storage date of the mirror file.
In this embodiment, a gland _ store file may be configured, and default _ store may be configured as a shader. The company _ conf file is a file for determining a storage space, that is, the configuration file, the default _ store ═ circular statement is the allocation statement, and the circular is the target character mark.
The configuration code is as follows:
[glance_store]
#Which backend scheme should glance use by default is not
#in a request to add a new image to glanceKnown schemes
#by the stores option below
#Default:‘file’
default_store=cinder
the character mark can be configured to be a target character mark through the code.
Fig. 3 is a schematic diagram of a storage target image receiving an upload request according to the present embodiment. In fig. 3, both the client 1 and the client 2 send mirror image upload requests to the server, the server receives the mirror image upload requests, allocates first storage spaces for the client 1 and the client 2 in the storage area network, establishes connection between the storage area network and the client, and uploads the mirror images to the storage area network.
Fig. 4 is a schematic diagram of the present embodiment that a virtual machine is created upon receiving a creation request. In fig. 4, after receiving a creation request, a first image for creating a virtual machine is determined from the plurality of images, and the virtual machine is created using the first image map.
In the embodiment, the circle component can be used as a storage mirror image drive of the pane, the storage drive of the circle is SAN storage, a request for creating a volume is sent to the circle every time when the mirror image pane is uploaded, then mirror image data can be written into the volume created by the circle.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
According to another aspect of the embodiments of the present application, there is also provided a mirror storage device of a storage area network, as shown in fig. 5, including:
a receiving module 502, configured to receive a mirror image upload request of a client, where the mirror image upload request is used to request to upload a target mirror image;
a sending module 504, configured to send a creation request to the cloud disk management module, where the creation request is used to request the cloud disk management module to create a first storage space for storing a target image in a storage area network;
the first creating module 506 is configured to locally connect the first storage space with the client after the cloud disk management module creates the first storage space;
a writing module 508, configured to write mirror image data of a local target mirror image of the client into the first storage space;
and the processing module 510 is configured to disconnect the local connection between the first storage space and the client after the mirror image data is written, and write the mirror image metadata of the target mirror image into the database.
Optionally, the present embodiment may be, but is not limited to, applied to a process of storing an image. The image in this embodiment may be a template in which an operating system has been installed for creating virtual machines, and the virtual machines may be created in batch by the image.
Optionally, a Storage Area Network (SAN) in this embodiment adopts a Fibre Channel (Fibre Channel) technology, and connects the Storage array and the server host through a Fibre Channel switch, so as to establish an Area Network dedicated to data Storage.
Optionally, in this embodiment, when the client wants to upload the image, the client may receive an image upload request of the client, send a creation request to the cloud disk management module, create a first storage space in the storage area network by the cloud disk management module, connect the first storage space with the client, and write image data of the client into the first storage space after the connection. And after the writing is finished, disconnecting the connection, and writing the mirror pixel data into the database.
In the method, when the mirror image is stored, the creation request is sent to the cloud disk management module, the cloud disk management module sends the creation request to open up the first storage space in the storage area network, the connection is established between the first storage space and the client, and the mirror image is written into the first storage space to store the mirror image, so that the aim of improving the efficiency of the storage mirror image is fulfilled.
As an optional implementation, the processing module includes:
the first processing unit is used for disconnecting the connection when the last byte of the mirror image data is written into the database, and writing the mirror image metadata of the mirror image data into the database; or
And the second processing unit is used for disconnecting the connection after the preset time after the last byte of the mirror image data is written into the database, and writing the mirror image metadata of the mirror image data into the database.
Optionally, in this embodiment, if the target image is uploaded to the first storage space, the connection relationship may be disconnected immediately, or may be disconnected after a predetermined time period. The immediate disconnection relation can reduce the occupation of bandwidth, and the disconnection relation after a preset time can improve the accuracy of uploading the target mirror image.
As an optional implementation, the creating module includes:
the identification unit is used for identifying a target field in the mirror image uploading request, wherein the target field is used for marking a target object for creating the first storage space;
and the sending unit is used for sending a creation request to the cloud disk management module under the condition that the target field indicates that the target object is the cloud disk management module.
In this embodiment, the storage location to which the first storage space is to be allocated may be marked by a character flag in the allocation statement. For example, the allocation statement is analyzed, the character mark in the allocation statement is analyzed, and if the character mark is the target character mark, the first storage space is allocated in the storage area network. If the character tag is other character tags, for example, the first character tag, then the first storage space is allocated in the distributed network. For example, if the character mark is the second character mark, the first storage space is allocated in the direct connection type storage. The allocation of the first storage space to the storage target image is determined by setting different character flags in the allocation statement.
Optionally, in this embodiment, the location of the first storage space in the storage area network or the size of the first storage space may also be determined according to characters in the allocation statement. Different characters correspond to different positions or sizes.
As an optional implementation, the apparatus further includes:
the configuration module is used for configuring the corresponding relation between the fields and the objects in the configuration file;
the storage module is used for storing the newly added corresponding relation into the configuration file under the condition of receiving a newly added instruction of the newly added corresponding relation; or
And the deleting module is used for deleting the corresponding relation indicated by the deleting instruction in the configuration file under the condition of receiving the deleting instruction for deleting the corresponding relation.
Optionally, the configuration file in this embodiment includes an allocation statement, and a character flag in the allocation statement may be adjusted. In this embodiment, before the first storage space is allocated, the character flag in the allocation statement may be adjusted to be the target character flag, so that the adjusted allocation statement may be used to allocate the first storage space for the target mirror image. The content in the configuration file may be modified according to the add instruction and the delete instruction.
As an optional implementation, the apparatus further includes:
the system comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring a creation request after image data of a local target image of a client is written into a first storage space, and the creation request is used for requesting to create a virtual machine;
the system comprises a determining module, a judging module and a judging module, wherein the determining module is used for determining a first mirror image used for creating a virtual machine in all mirror images in a storage area network;
a second creation module to create a virtual machine using the first image.
Optionally, in this embodiment, after the target image is stored in the first storage space, a creation request may be received, where the creation request is used to request creation of a virtual machine. After receiving a creation request to create a virtual machine, an image corresponding to the virtual machine to be created may be determined. Different images correspondingly create different virtual machines. And determining a first image of the virtual machine to be created according to the creation request, and then creating the virtual machine through the first image.
As an optional implementation, the determining module includes:
a searching unit, configured to search, according to the target identifier of the mirror image included in the creation request, a mirror image whose mirror image identifier is the same as the target identifier in all mirror images in the storage area network;
and the determining unit is used for determining the searched mirror image as a first mirror image.
Optionally, in this embodiment, the first image to be used for creating the virtual machine may be determined according to a target flag of the image included in the creation request. After the creation request is acquired, acquiring a target mark of a mirror image in the creation request, then comparing the mark with mirror image marks of all mirror images, determining a mirror image with the same mark as the target mark from all mirror images, and using the mirror image as a first mirror image to create the virtual machine.
As an optional implementation manner, the second creating module includes:
and the mapping unit is used for mapping the first mirror image in the first storage space into the second storage space so as to create the virtual machine.
Optionally, in this embodiment, after determining to create the first image of the virtual machine, the first image is stored in the first storage space. The first image may be mapped into a second storage space, thereby creating a virtual machine.
According to still another aspect of the embodiments of the present invention, there is also provided an electronic device for implementing the mirror storage method of the storage area network, where the electronic device may include a memory and a processor, the memory stores therein a computer program, and the processor is configured to execute the steps in the mirror storage method of the storage area network through the computer program.
According to still another aspect of embodiments of the present invention, there is also provided a computer-readable storage medium having a computer program stored therein, wherein the computer program is configured to execute the steps in the mirror image storage method of the storage area network when running.
Alternatively, in this embodiment, a person skilled in the art may understand that all or part of the steps in the methods of the foregoing embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing one or more computer devices (which may be personal computers, servers, network devices, etc.) to execute all or part of the steps of the method according to the embodiments of the present invention.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (10)

1. A method of mirrored storage, comprising:
receiving a mirror image uploading request of a client, wherein the mirror image uploading request is used for requesting to upload a target mirror image;
sending a creation request to a cloud disk management module, wherein the creation request is used for requesting the cloud disk management module to create a first storage space for storing the target image in a storage area network;
after the cloud disk management module creates the first storage space, locally connecting the first storage space with the client;
writing mirror image data of the target mirror image local to the client into the first storage space;
and after the mirror image data is written, disconnecting the first storage space from the local client, and writing the mirror image metadata of the target mirror image into a database.
2. The method of claim 1, wherein disconnecting the first storage space from the local client after the mirror image data is written into the database, and writing the mirror image data of the target mirror image into the database comprises:
when the last byte of the mirror image data is written, disconnecting the connection, and writing the mirror image metadata of the mirror image data into a database; or
And after the preset time after the last byte of the mirror image data is written into the database, disconnecting the connection and writing the mirror image metadata of the mirror image data into the database.
3. The method of claim 1, wherein sending a create request to a cloud disk management module comprises:
identifying a target field in the mirror image uploading request, wherein the target field is used for marking a target object for creating the first storage space;
and sending the creation request to the cloud disk management module under the condition that the target field indicates that the target object is the cloud disk management module.
4. The method of claim 3, further comprising:
configuring the corresponding relation between the fields and the objects in the configuration file;
under the condition that a new instruction for adding the corresponding relation is received, storing the newly added corresponding relation into the configuration file; or
And under the condition of receiving a deleting instruction for deleting the corresponding relation, deleting the corresponding relation indicated by the deleting instruction in the configuration file.
5. The method of any of claims 1 to 4, wherein after writing the image data of the target image local to the client into the first storage space, the method further comprises:
acquiring a creating request, wherein the creating request is used for requesting to create a virtual machine;
determining a first image for creating the virtual machine in all images in the storage area network;
creating the virtual machine using the first image.
6. The method of claim 5, wherein determining the first image for creating the virtual machine among all images in the storage area network comprises:
searching the mirror image with the mirror image mark same as the target mark in all the mirror images in the storage area network according to the target mark of the mirror image contained in the establishing request;
and determining the searched mirror image as the first mirror image.
7. The method of claim 5, wherein the creating the virtual machine using the first image comprises:
mapping the first image in the first storage space into a second storage space, thereby creating the virtual machine.
8. A mirrored storage device, comprising:
the system comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving a mirror image uploading request of a client, and the mirror image uploading request is used for requesting to upload a target mirror image;
the system comprises a sending module, a creating module and a storage area network, wherein the sending module is used for sending a creating request to a cloud disk management module, and the creating request is used for requesting the cloud disk management module to create a first storage space for storing the target image in the storage area network;
the first creating module is used for locally connecting the first storage space with the client after the cloud disk management module creates the first storage space;
the writing module is used for writing the mirror image data of the target mirror image local to the client into the first storage space;
and the processing module is used for disconnecting the first storage space from the local client after the mirror image data is written in, and writing the mirror image metadata of the target mirror image into a database.
9. A computer-readable storage medium, in which a computer program is stored, which computer program, when running, performs the method of any one of claims 1 to 7.
10. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 7 by means of the computer program.
CN202111415476.8A 2021-11-25 2021-11-25 Mirror image storage method, apparatus, storage medium and electronic device Active CN114168074B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111415476.8A CN114168074B (en) 2021-11-25 2021-11-25 Mirror image storage method, apparatus, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111415476.8A CN114168074B (en) 2021-11-25 2021-11-25 Mirror image storage method, apparatus, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN114168074A true CN114168074A (en) 2022-03-11
CN114168074B CN114168074B (en) 2025-07-25

Family

ID=80480628

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111415476.8A Active CN114168074B (en) 2021-11-25 2021-11-25 Mirror image storage method, apparatus, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN114168074B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116955219A (en) * 2023-09-13 2023-10-27 新华三信息技术有限公司 A data mirroring method, device, host and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010037371A1 (en) * 1997-04-28 2001-11-01 Ohran Michael R. Mirroring network data to establish virtual storage area network
CN1543135A (en) * 2003-11-07 2004-11-03 清华大学 Asynchronous Remote Mirroring Method Based on Load Adaptation in SAN System
US20060218360A1 (en) * 2005-03-22 2006-09-28 Burkey Todd R Method, apparatus and program storage device for providing an optimized read methodology for synchronously mirrored virtual disk pairs
US20080104321A1 (en) * 2007-08-14 2008-05-01 Cisco Technology, Inc. Fast write operations to a mirrored volume in a volume manager
US20080183922A1 (en) * 2007-01-31 2008-07-31 Kishore Kaniyar Sampathkumar Method, Apparatus And Software For Processing Input Or Output Requests For A Mirrored Storage Volume
US20090259817A1 (en) * 2001-12-26 2009-10-15 Cisco Technology, Inc. Mirror Consistency Checking Techniques For Storage Area Networks And Network Based Virtualization
CN109634718A (en) * 2018-12-13 2019-04-16 无锡华云数据技术服务有限公司 The method and system of cloud platform creation mirror image

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010037371A1 (en) * 1997-04-28 2001-11-01 Ohran Michael R. Mirroring network data to establish virtual storage area network
CN1520564A (en) * 2001-06-26 2004-08-11 Emc Mirror network data to create a virtual storage area network
US20090259817A1 (en) * 2001-12-26 2009-10-15 Cisco Technology, Inc. Mirror Consistency Checking Techniques For Storage Area Networks And Network Based Virtualization
CN1543135A (en) * 2003-11-07 2004-11-03 清华大学 Asynchronous Remote Mirroring Method Based on Load Adaptation in SAN System
US20060218360A1 (en) * 2005-03-22 2006-09-28 Burkey Todd R Method, apparatus and program storage device for providing an optimized read methodology for synchronously mirrored virtual disk pairs
US20080183922A1 (en) * 2007-01-31 2008-07-31 Kishore Kaniyar Sampathkumar Method, Apparatus And Software For Processing Input Or Output Requests For A Mirrored Storage Volume
US20080104321A1 (en) * 2007-08-14 2008-05-01 Cisco Technology, Inc. Fast write operations to a mirrored volume in a volume manager
CN101784990A (en) * 2007-08-14 2010-07-21 思科技术公司 Fast write operations to mirrored volumes in a volume manager
CN109634718A (en) * 2018-12-13 2019-04-16 无锡华云数据技术服务有限公司 The method and system of cloud platform creation mirror image

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116955219A (en) * 2023-09-13 2023-10-27 新华三信息技术有限公司 A data mirroring method, device, host and storage medium
CN116955219B (en) * 2023-09-13 2024-01-19 新华三信息技术有限公司 Data mirroring method, device, host and storage medium

Also Published As

Publication number Publication date
CN114168074B (en) 2025-07-25

Similar Documents

Publication Publication Date Title
CN105933376B (en) A data manipulation method, server and storage system
CN104618482B (en) Method, server, traditional storage device, system for accessing cloud data
US10977062B2 (en) System for starting virtual machine using mirror image file stored in units of a distributed block storage system mapped to units of a logical volume
CN104020961B (en) Distributed data storage method, apparatus and system
US10248598B2 (en) Intelligent storage device signal transmission method for backing up data on intelligent storage module based on system type of electronic device
WO2017107414A1 (en) File operation method and device
JP2012089094A5 (en)
US9940331B1 (en) Proactive scavenging of file system snaps
JP2003271429A (en) Storage device resource management method, storage resource management program, recording medium storing the program, and storage resource management device
CN107911461A (en) Object processing method, storage server and cloud storage system in cloud storage system
CN112785248B (en) Human resource data cross-organization interaction method, device, equipment and storage medium
CN110569218B (en) Offline modification method and device for EXT file system and storage medium
CN113688139A (en) Object storage method, gateway, device and medium
CN108536467A (en) Location processing method, device, terminal device and the storage medium of code
CN115563071A (en) Data processing method, system, electronic device and computer readable storage medium
CN113918519A (en) A kind of folder mounting method, device and terminal device
CN111803917B (en) Resource processing method and device
CN114168074A (en) Mirror image storage method, device, storage medium and electronic equipment
CN113486025B (en) Data storage method, data query method and device
CN113448946B (en) Data migration method and device and electronic equipment
CN109857519A (en) The processing method and relevant apparatus of virtual disk
CN113467823A (en) Configuration information acquisition method, device, system and storage medium
CN114356674B (en) Card opening method, card opening device and computer readable storage medium
CN117591018A (en) A request processing method and device in a distributed object storage system
CN114675776B (en) Resource storage method and device, storage medium and electronic device

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
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载