CN114579036B - Storage device management method and related device - Google Patents
Storage device management method and related device Download PDFInfo
- Publication number
- CN114579036B CN114579036B CN202011384867.3A CN202011384867A CN114579036B CN 114579036 B CN114579036 B CN 114579036B CN 202011384867 A CN202011384867 A CN 202011384867A CN 114579036 B CN114579036 B CN 114579036B
- Authority
- CN
- China
- Prior art keywords
- storage device
- instruction
- control
- physical machine
- management
- 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
Links
- 238000007726 management method Methods 0.000 title claims abstract description 215
- 238000000034 method Methods 0.000 claims abstract description 31
- 238000004891 communication Methods 0.000 claims description 6
- 238000010586 diagram Methods 0.000 description 11
- 238000012545 processing Methods 0.000 description 11
- 230000005540 biological transmission Effects 0.000 description 7
- 238000005516 engineering process Methods 0.000 description 5
- 230000004044 response Effects 0.000 description 5
- 238000004590 computer program Methods 0.000 description 4
- 238000012544 monitoring process Methods 0.000 description 4
- 230000002688 persistence Effects 0.000 description 3
- 230000006978 adaptation Effects 0.000 description 2
- 238000006243 chemical reaction Methods 0.000 description 2
- 230000002085 persistent effect Effects 0.000 description 2
- 239000000523 sample Substances 0.000 description 2
- 230000002547 anomalous effect Effects 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 210000001503 joint Anatomy 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0604—Improving or facilitating administration, e.g. storage management
- G06F3/0605—Improving or facilitating administration, e.g. storage management by facilitating the interaction with a user or administrator
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0629—Configuration or reconfiguration of storage systems
- G06F3/0631—Configuration or reconfiguration of storage systems by allocating resources to storage systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/067—Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The disclosure relates to a storage device management method and related devices, wherein the method comprises the following steps: the physical machine receives a storage device control instruction sent by a control instance of the control device, and the control device runs at least one control instance for acquiring the storage device control instruction from an instruction queue and sending the storage device control instruction, wherein the storage device control instruction in the instruction queue is generated by the control device and stored in the instruction queue; the physical machine generates a storage device management instruction based on the storage device control instruction; the physical machine sends a storage device management instruction to the storage device server, so that the storage device server manages the first target storage device based on the storage device management instruction. The method and the device can realize that the storage device is mounted in the physical machine or unloaded from the physical machine, and a virtual machine is not required to be arranged on the physical machine first, so that the method and the device are simple and convenient.
Description
Technical Field
The disclosure relates to the technical field of storage device management, and in particular relates to a storage device management method and related devices.
Background
With the development of technology, the storage space of electronic devices such as computers is larger and larger, but many times, the requirements cannot be met.
By adding the cloud hard disk, the storage space can be rapidly increased for the electronic equipment. Whether the cloud hard disk is added, deleted or otherwise managed, a technology for managing the cloud hard disk needs to be developed. Currently, technicians have developed techniques for managing cloud hard disks of virtual machines.
However, for a physical machine without a virtual machine, there is no technology for managing a cloud hard disk of the physical machine, which makes it necessary for a technician to first set the virtual machine on the physical machine, and then use a technology for managing the cloud hard disk of the virtual machine to increase and manage a storage space, which is complicated.
Disclosure of Invention
The disclosure provides a storage device management method and related devices, so as to at least solve the problem of complicated cloud hard disk management of a physical machine in the related technology. The technical scheme of the present disclosure is as follows:
in a first aspect, a storage device management method is applied to a physical machine, where the physical machine is respectively connected with a control device and a storage device server in a communication manner, and the storage device management method includes:
the physical machine receives a storage device control instruction sent by a control instance of the control device, wherein the control device runs at least one control instance for acquiring the storage device control instruction from an instruction queue and sending the storage device control instruction, and the storage device control instruction in the instruction queue is generated by the control device and stored in the instruction queue;
The physical machine generates a storage device management instruction based on the storage device control instruction;
and the physical machine sends the storage device management instruction to the storage device server so that the storage device server manages the first target storage device based on the storage device management instruction.
With reference to the first aspect, in certain optional embodiments, the method further includes:
the physical machine obtains a storage device management result returned by the storage device server;
and the physical machine sets the device state identifier of the first target storage device and/or sets the corresponding relation between the first target storage device and the physical machine according to the storage device management result.
With reference to the first aspect, in some optional embodiments, the storage device control instruction is a storage device mount instruction or a storage device off-load instruction,
the method further comprises the steps of:
when the storage device control instruction is the storage device mounting instruction and a storage device management result returned by the storage device server, which is obtained by the physical machine, is that mounting is successful, displaying an icon of an access inlet of the first target storage device by the physical machine;
And/or when the storage device control instruction is the storage device unloading instruction and the storage device management result returned by the storage device server obtained by the physical machine is that the unloading is successful, stopping displaying the icon of the access entrance of the first target storage device by the physical machine.
With reference to the first aspect, in some optional embodiments, the generating, by the physical machine, storage device management instructions based on the storage device control instructions includes:
the physical machine obtains the instruction type in the storage device control instruction and the device information of the first target storage device, and generates a storage device management instruction containing the identification of the physical machine, the instruction type and the device information.
In a second aspect, a storage device management method is applied to a control device, where the control device is communicatively connected to a physical machine, and the physical machine is also communicatively connected to a storage device server, and the control device runs at least one control instance, and the storage device management method includes:
the control device generates at least one storage device control instruction and stores the generated storage device control instruction into an instruction queue;
The control instance in the control device obtains the storage device control instruction from the instruction queue and sends the storage device control instruction to the physical machine related to the storage device control instruction, so that the physical machine generates a storage device management instruction based on the storage device control instruction and sends the storage device management instruction to the storage device server, and further the storage device server manages a first target storage device based on the storage device management instruction.
With reference to the second aspect, in some optional embodiments, the control device generates at least one storage device control instruction, and stores the generated storage device control instruction in an instruction queue, including:
the control device obtains multiple sets of input storage device control information, generates a storage device control instruction according to each set of storage device control information, and stores the generated storage device control instruction into an instruction queue.
In a third aspect, a storage device management method is applied to a control device, where the control device is communicatively connected to a storage device server, and the control device runs at least one control instance, and the storage device management method includes:
The control device generates at least one storage device control instruction and stores the generated storage device control instruction into an instruction queue;
the control instance in the control device obtains the storage device control instruction from the instruction queue, when the obtained storage device control instruction is a storage device establishment instruction, a second target storage device is determined according to the obtained storage device establishment instruction, and a device state identifier of the second target storage device is set as a first state identifier;
the control instance in the control device generates a storage device creation instruction based on the storage device creation instruction, and sends the storage device creation instruction to the storage device server;
and after the control equipment determines that the second target storage equipment is successfully created, setting the equipment state identifier of the second target storage equipment as a second state identifier.
In a fourth aspect, a physical machine is communicatively connected to a control device and a storage device server, respectively, and includes: an instruction receiving unit, a first instruction generating unit and a first instruction transmitting unit,
The instruction receiving unit is configured to execute a storage device control instruction sent by a control instance of the control device, wherein the control device runs at least one control instance for acquiring the storage device control instruction from an instruction queue and sending the storage device control instruction, and the storage device control instruction in the instruction queue is generated by the control device and stored in the instruction queue;
the first instruction generating unit is configured to execute a storage device management instruction based on the storage device control instruction;
the first instruction transmitting unit is configured to transmit the storage device management instruction to the storage device server, so that the storage device server manages a first target storage device based on the storage device management instruction.
With reference to the fourth aspect, in some optional embodiments, the physical machine further includes: a result obtaining unit and a relation setting unit,
the result obtaining unit is configured to obtain a storage device management result returned by the storage device server;
the relation setting unit is configured to execute setting of the device state identifier of the first target storage device and/or setting of the corresponding relation between the first target storage device and the physical machine according to the storage device management result.
With reference to the fourth aspect, in some optional embodiments, the storage device control instruction is a storage device mount instruction or a storage device off-load instruction,
the physical machine further includes: a first display control unit and/or a second display control unit,
the first display control unit is configured to perform: when the storage device control instruction is the storage device mounting instruction and a storage device management result returned by the storage device server, which is obtained by the physical machine, is that mounting is successful, displaying an icon of an access inlet of the first target storage device;
the second display control unit is configured to perform: and stopping displaying the icon of the access entrance of the first target storage device when the storage device control instruction is the storage device unloading instruction and the storage device management result returned by the storage device server obtained by the physical machine is that the unloading is successful.
With reference to the fourth aspect, in certain optional embodiments, the first instruction generating unit is specifically configured to perform: and obtaining the instruction type in the storage device control instruction and the device information of the first target storage device, and generating a storage device management instruction containing the identification of the physical machine, the instruction type and the device information.
In a fifth aspect, a control device, the control device communicatively coupled to a physical machine, the physical machine further communicatively coupled to a storage device server, the control device running at least one control instance, the control device comprising: a second instruction generating unit and a second instruction transmitting unit,
the second instruction generating unit is configured to execute and generate at least one storage device control instruction, and store the generated storage device control instruction into an instruction queue;
the second instruction sending unit is configured to control the control instance to obtain the storage device control instruction from the instruction queue and send the storage device control instruction to the physical machine related to the storage device control instruction, so that the physical machine generates a storage device management instruction based on the storage device control instruction and sends the storage device management instruction to the storage device server, and further, the storage device server manages a target storage device based on the storage device management instruction.
With reference to the fifth aspect, in certain optional embodiments, the second instruction generating unit is specifically configured to perform: and obtaining the input multiple sets of storage device control information, generating a storage device control instruction according to each set of storage device control information, and storing the generated storage device control instruction into an instruction queue.
In a sixth aspect, a control device communicatively coupled to a storage device server, the control device running at least one control instance, the control device comprising: a third instruction generating unit, a first identification setting unit, a fourth instruction generating unit and a second identification setting unit,
the third instruction generating unit is configured to execute and generate at least one storage device control instruction, and store the generated storage device control instruction into an instruction queue;
the first identifier setting unit is configured to perform control on the control instance to obtain the storage device control instruction from the instruction queue, and when the obtained storage device control instruction is a storage device establishment instruction, determine a second target storage device according to the obtained storage device establishment instruction, and set a device state identifier of the second target storage device to be: a first status identifier;
the fourth instruction generating unit is configured to execute and control the control instance to generate a storage device creation instruction based on the storage device creation instruction, and send the storage device creation instruction to the storage device server;
The second identifier setting unit is configured to set, after determining that the creation of the second target storage device is successful, a device state identifier of the second target storage device as follows: the second state identifies.
In a seventh aspect, a physical machine includes:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement any of the storage device management methods of the first aspect.
An eighth aspect, a control apparatus includes:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement any one of the storage device management methods of the second or third aspects.
A ninth aspect is a storage medium, which when executed by a processor of a physical machine, causes the physical machine to perform any one of the storage device management methods of the first aspect.
A tenth aspect is a storage medium, which when executed by a processor of a control device, causes the control device to perform any one of the storage device management methods implementing the second or third aspects.
An eleventh aspect is a storage device management system, comprising: the physical machine of the seventh aspect and the control device of the eighth aspect.
In a twelfth aspect, a computer program product is adapted to perform a program initialized with any one of the storage device management method steps applied to a physical machine when executed on the physical machine.
A thirteenth aspect is a computer program product adapted to perform a program initialized with any one of the storage device management method steps applied to a control device, when executed on the control device.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
in the storage device management method and the related device provided by the embodiments of the present disclosure, a physical machine may receive a storage device control instruction sent by a control instance of a control device, where the control device runs at least one control instance for acquiring and sending the storage device control instruction from an instruction queue, where the storage device control instruction in the instruction queue is generated by the control device and stored in the instruction queue; the physical machine generates a storage device management instruction based on the storage device control instruction; the physical machine sends a storage device management instruction to the storage device server, so that the storage device server manages the first target storage device based on the storage device management instruction. The method and the device can control the instruction through the storage equipment in the parallel execution instruction queue of a plurality of control examples, and effectively improve the processing speed of the instruction. Meanwhile, through the cooperation of the control equipment, the physical machine and the storage equipment server, the storage equipment can be mounted in the physical machine or unloaded from the physical machine, and a virtual machine is not required to be arranged on the physical machine at first, so that the method is simple and convenient.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure and do not constitute an undue limitation on the disclosure.
FIG. 1 is a schematic diagram illustrating an application environment for a storage device management method according to an example embodiment;
FIG. 2 is a flowchart illustrating a method of storage device management, according to an example embodiment;
FIG. 3 is a schematic diagram of a management interface shown in accordance with an exemplary embodiment;
FIG. 4 is a flowchart illustrating a storage device management method according to another example embodiment;
FIG. 5 is a flowchart illustrating a storage device management method according to another exemplary embodiment;
FIG. 6 is a flowchart illustrating a storage device management method according to another example embodiment;
FIG. 7 is a schematic diagram of a management interface shown in accordance with another exemplary embodiment;
FIG. 8 is a schematic diagram illustrating an application environment of a storage device management method according to another example embodiment;
FIG. 9 is a schematic diagram of a physical machine, according to an example embodiment;
fig. 10 is a schematic structural view of a control apparatus according to an exemplary embodiment;
fig. 11 is a schematic structural view of another control apparatus according to an exemplary embodiment.
Detailed Description
In order to enable those skilled in the art to better understand the technical solutions of the present disclosure, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the foregoing figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the disclosure described herein may be capable of operation in sequences other than those illustrated or described herein. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
An optional application environment of the solution provided in the present disclosure is first described below, and fig. 1 is a schematic diagram of the application environment, including: the physical machine 001, the control device 002, and the storage device server 003, and the physical machine 001 is communicatively connected to the control device 002 and the storage device server 003, respectively.
Wherein physical machine 001 is a reference to a physical computer with respect to a virtual machine.
Alternatively, the storage device server 003 may be a server for managing storage devices. In particular, storage devices managed by storage device server 003 may be partitioned into a plurality of storage clusters, each of which may include at least one storage device therein. Each storage device may be a cloud hard disk, and storage device server 003 may also be referred to as a cloud server. The storage space of each storage device managed by the storage device server 003 may be the same or different. Alternatively, each storage device may be a block device. The block device has the characteristics of high performance and low time delay, supports random reading and writing, and can be used as a system disk or a data disk to be directly mounted on an example. Alternatively, each storage cluster may have a cluster identity and each block device may have a block identity. By means of the cluster identity and the block identity, one block device can be uniquely located. Alternatively, the physical machine may also have a unique identifier, which may be a device ID, such as an international mobile equipment identification (International Mobile Equipment Identity, IMEI) or a Serial Number (SN), and may also be an IP address (Internet Protocol Address) of the physical machine.
Alternatively, the control device 002 may be a separate device or may be composed of a plurality of different devices. The control device 002 may be deployed with a server application for managing the storage device, and the physical machine 001 may be installed with a client application for managing the storage device. The client application may communicate with the server application to complete the management of the storage device. The server application may probe the client application to determine if the client application is running. Of course, the client application may also probe the server application to determine whether the related service of the control device 002 can be used normally. As for the specific composition of the control device 002, the subsequent embodiments of the present disclosure will be described in detail.
Fig. 2 is a flowchart illustrating a storage device management method according to an exemplary embodiment, which is used in the physical machine 001 shown in fig. 1, as shown in fig. 1, and in which the physical machine 001 is communicatively connected to the control device 002 and the storage device server 003, respectively, as shown in fig. 2, and may include the following steps.
In step S11, the physical machine receives a storage device control instruction sent by a control instance of the control device, where the control device executes at least one control instance for acquiring and sending the storage device control instruction from the instruction queue, and the storage device control instruction in the instruction queue is generated by the control device and stored in the instruction queue.
Wherein, a control instance in the disclosure may be a service process, and when a plurality of control instances are executed in the control device, each control instance may be executed in parallel to increase a processing speed of a storage device control instruction in the instruction queue.
Alternatively, the storage device control instruction received by the physical machine may be a storage device mount instruction or a storage device offload instruction. The storage device mounting instruction may be used to instruct mounting the storage device on the physical machine, so that the physical machine and the storage device establish a data transmission channel. In this way, the physical machine can store data on the corresponding storage device. And the storage device unloading instruction is used for indicating to unload the storage device from the physical machine so as to release the data transmission channel of the physical machine and the storage device. In this way, the physical machine can no longer store data on the corresponding storage device.
Optionally, a plurality of storage device control instructions may be stored in the instruction queue, where each storage device control instruction may be acquired by each control instance in a first-in-first-out manner, and each control instance may acquire and process a storage device control instruction from the instruction queue. When the acquired storage device control instruction is a storage device mounting instruction or a storage device unloading instruction, the control instance sends the storage device mounting instruction or the storage device unloading instruction to the corresponding physical machine. Optionally, the storage device control instruction may carry an identifier of the instruction sender and an identifier of the instruction receiver, so that the control instance can know to which physical machine the storage device mount instruction or the storage device uninstall instruction needs to be sent through the identifier of the instruction receiver. Accordingly, by the identification of the instruction sender, the physical machine that receives the storage device control instruction can know which device sent the instruction.
Alternatively, after a control instance obtains a storage device control instruction from the instruction queue, the control instance may lock the storage device control instruction in the instruction queue to avoid other control instances from obtaining the storage device control instruction again. When a control instance determines that its transmitted storage device control instruction is complete (the storage device server completes management of the storage device based on the storage device management instruction), the control instance may delete the complete storage device control instruction from the instruction queue.
Wherein the control device can generate at least one storage device control instruction by means of the management interface. Specifically, the control device may generate at least one storage device control instruction according to the information transmitted from the management interface. Alternatively, the management interface may be an application interface or a web interface. Controls for entering storage device control information may be provided in the management interface, such as: input boxes, selection boxes, drop down lists, virtual keys, etc. The storage device control information may specifically include: device information of the storage device, identification of the physical machine, instruction type, and the like. Wherein, the device information of the storage device may include: the cluster identifier and the block identifier may be the control device to be controlled by locating the device information of the storage device. The identity of the physical machine may be an IP address of the physical machine. The instruction types may be: storage device mount instructions, storage device uninstall instructions, or storage device establish instructions, etc. The storage device setup instructions are to instruct setting at least one storage device to an available state for the target account, such as: when the target account selects two storage devices through the management interface and pays the use fee, the control device may generate a storage device setup instruction for instructing to set the two storage devices to the available states for the target account by means of the management interface.
The management interface may be displayed in a physical machine, a control device or other electronic devices, which is not limited in this disclosure. The control device may obtain various information input from the management interface and generate at least one storage device control instruction based on the information. Optionally, the management interface may have multiple sets of controls for inputting storage device control information, where each set of controls is used to input storage device control information for controlling one storage device. As shown in fig. 3, fig. 3 is a schematic diagram of a management interface according to an exemplary embodiment of the present disclosure, where the management interface includes multiple groups of controls, and four controls in a dashed box in fig. 3 are a group of controls, and are used to input storage device control information for controlling one storage device (block 0001 of cluster a). As can be seen from fig. 3, six sets of controls (one for each behavior) may be included in the management interface, and the management interface may simultaneously input storage device control information for controlling a plurality of storage devices, respectively. After the user finishes inputting, after clicking the 'confirm' button shown in figure 3, the control device can obtain the control information of the storage device input through a plurality of groups of controls.
The control device may generate a storage device control instruction according to storage device control information for controlling each storage device, and put the storage device control instruction into the instruction queue. For example: when the user inputs storage device control information for controlling six storage devices respectively at the management interface shown in fig. 3, the control device may generate six storage device control instructions.
The storage device management instruction may include: identification of the physical machine, instruction type, and device information of the storage device.
In step S12, the physical machine generates a storage device management instruction based on the storage device control instruction.
Alternatively, the physical machine may generate the storage device management instruction by changing the identification of the instruction sender and the identification of the instruction receiver in the storage device management instruction. For example: the physical machine modifies the identification of the instruction sender in the storage device management instruction into the identification of the physical machine, and simultaneously the physical machine modifies the identification of the instruction receiver in the storage device management instruction into the identification of the storage device server, so that the storage device management instruction is generated.
Of course, in addition to modifying the identifier of the instruction sender and the identifier of the instruction receiver, the physical machine may perform processing such as instruction format conversion to generate the storage device management instruction, which is not limited in this disclosure.
In an alternative embodiment of the present disclosure, step S12 may specifically include: the physical machine obtains the instruction type in the storage device control instruction and the device information of the first target storage device, and generates a storage device management instruction containing the identification of the physical machine, the instruction type and the device information of the first target storage device.
In step S13, the physical machine transmits a storage device management instruction to the storage device server, so that the storage device server manages the first target storage device based on the storage device management instruction.
Optionally, when the storage device management instruction is a storage device mounting instruction, the storage device server may establish a data transmission channel between the storage device indicated in the storage device mounting instruction and the physical machine. It should be noted that the data transmission channel may be a physical transmission channel or a software transmission channel.
In practical applications, at least the device state identifier of the first target storage device may be stored in the physical machine. The device state identification of the first target storage device may be: during mounting, mounted, unloaded, etc.
Optionally, after receiving a storage device mount instruction sent by a control instance of the control device, the physical machine may set a device state identifier of the first target storage device stored locally to be in mount. The physical machine may set the device state identifier of the first target storage device stored locally as being unloaded after receiving a storage device unloading instruction sent by the control instance of the control device.
In the storage device management method provided by the embodiment of the disclosure, a physical machine can receive a storage device control instruction sent by a control instance of a control device, the control device runs at least one control instance, each control instance obtains the storage device control instruction from an instruction queue to send, the control device generates at least one storage device control instruction, and the generated storage device control instruction is stored in the instruction queue; the physical machine generates a storage device management instruction based on the storage device control instruction; the physical machine sends a storage device management instruction to the storage device server, so that the storage device server manages the first target storage device based on the storage device management instruction. The method and the device can control the instruction through the storage equipment in the parallel execution instruction queue of a plurality of control examples, and effectively improve the processing speed of the instruction. Meanwhile, through the cooperation of the control equipment, the physical machine and the storage equipment server, the storage equipment can be mounted in the physical machine or unloaded from the physical machine, and a virtual machine is not required to be arranged on the physical machine at first, so that the method is simple and convenient.
The method shown in fig. 2 may further include:
When the storage device control instruction is a storage device mounting instruction and a storage device management result returned by the storage device server is that mounting is successful, the physical machine displays an icon of an access entrance of the first target storage device.
When the user clicks on the icon, the user may use the storage device through its access portal. Alternatively, the icon may be a system storage disk icon, such as: d disc, E disc, new roll F, etc., the present disclosure is not limited. Alternatively, the present disclosure may modify the device identification of a storage device mounted to a physical machine to include the IP address of the physical machine and the device identification of the drive letter of the storage device. For example: a storage device is mounted on a physical machine with an IP address of 10.10.2.3 and its drive letter is an E-disc, then the device identifier of the storage device may be modified as follows: as can be seen, the device identifier of the storage device modifies "." in the IP address to "_j", which can improve the security of the IP address.
Alternatively, the device identifier including the IP address of the physical machine and the drive letter of the storage device may be only the device identifier used by the storage device in the physical machine on which the storage device is mounted, or may be the device identifier used in the whole network. When the storage device is unloaded from the physical machine, the device identification of the storage device may be restored to a device identification including a cluster identification and a block identification.
The method shown in fig. 2 may further include:
and when the storage device control instruction is a storage device unloading instruction and the storage device management result returned by the storage device server obtained by the physical machine is that the unloading is successful, stopping displaying the icon of the access entrance of the first target storage device by the physical machine.
Optionally, when the physical machine obtains that the storage device management result returned by the storage device server is that the mounting is successful, the physical machine may set the device state identifier of the first target storage device stored locally as mounted. When the physical machine obtains the storage device management result returned by the storage device server and is successful in unloading, the physical machine can set the device state identifier of the first target storage device stored locally as unloaded.
Optionally, the disclosure may further save the device status identification of the at least one storage device through a database. In an alternative embodiment, only the device state identifiers of the storage devices related to the physical machine may be stored in one physical machine, and the database may store the device state identifiers of the storage devices.
Alternatively, the device state identifier stored in the database may be consistent with the device state identifier stored in each physical machine. In an alternative embodiment, each physical machine may set a device status identifier of the storage device associated therewith in a database. For example: the physical machine may set the device status identifier of the first target storage device in the database to be in the mount after receiving the storage device mount instruction sent by the control instance of the control device. The physical machine may set the device status identifier of the first target storage device in the database as being unloaded after receiving a storage device unloading instruction sent by the control instance of the control device. When the physical machine obtains the storage device management result returned by the storage device server and is that the mounting is successful, the physical machine can set the device state identifier of the first target storage device in the database as mounted. When the physical machine obtains the storage device management result returned by the storage device server and is successful in unloading, the physical machine can set the device state identifier of the first target storage device in the database to be unloaded.
Optionally, the physical machine sets a locally stored device state identifier and sets a sequence of device state identifiers stored in a database, which is not limited in this disclosure. For example: the physical machine may set the device state identifier of the first target storage device in the database to be in the mount after receiving the storage device mount instruction sent by the control instance of the control device, and then set the device state identifier of the first target storage device stored locally to be in the mount. When the physical machine obtains the storage device management result returned by the storage device server and is successful in mounting, the physical machine can set the device state identifier of the first target storage device stored locally as mounted, and then set the device state identifier of the first target storage device in the database as mounted.
Optionally, one physical machine may mount a plurality of storage devices, and the physical machine or other devices may store the correspondence between the physical machines with the mount relationship and the storage devices.
In an alternative embodiment, when the physical machine obtains that the storage device management result returned by the storage device server is that the mounting fails, the physical machine may alarm, for example: and alarming to an alarm system through a preset alarm mode (such as mail, short message, telephone and the like).
Optionally, the physical machine may further monitor the mounted storage device, where the monitored content may include: IO statistics of the storage device, storage amount/storage proportion of the storage device, whether the storage device is online or not, and the like.
FIG. 4 is a flowchart illustrating a method of storage device management, as shown in FIG. 4, according to an example embodiment, including:
in step S11, the physical machine receives a storage device control instruction sent by a control instance of the control device, where the control device executes at least one control instance for acquiring and sending the storage device control instruction from the instruction queue, and the storage device control instruction in the instruction queue is generated by the control device and stored in the instruction queue.
In step S12, the physical machine generates a storage device management instruction based on the storage device control instruction.
In step S13, the physical machine transmits a storage device management instruction to the storage device server, so that the storage device server manages the first target storage device based on the storage device management instruction.
The steps S11 to S13 are described in the embodiment shown in fig. 1, and are not repeated.
In step S14, the physical machine obtains a storage device management result returned from the storage device server.
In step S15, the physical machine sets a device status identifier of the first target storage device and/or sets a correspondence between the first target storage device and the physical machine according to the storage device management result.
When the storage device management result is that the mounting is successful, the physical machine can establish and store the corresponding relation between the first target storage device and the physical machine.
When the storage device management result is that the unloading is successful, the physical machine can delete the stored corresponding relation between the first target storage device and the physical machine.
Fig. 2 is a storage device management method applied to a physical machine, and the present disclosure also provides a storage device management method applied to a control device, corresponding to the method shown in fig. 2.
Fig. 5 is a flowchart illustrating another storage device management method according to an exemplary embodiment, where the storage device management method illustrated in fig. 5 is applied to the control device 002 illustrated in fig. 1, and as illustrated in fig. 1, the control device 002 is communicatively connected to the physical machine 001, and the physical machine 001 is also communicatively connected to the storage device server 003, and the control device 002 runs at least one control instance, and the storage device management method illustrated in fig. 5 may include:
in step S21, the control device generates at least one storage device control instruction, and stores the generated storage device control instruction in the instruction queue.
Wherein, a control instance in the disclosure may be a service process, and when a plurality of control instances are executed in the control device, each control instance may be executed in parallel to increase a processing speed of a storage device control instruction in the instruction queue.
Optionally, the instruction type of the storage device control instruction generated by the control device may be: the storage device mounting instruction, the storage device unloading instruction, or the storage device establishing instruction are described in the embodiment shown in fig. 2, and are not described again.
Wherein the control device can generate at least one storage device control instruction by means of the management interface. Alternatively, the management interface may be the same as in the method shown in fig. 2. As shown in fig. 7, when storage device control information for creating one storage device (block 0003 of cluster a) needs to be input in a set of controls of the management interface, the information of the physical machine is not input, and the instruction type is set to "create", so that after clicking the "ok" button, the control device generates an instruction for creating the storage device of block 0003 of cluster a by means of the management interface, and stores the generated storage device creation instruction in the instruction queue.
The control device may generate a plurality of storage device control instructions by means of the management interface, and the instruction types of the respective storage device control instructions may be the same or different.
Alternatively, when the storage device control instruction is a storage device establishment instruction, the storage device establishment instruction may not include identification information of the storage device. Specifically, the storage device establishment instruction may include storage space information (for example, 1 gb), and the control device may select the storage device to establish according to the storage space information. For example: and selecting a storage device of one cluster according to the occupation condition of the cluster to establish.
Step S21 may specifically include:
the control device obtains the input multiple sets of storage device control information, generates a storage device control instruction according to each set of storage device control information, and stores the generated storage device control instruction into the instruction queue.
Alternatively, the multiple sets of storage device control information obtained by the control device may be entered through the management interface.
Optionally, after step S21, the method shown in fig. 5 may further include:
and the control equipment returns a preset response through the management interface.
After the control device stores the generated control instruction of the storage device into the instruction queue, the control device returns a preset response through the management interface and outputs corresponding information in time, so that the user is prevented from waiting for a long time. The preset response may be the word "processing, please be later", or may be voice, animation, etc. to inform the user that processing is occurring.
Of course, the above-described preset response may also be changed according to the instruction type, for example: when the instruction type is a storage device mount instruction, the preset response may be the word "mount, please be later.
In step S22, the control instance in the control device obtains the storage device control instruction from the instruction queue and sends the storage device control instruction to the physical machine related to the storage device control instruction, so that the physical machine generates a storage device management instruction based on the storage device control instruction and sends the storage device management instruction to the storage device server, and further, the storage device server manages the first target storage device based on the storage device management instruction.
Each control instance may fetch and process a storage device control instruction from the instruction queue. When the acquired storage device control instruction is a storage device mounting instruction or a storage device unloading instruction, the control instance sends the storage device mounting instruction or the storage device unloading instruction to the corresponding physical machine. Optionally, the storage device control instruction may carry an identifier of the instruction sender and an identifier of the instruction receiver, so that the control instance can know to which physical machine the storage device mount instruction or the storage device uninstall instruction needs to be sent through the identifier of the instruction receiver. Accordingly, by the identification of the instruction sender, the physical machine that receives the storage device control instruction can know which device sent the instruction.
The control instance in the control device can identify the identification of the instruction receiver of the acquired storage device control instruction, and send the identification to the corresponding instruction receiver according to the identification. When the identification of the instruction receiver is the identification of one physical machine, the control instance can send the storage device control instruction to the physical machine with the identification.
In the storage device management method provided by the embodiment of the disclosure, a control device generates at least one storage device control instruction, and stores the generated storage device control instruction into an instruction queue; the control instance in the control device obtains the storage device control instruction from the instruction queue and sends the storage device control instruction to the physical machine related to the storage device control instruction, so that the physical machine generates a storage device management instruction based on the storage device control instruction and sends the storage device management instruction to the storage device server, and further the storage device server manages the first target storage device based on the storage device management instruction. The method and the device can control the instruction through the storage equipment in the parallel execution instruction queue of a plurality of control examples, and effectively improve the processing speed of the instruction. Meanwhile, through the cooperation of the control equipment, the physical machine and the storage equipment server, the storage equipment can be mounted in the physical machine or unloaded from the physical machine, and a virtual machine is not required to be arranged on the physical machine at first, so that the method is simple and convenient. Meanwhile, the storage device can be created, and the flow for creating the storage device is simple and convenient.
Fig. 6 is a flowchart illustrating another storage device management method according to an exemplary embodiment, where the method shown in fig. 6 is applied to the control device 002 shown in fig. 1, and as shown in fig. 1, the control device 002 is communicatively connected to the storage device server 003, and the control device 002 operates at least one control instance, where the method shown in fig. 6 may include:
in step S21, the control device generates at least one storage device control instruction, and stores the generated storage device control instruction in the instruction queue.
Step S21 shown in fig. 6 is the same as step S21 in the method shown in fig. 5, and will not be described again.
In step S23, the control instance in the control device obtains a storage device control instruction from the instruction queue, determines a second target storage device according to the obtained storage device establishment instruction when the obtained storage device control instruction is the storage device establishment instruction, and sets a device state identifier of the second target storage device as the first state identifier.
The first status identifier may be an identifier for indicating that the current status is in establishment, for example: "creating" or "establishing" and the like.
Alternatively, the control device may generate at least one storage device control instruction via the management interface.
The storage device establishment instruction carries identification information of the second target storage device to be established, so that the second target storage device can be determined through the identification information. By setting the device state identifier of the second target storage device as the first state identifier, other devices or accounts can be enabled to know the device state of the second target storage device, and collision is prevented. For example: after account a selects storage device 0001 of cluster a via the management interface and pays the usage fee, the control device may generate a storage device setup instruction via the management interface for instructing to set this storage device to the available status for account a. When a control instance obtains the instruction, the device state of storage device 0001 of cluster a may be identified as: the first state is identified. When other storage device management instructions need to manage the storage devices 0001 of the cluster a, the other storage device management instructions will not be able to manage the storage devices 0001 of the cluster a because the device state identifier of the storage devices 0001 of the cluster a is the first state identifier. At this time, the disclosure may inform relevant personnel to perform processing by outputting error reporting information, or may wait for the device status of the storage device 0001 of the cluster a to be identified as established, and then execute other storage device management instructions for managing the storage device 0001 of the cluster a.
In step S24, the control instance in the control device generates a storage device creation instruction based on the storage device creation instruction, and transmits the storage device creation instruction to the storage device server.
Alternatively, the control device may generate the storage device creation instruction by changing the identification of the instruction sender and the identification of the instruction receiver in the storage device creation instruction. For example: the control device modifies the identification of the instruction sender in the storage device establishment instruction to the identification of the control device, and the control device modifies the identification of the instruction receiver in the storage device establishment instruction to the identification of the storage device server, so that the storage device establishment instruction is generated.
Of course, in addition to modifying the identifier of the instruction sender and the identifier of the instruction receiver, the control device may perform processing such as instruction format conversion to generate the storage device creation instruction, which is not limited in this disclosure.
After the control device sends the storage device creation instruction to the storage device server, the storage device server can make the storage device setting available to the account a by setting the management authority possessor of the storage device as the account a, so that the creation of one storage device is realized. It should be noted that, in the creation of the storage device of the present disclosure, instead of establishing a new communication connection between the storage device and the storage device server, the management authority possessor of the storage device that has been in communication connection with the storage device server is set. For example: a storage device that has been communicatively connected to the storage device server has no management authority owner before, and after the account a is paid, the account a may be referred to as the management authority owner of the storage device, for which the disclosure "creates" a usable storage device, but the storage device exists before.
Optionally, the control device may also authenticate and manage the rights of each account. Specifically, when the key input by an account is a preset batch management key, the control device may control a management interface for performing batch management of the storage device to display, so as to generate a plurality of storage device management instructions by means of the management interface, so as to implement batch management of the storage device. When the key input by a certain account is not the preset batch management key, the control device can control the management interface for managing one storage device to be displayed, so that a storage device management instruction is generated by means of the management interface, and management of one storage device is realized.
The storage device server may send the creation result to the control device after completing creation of the storage device according to the storage device creation instruction. Of course, the control device may also query the storage device server periodically or aperiodically whether the storage device has been successfully created.
In step S25, the control device sets the device status identifier of the second target storage device to the second status identifier after determining that the creation of the second target storage device is successful.
Wherein, the second status identifier may be an identifier for indicating that the current status is established, such as: "created" or "established" and the like.
After setting the device state identifier of the second target storage device as the second state identifier, the control instance of the control device may execute a storage device mounting instruction for the second target storage device, so as to mount the established second target storage device on a physical machine. Thus, the physical machine can use the second target storage device, thereby realizing the expansion of the storage space.
Fig. 8 is an application environment diagram of a storage device management method according to an exemplary embodiment, and as shown in fig. 8, the control device 002 in fig. 1 may include: business logic layer 102, cluster management layer 104 and anomaly alarm system 106,
the service logic layer 102 is provided with a plurality of control instances and instruction queues, which are used for implementing step S21 and step S22 in the method shown in fig. 5.
The cluster management layer 104 may be a middleware for managing the block storage clusters 103, and the cluster management layer 104 may obtain the cluster information of the block storage clusters 103 and send the cluster information to the block storage management interface 107 through the service logic layer 102 for display. Thus, the user can see each cluster included in the block storage cluster 103, and information such as the total storage capacity and free capacity of each cluster, through the block storage management interface 107. The accounts with rights may also control the clusters included in the block storage cluster 103 through the cluster management layer 104, for example: the total storage capacity of a cluster is adjusted. When the total storage capacity of a cluster is large, but the usage is low, the total storage capacity of the cluster can be reduced.
The block storage cluster 103 may include: a storage device server and a plurality of storage devices, each of which may be a block device. The storage device server may manage the block devices within the block storage cluster 103. The storage device server may be communicatively coupled to the control device, physical machine, etc. via the same or different application program interfaces (Application Programming Interface, API).
The cluster management layer 104 may also manage the image file, and the disclosure may store the image file in a storage device of the physical machine or mounted on the physical machine, so as to improve data security. The cluster management layer 104 may perform operations such as creating, copying, moving, deleting, etc. an image file.
The database 105 may store device status identifiers of the respective storage devices, and may store correspondence between physical machines and the storage devices. The correspondence may be specifically: correspondence between the IP address of the physical machine and cluster identification and block identification.
Alternatively, one physical machine may mount one or more storage devices, so the correspondence between the physical machine and the storage devices stored in the database 105 may be a correspondence between one physical machine and the plurality of storage devices, that is: one-to-many.
The anomaly alarm system 106 can scan the database 105 and can alarm in time when the data stored in the database 105 is found to be anomalous.
The monitoring platform 101 may monitor the physical machine 001, for example: monitor IO data of the physical machine 001, and the like. Optionally, an application program client of the monitoring platform 101 may be installed in the physical machine 001, so as to collect data in the physical machine 001 in time, thereby implementing monitoring.
Alternatively, the monitoring platform 101 may be an integral part of the control device, or may be a separately provided device, which is not limited in this disclosure.
Business logic layer 102 may also be in communication with third party platform 108 such that third party platform 108 may implement management of storage devices through business logic layer 102, for example: the device resource management platform of a company is in butt joint with the business logic layer 102, and the platform can mount the storage devices in the block storage cluster 103 to the physical machine 001 of the company for use through the business logic layer 102. Alternatively, business logic layer 102 may communicate with third party platform 108 through an application program interface API.
Business logic layer 102 may also perform data persistence operations such as: and performing persistence operation on the storage device control instruction. Business logic layer 102 may save each storage device control instruction in the instruction queue to a persistent disk so that the instruction queue is not lost even if power is lost. After the power is on again, the instruction queue stored before can be obtained from the persistent disk, and the control instruction of the storage device in the instruction queue can be continuously processed. Optionally, the present disclosure may store the locking state of each storage device control instruction at the same time, so that after powering on again, the control instance may determine, according to the locking state, whether the storage device control instruction has control instance processing and which control instance reprocesses, thereby avoiding repeated execution.
Alternatively, business logic layer 102 may perform persistence operations on all data it receives, processes, and transmits.
Corresponding to the storage equipment management method applied to the physical machine provided by the embodiment of the disclosure, the disclosure also provides the physical machine.
Fig. 9 is a schematic structural diagram of a physical machine, which is respectively connected with a control device and a storage device server in a communication manner, according to an exemplary embodiment, and may include: an instruction receiving unit 100, a first instruction generating unit 200 and a first instruction transmitting unit 300,
an instruction receiving unit 100 configured to execute a storage device control instruction sent by a control instance of a control device, where the control device executes at least one control instance for acquiring the storage device control instruction from an instruction queue and sending the storage device control instruction, where the storage device control instruction in the instruction queue is generated by the control device and stored in the instruction queue;
a first instruction generating unit 200 configured to execute a storage device management instruction based on the storage device control instruction;
the first instruction transmitting unit 300 is configured to perform transmission of a storage device management instruction to the storage device server, so that the storage device server manages the first target storage device based on the storage device management instruction.
Optionally, the physical machine shown in fig. 9 may further include: a result obtaining unit and a relation setting unit,
the result obtaining unit is configured to obtain a storage device management result returned by the storage device server;
and the relation setting unit is configured to perform setting of the device state identification of the first target storage device and/or setting of the corresponding relation between the first target storage device and the physical machine according to the storage device management result.
Optionally, the storage device control instruction is a storage device mount instruction or a storage device unload instruction,
optionally, the physical machine shown in fig. 9 may further include: a first display control unit and/or a second display control unit,
a first display control unit configured to perform: when the storage device control instruction is a storage device mounting instruction and a storage device management result returned by a storage device server obtained by the physical machine is that mounting is successful, displaying an icon of an access entrance of the first target storage device;
a second display control unit configured to perform: and stopping displaying the icon of the access entrance of the first target storage device when the storage device control instruction is a storage device unloading instruction and the storage device management result returned by the storage device server obtained by the physical machine is that the unloading is successful.
Optionally, the first instruction generating unit is specifically configured to perform: and obtaining the instruction type in the storage device control instruction and the device information of the first target storage device, and generating a storage device management instruction containing the identification of the physical machine, the instruction type and the device information.
Corresponding to the storage device management method applied to the control device shown in fig. 5 and provided by the embodiment of the present disclosure, the present disclosure further provides a control device.
Fig. 10 is a schematic structural diagram of a control device according to an exemplary embodiment, where the control device is communicatively connected to a physical machine, and the physical machine is also communicatively connected to a storage device server, and the control device operates at least one control instance, as shown in fig. 10, and includes: a second instruction generating unit 400 and a second instruction transmitting unit 500,
a second instruction generating unit 400 configured to execute and generate at least one storage device control instruction, and store the generated storage device control instruction into an instruction queue;
the second instruction sending unit 500 is configured to control the control instance to obtain the storage device control instruction from the instruction queue and send the storage device control instruction to the physical machine related to the storage device control instruction, so that the physical machine generates the storage device management instruction based on the storage device control instruction and sends the storage device management instruction to the storage device server, and further, the storage device server manages the target storage device based on the storage device management instruction.
Optionally, the second instruction generating unit 500 is specifically configured to perform: and obtaining the input multiple sets of storage device control information, generating a storage device control instruction according to each set of storage device control information, and storing the generated storage device control instruction into an instruction queue.
Corresponding to the storage device management method applied to the control device shown in fig. 6 and provided by the embodiment of the present disclosure, the present disclosure further provides a control device.
Fig. 11 is a schematic structural diagram of a control device according to an exemplary embodiment, the control device being communicatively connected to a storage device server, the control device running at least one control instance, as shown in fig. 11, the control device comprising: a third instruction generating unit 600, a first identification setting unit 700, a fourth instruction generating unit 800 and a second identification setting unit 900,
a third instruction generating unit 600 configured to execute and generate at least one storage device control instruction, and store the generated storage device control instruction into an instruction queue;
a first identifier setting unit 700 configured to execute a control instance to obtain a storage device control instruction from the instruction queue, determine a second target storage device according to the obtained storage device establishment instruction when the obtained storage device control instruction is the storage device establishment instruction, and set a device state identifier of the second target storage device as: a first status identifier;
A fourth instruction generating unit 800 configured to execute the control instance to generate a storage device creation instruction based on the storage device creation instruction, and to send the storage device creation instruction to the storage device server;
the second identifier setting unit 900 is configured to set, after determining that the creation of the second target storage device is successful, a device state identifier of the second target storage device as: the second state identifies.
An exemplary embodiment of the present disclosure further provides a physical machine, including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to execute instructions to implement any of the storage device management methods provided by the present disclosure that apply to a physical machine.
An exemplary embodiment of the present disclosure also provides a control apparatus including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to execute instructions to implement any of the storage device management methods provided by the present disclosure as applied to a control device.
An exemplary embodiment of the present disclosure also provides a storage medium, which when executed by a processor of a physical machine, causes the physical machine to perform any one of the storage device management methods provided by the present disclosure applied to the physical machine.
An exemplary embodiment of the present disclosure also provides a storage medium, which when executed by a processor of a control device, enables the control device to perform any one of the storage device management methods provided by the present disclosure applied to the control device.
Alternatively, the storage medium may be a non-transitory computer readable storage medium, for example, a ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, and the like.
An exemplary embodiment of the present disclosure also provides a storage device management system, including: any of the physical machines provided by the present disclosure and any of the control devices provided by the present disclosure.
An exemplary embodiment of the present disclosure also provides a computer program product adapted to perform a program initialized with any one of the storage device management method steps applied to a physical machine when executed on the physical machine.
An exemplary embodiment of the present disclosure also provides another computer program product, which, when executed on a control device, is adapted to execute a program initialized with any one of the storage device management method steps applied to the control device.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims (19)
1. The storage device management method is characterized by being applied to a physical machine, wherein the physical machine is respectively in communication connection with a control device and a storage device server, and the storage device management method comprises the following steps:
the physical machine receives a storage device control instruction sent by a control instance of the control device, wherein the control device runs at least one control instance for acquiring the storage device control instruction from an instruction queue and sending the storage device control instruction, and the storage device control instruction in the instruction queue is generated by the control device and stored in the instruction queue;
The physical machine generates a storage device management instruction based on the storage device control instruction;
and the physical machine sends the storage device management instruction to the storage device server so that the storage device server manages the first target storage device based on the storage device management instruction.
2. The storage device management method according to claim 1, further comprising:
the physical machine obtains a storage device management result returned by the storage device server;
and the physical machine sets the device state identifier of the first target storage device and/or sets the corresponding relation between the first target storage device and the physical machine according to the storage device management result.
3. The storage device management method according to claim 1, wherein the storage device control instruction is a storage device mount instruction or a storage device off-load instruction,
the method further comprises the steps of:
when the storage device control instruction is the storage device mounting instruction and a storage device management result returned by the storage device server, which is obtained by the physical machine, is that mounting is successful, displaying an icon of an access inlet of the first target storage device by the physical machine;
And/or when the storage device control instruction is the storage device unloading instruction and the storage device management result returned by the storage device server obtained by the physical machine is that the unloading is successful, stopping displaying the icon of the access entrance of the first target storage device by the physical machine.
4. The storage device management method of claim 1, wherein the physical machine generates storage device management instructions based on the storage device control instructions, comprising:
the physical machine obtains the instruction type in the storage device control instruction and the device information of the first target storage device, and generates a storage device management instruction containing the identification of the physical machine, the instruction type and the device information.
5. A storage device management method, applied to a control device, where the control device is communicatively connected to a physical machine, and the physical machine is also communicatively connected to a storage device server, and the control device runs at least one control instance, the storage device management method includes:
the control device generates at least one storage device control instruction and stores the generated storage device control instruction into an instruction queue;
The control instance in the control device obtains the storage device control instruction from the instruction queue and sends the storage device control instruction to the physical machine related to the storage device control instruction, so that the physical machine generates a storage device management instruction based on the storage device control instruction and sends the storage device management instruction to the storage device server, and further the storage device server manages a first target storage device based on the storage device management instruction.
6. The method of claim 5, wherein the control device generating at least one storage device control instruction and storing the generated storage device control instruction in an instruction queue comprises:
the control device obtains multiple sets of input storage device control information, generates a storage device control instruction according to each set of storage device control information, and stores the generated storage device control instruction into an instruction queue.
7. A storage device management method, applied to a control device, where the control device is communicatively connected to a storage device server, and the control device runs at least one control instance, the storage device management method comprising:
The control device generates at least one storage device control instruction and stores the generated storage device control instruction into an instruction queue;
the control instance in the control device obtains the storage device control instruction from the instruction queue, when the obtained storage device control instruction is a storage device establishment instruction, a second target storage device is determined according to the obtained storage device establishment instruction, and a device state identifier of the second target storage device is set as a first state identifier;
the control instance in the control device generates a storage device creation instruction based on the storage device creation instruction, and sends the storage device creation instruction to the storage device server;
and after the control equipment determines that the second target storage equipment is successfully created, setting the equipment state identifier of the second target storage equipment as a second state identifier.
8. A physical machine, wherein the physical machine is communicatively connected to a control device and a storage device server, respectively, the physical machine comprising: an instruction receiving unit, a first instruction generating unit and a first instruction transmitting unit,
The instruction receiving unit is configured to execute a storage device control instruction sent by a control instance of the control device, wherein the control device runs at least one control instance for acquiring the storage device control instruction from an instruction queue and sending the storage device control instruction, and the storage device control instruction in the instruction queue is generated by the control device and stored in the instruction queue;
the first instruction generating unit is configured to execute a storage device management instruction based on the storage device control instruction;
the first instruction transmitting unit is configured to transmit the storage device management instruction to the storage device server, so that the storage device server manages a first target storage device based on the storage device management instruction.
9. The physical machine of claim 8, further comprising: a result obtaining unit and a relation setting unit,
the result obtaining unit is configured to obtain a storage device management result returned by the storage device server;
the relation setting unit is configured to execute setting of the device state identifier of the first target storage device and/or setting of the corresponding relation between the first target storage device and the physical machine according to the storage device management result.
10. The physical machine of claim 8, wherein the storage device control instructions are storage device mount instructions or storage device off-load instructions,
the physical machine further includes: a first display control unit and/or a second display control unit,
the first display control unit is configured to perform: when the storage device control instruction is the storage device mounting instruction and a storage device management result returned by the storage device server, which is obtained by the physical machine, is that mounting is successful, displaying an icon of an access inlet of the first target storage device;
the second display control unit is configured to perform: and stopping displaying the icon of the access entrance of the first target storage device when the storage device control instruction is the storage device unloading instruction and the storage device management result returned by the storage device server obtained by the physical machine is that the unloading is successful.
11. The physical machine according to claim 8, wherein the first instruction generating unit is specifically configured to perform: and obtaining the instruction type in the storage device control instruction and the device information of the first target storage device, and generating a storage device management instruction containing the identification of the physical machine, the instruction type and the device information.
12. A control device, wherein the control device is communicatively coupled to a physical machine, the physical machine is also communicatively coupled to a storage device server, the control device operates at least one control instance, the control device comprising: a second instruction generating unit and a second instruction transmitting unit,
the second instruction generating unit is configured to execute and generate at least one storage device control instruction, and store the generated storage device control instruction into an instruction queue;
the second instruction sending unit is configured to control the control instance to obtain the storage device control instruction from the instruction queue and send the storage device control instruction to the physical machine related to the storage device control instruction, so that the physical machine generates a storage device management instruction based on the storage device control instruction and sends the storage device management instruction to the storage device server, and further, the storage device server manages a target storage device based on the storage device management instruction.
13. The control device according to claim 12, wherein the second instruction generation unit is specifically configured to perform: and obtaining the input multiple sets of storage device control information, generating a storage device control instruction according to each set of storage device control information, and storing the generated storage device control instruction into an instruction queue.
14. A control device communicatively coupled to a storage device server, the control device running at least one control instance, the control device comprising: a third instruction generating unit, a first identification setting unit, a fourth instruction generating unit and a second identification setting unit,
the third instruction generating unit is configured to execute and generate at least one storage device control instruction, and store the generated storage device control instruction into an instruction queue;
the first identifier setting unit is configured to perform control on the control instance to obtain the storage device control instruction from the instruction queue, and when the obtained storage device control instruction is a storage device establishment instruction, determine a second target storage device according to the obtained storage device establishment instruction, and set a device state identifier of the second target storage device to be: a first status identifier;
the fourth instruction generating unit is configured to execute and control the control instance to generate a storage device creation instruction based on the storage device creation instruction, and send the storage device creation instruction to the storage device server;
The second identifier setting unit is configured to set, after determining that the creation of the second target storage device is successful, a device state identifier of the second target storage device as follows: the second state identifies.
15. A physical machine, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the storage device management method of any of claims 1 to 4.
16. A control apparatus, characterized by comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the storage device management method of any of claims 5 to 7.
17. A storage medium, which when executed by a processor of a physical machine, causes the physical machine to perform the storage device management method of any one of claims 1 to 4.
18. A storage medium, which when executed by a processor of a control device, causes the control device to perform the storage device management method of any one of claims 5 to 7.
19. A storage device management system, comprising: the physical machine of claim 15 and the control device of claim 16.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011384867.3A CN114579036B (en) | 2020-11-30 | 2020-11-30 | Storage device management method and related device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011384867.3A CN114579036B (en) | 2020-11-30 | 2020-11-30 | Storage device management method and related device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114579036A CN114579036A (en) | 2022-06-03 |
CN114579036B true CN114579036B (en) | 2024-02-13 |
Family
ID=81766794
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011384867.3A Active CN114579036B (en) | 2020-11-30 | 2020-11-30 | Storage device management method and related device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114579036B (en) |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6397267B1 (en) * | 1999-03-04 | 2002-05-28 | Sun Microsystems, Inc. | Redirected I/O for scalable performance storage architecture |
CN103049327A (en) * | 2011-10-14 | 2013-04-17 | 深圳市同洲电子股份有限公司 | Method and device for mounting many storage devices on android system |
CN104090822A (en) * | 2014-07-11 | 2014-10-08 | Tcl通讯(宁波)有限公司 | Method and system for switching external storage devices under Android system |
CN106201349A (en) * | 2015-12-31 | 2016-12-07 | 华为技术有限公司 | A kind of method and apparatus processing read/write requests in physical host |
CN108337289A (en) * | 2017-12-15 | 2018-07-27 | 中金数据(武汉)超算技术有限公司 | A kind of operational order processing method and system |
CN109814981A (en) * | 2019-01-28 | 2019-05-28 | 北京首都在线科技股份有限公司 | Physical machine rental service system, method, terminal and storage medium |
CN110399171A (en) * | 2019-07-23 | 2019-11-01 | 苏州浪潮智能科技有限公司 | A kind of hard disk management method, system and associated component |
CN110413584A (en) * | 2019-07-24 | 2019-11-05 | 无锡华云数据技术服务有限公司 | Date storage method, device, equipment and storage medium |
CN110795029A (en) * | 2019-10-08 | 2020-02-14 | 济南浪潮数据技术有限公司 | Cloud hard disk management method, device, server and medium |
-
2020
- 2020-11-30 CN CN202011384867.3A patent/CN114579036B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6397267B1 (en) * | 1999-03-04 | 2002-05-28 | Sun Microsystems, Inc. | Redirected I/O for scalable performance storage architecture |
CN103049327A (en) * | 2011-10-14 | 2013-04-17 | 深圳市同洲电子股份有限公司 | Method and device for mounting many storage devices on android system |
CN104090822A (en) * | 2014-07-11 | 2014-10-08 | Tcl通讯(宁波)有限公司 | Method and system for switching external storage devices under Android system |
CN106201349A (en) * | 2015-12-31 | 2016-12-07 | 华为技术有限公司 | A kind of method and apparatus processing read/write requests in physical host |
CN108337289A (en) * | 2017-12-15 | 2018-07-27 | 中金数据(武汉)超算技术有限公司 | A kind of operational order processing method and system |
CN109814981A (en) * | 2019-01-28 | 2019-05-28 | 北京首都在线科技股份有限公司 | Physical machine rental service system, method, terminal and storage medium |
CN110399171A (en) * | 2019-07-23 | 2019-11-01 | 苏州浪潮智能科技有限公司 | A kind of hard disk management method, system and associated component |
CN110413584A (en) * | 2019-07-24 | 2019-11-05 | 无锡华云数据技术服务有限公司 | Date storage method, device, equipment and storage medium |
CN110795029A (en) * | 2019-10-08 | 2020-02-14 | 济南浪潮数据技术有限公司 | Cloud hard disk management method, device, server and medium |
Also Published As
Publication number | Publication date |
---|---|
CN114579036A (en) | 2022-06-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP2972746B1 (en) | Storage unit selection for virtualized storage units | |
CN110704167B (en) | Method, device, equipment and storage medium for creating virtual machine | |
CN104834602B (en) | A kind of program dissemination method, device and program delivery system | |
US8433772B2 (en) | Automated tape drive sharing in a heterogeneous server and application environment | |
CN108768730A (en) | Method and apparatus for operating intelligent network adapter | |
CN108696400A (en) | network monitoring method and device | |
KR100947740B1 (en) | System and method for monitoring event in computing network and event management apparatus | |
CN111431730B (en) | Service processing method, system, computer equipment and readable medium | |
CN110289999A (en) | A kind of data processing method, system and device | |
CN111625810A (en) | Device login method, device and system | |
CN114363334B (en) | Cloud system, network configuration method, device and equipment of cloud desktop virtual machine | |
US8806611B2 (en) | Message administration system | |
CN112153146B (en) | Operation notification method and apparatus, storage medium, and electronic apparatus | |
CN114579036B (en) | Storage device management method and related device | |
US9577967B2 (en) | Method and system for managing an informational site using a social networking application | |
CN116016209A (en) | Network automation method and device | |
CN115714816A (en) | Data center resource supply method and device, electronic equipment and storage medium | |
CN114449040A (en) | Configuration issuing method and device based on cloud platform | |
CN113254097A (en) | Configuration information issuing method and device, electronic equipment and storage medium | |
CN110768855B (en) | Method and device for testing linkmzation performance | |
CN111930587B (en) | Alarm message processing method and device, storage medium and electronic equipment | |
CN114285807B (en) | Message information management method, device, server and storage medium | |
US11902111B1 (en) | Service status determination framework | |
WO2018138553A1 (en) | Methods, apparatuses and products for automated network management | |
CN115545861A (en) | Method, device, equipment and computer readable medium for data interaction |
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 |