CN112286869A - Snapshot creating method and device - Google Patents

Snapshot creating method and device Download PDF

Info

Publication number
CN112286869A
CN112286869A CN202011183146.6A CN202011183146A CN112286869A CN 112286869 A CN112286869 A CN 112286869A CN 202011183146 A CN202011183146 A CN 202011183146A CN 112286869 A CN112286869 A CN 112286869A
Authority
CN
China
Prior art keywords
snapshot
scsi
storage device
scsi instruction
instruction
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.)
Pending
Application number
CN202011183146.6A
Other languages
Chinese (zh)
Inventor
蔡斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Macrosan Technologies Co Ltd
Original Assignee
Macrosan Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Macrosan Technologies Co Ltd filed Critical Macrosan Technologies Co Ltd
Priority to CN202011183146.6A priority Critical patent/CN112286869A/en
Publication of CN112286869A publication Critical patent/CN112286869A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • G06F16/128Details of file system snapshots on the file-level, e.g. snapshot creation, administration, deletion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • G06F11/1469Backup restoration techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1471Saving, restoring, recovering or retrying involving logging of persistent data for recovery

Landscapes

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

Abstract

The application provides a snapshot creating method and a snapshot creating device, which are applied to storage equipment, wherein the method comprises the following steps: receiving an SCSI instruction issued by an application server, wherein the SCSI instruction is generated by triggering the application server when the application server responds to the completion of preset business operation; detecting whether the SCSI instruction is a snapshot SCSI instruction or not, wherein the snapshot SCSI instruction indicates the storage device to create a snapshot; and if so, responding to the snapshot SCSI instruction, and creating a snapshot corresponding to the snapshot SCSI instruction. On one hand, the method and the device can realize that the storage device can quickly create the snapshot according to the requirements of the user, thereby ensuring the business integrity of the snapshot data; on the other hand, the snapshot is triggered and created based on the SCSI instruction issued by the application server to the storage device, so that the snapshot creating speed can be increased.

Description

Snapshot creating method and device
Technical Field
The present application relates to the field of storage technologies, and in particular, to a snapshot creation method and apparatus.
Background
With the increasing degree of informatization of the current society, various information systems have become important supports for the normal operation of enterprises, and data is the root of the information systems. When a hardware failure or a non-hardware failure occurs in the storage device, the data file stored in the storage device may be damaged, and even data may be lost. The non-hardware faults may include human factors and software faults, such as mistaken deletion operations, mistaken formatting operations, virus attacks, application process exceptions, and the like. When data files in a storage device are damaged or lost, it is necessary to restore the original data to the maximum extent as soon as possible so that the service depending on the data can be performed normally. Therefore, disaster-tolerant backup of data, such as remote copy, snapshot, etc., is typically performed on the storage device to restore the data to a state at some point in time prior to the failure, if necessary.
The snapshot technology is a common data disaster recovery backup method, and a storage device creates a snapshot corresponding to service data. For example, in practical applications, by creating a data copy of source data corresponding to a certain time point and recording only data that changes for the first time, when data damage or loss caused by non-hardware failure occurs in a storage device, the data can be quickly rolled back to the data corresponding to the certain snapshot creation time point, so as to attempt to restore the service. In addition, while the source data in the storage device is being called, the user can perform a test or the like using the data of the snapshot.
In the related art, snapshot creation is usually performed at the bottom layer of a storage system, and when a storage device creates a snapshot, a service processing process of an application layer cannot be known in time, so that snapshots created by the storage device are not necessarily snapshots required by a user, which may cause waste of storage resources.
Disclosure of Invention
In view of this, the present application provides a snapshot creating method, a snapshot creating apparatus, a storage device, and a machine-readable storage medium, so as to solve the problem that the storage device cannot create a snapshot according to the requirement of a user, which wastes storage resources.
The application provides a snapshot creating method, which is applied to a storage device and comprises the following steps:
receiving an SCSI instruction issued by an application server, wherein the SCSI instruction is generated by triggering the application server when the application server responds to the completion of preset business operation;
detecting whether the SCSI instruction is a snapshot SCSI instruction or not, wherein the snapshot SCSI instruction indicates the storage device to create a snapshot;
and if so, responding to the snapshot SCSI instruction, and creating a snapshot corresponding to the snapshot SCSI instruction.
Optionally, the snapshot SCSI command is a synchronous SCSI command.
Optionally, the detecting whether the SCSI command is a snapshot SCSI command includes:
detecting whether the SCSI instruction carries a snapshot creating command word indicating the storage device to create a snapshot in a preset custom field;
if yes, determining the SCSI instruction as a snapshot SCSI instruction.
Optionally, the detecting whether the SCSI command carries a snapshot creation command word indicating that the storage device creates a snapshot in a preset custom field includes:
detecting whether the SCSI instruction is a mode select SCSI instruction;
if the command is a mode select SCSI command, detecting whether the mode select SCSI command carries a subpage code indicating that the storage device creates a snapshot in a preset custom field, wherein the preset custom field is a custom mode page;
and if the file carries the subpage code indicating the storage equipment to create the snapshot, further determining that the SCSI instruction carries a snapshot creation command word indicating the storage equipment to create the snapshot in a preset self-defined field.
Optionally, the snapshot SCSI command also carries LUN information of a storage volume to be snapshot created;
the creating the snapshot corresponding to the snapshot SCSI instruction in response to the snapshot SCSI instruction comprises:
acquiring LUN information of the storage volume of the snapshot to be created, and detecting whether the LUN corresponding to the LUN information belongs to a preset consistency group, wherein the consistency group comprises a plurality of member LUNs;
if the member LUN belongs to the consistency group, responding to the snapshot SCSI instruction, and creating snapshots of all member LUNs corresponding to the consistency group to which the LUN belongs;
and if not, responding to the snapshot SCSI instruction, and creating a snapshot of the LUN corresponding to the LUN information.
Optionally, the method further includes, when creating the snapshot corresponding to the snapshot SCSI command is successful, returning a successful response corresponding to the snapshot SCSI command to the application server, so that the application server receives the successful response and continues to issue the service IO.
Optionally, the method further includes, when creating the snapshot corresponding to the snapshot SCSI command fails, returning a failure response corresponding to the snapshot SCSI command to the application server, so that the application server receives the failure response, and re-issues the snapshot SCSI command or continues to issue the service IO.
The present application further provides a snapshot creating apparatus, applied to a storage device, the apparatus including:
the system comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving an SCSI instruction issued by an application server, and the SCSI instruction is generated by triggering when the application server responds to the completion of preset business operation;
the detection module is used for detecting whether the SCSI instruction received by the receiving module is a snapshot SCSI instruction, and the snapshot SCSI instruction indicates the storage device to create a snapshot;
and the creating module is used for responding to the snapshot SCSI instruction and creating the snapshot corresponding to the snapshot SCSI instruction according to the detection result of the detection module if the snapshot SCSI instruction is received.
Optionally, the detection module is specifically configured to:
detecting whether the SCSI instruction carries a snapshot creating command word indicating the storage device to create a snapshot in a preset custom field;
if yes, determining the SCSI instruction as a snapshot SCSI instruction.
Optionally, when detecting whether the SCSI command carries a snapshot creation command word indicating that the storage device creates a snapshot in a preset custom field, the detection module is specifically configured to:
detecting whether the SCSI instruction is a mode select SCSI instruction;
if the command is a mode select SCSI command, detecting whether the mode select SCSI command carries a subpage code indicating that the storage device creates a snapshot in a preset custom field, wherein the preset custom field is a custom mode page;
and if the file carries the subpage code indicating the storage equipment to create the snapshot, further determining that the SCSI instruction carries a snapshot creation command word indicating the storage equipment to create the snapshot in a preset self-defined field.
Optionally, when the snapshot SCSI command further carries LUN information of a storage volume to be snapshot created, the creating module is specifically configured to:
acquiring LUN information of the storage volume of the snapshot to be created, and detecting whether the LUN corresponding to the LUN information belongs to a preset consistency group, wherein the consistency group comprises a plurality of member LUNs;
if the member LUN belongs to the consistency group, responding to the snapshot SCSI instruction, and creating snapshots of all member LUNs corresponding to the consistency group to which the LUN belongs;
and if not, responding to the snapshot SCSI instruction, and creating a snapshot of the LUN corresponding to the LUN information.
Optionally, when the snapshot SCSI command sent by the application server and received by the receiving module is a synchronous SCSI command, the creating module is further configured to:
and when the snapshot corresponding to the snapshot SCSI instruction is successfully created, returning a successful response corresponding to the snapshot SCSI instruction to the application server, so that the application server receives the successful response and continues to issue the service IO.
Optionally, when the snapshot SCSI command sent by the application server and received by the receiving module is a synchronous SCSI command, the creating module is further configured to:
and when the snapshot corresponding to the snapshot SCSI instruction is failed to be created, returning a failure response corresponding to the snapshot SCSI instruction to the application server so that the application server receives the failure response and retransmits the snapshot SCSI instruction or continues to transmit the business IO.
The application also provides a storage device, which comprises a communication interface, a processor, a memory and a bus, wherein the communication interface, the processor and the memory are mutually connected through the bus;
the memory stores machine-readable instructions, and the processor executes the method by calling the machine-readable instructions.
The present application also provides a machine-readable storage medium having stored thereon machine-readable instructions which, when invoked and executed by a processor, implement the above-described method.
According to the method and the device, when an application server corresponding to the storage device completes preset service operation according to a service processing process on the application server, the storage device receives an SCSI instruction which is actively triggered by the application server and used for creating the snapshot, and the snapshot corresponding to the SCSI instruction is created. On one hand, the method and the device can realize that the storage device creates the snapshot according to the requirements of the user, thereby ensuring the business integrity of the snapshot data; on the other hand, the snapshot is triggered and created based on the SCSI instruction issued by the application server to the storage device, so that the snapshot creating speed can be increased.
Drawings
FIG. 1 is a schematic diagram of a networking architecture of a storage system, shown in an exemplary embodiment;
FIG. 2 is a flow diagram of a snapshot creation method, shown in an exemplary embodiment;
FIG. 3 is a block diagram of a snapshot creation apparatus, of which an exemplary embodiment is shown;
fig. 4 is a hardware configuration diagram of a storage device in which a snapshot creation apparatus is located according to an exemplary embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
In order to make those skilled in the art better understand the technical solution in the embodiment of the present specification, a brief description will be given below of the related technology of snapshot creation related to the embodiment of the present specification.
Referring to fig. 1, fig. 1 is a schematic diagram illustrating a networking architecture of a storage system according to an exemplary embodiment. The application server 110 includes an application server 111, an application server 112, and an application server 113; gateway device 120 includes switch 121 and switch 122; the application server 111, the application server 112 and the application server 113 can perform data interaction with the storage device 140 through the switch 121; the application server 112 and the application server 113 can perform data interaction with the storage device 140 through the switch 122; storage device 140 may provide a management port for managing the storage device; the management PC130 may be directly connected to the management port of the storage device 140, or may be connected to the management port of the storage device 140 through the switch 121 or the switch 122.
In practical applications, the application server 110 of the storage system may include one server or a plurality of servers; the application server 110 may perform data interaction with the storage device 140 through the gateway device 120; the management PC130 may be directly connected to the management port of the storage device 140 or may be connected to the management port of the storage device 140 through the gateway device 120.
If the application server is composed of a plurality of application servers, relevant software, such as cluster software, parallel file system software and the like, needs to be installed on the corresponding application servers, so that the plurality of application servers can have read-write permission on the same storage resource in the storage device, and mutually exclusive access to the same storage area is realized, and the accuracy and the consistency of data are ensured.
The storage device 140 provides a visual configuration interface for a user on the management PC130, and the user can perform configuration related to the snapshot for the storage device 140 according to actual needs through the configuration interface, for example, allocating a snapshot reserved memory, managing LUN (logical Unit Number) information that needs to enable the snapshot, modifying a time point policy for creating the snapshot, and the like.
In the storage system, in order to distinguish different storage devices, each storage device may be divided into a SCSI ID based on a SCSI protocol, where the SCSI ID is actually an address of the storage device; in a storage device, to distinguish between different storage volumes, each storage volume may be identified by a LUN; the storage device corresponding to each SCSI ID can only contain a storage volume identified by 32 LUNs at most. It should be clear that in practical applications, the storage volume information can be represented by "LUN information".
In the storage device, creating the snapshot is based on the LUN. At the snapshot time point, the storage device creates a snapshot of the LUN corresponding to the LUN information, thereby saving the data state of the service data at the time of the snapshot time point; the user can check the data state corresponding to any snapshot time point at any later time, and can also rollback the current data to the data state corresponding to any snapshot time point.
In a prior art scheme a, the storage device 140 may automatically create a snapshot time point according to a preset time point policy, and create a snapshot corresponding to the snapshot time point based on preset LUN information that needs to enable the snapshot; the user may manually create a snapshot time point through a configuration interface provided by the management PC130, and the storage device 140 may also create a snapshot corresponding to the snapshot time point according to the snapshot time point manually created by the user based on LUN information that requires snapshot activation.
However, in the above-mentioned prior art scheme a, on one hand, since the process of creating the snapshot is usually performed at the bottom layer of the storage system, the storage device cannot timely learn about the service processing process of the application layer, for example, the storage device cannot learn whether the cache of the file system has been completely written into the storage, or whether the database service has generated checkpoint, and so on, and therefore, the snapshot created by the storage device may have a situation that the snapshot data is incomplete; on the other hand, the storage device only needs to create the snapshot corresponding to the snapshot time point based on the LUN information that needs to enable the snapshot according to the set snapshot time point, and the process of creating the snapshot does not need to communicate with the application server, so the snapshots created by the storage device are not necessarily all snapshots that are needed by the user, which may cause waste of storage resources.
In another prior art solution B, in order to ensure the integrity of the snapshot data, snapshot agent (snapshot agent) software may be installed on the application server 110, and the snapshot agent software is used for communication between the application server 110 and the storage device 140. In practical application, when the storage device is ready to create a snapshot, the storage device may first notify a snapshot agent on the application server; after receiving the notification that the storage device is ready to create a snapshot, the snapshot agent may perform related operations on the application server, for example, write all data in the cache into the storage, suspend other business IO, and so on; after the application server is ready, the snapshot agent notifies the storage device to start creating the snapshot.
However, in the above-mentioned prior art solution B, on one hand, because the snapshot time point is created or is automatically created by the storage device according to the preset time point policy, the snapshots created by the storage device are not necessarily all snapshots required by the user; on the other hand, for different file systems or different databases, different and corresponding snapshot agent software needs to be installed on the application server, so that compatibility and usability for different storage systems are lacked; on the other hand, before creating the snapshot, the storage device needs to communicate with the application server first and wait for the application server to perform the relevant operations before starting creating the snapshot, and a certain time needs to be waited, which results in a longer time required for creating the snapshot.
Therefore, in the above-described prior art scheme, the storage device cannot timely know the service processing process of the application server, which causes that the snapshot created by the storage device is not necessarily the snapshot required by the user, which may cause waste of storage resources.
In view of this, the present specification aims to provide a technical solution for quickly creating a snapshot on demand based on a snapshot SCSI command that is generated by a storage device in response to a trigger when an application server completes a preset service operation.
When the application server is implemented, the storage device receives an SCSI instruction issued by the application server, wherein the SCSI instruction is generated by triggering when the application server responds to the completion of preset business operation;
the storage device detects whether the SCSI instruction is a snapshot SCSI instruction, and the snapshot SCSI instruction indicates the storage device to create a snapshot;
if yes, the storage device responds to the snapshot SCSI instruction and creates a snapshot corresponding to the snapshot SCSI instruction.
Therefore, in the technical solution in this specification, because the time for creating the snapshot is determined by the application server according to the processing process of the service, the application server actively triggers and generates an SCSI command for instructing the storage device to create the snapshot in response to the completion of the preset service operation, and issues the SCSI command to the storage device; and the storage equipment receives an SCSI instruction for creating the snapshot sent by the application server and creates a snapshot corresponding to the SCSI instruction for creating the snapshot. On one hand, the method and the device can realize that the storage device creates the snapshot according to the requirements of the user, thereby ensuring the business integrity of the snapshot data; on the other hand, the snapshot is triggered and created based on the SCSI instruction issued by the application server to the storage device, so that the snapshot creating speed can be increased.
Compared with the prior art scheme a, in the snapshot creating method provided by the application, the time for creating the snapshot is determined by the application server according to the service processing process, when the preset service operation is completed, the application server can actively trigger to generate the snapshot SCSI command and issue the snapshot SCSI command to the storage device, and the storage device responds to the snapshot SCSI command to create the corresponding snapshot; therefore, the method and the device can realize that the storage device creates the snapshot according to the requirement of the user, thereby ensuring the business integrity of the snapshot data.
Compared with the prior art scheme B, in the snapshot creating method provided by the application, the storage device does not need to communicate with the application server before creating the snapshot and create the snapshot after waiting for the response returned by the storage device, when the preset service operation is completed, the application server actively triggers to generate the snapshot SCSI instruction and issues the snapshot SCSI instruction to the storage device, and the storage device can respond to the snapshot SCSI instruction and directly create the corresponding snapshot; therefore, on one hand, the application triggers to create the snapshot based on the SCSI instruction issued by the application server to the storage device, so that the snapshot creation speed can be increased; on the other hand, the application server does not need to additionally install snapshot agent software, and better compatibility and usability of different systems are achieved.
In the embodiments of the present specification, an application server in a storage system performs data interaction with a storage device through a SCSI command; all entities in the storage system and the above SCSI command conform to the specification of the SCSI protocol, and are not described herein.
The SCSI protocol defines a SCSI model that defines various entities and interactions between entities in a SCSI architecture. In the above SCSI model, the SCSI interface on the application server is called Initiator, and the storage device connected to it is called Target; logically, the operation mode of communication between Initiator and Target may correspond to a client/server mode.
The Application server may include at least an Application Client (Application driver); the Target may at least include a Device Server and a Task Manager, and the Device Server may include a LUN of the Target end; wherein, the Application Client can communicate with the Device Server. For example, in practical applications, the Application Client issues a SCSI command to the Device Server through the Initiator, and the LUN in the Device Server can process the SCSI command and return a response to the Application Client.
The SCSI Command may be implemented based on a CDB (Command description Block) in general. The CDB may include an Operation Code (Operation Code), a Logical Block Address (Logical Block Address), an allocation length field (Transfer), and a Control field (Control Byte). Wherein, the operation code is used for identifying the operation type executed by the SCSI instruction server; the logical block address is used for identifying the logical block address in the logical unit volume or the partition, and the length of the field is variable; the assignment Length field may include Transfer Length, Parameter List Length, Allocation Length, etc., which may vary in Length; the control field may contain vendor-defined bits, reserved bits, NACA, etc.; for the definition and usage of each field in the CDB, refer to the SCSI SPC-4 specification, which is not described herein.
In practical applications, there are several common SCSI commands. For example, the inquiry instruction is used for requesting, by an Application Client, basic information of a storage device, where the basic information of the storage device may include configuration information of a target port and an LUN; for another example, the report LUNS instruction is used for the Application Client to discover the LUN list of the target storage device; for another example, the test unit ready instruction is used for the Application Client to detect the state of the LUN; for another example, a mode select instruction is used by the Application Client to configure the parameters of the storage device in a mode page (mode page); for another example, the mode sense instruction is used for the Application Client to query the content of the mode page, which may include the configuration information of the target port and the LUN. In the SCSI command in the embodiment of the present specification, except that the customizable portion of the command may be preset, other formats and usages are referred to in the SCSI SPC-4 specification, and are not described herein again.
The mode page refers to a format for storing logical unit parameters. The logic unit of the storage device can contain a plurality of parameters, and the logic unit can organize the parameters of the same class together; through the mode page format, the storage device can provide the logical unit parameters of the storage device for the outside, and the external device can also configure the logical unit parameters of the storage device. In practical applications, the mode page may include: control mode page, caching mode page, power control page, etc.; in this specification, no limitation is made to the specific type of mode page.
The present application is described below with reference to specific embodiments and specific application scenarios.
Referring to fig. 2, fig. 2 is a flowchart illustrating a snapshot creation method according to an exemplary embodiment, where the method is applied to a storage device and performs the following steps:
step 201: receiving an SCSI instruction issued by an application server, wherein the SCSI instruction is generated by triggering when the application server responds to the completion of preset business operation;
step 202: detecting whether the SCSI instruction is a snapshot SCSI instruction or not, wherein the snapshot SCSI instruction indicates the storage device to create a snapshot;
step 203: and if so, responding to the snapshot SCSI instruction, and creating a snapshot corresponding to the snapshot SCSI instruction.
In a storage system, the application server processes the service of a user, and the service data required by the service operation can be called from the storage equipment; after the application server completes the operation on the service, the service data after the operation processing may be stored in the storage device.
For example, in practical applications, the application server may first write the service data into the cache, and then write the service data in the cache into the hard disk when the storage device is idle. In another practical application, the application server may write the service data into a buffer area of the database, and then write the data in the buffer area into a data file corresponding to the database, where the data file is stored in the storage device.
In this specification, the storage device receives an SCSI command issued by an application server, where the SCSI command is generated by triggering the application server when a preset service operation is completed. That is to say, when the application server detects that the preset service operation is completed, the application server actively triggers and generates an SCSI command for instructing the storage device to create a snapshot, and issues the SCSI command to the storage device.
In this specification, the storage device at least includes a hardware structure capable of storing data, such as a magnetic disk; the storage device may further include software having a control function, such as configuration software corresponding to the storage device, and the like. The storage device in this specification may store data and data files of an application server connected to the storage device, and may create a snapshot for the data, and the hardware structure and software configuration of the storage device are not limited in this specification.
In this specification, the SCSI command received by the storage device may include not only a predefined SCSI command instructing the storage device to create a snapshot, but also various SCSI commands for performing service processing between the original application server and the storage device.
In practical applications, the step of "completing the preset service operation" may include the step of the application server determining, according to a requirement of a user, that the storage device needs to create a corresponding snapshot, so as to save a time of a data state when the current service operation is completed. For example, when a service processed by the application server copies a large amount of data and performs SYNC operation, the data currently cached is written into the storage device. For another example, when the application server writes a large amount of data in the corresponding database and generates a checkpoint, the database executes a DBWR to write the buffered data block into the data file.
In practical application, the "completion of the preset service operation" may further include a snapshot time point set in the application server by the user according to a requirement of the user. For example, a user sets a time point policy for creating a snapshot according to an actual service requirement, and the application server may generate a snapshot time point according to the policy and instruct the storage device to create a corresponding snapshot. For another example, after the application server executes a certain service step, when the user considers that a snapshot needs to be created to save the current data state, the snapshot time point may be created by manual operation, so that the application server instructs the storage device to create a corresponding snapshot.
It should be clear that, in this specification, the application server triggers and generates an SCSI command for instructing the storage device to create a snapshot when responding to the completion of the preset service operation, and issues the SCSI command to the storage device, so that the storage device creates a corresponding snapshot after receiving the SCSI command; in other words, the created snapshot is a snapshot required by the user, or the application server determines a snapshot that the user may need according to the processing process of the service. For the specific case of "the preset service operation is completed" and the specific step of "the application server determines that the preset service operation is completed", the embodiment of the present specification is only an exemplary example and is not limited.
In this specification, the storage device detects whether the received SCSI command from the application server is a snapshot SCSI command, where the snapshot SCSI command is used to instruct the storage device to create a snapshot. Since the SCSI command received by the storage device includes not only a predefined SCSI command instructing the storage device to create a snapshot, but also various SCSI commands for performing service processing between the original application server and the storage device, the storage device needs to detect whether the received SCSI command is a predefined SCSI command instructing the storage device to create a snapshot.
In this specification, the snapshot SCSI command refers to a SCSI command that is customized by a user based on a SCSI protocol and is used to instruct a storage device to create a snapshot, and may use a SCSI command that is not currently used and is customizable by a manufacturer or a user, or may use a SCSI command that includes an unused field that is customizable by a manufacturer or a user. With respect to the customizable SCSI command utilized by the snapshot SCSI command, the embodiments of the present disclosure are only exemplary and not limiting.
In this specification, a specific manner of detecting the snapshot SCSI command may be that the storage device detects an operation type and an operation target of the SCSI command according to an operation code, a control field, and the like of the SCSI command. In practical application, the storage device may at least detect the operation code of the SCSI command to obtain the action type of the SCSI command, and according to the action type of the SCSI command, may determine whether the command instructs the storage device to create a snapshot; if the storage device detects that the SCSI instruction indicates that the storage device creates a snapshot, the SCSI instruction is a snapshot SCSI instruction.
For example, after receiving an inquiry instruction from an application server, the storage device detects the instruction, and detects that a custom field indicating that the storage device creates a snapshot is carried in an operation code of the inquiry instruction, so that the inquiry instruction is a snapshot SCSI instruction. In practical application, the snapshot SCSI command may also be another customizable SCSI command, which is not limited in this specification.
In an embodiment shown, the storage device detects whether the SCSI command carries a snapshot creation command word indicating that the storage device creates a snapshot in a preset custom field; if yes, determining the SCSI instruction as a snapshot SCSI instruction.
In practical application, when the existing SCSI command is used to generate a snapshot SCSI command, a bit which can be defined by user in an operation code of the SCSI command can be preset as a snapshot creation command word, and an unused field in the SCSI command can be preset as a snapshot creation command word; the snapshot creation command word is a custom field carried by an SCSI command and used for instructing the storage device to create a snapshot. The embodiments of the present disclosure are merely exemplary and not limiting with respect to the custom fields utilized by the snapshot creation command word and the specific format of the snapshot creation command word.
For example, since the CDB can be divided into a fixed-length CDB and a variable-length CDB, in practical applications, the fixed-length CDB occupies 16 bytes, and if the length defined by the fixed-length CDB itself is less than 16 bytes, the spare bytes can be filled with 0. The user can utilize the unused spare bytes to add self-defined snapshot creating command words based on the existing SCSI instruction; if the storage device detects that the SCSI instruction carries the snapshot creation command word in the preset custom field of the SCSI instruction, the SCSI instruction is the snapshot SCSI instruction.
In another embodiment, the storage device detects whether the SCSI command is a mode select SCSI command; if the command is a mode select SCSI command, detecting whether the mode select SCSI command carries a subpage code indicating that the storage device creates a snapshot in a preset custom field, wherein the preset custom field is a custom mode page; and if the file carries the subpage code indicating the storage equipment to create the snapshot, further determining that the SCSI instruction carries a snapshot creation command word indicating the storage equipment to create the snapshot in a preset custom field.
In practical applications, the mode select instruction is used by the Application Client to configure parameters of the storage device in a mode page, the mode sense instruction is used by the Application Client to query the content of the mode page, and the mode page is a page shared by the mode select instruction and the mode sense instruction. According to the specification of SPC-4, a mode page can be customized by a user or a manufacturer if the value of the page code in the mode page is any one of values from 0x20H to 0x3 EH. In an embodiment of the present specification, an unused, customizable mode page may be preset as a mode page for instructing a storage device to create a snapshot.
For example, the user sets a mode page having a page code value of 0x22H, the format of which is illustrated in table 1, as a snapshot creation command word instructing the storage device to create a snapshot, in advance.
Figure BDA0002750711840000151
TABLE 1
As shown in table 1, in the above mode page, PS (parameters save) is a standard parameter of the mode page, where a setting of 1 indicates that data of the mode page is stored in a preset position, and a setting of 0 indicates that the data of the mode page is saved, and the PS in the mode page corresponding to the mode select instruction has no practical meaning and is a reserved bit. Spf (SubPage format) is a flag bit indicating whether SubPage is enabled, and when set to 0, indicates that SubPage is not enabled, and when set to 1, indicates that SubPage is enabled. The page code is used to distinguish between different mode pages. The SubPage Code is used for representing different functions realized by different subpages, and in a mode page corresponding to the mode select instruction, when the SubPage Code is 00H, the SubPage Code represents a command field for creating a snapshot. The date of snapshot is a variable length field, and is used for indicating The time for creating The snapshot, and when The service triggers generation of The snapshot SCSI command, The current time can be converted into a time parameter in seconds, so as to be transmitted to The storage device.
In practical applications, if the storage device detects that the mode page carries a SubPage Code indicating that the storage device creates a snapshot in the customized mode page, it may be determined that the mode select SCSI command carries a snapshot creation command word in a preset custom field.
For example, if the storage device receives a mode select instruction from the application server, and the mode select instruction carries a mode page with a page code value of 0x22H, the SCSI instruction carries a custom mode page; the storage device continues to detect the mode page, where the value of the SPF parameter is 1, and the value of the SubPage Code is 00H, and then the storage device may confirm that the mode select instruction carries the snapshot creation command word in the customized mode page.
In an embodiment, the snapshot SCSI command is a synchronous SCSI command.
In practical application, when the storage device receives a synchronous snapshot SCSI command from the application server, the application server may suspend other business IOs temporarily before the synchronous snapshot SCSI command is executed, that is, the application server may not issue other business IOs to the LUN of the storage device where the snapshot is to be created, from the time the synchronous snapshot SCSI command is issued to the time the snapshot creation corresponding to the command is completed.
It should be noted that, when the snapshot SCSI command issued by the application server to the storage device is a synchronous SCSI command, the application server may suspend other service IOs temporarily, so as to ensure that the data state of the LUN in the storage device where the snapshot is to be created does not change before the synchronous snapshot SCSI command is executed, and ensure the integrity of the snapshot data.
In this specification, if the storage device detects that the received SCSI command is a snapshot SCSI command, a snapshot corresponding to the snapshot SCSI command is created in response to the snapshot SCSI command. The specific ways of creating the snapshot may include COW (Copy On Write), ROW (Redirect On Write); the specific manner in which the snapshot is created in this specification is not limiting in this specification.
In practical application, the storage device may respond to the snapshot SCSI command, and call a snapshot interface of the storage device to create a snapshot; the snapshot interface may obtain relevant parameters required for creating a snapshot based on the snapshot SCSI command, call a snapshot creating command preset by the storage device, allocate RAID in the storage device as a snapshot capacity, and create a snapshot corresponding to the snapshot SCSI command according to the snapshot creating command issued by the snapshot interface in the allocated snapshot capacity. For a specific process of creating a snapshot by calling a snapshot interface of a storage device, reference may be made to related technologies, which are not limited in this specification.
For example, if the storage device detects that a snapshot SCSI command is received, the snapshot SCSI command may be analyzed, at least LUN information of a storage volume that needs to create a snapshot may be obtained, an existing snapshot creation interface in the storage device is called, and a snapshot creation command based on the LUN information is issued to the storage device, so that the storage device creates a snapshot corresponding to the snapshot SCSI command.
In practical application, the storage device may obtain a snapshot time point corresponding to the snapshot SCSI command by analyzing the snapshot SCSI command, where the snapshot time point is a time when the application server generates the snapshot SCSI command; the storage device may also obtain a snapshot time point according to its own system time, where the snapshot time point is a time when the storage device actually creates a snapshot. The specific manner in which the storage device obtains the snapshot time point is not limited in this specification.
For example, the application server responds to the completion of the service execution SYNC operation, actively triggers and generates a mode select instruction, and sets a mode page with a page code value of 0x26H as a snapshot creation command word in advance; after The storage device receives The mode select instruction, if The storage device detects that The parameter SPF of The mode page corresponding to The mode select instruction is 1, The SubPage Code is 00H, and The date of snapshot contains a time parameter indicating snapshot creation, The SCSI instruction is determined to be a snapshot SCSI instruction; the storage device responds to The snapshot SCSI instruction, analyzes The snapshot SCSI instruction, can obtain LUN information of a snapshot to be created, analyzes a time parameter in The date of snapshot in The mode page, obtains a snapshot time point, and accordingly creates a snapshot corresponding to The snapshot time point; wherein the snapshot time point of the snapshot is the time when the application server wishes to create the snapshot.
In an embodiment shown in the present invention, the snapshot SCSI command further carries LUN information of a storage volume to be snapshot created; when the storage equipment responds to the snapshot SCSI instruction to create a snapshot, the storage equipment acquires LUN information of the storage volume of the snapshot to be created, and detects whether the LUN corresponding to the LUN information belongs to a preset consistency group, wherein the consistency group comprises a plurality of member LUNs; if the LUN belongs to a preset consistency group, responding to the snapshot SCSI instruction, and creating snapshots of all member LUNs corresponding to the consistency group to which the LUN belongs; and if the LUN does not belong to the preset consistency group, responding to the snapshot SCSI instruction, and creating a snapshot of the LUN corresponding to the LUN.
The "consistency group" may contain several member LUNs, which have an association in the business process. In practical applications, the processing of certain services on the application server may need to be based on multiple LUNs; for example, database services need to be based on data LUNs, configuration LUNs, log LUNs, and so on. When the service needs to acquire data at a certain time, it is necessary to ensure that the data acquired from the corresponding LUNs have consistency, that is, the data acquired from the LUNs need to correspond to the same time plane, otherwise, the acquired data cannot be used for service processing.
In the above embodiment, the "preset consistency group" means that if the processing of some services on the application server needs to be based on multiple LUNs and there is a data consistency requirement for the multiple LUNs, multiple consistency groups may be created in advance, and the LUNs with associated data are added to a certain consistency group.
In practical application, when service data has a requirement for consistency, if a snapshot needs to be created for a certain member LUN in a consistency group, the storage system may suspend service IO of all member LUNs in the consistency group, then execute related operations to obtain data at the current time, and then recover service IO of all member LUNs, thereby ensuring data consistency.
For example, the storage device analyzes the received snapshot SCSI command, and acquires LUN information of a corresponding storage volume to be snapshot created; the storage device may first query the consistency group list to detect whether the LUN corresponding to the LUN information belongs to a preset consistency group; if the LUN belongs to a certain consistency group, a group snapshot interface of the storage device can be called to create a snapshot for all the member LUNs of the consistency group; the group snapshot interface may obtain relevant parameters required for creating a snapshot based on the snapshot SCSI command, call a preset group snapshot creating command of the storage device, allocate an RAID in the storage device as a snapshot capacity, and create a snapshot corresponding to all member LUNs of the consistency group in the allocated snapshot capacity according to the group snapshot creating command issued by the snapshot interface. As to a specific process of creating a group snapshot by calling a group snapshot interface of a storage device, reference may be made to related technologies, and this specification is not limited thereto.
It should be noted that, before creating a corresponding snapshot in response to a snapshot SCSI command, the storage device first detects whether a LUN corresponding to LUN information of a storage volume to be created with the snapshot corresponding to the snapshot SCSI command belongs to a preset consistency group, and if the LUN belongs to the preset consistency group, creates a group snapshot for the consistency group to which the LUN belongs, thereby ensuring that data of all member LUNs of the consistency group are on the same time plane, that is, achieving data consistency of all member LUNs in the consistency group.
In an embodiment shown in the present disclosure, when the storage device receives a synchronous snapshot SCSI command from the application server and a snapshot corresponding to the synchronous snapshot SCSI command is created successfully, the storage device returns a successful response corresponding to the synchronous snapshot SCSI command to the application server, so that the application server can receive the successful response and continue to issue other service IOs.
In another embodiment shown, when the storage device receives a synchronous snapshot SCSI command from the application server and fails to create a snapshot corresponding to the synchronous snapshot SCSI command, the storage device returns a failure response corresponding to the synchronous snapshot SCSI command to the application server, so that the application server can receive the failure response and select to re-issue the snapshot SCSI command or continue to issue other business IO.
In practical applications, after the Target end executes the SCSI command, a response is returned to the Initiator of the SCSI command, where the response is used to indicate whether the SCSI command is executed successfully. In practical application, after receiving a response returned by the storage device, the application server can continue to issue other service IO according to a result of whether the snapshot creation corresponding to the response is successful; the SCSI command may also be reissued until the snapshot creation, which may be required by the application server, is successful.
For example, the storage device fails to create the snapshot corresponding to the synchronous snapshot SCSI command, and returns a response to the application server, where the response may include a result of the failure to create the snapshot, a reason for the failure to create the snapshot, and the like; after receiving the response returned by the storage device, the application server may give up creating the snapshot corresponding to the synchronous snapshot SCSI command and continue issuing other business IO according to the reason of failure in creating the snapshot, or retry creating the snapshot corresponding to the synchronous snapshot SCSI command and resend the snapshot SCSI command.
It should be noted that, after the storage device returns a response indicating whether the synchronous snapshot SCSI command successfully creates the snapshot to the application server, when the response indicates that the storage snapshot creation fails, the application server may further perform whether to retry creating the snapshot, so as to ensure that the snapshot important to the user can be successfully created, thereby avoiding a situation that the creation of the snapshot is not successful, but the data state of the original storage volume has changed.
In the technical solution of the present specification, an application server actively triggers and generates a snapshot SCSI command when completing a preset service operation according to a service processing process, and issues the snapshot SCSI command to a storage device; and the storage equipment receives the snapshot SCSI instruction and creates a corresponding snapshot. On one hand, the method and the device can realize that the storage device creates the snapshot according to the requirements of the user, thereby ensuring the business integrity of the snapshot data; on the other hand, the snapshot is triggered and created based on the SCSI instruction issued by the application server to the storage device, so that the snapshot creating speed can be increased.
Further, in the technical solution of this specification, when the snapshot SCSI command issued by the application server to the storage device is a synchronous SCSI command, the application server may suspend other service IOs temporarily, so as to ensure that the data state of the LUN to be snapshot created in the storage device does not change before the synchronous snapshot SCSI command is executed, and ensure the integrity of snapshot data.
Further, in the technical solution of this specification, before creating a corresponding snapshot in response to a snapshot SCSI command, the storage device first detects whether a LUN of a storage volume to be created with the snapshot corresponding to the snapshot SCSI command belongs to a preset consistency group, and if so, creates a group snapshot for the consistency group to which the LUN belongs, thereby ensuring data consistency of all member LUNs in the consistency group.
Further, in the technical solution of this specification, after the storage device returns a response indicating whether the synchronous snapshot SCSI command successfully creates the snapshot to the application server, when the response indicates that the storage snapshot creation fails, the application server may further perform whether retry of creating the snapshot is required, so as to ensure that the snapshot important to the user can be successfully created.
Corresponding to the above method embodiments, the present specification further provides an embodiment of creating a snapshot apparatus.
Referring to fig. 3, fig. 3 is a block diagram of a snapshot creation apparatus according to an exemplary embodiment, where the apparatus is applied to a storage device, and the apparatus may include the following modules:
a receiving module 301, configured to receive an SCSI command issued by an application server, where the SCSI command is generated by triggering the application server to complete a preset service operation;
a detecting module 302, configured to detect whether the SCSI command received by the receiving module is a snapshot SCSI command, where the snapshot SCSI command indicates the storage device to create a snapshot;
a creating module 303, configured to, according to a detection result of the detecting module, if the detection result is positive, respond to the snapshot SCSI command, and create a snapshot corresponding to the snapshot SCSI command.
In this embodiment, the detection module 302 of the apparatus is specifically configured to: detecting whether the SCSI instruction carries a snapshot creating command word indicating the storage device to create a snapshot in a preset custom field; if yes, determining the SCSI instruction as a snapshot SCSI instruction.
In this embodiment, the detection module 302 of the apparatus is specifically configured to: detecting whether the SCSI instruction is a mode select SCSI instruction; if yes, detecting whether a custom mode page in the mode select SCSI instruction carries a subpage code indicating the storage device to create a snapshot; if yes, determining that the SCSI instruction carries a snapshot creating command word indicating the storage device to create the snapshot in a preset custom field.
In this embodiment, the creating module 303 of the apparatus is specifically configured to: acquiring LUN information of a storage volume of a snapshot to be created carried in the snapshot SCSI instruction, and detecting whether an LUN corresponding to the LUN information belongs to a preset consistency group, wherein the consistency group comprises a plurality of member LUNs; if the member LUN belongs to the consistency group, responding to the snapshot SCSI instruction, and creating snapshots of all member LUNs corresponding to the consistency group to which the LUN belongs for the LUN information of all members in the consistency group to which the LUN belongs; and if not, responding to the snapshot SCSI instruction, and creating a snapshot of the LUN corresponding to the LUN information.
In this embodiment, when the snapshot SCSI command received by the receiving module 301 of the apparatus is a synchronous SCSI command, the creating module 303 of the apparatus is further configured to, when creating a snapshot corresponding to the snapshot SCSI command is successful, return a successful response corresponding to the snapshot SCSI command to the application server, so that the application server receives the successful response and continues to issue a service IO.
In this embodiment, when the snapshot SCSI command received by the receiving module 301 of the apparatus is a synchronous SCSI command, the creating module 303 of the apparatus is further configured to, when creating a snapshot corresponding to the snapshot SCSI command fails, return a failure response corresponding to the snapshot SCSI command to the application server, so that the application server receives the failure response, and re-issues the snapshot SCSI command or continues to issue a service IO.
In addition, the present specification also provides an embodiment of creating a storage device in which the snapshot apparatus is located.
Corresponding to the above method embodiments, the present specification further provides an embodiment of creating a snapshot apparatus. The embodiment of the snapshot creating apparatus of the present specification can be applied to a storage device. The device embodiments may be implemented by software, or by hardware, or by a combination of hardware and software. Taking a software implementation as an example, as a logical device, the device is formed by reading, by a processor of a storage device where the device is located, a corresponding computer program instruction in a non-volatile memory into an internal memory for operation. From a hardware aspect, please refer to fig. 4, where fig. 4 is a hardware structure diagram of a storage device where a snapshot creating apparatus is located in an exemplary embodiment, except for the processor, the memory, the network interface, and the nonvolatile memory shown in fig. 4, the storage device where the apparatus is located in the embodiment may also include other hardware according to an actual function of the storage device, which is not described again.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are only illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution in the specification. One of ordinary skill in the art can understand and implement it without inventive effort.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
In a typical configuration, a computer includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic disk storage, quantum memory, graphene-based storage media or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The terminology used in the description of the one or more embodiments is for the purpose of describing the particular embodiments only and is not intended to be limiting of the description of the one or more embodiments. As used in one or more embodiments of the present specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used in one or more embodiments of the present description to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of one or more embodiments herein. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
The above description is only for the purpose of illustrating the preferred embodiments of the one or more embodiments of the present disclosure, and is not intended to limit the scope of the one or more embodiments of the present disclosure, and any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the one or more embodiments of the present disclosure should be included in the scope of the one or more embodiments of the present disclosure.
The above description is only a preferred embodiment of the present disclosure, and should not be taken as limiting the present disclosure, and any modifications, equivalents, improvements, etc. made within the spirit and principle of the present disclosure should be included in the scope of the present disclosure.

Claims (10)

1. A snapshot creation method, applied to a storage device, the method comprising:
receiving an SCSI instruction issued by an application server, wherein the SCSI instruction is generated by triggering the application server when the application server responds to the completion of preset business operation;
detecting whether the SCSI instruction is a snapshot SCSI instruction or not, wherein the snapshot SCSI instruction indicates the storage device to create a snapshot;
and if so, responding to the snapshot SCSI instruction, and creating a snapshot corresponding to the snapshot SCSI instruction.
2. The method of claim 1, wherein the snapshot SCSI command is a synchronous SCSI command.
3. The method of claim 1, wherein said detecting whether said SCSI command is a snapshot SCSI command comprises:
detecting whether the SCSI instruction carries a snapshot creating command word indicating the storage device to create a snapshot in a preset custom field;
if yes, determining the SCSI instruction as a snapshot SCSI instruction.
4. The method according to claim 3, wherein said detecting whether said SCSI instruction carries a snapshot creation command word in a predetermined custom field, said snapshot creation command word instructing said storage device to create a snapshot comprises:
detecting whether the SCSI instruction is a mode select SCSI instruction;
if the command is a mode select SCSI command, detecting whether the mode select SCSI command carries a subpage code indicating that the storage device creates a snapshot in a preset custom field, wherein the preset custom field is a custom mode page;
and if the file carries the subpage code indicating the storage equipment to create the snapshot, further determining that the SCSI instruction carries a snapshot creation command word indicating the storage equipment to create the snapshot in a preset self-defined field.
5. The method according to claim 1, wherein the snapshot SCSI command further carries LUN information of a storage volume to be snapshot created;
the creating the snapshot corresponding to the snapshot SCSI instruction in response to the snapshot SCSI instruction comprises:
acquiring LUN information of the storage volume of the snapshot to be created, and detecting whether the LUN corresponding to the LUN information belongs to a preset consistency group, wherein the consistency group comprises a plurality of member LUNs;
if the member LUN belongs to the consistency group, responding to the snapshot SCSI instruction, and creating snapshots of all member LUNs corresponding to the consistency group to which the LUN belongs;
and if not, responding to the snapshot SCSI instruction, and creating a snapshot of the LUN corresponding to the LUN information.
6. The method of claim 2, further comprising:
and when the snapshot corresponding to the snapshot SCSI instruction is successfully created, returning a successful response corresponding to the snapshot SCSI instruction to the application server, so that the application server receives the successful response and continues to issue the service IO.
7. The method of claim 2, further comprising:
and when the snapshot corresponding to the snapshot SCSI instruction is failed to be created, returning a failure response corresponding to the snapshot SCSI instruction to the application server so that the application server receives the failure response and retransmits the snapshot SCSI instruction or continues to transmit the business IO.
8. A snapshot creation apparatus, the apparatus being applied to a storage device, the apparatus comprising:
the system comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving an SCSI instruction issued by an application server, and the SCSI instruction is generated by triggering when the application server responds to the completion of preset business operation;
the detection module is used for detecting whether the SCSI instruction received by the receiving module is a snapshot SCSI instruction, and the snapshot SCSI instruction indicates the storage device to create a snapshot;
and the creating module is used for responding to the snapshot SCSI instruction and creating the snapshot corresponding to the snapshot SCSI instruction according to the detection result of the detection module if the snapshot SCSI instruction is received.
9. The storage device is characterized by comprising a communication interface, a processor, a memory and a bus, wherein the communication interface, the processor and the memory are connected with each other through the bus;
the memory has stored therein machine-readable instructions, the processor executing the method of any of claims 1 to 7 by calling the machine-readable instructions.
10. A machine-readable storage medium having stored thereon machine-readable instructions which, when invoked and executed by a processor, carry out the method of any of claims 1 to 7.
CN202011183146.6A 2020-10-29 2020-10-29 Snapshot creating method and device Pending CN112286869A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011183146.6A CN112286869A (en) 2020-10-29 2020-10-29 Snapshot creating method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011183146.6A CN112286869A (en) 2020-10-29 2020-10-29 Snapshot creating method and device

Publications (1)

Publication Number Publication Date
CN112286869A true CN112286869A (en) 2021-01-29

Family

ID=74353356

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011183146.6A Pending CN112286869A (en) 2020-10-29 2020-10-29 Snapshot creating method and device

Country Status (1)

Country Link
CN (1) CN112286869A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004118413A (en) * 2002-09-25 2004-04-15 Hitachi Ltd Storage system, storage device, host computer, and snapshot creation method
US20050005070A1 (en) * 2003-07-02 2005-01-06 Wai Lam Snapshot marker
CN103064763A (en) * 2012-12-27 2013-04-24 华为技术有限公司 Data backup method and related device and system
CN103853632A (en) * 2012-12-07 2014-06-11 华为技术有限公司 Snapshot method, service node, master control node and system
CN105302922A (en) * 2015-11-24 2016-02-03 无锡江南计算技术研究所 Realizing method for snapshot of distributed file system
US20180075000A1 (en) * 2016-09-15 2018-03-15 Oracle International Corporation Providing way to store process data object state as snapshots at different points of process
CN107918650A (en) * 2017-11-14 2018-04-17 郑州云海信息技术有限公司 A kind of snapshot creation method, device, system and computer-readable recording medium
US10268418B1 (en) * 2016-03-31 2019-04-23 EMC IP Holding Company LLC Accessing multiple data snapshots via one access point

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004118413A (en) * 2002-09-25 2004-04-15 Hitachi Ltd Storage system, storage device, host computer, and snapshot creation method
US20050005070A1 (en) * 2003-07-02 2005-01-06 Wai Lam Snapshot marker
CN103853632A (en) * 2012-12-07 2014-06-11 华为技术有限公司 Snapshot method, service node, master control node and system
CN103064763A (en) * 2012-12-27 2013-04-24 华为技术有限公司 Data backup method and related device and system
CN105302922A (en) * 2015-11-24 2016-02-03 无锡江南计算技术研究所 Realizing method for snapshot of distributed file system
US10268418B1 (en) * 2016-03-31 2019-04-23 EMC IP Holding Company LLC Accessing multiple data snapshots via one access point
US20180075000A1 (en) * 2016-09-15 2018-03-15 Oracle International Corporation Providing way to store process data object state as snapshots at different points of process
CN107918650A (en) * 2017-11-14 2018-04-17 郑州云海信息技术有限公司 A kind of snapshot creation method, device, system and computer-readable recording medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
本书编写组: "税务灾难恢复系统建设 思考篇", 北京:中国税务出版社 *

Similar Documents

Publication Publication Date Title
US8595461B2 (en) Management of recycling bin for thinly-provisioned logical volumes
EP3206128B1 (en) Data storage method, data storage apparatus, and storage device
KR100439675B1 (en) An efficient snapshot technique for shated large storage
CN109522154B (en) Data recovery method and related equipment and system
CN106776147B (en) Differential data backup method and differential data backup device
US20130111103A1 (en) High-speed synchronous writes to persistent storage
KR20140061444A (en) Volatile memory representation of nonvolatile storage device set
CN109902034B (en) Snapshot creating method and device, electronic equipment and machine-readable storage medium
US8560775B1 (en) Methods for managing cache configuration
CN106528338B (en) Remote data copying method, storage device and storage system
CN103412822A (en) Operation method of non-volatile RAM, data operation method and relevant device
CN113568566A (en) Method, host device and storage server for seamless migration of simple storage service by using index object
US9619336B2 (en) Managing production data
CN113157487A (en) Data recovery method and apparatus thereof
WO2020081899A1 (en) Systems, methods, and storage media for using the otherwise-unutilized storage space on a storage device
US10936231B2 (en) Allocating snapshot group identifiers
WO2022242665A1 (en) Data storage method and related device
CN112286869A (en) Snapshot creating method and device
US11537597B1 (en) Method and system for streaming data from portable storage devices
US9639417B2 (en) Storage control apparatus and control method
US12007852B2 (en) Systems and methods for backing up clustered and non-clustered data
US11550506B2 (en) Systems and methods for accessing hybrid storage devices
US11593230B2 (en) Efficient mechanism for data protection against cloud region failure or site disasters and recovery time objective (RTO) improvement for backup applications
US11586508B2 (en) Systems and methods for backing up volatile storage devices
US20230050976A1 (en) File system aware computational storage block

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20210129

RJ01 Rejection of invention patent application after publication