WO2016107443A1 - 一种快照处理方法及相关设备 - Google Patents
一种快照处理方法及相关设备 Download PDFInfo
- Publication number
- WO2016107443A1 WO2016107443A1 PCT/CN2015/098112 CN2015098112W WO2016107443A1 WO 2016107443 A1 WO2016107443 A1 WO 2016107443A1 CN 2015098112 W CN2015098112 W CN 2015098112W WO 2016107443 A1 WO2016107443 A1 WO 2016107443A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- lun
- storage device
- snapshot
- command
- mirrored
- 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.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/16—Error detection or correction of the data by redundancy in hardware
- G06F11/20—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
- G06F11/2053—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant
- G06F11/2056—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant by mirroring
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; 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/0614—Improving the reliability of storage systems
- G06F3/0619—Improving the reliability of storage systems in relation to data integrity, e.g. data losses, bit errors
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operations
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operations
- G06F11/1446—Point-in-time backing up or restoration of persistent data
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; 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/061—Improving I/O performance
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; 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/0634—Configuration or reconfiguration of storage systems by changing the state or mode of one or more devices
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; 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/0646—Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
- G06F3/065—Replication mechanisms
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; 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/0655—Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
- G06F3/0659—Command handling arrangements, e.g. command buffers, queues, command scheduling
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; 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/0662—Virtualisation aspects
- G06F3/0665—Virtualisation aspects at area level, e.g. provisioning of virtual or logical volumes
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; 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]
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; 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/0671—In-line storage system
- G06F3/0683—Plurality of storage devices
- G06F3/0689—Disk arrays, e.g. RAID, JBOD
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2201/00—Indexing scheme relating to error detection, to error correction, and to monitoring
- G06F2201/84—Using snapshots, i.e. a logical point-in-time copy of the data
Definitions
- the present invention relates to the field of electronic technologies, and in particular, to a snapshot processing method and related devices.
- the active-active data center has two mirrored data volumes, and they show the same identity and attributes to the upper application and the server. It can be regarded as a logically integrated and two mirrored data points. Mirrored volume.”
- a snapshot can be understood as a copy of a data set that includes an image of the corresponding data at a point in time (the point in time when the copy begins), or a copy of the data set at a certain time.
- a live-active snapshot is a snapshot of a dual-active mirrored volume. In fact, a pair of mirrored snapshots are formed in the active-active mirrored volume. The data is exactly the same, so that the active-active mirrored volume can be rolled back to a certain moment.
- the invention provides a snapshot processing method and related equipment. There is no need to block or suspend the I/O interface during the snapshot process, which not only ensures data consistency between the primary storage device and the mirrored storage device, but also increases the rate of snapshot operations.
- the first aspect of the present invention provides a snapshot processing method, where the method is applied to a storage system, where the storage system includes a primary storage device and a mirror storage device, and the primary storage device and the mirror storage device are in a working mode.
- the primary storage device includes a logical unit LUN (Logical Unit Number), and the mirrored storage device includes a mirrored LUN of the LUN.
- the method is performed by the primary storage device, and includes:
- the method further includes:
- the method further includes:
- the service data is written to the LUN according to the ID of the LUN.
- the method further includes:
- the snapshot state of the LUN is set to a completion state, where the completion state is used to indicate that the primary storage device has completed snapshot processing on the LUN.
- a second aspect of the present invention provides a snapshot processing method, where the method is applied to a storage system, where the storage system includes a primary storage device and a mirror storage device, and the primary storage device and the mirror storage device are in a working mode.
- the primary storage device includes a logical unit LUN
- the mirrored storage device includes a mirrored LUN of the LUN.
- the method is performed by the mirrored storage device, including:
- Snapshot processing is performed on the mirrored LUN, and the ID of the mirrored LUN is the same as the ID of the LUN.
- the method further includes:
- the mirroring LUN is determined according to the ID of the LUN, and the snapshot state of the mirrored LUN is set to a ready state.
- the preparation state indicates that the mirrored storage device enters a preparation phase for performing snapshot processing on the mirrored LUN.
- the method further includes:
- the service data is written into the mirror LUN.
- the method further includes:
- the service data is written into the mirror LUN.
- a third aspect of the present invention provides a snapshot processing device, where the device is applied to a storage system, where the storage system includes a primary storage device and a mirror storage device, and the primary storage device and the mirror storage device are in a working mode.
- the primary storage device includes a logical unit LUN
- the mirrored storage device includes a mirrored LUN of the LUN.
- the device is the primary storage device, and includes:
- a command receiving module configured to receive a snapshot request command, where the snapshot request command includes an ID of the LUN;
- a state setting module configured to determine the LUN according to the ID of the LUN, and set a snapshot state of the LUN to a ready state, where the preparation state indicates that the primary storage device enters a preparation for performing snapshot processing on the LUN Stage
- a command sending module configured to send a first snapshot command to the mirror storage device, where the first snapshot command includes an ID of the LUN, the first snapshot command is used to notify the mirror storage device, and the LUN is in the Preparation state
- a message receiving module configured to receive a response message that the mirror storage device sends a first snapshot command, where the response message is used to notify the primary storage device that the mirrored LUN is in a ready state;
- the snapshot processing module is configured to perform snapshot processing on the LUN.
- the device further includes:
- a first data receiving module configured to receive a write data request sent by the host, where the write data request includes service data and an ID of the LUN;
- a first data writing module configured to: after determining that the LUN is in the preparation state, write the service data to the LUN according to an ID of the LUN; and forward the write data request to the mirror Storage device.
- the device further includes:
- a second data receiving module configured to receive a write data request sent by the mirror storage device, where the write data request includes service data and an ID of the LUN;
- a second data writing module configured to determine, according to the ID of the LUN, that the LUN is in the preparation state, and write the service data into the LUN.
- the state setting module is further configured to set a snapshot state of the LUN to a completion state, where the completion state is used to indicate that the primary storage device has completed snapshot processing on the LUN.
- the command sending module is further configured to send a second snapshot command to the mirror storage device, where the second snapshot command includes an ID of the LUN, and the snapshot completion command is used to notify the mirror storage device that the LUN is in completion. status;
- the message receiving module is further configured to receive a response message of the second snapshot command sent by the mirror storage device, where the response message is used to notify the primary storage device that the mirrored storage device has completed the mirrored LUN Snapshot processing.
- a fourth aspect of the present invention provides a snapshot processing apparatus, the apparatus being applied to storage
- the storage system includes a primary storage device and a mirrored storage device, wherein the primary storage device and the mirrored storage device are in an operational mode, the primary storage device includes a logical unit LUN, and the mirrored storage device includes the LUN.
- the primary storage device includes a logical unit LUN
- the mirrored storage device includes the LUN.
- a first command receiving module configured to receive a first snapshot command sent by the primary storage device, where the first snapshot command includes an ID of the LUN, and the first snapshot command is used to notify the mirror storage device
- the primary storage device has completed snapshot processing on the LUN.
- the snapshot processing module is configured to perform snapshot processing on the mirrored LUN, where the ID of the mirrored LUN is the same as the ID of the LUN.
- the device further includes:
- a second command receiving module configured to receive a second snapshot command sent by the primary storage device, where the second snapshot command includes an ID of the LUN, and the second snapshot command is used to notify the mirror storage device The LUN is in the prepared state;
- a state setting module configured to determine the mirrored LUN according to the ID of the LUN, and set a snapshot state of the mirrored LUN to a ready state, where the prepared state indicates that the mirrored storage device enters a snapshot of the mirrored LUN Preparation stage of processing;
- the message sending module is configured to send a response message of the second snapshot command to the primary storage device, where the response message is used to notify the primary storage device that the mirrored LUN is in a ready state.
- the device further includes:
- a first data receiving module configured to receive a write data request sent by the primary storage device, where the write data request includes service data and an ID of the LUN;
- the first data writing module is configured to write the service data into the mirror LUN.
- the device further includes:
- a second data receiving module configured to receive a write data request sent by the host, where the write data request includes service data and an ID of the mirrored LUN;
- a data request forwarding module configured to forward the write data request to the primary storage device
- the second data writing module is configured to write the service data into the mirror LUN after receiving the message that the primary storage device writes the service data to the LUN.
- the embodiment of the present invention firstly receives a snapshot request command, and the snapshot request command includes the ID of the LUN.
- the LUN is determined according to the ID of the LUN, and the snapshot state of the LUN is set to the standby state.
- the first snapshot command is sent to the mirror storage device.
- the first snapshot command includes the ID of the LUN.
- the first snapshot command is used to notify the mirror storage device that the LUN is in the ready state.
- the response message of the snapshot command is used to notify the primary storage device that the mirrored LUN is in the ready state.
- the LUN is snapshotd, so that the I/O interface does not need to be blocked or suspended during the snapshot process, which not only ensures the primary storage device. Consistent with data in mirrored storage devices and increased rate of snapshot operations
- FIG. 1 is a flow chart of a first embodiment of a snapshot processing method proposed by the present invention
- FIG. 2 is a flowchart of a second embodiment of a snapshot processing method according to the present invention.
- FIG. 3 is a flowchart of a third embodiment of a snapshot processing method according to the present invention.
- FIG. 4 is a schematic structural diagram of a first embodiment of a snapshot processing apparatus according to the present invention.
- FIG. 5 is a schematic structural diagram of a second embodiment of a snapshot processing apparatus according to the present invention.
- FIG. 6 is a schematic structural diagram of a third embodiment of a snapshot processing apparatus according to the present invention.
- FIG. 7 is a schematic structural diagram of a fourth embodiment of a snapshot processing apparatus according to the present invention.
- FIG. 1 is a flowchart of a first embodiment of a snapshot processing method according to the present invention.
- the method is applied to a storage system, where the storage system includes a primary storage device and a mirror storage device, and the primary storage device and the mirror storage device are in an operation mode, and the primary storage device includes a logical unit.
- the LUN, the mirrored storage device includes a mirrored LUN of the LUN, wherein the primary storage device and the mirrored storage device are two sites distributed in different locations, and the primary storage device and the mirrored storage device in the working mode can receive the host.
- the write data request, the logical unit LUN is a logical storage space, and the method is performed by the primary storage device, including:
- S101 Receive a snapshot request command, where the snapshot request command includes an ID of the LUN.
- the snapshot request command is sent by a snapshot management module inside the primary storage device.
- S102 Determine the LUN according to the ID of the LUN, and set a snapshot state of the LUN to a ready state, where the preparation state indicates that the primary storage device enters a preparation phase for performing snapshot processing on the LUN.
- the write data request sent by the host may be received, where the write data request includes service data and an ID of the LUN;
- the service data is written to the LUN according to the ID of the LUN; and the write data request is forwarded to the mirror storage device.
- the write data request sent by the mirror storage device may be received, where the write data request includes The service data and the ID of the LUN; after the LUN is determined to be in the ready state according to the ID of the LUN, the service data is written to the LUN.
- the first snapshot command is sent to the mirror storage device, where the first snapshot command includes an ID of the LUN, and the first snapshot command is used to notify the mirror storage device that the LUN is in the ready state.
- the first snapshot command can carry service data.
- the mirror storage device after the mirroring storage device receives the first snapshot command, the mirror storage device first determines the mirrored LUN according to the ID of the LUN, and sets the snapshot state of the mirrored LUN to a ready state. The mirroring storage device enters a preparation phase for performing snapshot processing on the mirrored LUN, and then sends a response message of the first snapshot command to the primary storage device, where the response message is used to notify the primary storage device.
- the mirrored LUN is in a ready state. After the mirrored LUN of the mirrored storage device enters the ready state, the mirrored storage device can write the service data carried in the first snapshot command to the mirrored LUN.
- S104 Receive a response message that the mirror storage device sends a first snapshot command, where the response message is used to notify the primary storage device that the mirrored LUN is in a ready state.
- the primary storage device after performing the snapshot processing on the LUN, the primary storage device first sets the snapshot state of the LUN to a completion state, where the completion state is used to indicate that the primary storage device has completed the LUN Snapshot processing; then sending a second snapshot command to the mirror storage device, where the second snapshot command includes an ID of the LUN, and the snapshot completion command is used to notify the mirror storage device that the LUN is in a completed state, where The second snapshot command may also carry the service data.
- the mirrored storage device may also write the service data carried in the second snapshot command to the mirrored LUN, and perform the mirroring LUN on the mirrored LUN.
- the response message that the mirror storage device has completed the snapshot processing of the mirrored LUN is sent to the primary storage device.
- the primary storage device receives the response message of the second snapshot command sent by the mirrored storage device, and the response message is used to notify the primary storage device that the mirrored storage device has completed snapshot processing of the mirrored LUN.
- the snapshot request command is received first, and the snapshot request command includes the ID of the LUN; the LUN is determined according to the ID of the LUN, and the snapshot state of the LUN is set to the standby state, and the preparation state indicates that the primary storage device enters the snapshot of the LUN.
- the preparation phase of the processing secondly, the first snapshot command is sent to the mirror storage device, where the first snapshot command includes the ID of the LUN, the first snapshot command is used to notify the mirror storage device, and the LUN is in the ready state;
- the response message of the snapshot command is used to notify the primary storage device that the mirrored LUN is in the ready state.
- the LUN is snapshotd, so that the I/O interface does not need to be blocked or suspended during the snapshot process, which not only ensures the primary storage.
- the device is consistent with the data in the mirrored storage device and increases the rate of snapshot operations.
- FIG. 2 is a flowchart of a second embodiment of a snapshot processing method according to the present invention.
- the method is applied to a storage system, where the storage system includes a primary storage device and a mirror storage device, and the primary storage device and the mirror storage device are in an active mode, and the primary storage device includes a logical unit LUN.
- the mirror storage device includes a mirrored LUN of the LUN.
- the primary storage device and the mirrored storage device are two sites distributed in different locations.
- the primary storage device and the mirrored storage device in the working mode can receive the write data request sent by the host.
- the logical unit LUN is a logical storage space.
- the method is performed by the mirror storage device, including:
- S201 Receive a first snapshot command sent by the primary storage device, where the first snapshot command includes an ID of the LUN, and the first snapshot command is used to notify the mirror storage device, where the primary storage device is completed. Snapshot processing of the LUN.
- the mirror storage device may receive a second snapshot command sent by the primary storage device, where the second snapshot command includes an ID of the LUN, where the The second snapshot command is used to notify the mirrored storage device that the LUN is in the ready state; the mirrored storage device determines the mirrored LUN according to the ID of the LUN, and sets the snapshot state of the mirrored LUN to a ready state.
- the preparation state indicates that the mirror storage device enters the mirror LUN. a preparation phase of the snapshot processing; the mirror storage device sends a response message of the second snapshot command to the primary storage device, where the response message is used to notify the primary storage device that the mirrored LUN is in a ready state.
- the mirror storage device may first receive a write data request sent by the host, where the write data request includes service data and an ID of the mirrored LUN; The primary storage device forwards the write data request, and after receiving the write data request sent by the mirror storage device, the primary storage device determines, according to the ID of the LUN, that the LUN is in the ready state, and then writes the service data.
- the LUN is entered, and a message for writing the service data to the LUN is sent to the mirror storage device.
- the mirrored storage device After receiving the message that the primary storage device writes the service data to the LUN, the mirrored storage device writes the service data into the mirrored LUN. or
- the primary storage device After the primary storage device performs the snapshot processing on the LUN, the primary storage device first sets the snapshot state of the LUN to a completion state, where the completion state is used to indicate that the primary storage device has completed snapshot processing on the LUN. Then, the first snapshot command is sent to the mirror storage device, and after the mirror storage device receives the first snapshot command, the service data is written into the mirror LUN.
- the primary storage device may first receive a write data request sent by the host, where the write data request includes service data and an ID of the LUN; and then the primary storage device Determining, after the LUN is in the ready state, the service data is written to the LUN according to the ID of the LUN; and forwarding the write data request to the mirror storage device.
- the mirror storage device first receives a write data request sent by the primary storage device, where the write data request includes service data and an ID of the LUN, and then the service data is written into the mirror LUN.
- the primary storage device After the primary storage device performs the snapshot processing on the LUN, the primary storage device first sets the snapshot state of the LUN to a completion state, where the completion state is used to indicate that the primary storage device has completed snapshot processing on the LUN. And then sending a first snapshot command to the mirror storage device, after the mirror storage device receives the first snapshot command, the industry Data is written to the mirrored LUN.
- S202 Perform snapshot processing on the mirrored LUN, where the ID of the mirrored LUN is the same as the ID of the LUN.
- the first snapshot command is sent by the primary storage device, where the first snapshot command includes an ID of the LUN, and the first snapshot command is used to notify the mirror storage device.
- the primary storage device has completed the snapshot processing of the LUN; and then performs snapshot processing on the mirrored LUN, where the ID of the mirrored LUN is the same as the ID of the LUN. Therefore, there is no need to block or suspend the I/O interface during the snapshot process, which not only ensures data consistency between the primary storage device and the mirrored storage device, but also increases the rate of snapshot operations.
- FIG. 3 is a flowchart of a third embodiment of a snapshot processing method according to the present invention.
- the method is applied to a storage system, where the storage system includes a primary storage device and a mirror storage device, and the primary storage device and the mirror storage device are in an active mode, and the primary storage device includes a logical unit LUN.
- the mirror storage device includes a mirrored LUN of the LUN.
- the primary storage device and the mirrored storage device are two sites distributed in different locations.
- the primary storage device and the mirrored storage device in the working mode can receive the write data request sent by the host.
- the logical unit LUN is a logical storage space.
- the method includes:
- the primary storage device receives a snapshot request command, where the snapshot request command includes an ID of the LUN.
- the snapshot request command is sent by a snapshot management module inside the primary storage device.
- the primary storage device determines the LUN according to the ID of the LUN, and sets a snapshot state of the LUN to a ready state, where the preparation state indicates that the primary storage device enters a preparation phase for performing snapshot processing on the LUN. .
- the primary storage device receives a write data request sent by the host, where the write data request includes service data and an ID of the LUN.
- the primary storage device determines, according to the ID of the LUN, that the LUN is in the ready state, and writes the service data to the LUN.
- the primary storage device sends a first snapshot command to the mirror storage device, where the first snapshot command includes an ID of the LUN, the first snapshot command is used to notify the mirror storage device, and the LUN is in the preparation status.
- the first snapshot command can carry service data.
- the mirrored storage device determines the mirrored LUN according to the ID of the LUN, and sets the snapshot state of the mirrored LUN to a ready state, where the readiness state indicates that the mirrored storage device enters a snapshot process on the mirrored LUN. Preparation stage.
- S307 The image storage device writes the service data carried in the first snapshot command to the mirror LUN.
- the mirror storage device sends a response message of the first snapshot command to the primary storage device, where the response message is used to notify the primary storage device that the mirrored LUN is in a ready state.
- the primary storage device performs snapshot processing on the LUN.
- the primary storage device sets the snapshot state of the LUN to a completion state, where the completion state is used to indicate that the primary storage device has completed snapshot processing on the LUN.
- the primary storage device sends a second snapshot command to the mirror storage device, where the second snapshot command includes an ID of the LUN, and the snapshot completion command is used to notify the mirror storage device that the LUN is in a completed state, where The second snapshot command can also carry service data.
- S312 The image storage device writes the service data carried in the second snapshot command to the mirror LUN.
- the mirrored storage device performs snapshot processing on the mirrored LUN, where the ID of the mirrored LUN is the same as the ID of the LUN.
- the mirror storage device sends a response message to the primary storage device that the mirror storage device has completed the snapshot processing of the mirrored LUN.
- the response message is used to notify the primary storage device that the mirror storage device has completed snapshot processing of the mirrored LUN.
- the snapshot request command is first received, and the snapshot request command includes the ID of the LUN; the LUN is determined according to the ID of the LUN, and the snapshot state of the LUN is set.
- the preparation state indicates that the primary storage device enters the preparation phase for performing snapshot processing on the LUN.
- the first snapshot command is sent to the mirror storage device.
- the first snapshot command includes the ID of the LUN, and the first snapshot command is used to notify the mirror storage.
- the LUN is in the standby state.
- the LUN is in the standby state.
- the response message is used to notify the primary storage device.
- the mirrored LUN is in the ready state.
- the LUN is snapshotd. There is no need to block or suspend the I/O interface, which not only ensures data consistency between the primary storage device and the mirrored storage device, but also increases the rate of snapshot operations.
- FIG. 4 is a schematic structural diagram of a first embodiment of a snapshot processing apparatus according to the present invention.
- the device is applied to a storage system, where the storage system includes a primary storage device and a mirror storage device, wherein the primary storage device and the mirror storage device are in an operation mode, and the primary storage device includes logic.
- a unit LUN the mirror storage device includes a mirrored LUN of the LUN, wherein the primary storage device and the mirrored storage device are two sites distributed in different places, and the primary storage device and the mirror storage device in the working mode can receive the host.
- the write data request sent, the logical unit LUN is a logical storage space.
- the device is the primary storage device, including:
- the command receiving module 401 is configured to receive a snapshot request command, where the snapshot request command includes an ID of the LUN.
- the snapshot request command is sent by a snapshot management module inside the primary storage device.
- the state setting module 402 is configured to determine the LUN according to the ID of the LUN, and set the snapshot state of the LUN to a ready state, where the standby state indicates that the primary storage device enters a snapshot process on the LUN. Preparation Phase.
- the snapshot processing apparatus may further include:
- a first data receiving module configured to receive a write data request sent by the host, where the write data request includes service data and an ID of the LUN;
- a first data writing module configured to: after determining that the LUN is in the preparation state, write the service data to the LUN according to an ID of the LUN; and forward the write data request to the mirror Storage device.
- the snapshot processing apparatus may further include:
- a second data receiving module configured to receive a write data request sent by the mirror storage device, where the write data request includes service data and an ID of the LUN.
- a second data writing module configured to determine, according to the ID of the LUN, that the LUN is in the preparation state, and write the service data into the LUN.
- the command sending module 403 is configured to send a first snapshot command to the mirror storage device, where the first snapshot command includes an ID of the LUN, and the first snapshot command is used to notify the mirror storage device, where the LUN is located Prepare the state.
- the first snapshot command can carry service data.
- the mirror storage device after the mirroring storage device receives the first snapshot command, the mirror storage device first determines the mirrored LUN according to the ID of the LUN, and sets the snapshot state of the mirrored LUN to a ready state. The mirroring storage device enters a preparation phase for performing snapshot processing on the mirrored LUN, and then sends a response message of the first snapshot command to the primary storage device, where the response message is used to notify the primary storage device.
- the mirrored LUN is in a ready state. After the mirrored LUN of the mirrored storage device enters the ready state, the mirrored storage device can write the service data carried in the first snapshot command to the mirrored LUN.
- the message receiving module 404 is configured to receive a response message that the mirror storage device sends a first snapshot command, where the response message is used to notify the primary storage device that the mirrored LUN is in a ready state.
- the snapshot processing module 405 is configured to perform snapshot processing on the LUN.
- the primary storage device after performing the snapshot processing on the LUN, the primary storage device first sets the snapshot state of the LUN to a completion state, where the completion state is used to indicate that the primary storage device has completed the LUN Snapshot processing; then sending a second snapshot command to the mirror storage device, where the second snapshot command includes an ID of the LUN, and the snapshot completion command is used to notify the mirror storage device that the LUN is in a completed state, where The second snapshot command may also carry the service data.
- the mirrored storage device may also write the service data carried in the second snapshot command to the mirrored LUN, and perform the mirroring LUN on the mirrored LUN.
- the primary storage device After snapshot processing The primary storage device sends a response message that the mirrored storage device has completed the snapshot processing of the mirrored LUN.
- the primary storage device receives the response message of the second snapshot command sent by the mirrored storage device, and the response message is used to notify the primary storage device that the mirrored storage device has completed snapshot processing of the mirrored LUN.
- the snapshot request command is received first, and the snapshot request command includes the ID of the LUN; the LUN is determined according to the ID of the LUN, and the snapshot state of the LUN is set to the standby state, and the preparation state indicates that the primary storage device enters the snapshot of the LUN.
- the preparation phase of the processing secondly, the first snapshot command is sent to the mirror storage device, where the first snapshot command includes the ID of the LUN, the first snapshot command is used to notify the mirror storage device, and the LUN is in the ready state;
- the response message of the snapshot command is used to notify the primary storage device that the mirrored LUN is in the ready state.
- the LUN is snapshotd, so that the I/O interface does not need to be blocked or suspended during the snapshot process, which not only ensures the primary storage.
- the device is consistent with the data in the mirrored storage device and increases the rate of snapshot operations.
- FIG. 5 is a schematic structural diagram of a second embodiment of a snapshot processing apparatus according to the present invention.
- the device is applied to a storage system, where the storage system includes a primary storage device and a mirrored storage device, and the primary storage device and the mirrored storage device are in a working mode, and the primary storage device includes a logical unit LUN.
- the mirrored storage device includes a mirrored LUN of the LUN.
- the primary storage device and the mirrored storage device are two sites distributed in different locations.
- the primary storage device and the mirrored storage device in the working mode can receive the sent by the host.
- Write data request, logical unit LUN is a kind of logical storage space.
- the device is the mirror storage device, including:
- the first command receiving module 501 is configured to receive a first snapshot command sent by the primary storage device, where the first snapshot command includes an ID of the LUN, and the first snapshot command is used to notify the mirror storage device.
- the primary storage device has completed snapshot processing on the LUN.
- the snapshot processing apparatus may further include:
- a second command receiving module configured to receive the first snapshot sent by the primary storage device Receiving a second snapshot command sent by the primary storage device, the second snapshot command includes an ID of the LUN, and the second snapshot command is used to notify the mirror storage device, where the LUN is in the Ready state.
- a state setting module configured to determine the mirrored LUN according to the ID of the LUN, and set a snapshot state of the mirrored LUN to a ready state, where the prepared state indicates that the mirrored storage device enters a snapshot of the mirrored LUN The preparation phase of the process.
- the message sending module is configured to send a response message of the second snapshot command to the primary storage device, where the response message is used to notify the primary storage device that the mirrored LUN is in a ready state.
- the snapshot processing apparatus may further include:
- the first data receiving module is configured to receive a write data request sent by the primary storage device, where the write data request includes service data and an ID of the LUN.
- the primary storage device may first receive a write data request sent by the host, where the write data request includes service data and an ID of the LUN; and then the primary storage device is configured according to the primary storage device. Determining, by the ID of the LUN, that the LUN is in the ready state, writing the service data to the LUN; and forwarding the write data request to the mirror storage device.
- the first data writing module is configured to write the service data into the mirror LUN. Specifically, after receiving the write data request sent by the primary storage device, the service data may be written into the mirrored LUN. After the primary storage device performs the snapshot processing on the LUN, the primary storage device first sets the snapshot state of the LUN to a completion state, where the completion state is used to indicate that the primary storage device has completed the snapshot of the LUN. Processing, the first snapshot command is sent to the mirror storage device, and after the mirror storage device receives the first snapshot command, the service data is written into the mirror LUN.
- the snapshot processing apparatus may further include:
- the second data receiving module is configured to receive a write data request sent by the host, where the write data request includes service data and an ID of the mirrored LUN.
- a data request forwarding module configured to forward the write data request to the primary storage device.
- the primary storage device receives the write data request sent by the mirror storage device. After the LUN is determined to be in the ready state, the service data is written to the LUN, and the message that the service data is written to the LUN is sent to the mirror storage device.
- the second data writing module is configured to write the service data into the mirror LUN after receiving the message that the primary storage device writes the service data to the LUN.
- the primary storage device After the primary storage device performs the snapshot processing on the LUN, the primary storage device first sets the snapshot state of the LUN to a completion state, where the completion state is used to indicate that the primary storage device has completed the snapshot of the LUN. Processing, the first snapshot command is sent to the mirror storage device, and after the mirror storage device receives the first snapshot command, the service data is written into the mirror LUN.
- the snapshot processing module 502 is configured to perform snapshot processing on the mirrored LUN, where the ID of the mirrored LUN is the same as the ID of the LUN.
- the first snapshot command is sent by the primary storage device, where the first snapshot command includes an ID of the LUN, and the first snapshot command is used to notify the mirror storage device,
- the primary storage device has completed the snapshot processing of the LUN.
- the mirrored LUN is snapshot processed.
- the ID of the mirrored LUN is the same as the ID of the LUN. Therefore, there is no need to block or suspend the I/O interface during the snapshot process, which not only ensures data consistency between the primary storage device and the mirrored storage device, but also increases the rate of snapshot operations.
- FIG. 6 is a schematic structural diagram of a third embodiment of a snapshot processing apparatus according to the present invention.
- the device is applied to a storage system, where the storage system includes a primary storage device and a mirror storage device, wherein the primary storage device and the mirror storage device are in an operating mode, and the primary storage device includes a logical unit.
- a LUN, the mirrored storage device includes a mirrored LUN of the LUN, and the device is the primary storage device.
- the apparatus may include at least one processor 601, such as a CPU, at least one receiver 603, at least one memory 604, at least one transmitter 605, and at least one communication bus 602. Among them, the communication bus 602 is used to implement connection communication between these components.
- the receiver 603 and the transmitter 605 of the device in the embodiment of the present invention may be wired transmitting ends.
- the port can also be a wireless device, for example, including an antenna device for signaling or data communication with other node devices.
- the memory 604 may be a high speed RAM memory or a non-volatile memory such as at least one disk memory.
- the memory 604 can optionally also be at least one storage device located remotely from the aforementioned processor 601.
- a set of program codes is stored in the memory 604, and the processor 601 is configured to call program code stored in the memory for performing the following operations:
- the processor 601 may further perform the following operations:
- the service data is written to the LUN according to the ID of the LUN; and the write data request is forwarded to the mirror storage device.
- the processor 601 may further perform the following operations:
- the service data is written to the LUN according to the ID of the LUN.
- the processor 601 may further perform the following operations:
- the snapshot state of the LUN is set to a completion state, where the completion state is used to indicate that the primary storage device has completed snapshot processing on the LUN.
- FIG. 7 is a schematic structural diagram of a fourth embodiment of a snapshot processing apparatus according to the present invention.
- the device is applied to a storage system, where the storage system includes a primary storage device and a mirror storage device, wherein the primary storage device and the mirror storage device are in an operating mode, and the primary storage device includes a logical unit.
- a LUN the mirrored storage device includes a mirrored LUN of the LUN, and the device is the mirrored storage device.
- the apparatus may include at least one processor 701, such as a CPU, at least one receiver 703, at least one memory 704, at least one transmitter 705, and at least one communication bus 702.
- the communication bus 702 is used to implement connection communication between these components.
- the receiver 703 and the transmitter 705 of the device in the embodiment of the present invention may be a wired sending port, or may be a wireless device, for example, including an antenna device, for performing signaling or data communication with other node devices.
- the memory 704 may be a high speed RAM memory or a non-volatile memory such as at least one disk memory.
- the memory 704 can optionally also be at least one storage device located remotely from the aforementioned processor 701.
- a set of program codes is stored in the memory 704, and the processor 701 is configured to call program code stored in the memory for performing the following operations:
- Snapshot processing is performed on the mirrored LUN, and the ID of the mirrored LUN is the same as the ID of the LUN.
- the processor 701 may further perform the following operations:
- the mirroring LUN is determined according to the ID of the LUN, and the snapshot state of the mirrored LUN is set to a ready state.
- the preparation state indicates that the mirrored storage device enters a preparation phase for performing snapshot processing on the mirrored LUN.
- processor 701 can also perform the following operations:
- the service data is written into the mirror LUN.
- processor 701 can also perform the following operations:
- the service data is written into the mirror LUN.
- the program may be stored in a computer readable storage medium, and the storage medium may include: Flash disk, read-only memory (English: Read-Only Memory, referred to as: ROM), random accessor (English: Random Access Memory, referred to as: RAM), disk or optical disk.
- ROM Read-Only Memory
- RAM Random Access Memory
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Quality & Reliability (AREA)
- Computer Security & Cryptography (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Retry When Errors Occur (AREA)
Abstract
一种快照处理方法及相关设备,包括:接收快照请求命令,快照请求命令包括LUN的ID(S101);根据LUN的ID确定LUN,并将LUN的快照状态设置为准备状态,准备状态表示主存储设备进入对LUN进行快照处理的准备阶段(S102);向镜像存储设备发送第一快照命令,第一快照命令包括LUN的ID,第一快照命令用于通知镜像存储设备,LUN处于准备状态(S103);接收镜像存储设备发送第一快照命令的响应消息,响应消息用于通知主存储设备,镜像LUN处于准备状态(S104);对LUN进行快照处理(S105)。采用本方案,在快照过程中不需阻塞或者悬挂I/O接口,不仅保障了主存储设备与镜像存储设备中的数据一致性,而且提高了快照操作的速率。
Description
本发明涉及电子技术领域,尤其涉及一种快照处理方法及相关设备。
随着信息技术的不断发展,需要存储和处理的数据越来越多,数据中心建设需要满足越来越严苛的可靠性和容灾需求,同时提高资源利用率,双活数据中心解决方案应运而生,在两地搭建同样的主机和存储系统,中间通过专用网络互联,上层应用和服务器形成两地集群,同时存储也形成两地集群,这样可以实现应用、网络、存储多个层面的故障切换和负载均衡,从而可以使用更少的投资实现零数据丢失和接近0的业务中断时间。
双活数据中心有两地互为镜像的数据卷,而且它们对上层应用和服务器展现的是同样的标识和属性,可看作一个逻辑上一体而两份镜像数据分处两地的“双活镜像卷”。快照可以理解为数据集的一个拷贝,该拷贝包括相应数据在某个时间点(拷贝开始的时间点)的映像,也可以理解为数据集在某个时刻的一个副本。而双活快照是对双活镜像卷的快照,实际上是在双活镜像卷中形成一对镜像的快照,它们的数据是完全一样的,以便双活镜像卷可以回滚到某个时刻的状态(比如双活镜像卷的快照回滚,两地都要回滚到同一数据状态)。由于双活镜像卷两地数据是并发的,随时有数据变更,两地做快照时如果没有好的协同机制,最终形成的快照就可能不一致。
在现有技术方案中,多采用多站点同时阻塞或者悬挂I/O(input/output,输出与输入)接口,在没有新的数据变更之后,再一起做快照,但是,由于双活快照多是远距离跨站点的场景,并且两地
I/O接口都是并发的,同时每个写请求都要同步到远端,在大量数据并发的时候两站点互相等待暂停I/O接口完成的时延会比较大,影响上层应用业务,甚至出现卡顿或暂时无响应现象,导致快照速率不高。
发明内容
本发明提供一种快照处理方法及相关设备。在快照过程中不需阻塞或者悬挂I/O接口,不仅保障了主存储设备与镜像存储设备中的数据一致性,而且提高了快照操作的速率。
本发明第一方面提供了一种快照处理方法,所述方法应用于存储系统中,所述存储系统包括主存储设备和镜像存储设备,所述主存储设备和所述镜像存储设备均处于工作模式,所述主存储设备包括逻辑单元LUN(Logical Unit Number),所述镜像存储设备包括所述LUN的镜像LUN;所述方法由所述主存储设备执行,包括:
接收快照请求命令,所述快照请求命令包括所述LUN的ID(Identity,身份标识);
根据所述LUN的ID确定所述LUN,并将所述LUN的快照状态设置为准备状态,所述准备状态表示所述主存储设备进入对所述LUN进行快照处理的准备阶段;
向镜像存储设备发送第一快照命令,所述第一快照命令包括所述LUN的ID,所述第一快照命令用于通知所述镜像存储设备,所述LUN处于所述准备状态;
接收镜像存储设备发送第一快照命令的响应消息,所述响应消息用于通知所述主存储设备,所述镜像LUN处于准备状态;
对所述LUN进行快照处理。
在第一方面的第一种可能的实现方式中,在所述将所述LUN的快照状态设置为准备状态之后,所述方法还包括:
接收主机发送的写数据请求,所述写数据请求包括业务数据以及所述LUN的ID;
根据所述LUN的ID确定所述LUN处于所述准备状态后,将所
述业务数据写入所述LUN;并且,将所述写数据请求转发给所述镜像存储设备。
在第一方面的第二种可能的实现方式中,在所述将所述LUN的快照状态设置为准备状态之后,还包括:
接收所述镜像存储设备发送的写数据请求,所述写数据请求包括业务数据以及所述LUN的ID;
根据所述LUN的ID确定所述LUN处于所述准备状态后,将所述业务数据写入所述LUN。
在第一方面的第三种可能的实现方式中,在所述对所述LUN进行快照处理之后,还包括:
将所述LUN的快照状态设置为完成状态,所述完成状态用于表示所述主存储设备已完成对所述LUN的快照处理;
向镜像存储设备发送第二快照命令,所述第二快照命令包括所述LUN的ID,所述快照完成命令用于通知所述镜像存储设备所述LUN处于完成状态;
接收镜像存储设备发送的所述第二快照命令的响应消息,所述响应消息用于通知所述主存储设备,所述镜像存储设备已完成所述镜像LUN的快照处理。
本发明第二方面提供了一种快照处理方法,所述方法应用于存储系统中,所述存储系统包括主存储设备和镜像存储设备,所述主存储设备和镜像存储设备均处于工作模式,所述主存储设备包括逻辑单元LUN,所述镜像存储设备包括所述LUN的镜像LUN;所述方法由所述镜像存储设备执行,包括:
接收所述主存储设备发送的第一快照命令,所述第一快照命令包括所述LUN的ID,所述第一快照命令用于通知所述镜像存储设备,所述主存储设备已完成对所述LUN的快照处理;
对所述镜像LUN进行快照处理,所述镜像LUN的ID与所述LUN的ID相同。
在第二方面的第一种可能的实现方式中,在接收所述主存储设备
发送的第一快照命令之前,所述方法还包括:
接收所述主存储设备发送的第二快照命令,所述第二快照命令包括所述LUN的ID,所述第二快照命令用于通知所述镜像存储设备,所述LUN处于所述准备状态;
根据所述LUN的ID确定所述镜像LUN,并将所述镜像LUN的快照状态设置为准备状态,所述准备状态表示所述镜像存储设备进入对所述镜像LUN进行快照处理的准备阶段;
向所述主存储设备发送所述第二快照命令的响应消息,所述响应消息用于通知所述主存储设备,所述镜像LUN处于准备状态。
在第二方面的第二种可能的实现方式中,所述方法还包括:
接收所述主存储设备发送的写数据请求,所述写数据请求包括业务数据以及所述LUN的ID;
将所述业务数据写入所述镜像LUN中。
在第二方面的第三种可能的实现方式中,所述方法还包括:
接收主机发送的写数据请求,所述写数据请求包括业务数据以及所述镜像LUN的ID;
向所述主存储设备转发所述写数据请求;
在接收所述主存储设备将所述业务数据写入所述LUN的消息之后,将所述业务数据写入所述镜像LUN中。
本发明第三方面提供了一种快照处理装置,所述装置应用于存储系统中,所述存储系统包括主存储设备和镜像存储设备,所述主存储设备和所述镜像存储设备均处于工作模式,所述主存储设备包括逻辑单元LUN,所述镜像存储设备包括所述LUN的镜像LUN;所述装置为所述主存储设备,包括:
命令接收模块,用于接收快照请求命令,所述快照请求命令包括所述LUN的ID;
状态设置模块,用于根据所述LUN的ID确定所述LUN,并将所述LUN的快照状态设置为准备状态,所述准备状态表示所述主存储设备进入对所述LUN进行快照处理的准备阶段;
命令发送模块,用于向镜像存储设备发送第一快照命令,所述第一快照命令包括所述LUN的ID,所述第一快照命令用于通知所述镜像存储设备,所述LUN处于所述准备状态;
消息接收模块,用于接收镜像存储设备发送第一快照命令的响应消息,所述响应消息用于通知所述主存储设备,所述镜像LUN处于准备状态;
快照处理模块,用于对所述LUN进行快照处理。
在第三方面的第一种可能的实现方式中,所述装置还包括:
第一数据接收模块,用于接收主机发送的写数据请求,所述写数据请求包括业务数据以及所述LUN的ID;
第一数据写入模块,用于根据所述LUN的ID确定所述LUN处于所述准备状态后,将所述业务数据写入所述LUN;并且,将所述写数据请求转发给所述镜像存储设备。
在第三方面的第二种可能的实现方式中,所述装置还包括:
第二数据接收模块,用于接收所述镜像存储设备发送的写数据请求,所述写数据请求包括业务数据以及所述LUN的ID;
第二数据写入模块,用于根据所述LUN的ID确定所述LUN处于所述准备状态后,将所述业务数据写入所述LUN。
在第三方面的第三种可能的实现方式中,
所述状态设置模块,还用于将所述LUN的快照状态设置为完成状态,所述完成状态用于表示所述主存储设备已完成对所述LUN的快照处理;
所述命令发送模块,还用于向镜像存储设备发送第二快照命令,所述第二快照命令包括所述LUN的ID,所述快照完成命令用于通知所述镜像存储设备所述LUN处于完成状态;
所述消息接收模块,还用于接收镜像存储设备发送的所述第二快照命令的响应消息,所述响应消息用于通知所述主存储设备,所述镜像存储设备已完成所述镜像LUN的快照处理。
本发明第四方面提供了一种快照处理装置,所述装置应用于存储
系统中,所述存储系统包括主存储设备和镜像存储设备,所述主存储设备和镜像存储设备均处于工作模式,所述主存储设备包括逻辑单元LUN,所述镜像存储设备包括所述LUN的镜像LUN;所述装置为所述镜像存储设备,包括:
第一命令接收模块,用于接收所述主存储设备发送的第一快照命令,所述第一快照命令包括所述LUN的ID,所述第一快照命令用于通知所述镜像存储设备,所述主存储设备已完成对所述LUN的快照处理;
快照处理模块,用于对所述镜像LUN进行快照处理,所述镜像LUN的ID与所述LUN的ID相同。
在第四方面的第一种可能的实现方式中,所述装置还包括:
第二命令接收模块,用于接收所述主存储设备发送的第二快照命令,所述第二快照命令包括所述LUN的ID,所述第二快照命令用于通知所述镜像存储设备,所述LUN处于所述准备状态;
状态设置模块,用于根据所述LUN的ID确定所述镜像LUN,并将所述镜像LUN的快照状态设置为准备状态,所述准备状态表示所述镜像存储设备进入对所述镜像LUN进行快照处理的准备阶段;
消息发送模块,用于向所述主存储设备发送所述第二快照命令的响应消息,所述响应消息用于通知所述主存储设备,所述镜像LUN处于准备状态。
在第四方面的第二种可能的实现方式中,所述装置还包括:
第一数据接收模块,用于接收所述主存储设备发送的写数据请求,所述写数据请求包括业务数据以及所述LUN的ID;
第一数据写入模块,用于将所述业务数据写入所述镜像LUN中。
在第四方面的第三种可能的实现方式中,所述装置还包括:
第二数据接收模块,用于接收主机发送的写数据请求,所述写数据请求包括业务数据以及所述镜像LUN的ID;
数据请求转发模块,用于向所述主存储设备转发所述写数据请求;
第二数据写入模块,用于在接收所述主存储设备将所述业务数据写入所述LUN的消息之后,将所述业务数据写入所述镜像LUN中。
实施本发明实施例,首先接收快照请求命令,快照请求命令包括LUN的ID;根据LUN的ID确定LUN,并将LUN的快照状态设置为准备状态,准备状态表示主存储设备进入对LUN进行快照处理的准备阶段;其次,向镜像存储设备发送第一快照命令,第一快照命令包括LUN的ID,第一快照命令用于通知镜像存储设备,LUN处于准备状态;再次,接收镜像存储设备发送第一快照命令的响应消息,响应消息用于通知主存储设备,镜像LUN处于准备状态;最后,对LUN进行快照处理,从而在快照过程中不需阻塞或者悬挂I/O接口,不仅保障了主存储设备与镜像存储设备中的数据一致性,而且提高了快照操作的速率
为了更清楚地说明本发明实施例的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本发明提出的一种快照处理方法的第一实施例的流程图;
图2是本发明提出的一种快照处理方法的第二实施例的流程图;
图3是本发明提出的一种快照处理方法的第三实施例的流程图;
图4是本发明提出的一种快照处理装置的第一实施例的结构示意图;
图5是本发明提出的一种快照处理装置的第二实施例的结构示意图;
图6是本发明提出的一种快照处理装置的第三实施例的结构示意图;
图7是本发明提出的一种快照处理装置的第四实施例的结构示意图。
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
请参考图1,图1是本发明提出的一种快照处理方法的第一实施例流程图。
如图所示,该方法应用于存储系统中,所述存储系统包括主存储设备和镜像存储设备,所述主存储设备和所述镜像存储设备均处于工作模式,所述主存储设备包括逻辑单元LUN,所述镜像存储设备包括所述LUN的镜像LUN,其中,主存储设备和镜像存储设备为分布在异地的两个站点,处于工作模式下的主存储设备和镜像存储设备均可以接收主机发送的写数据请求,逻辑单元LUN是一种逻辑存储空间,所述方法由所述主存储设备执行,包括:
S101,接收快照请求命令,所述快照请求命令包括所述LUN的ID。其中,该快照请求命令由主存储设备内部的快照管理模块发出。
S102,根据所述LUN的ID确定所述LUN,并将所述LUN的快照状态设置为准备状态,所述准备状态表示所述主存储设备进入对所述LUN进行快照处理的准备阶段。
具体实现中,在所述将所述LUN的快照状态设置为准备状态之后,可以接收主机发送的写数据请求,所述写数据请求包括业务数据以及所述LUN的ID;
根据所述LUN的ID确定所述LUN处于所述准备状态后,将所述业务数据写入所述LUN;并且,将所述写数据请求转发给所述镜像存储设备。
可选的,在所述将所述LUN的快照状态设置为准备状态之后,可以接收所述镜像存储设备发送的写数据请求,所述写数据请求包括
业务数据以及所述LUN的ID;根据所述LUN的ID确定所述LUN处于所述准备状态后,将所述业务数据写入所述LUN。
S103,向镜像存储设备发送第一快照命令,所述第一快照命令包括所述LUN的ID,所述第一快照命令用于通知所述镜像存储设备,所述LUN处于所述准备状态。其中,第一快照命令可以携带业务数据。
具体实现中,在镜像存储设备接收到第一快照命令之后,镜像存储设备首先根据所述LUN的ID确定所述镜像LUN,并将所述镜像LUN的快照状态设置为准备状态,所述准备状态表示所述镜像存储设备进入对所述镜像LUN进行快照处理的准备阶段,然后向所述主存储设备发送所述第一快照命令的响应消息,所述响应消息用于通知所述主存储设备,所述镜像LUN处于准备状态。在镜像存储设备的镜像LUN进入准备状态之后,镜像存储设备可以将第一快照命令中携带的业务数据写入镜像LUN。
S104,接收镜像存储设备发送第一快照命令的响应消息,所述响应消息用于通知所述主存储设备,所述镜像LUN处于准备状态。
S105,对所述LUN进行快照处理。
具体实现中,在所述对所述LUN进行快照处理之后,主存储设备首先将所述LUN的快照状态设置为完成状态,所述完成状态用于表示所述主存储设备已完成对所述LUN的快照处理;然后向镜像存储设备发送第二快照命令,所述第二快照命令包括所述LUN的ID,所述快照完成命令用于通知所述镜像存储设备所述LUN处于完成状态,其中,第二快照命令也可以携带业务数据,在镜像存储设备接收到第二快照命令之后,镜像存储设备也可以将第二快照命令中携带的业务数据写入镜像LUN,并在对所述镜像LUN进行快照处理之后向主存储设备发送镜像存储设备已完成所述镜像LUN的快照处理的响应消息。最后主存储设备接收镜像存储设备发送的所述第二快照命令的响应消息,所述响应消息用于通知所述主存储设备,所述镜像存储设备已完成所述镜像LUN的快照处理。
在本发明实施例中,首先接收快照请求命令,快照请求命令包括LUN的ID;根据LUN的ID确定LUN,并将LUN的快照状态设置为准备状态,准备状态表示主存储设备进入对LUN进行快照处理的准备阶段;其次,向镜像存储设备发送第一快照命令,第一快照命令包括LUN的ID,第一快照命令用于通知镜像存储设备,LUN处于准备状态;再次,接收镜像存储设备发送第一快照命令的响应消息,响应消息用于通知主存储设备,镜像LUN处于准备状态;最后,对LUN进行快照处理,从而在快照过程中不需阻塞或者悬挂I/O接口,不仅保障了主存储设备与镜像存储设备中的数据一致性,而且提高了快照操作的速率。
请参考图2,图2是本发明提出的一种快照处理方法的第二实施例流程图。
如图所示,所述方法应用于存储系统中,所述存储系统包括主存储设备和镜像存储设备,所述主存储设备和镜像存储设备均处于工作模式,所述主存储设备包括逻辑单元LUN,所述镜像存储设备包括所述LUN的镜像LUN。其中,主存储设备和镜像存储设备为分布在异地的两个站点,处于工作模式下的主存储设备和镜像存储设备均可以接收主机发送的写数据请求,逻辑单元LUN是一种逻辑存储空间。所述方法由所述镜像存储设备执行,包括:
S201,接收所述主存储设备发送的第一快照命令,所述第一快照命令包括所述LUN的ID,所述第一快照命令用于通知所述镜像存储设备,所述主存储设备已完成对所述LUN的快照处理。
首先,在接收所述主存储设备发送的第一快照命令之前,镜像存储设备可以接收所述主存储设备发送的第二快照命令,所述第二快照命令包括所述LUN的ID,所述第二快照命令用于通知所述镜像存储设备,所述LUN处于所述准备状态;镜像存储设备根据所述LUN的ID确定所述镜像LUN,并将所述镜像LUN的快照状态设置为准备状态,所述准备状态表示所述镜像存储设备进入对所述镜像LUN进行
快照处理的准备阶段;镜像存储设备向所述主存储设备发送所述第二快照命令的响应消息,所述响应消息用于通知所述主存储设备,所述镜像LUN处于准备状态。
其次,在将所述镜像LUN的快照状态设置为准备状态之后,镜像存储设备可以首先接收主机发送的写数据请求,所述写数据请求包括业务数据以及所述镜像LUN的ID;然后向所述主存储设备转发所述写数据请求,主存储设备接收到所述镜像存储设备发送的写数据请求之后,根据所述LUN的ID确定所述LUN处于所述准备状态后,将所述业务数据写入所述LUN,并向镜像存储设备发送将所述业务数据写入所述LUN的消息。镜像存储设备在接收所述主存储设备将所述业务数据写入所述LUN的消息之后,将所述业务数据写入所述镜像LUN中。或
在主存储设备对所述LUN进行快照处理之后,主存储设备首先将所述LUN的快照状态设置为完成状态,所述完成状态用于表示所述主存储设备已完成对所述LUN的快照处理;然后向镜像存储设备发送第一快照命令,镜像存储设备收到第一快照命令之后,将所述业务数据写入所述镜像LUN中。
可选的,在将所述LUN的快照状态设置为准备状态之后,主存储设备可以首先接收主机发送的写数据请求,所述写数据请求包括业务数据以及所述LUN的ID;然后主存储设备根据所述LUN的ID确定所述LUN处于所述准备状态后,将所述业务数据写入所述LUN;并且将所述写数据请求转发给所述镜像存储设备。镜像存储设备首先接收所述主存储设备发送的写数据请求,所述写数据请求包括业务数据以及所述LUN的ID,然后将所述业务数据写入所述镜像LUN中。或
在主存储设备对所述LUN进行快照处理之后,主存储设备首先将所述LUN的快照状态设置为完成状态,所述完成状态用于表示所述主存储设备已完成对所述LUN的快照处理;然后向镜像存储设备发送第一快照命令,镜像存储设备收到第一快照命令之后,将所述业
务数据写入所述镜像LUN中。
S202,对所述镜像LUN进行快照处理,所述镜像LUN的ID与所述LUN的ID相同。
在本发明实施例中,首先接收所述主存储设备发送的第一快照命令,所述第一快照命令包括所述LUN的ID,所述第一快照命令用于通知所述镜像存储设备,所述主存储设备已完成对所述LUN的快照处理;然后对所述镜像LUN进行快照处理,所述镜像LUN的ID与所述LUN的ID相同。从而在快照过程中不需阻塞或者悬挂I/O接口,不仅保障了主存储设备与镜像存储设备中的数据一致性,而且提高了快照操作的速率。
请参考图3,图3是本发明提出的一种快照处理方法的第三实施例流程图。如图所示,所述方法应用于存储系统中,所述存储系统包括主存储设备和镜像存储设备,所述主存储设备和镜像存储设备均处于工作模式,所述主存储设备包括逻辑单元LUN,所述镜像存储设备包括所述LUN的镜像LUN。其中,主存储设备和镜像存储设备为分布在异地的两个站点,处于工作模式下的主存储设备和镜像存储设备均可以接收主机发送的写数据请求,逻辑单元LUN是一种逻辑存储空间,所述方法包括:
S301,主存储设备接收快照请求命令,所述快照请求命令包括所述LUN的ID。其中,该快照请求命令由主存储设备内部的快照管理模块发出。
S302,主存储设备根据所述LUN的ID确定所述LUN,并将所述LUN的快照状态设置为准备状态,所述准备状态表示所述主存储设备进入对所述LUN进行快照处理的准备阶段。
S303,主存储设备接收主机发送的写数据请求,所述写数据请求包括业务数据以及所述LUN的ID。
S304,主存储设备根据所述LUN的ID确定所述LUN处于所述准备状态后,将所述业务数据写入所述LUN。
S305,主存储设备向镜像存储设备发送第一快照命令,所述第一快照命令包括所述LUN的ID,所述第一快照命令用于通知所述镜像存储设备,所述LUN处于所述准备状态。其中,第一快照命令可以携带业务数据。
S306,镜像存储设备根据所述LUN的ID确定所述镜像LUN,并将所述镜像LUN的快照状态设置为准备状态,所述准备状态表示所述镜像存储设备进入对所述镜像LUN进行快照处理的准备阶段。
S307,镜像存储设备将第一快照命令中携带的业务数据写入镜像LUN。
S308,镜像存储设备向所述主存储设备发送所述第一快照命令的响应消息,所述响应消息用于通知所述主存储设备,所述镜像LUN处于准备状态。
S309,主存储设备对所述LUN进行快照处理。
S310,主存储设备将所述LUN的快照状态设置为完成状态,所述完成状态用于表示所述主存储设备已完成对所述LUN的快照处理。
S311,主存储设备向镜像存储设备发送第二快照命令,所述第二快照命令包括所述LUN的ID,所述快照完成命令用于通知所述镜像存储设备所述LUN处于完成状态,其中,第二快照命令也可以携带业务数据。
S312,镜像存储设备将第二快照命令中携带的业务数据写入镜像LUN。
S313,镜像存储设备对所述镜像LUN进行快照处理,所述镜像LUN的ID与所述LUN的ID相同。
S314,镜像存储设备向主存储设备发送镜像存储设备已完成所述镜像LUN的快照处理的响应消息。所述响应消息用于通知所述主存储设备,所述镜像存储设备已完成所述镜像LUN的快照处理。
在本发明实施例中,首先接收快照请求命令,快照请求命令包括LUN的ID;根据LUN的ID确定LUN,并将LUN的快照状态设置
为准备状态,准备状态表示主存储设备进入对LUN进行快照处理的准备阶段;其次,向镜像存储设备发送第一快照命令,第一快照命令包括LUN的ID,第一快照命令用于通知镜像存储设备,LUN处于准备状态;再次,接收镜像存储设备发送第一快照命令的响应消息,响应消息用于通知主存储设备,镜像LUN处于准备状态;最后,对LUN进行快照处理,从而在快照过程中不需阻塞或者悬挂I/O接口,不仅保障了主存储设备与镜像存储设备中的数据一致性,而且提高了快照操作的速率。
请参考图4,图4是本发明提出的一种快照处理装置的第一实施例的结构示意图。如图所示,所述装置应用于存储系统中,所述存储系统包括主存储设备和镜像存储设备,所述主存储设备和所述镜像存储设备均处于工作模式,所述主存储设备包括逻辑单元LUN,所述镜像存储设备包括所述LUN的镜像LUN;其中,主存储设备和镜像存储设备为分布在异地的两个站点,处于工作模式下的主存储设备和镜像存储设备均可以接收主机发送的写数据请求,逻辑单元LUN是一种逻辑存储空间。所述装置为所述主存储设备,包括:
命令接收模块401,用于接收快照请求命令,所述快照请求命令包括所述LUN的ID。其中,该快照请求命令由主存储设备内部的快照管理模块发出。
状态设置模块402,用于根据所述LUN的ID确定所述LUN,并将所述LUN的快照状态设置为准备状态,所述准备状态表示所述主存储设备进入对所述LUN进行快照处理的准备阶段。
具体实现中,所述快照处理装置还可以进一步包括:
第一数据接收模块,用于接收主机发送的写数据请求,所述写数据请求包括业务数据以及所述LUN的ID;
第一数据写入模块,用于根据所述LUN的ID确定所述LUN处于所述准备状态后,将所述业务数据写入所述LUN;并且,将所述写数据请求转发给所述镜像存储设备。
可选的,所述快照处理装置还可以进一步包括:
第二数据接收模块,用于接收所述镜像存储设备发送的写数据请求,所述写数据请求包括业务数据以及所述LUN的ID。
第二数据写入模块,用于根据所述LUN的ID确定所述LUN处于所述准备状态后,将所述业务数据写入所述LUN。
命令发送模块403,用于向镜像存储设备发送第一快照命令,所述第一快照命令包括所述LUN的ID,所述第一快照命令用于通知所述镜像存储设备,所述LUN处于所述准备状态。其中,第一快照命令可以携带业务数据。
具体实现中,在镜像存储设备接收到第一快照命令之后,镜像存储设备首先根据所述LUN的ID确定所述镜像LUN,并将所述镜像LUN的快照状态设置为准备状态,所述准备状态表示所述镜像存储设备进入对所述镜像LUN进行快照处理的准备阶段,然后向所述主存储设备发送所述第一快照命令的响应消息,所述响应消息用于通知所述主存储设备,所述镜像LUN处于准备状态。在镜像存储设备的镜像LUN进入准备状态之后,镜像存储设备可以将第一快照命令中携带的业务数据写入镜像LUN。
消息接收模块404,用于接收镜像存储设备发送第一快照命令的响应消息,所述响应消息用于通知所述主存储设备,所述镜像LUN处于准备状态。
快照处理模块405,用于对所述LUN进行快照处理。
具体实现中,在所述对所述LUN进行快照处理之后,主存储设备首先将所述LUN的快照状态设置为完成状态,所述完成状态用于表示所述主存储设备已完成对所述LUN的快照处理;然后向镜像存储设备发送第二快照命令,所述第二快照命令包括所述LUN的ID,所述快照完成命令用于通知所述镜像存储设备所述LUN处于完成状态,其中,第二快照命令也可以携带业务数据,在镜像存储设备接收到第二快照命令之后,镜像存储设备也可以将第二快照命令中携带的业务数据写入镜像LUN,并在对所述镜像LUN进行快照处理之后向
主存储设备发送镜像存储设备已完成所述镜像LUN的快照处理的响应消息。最后主存储设备接收镜像存储设备发送的所述第二快照命令的响应消息,所述响应消息用于通知所述主存储设备,所述镜像存储设备已完成所述镜像LUN的快照处理。
在本发明实施例中,首先接收快照请求命令,快照请求命令包括LUN的ID;根据LUN的ID确定LUN,并将LUN的快照状态设置为准备状态,准备状态表示主存储设备进入对LUN进行快照处理的准备阶段;其次,向镜像存储设备发送第一快照命令,第一快照命令包括LUN的ID,第一快照命令用于通知镜像存储设备,LUN处于准备状态;再次,接收镜像存储设备发送第一快照命令的响应消息,响应消息用于通知主存储设备,镜像LUN处于准备状态;最后,对LUN进行快照处理,从而在快照过程中不需阻塞或者悬挂I/O接口,不仅保障了主存储设备与镜像存储设备中的数据一致性,而且提高了快照操作的速率。
请参考图5,图5是本发明提出的一种快照处理装置的第二实施例的结构示意图。如图所示,所述装置应用于存储系统中,所述存储系统包括主存储设备和镜像存储设备,所述主存储设备和镜像存储设备均处于工作模式,所述主存储设备包括逻辑单元LUN,所述镜像存储设备包括所述LUN的镜像LUN;其中,主存储设备和镜像存储设备为分布在异地的两个站点,处于工作模式下的主存储设备和镜像存储设备均可以接收主机发送的写数据请求,逻辑单元LUN是一种逻辑存储空间。所述装置为所述镜像存储设备,包括:
第一命令接收模块501,用于接收所述主存储设备发送的第一快照命令,所述第一快照命令包括所述LUN的ID,所述第一快照命令用于通知所述镜像存储设备,所述主存储设备已完成对所述LUN的快照处理。
具体实现中,所述快照处理装置还可以进一步包括:
第二命令接收模块,用于在接收所述主存储设备发送的第一快照
命令之前,接收所述主存储设备发送的第二快照命令,所述第二快照命令包括所述LUN的ID,所述第二快照命令用于通知所述镜像存储设备,所述LUN处于所述准备状态。
状态设置模块,用于根据所述LUN的ID确定所述镜像LUN,并将所述镜像LUN的快照状态设置为准备状态,所述准备状态表示所述镜像存储设备进入对所述镜像LUN进行快照处理的准备阶段。
消息发送模块,用于向所述主存储设备发送所述第二快照命令的响应消息,所述响应消息用于通知所述主存储设备,所述镜像LUN处于准备状态。
可选的,所述快照处理装置还可以进一步包括:
第一数据接收模块,用于接收所述主存储设备发送的写数据请求,所述写数据请求包括业务数据以及所述LUN的ID。具体的,在将所述LUN的快照状态设置为准备状态之后,主存储设备可以首先接收主机发送的写数据请求,所述写数据请求包括业务数据以及所述LUN的ID;然后主存储设备根据所述LUN的ID确定所述LUN处于所述准备状态后,将所述业务数据写入所述LUN;并且将所述写数据请求转发给所述镜像存储设备。
第一数据写入模块,用于将所述业务数据写入所述镜像LUN中。具体的,在接收所述主存储设备发送的写数据请求之后,可以将所述业务数据写入所述镜像LUN中。或在主存储设备对所述LUN进行快照处理之后,主存储设备首先将所述LUN的快照状态设置为完成状态,所述完成状态用于表示所述主存储设备已完成对所述LUN的快照处理;然后向镜像存储设备发送第一快照命令,镜像存储设备收到第一快照命令之后,将所述业务数据写入所述镜像LUN中。
可选的,所述快照处理装置还可以进一步包括:
第二数据接收模块,用于接收主机发送的写数据请求,所述写数据请求包括业务数据以及所述镜像LUN的ID。
数据请求转发模块,用于向所述主存储设备转发所述写数据请求。具体的,主存储设备接收到所述镜像存储设备发送的写数据请求
之后,根据所述LUN的ID确定所述LUN处于所述准备状态后,将所述业务数据写入所述LUN,并向镜像存储设备发送将所述业务数据写入所述LUN的消息。
第二数据写入模块,用于在接收所述主存储设备将所述业务数据写入所述LUN的消息之后,将所述业务数据写入所述镜像LUN中。或在主存储设备对所述LUN进行快照处理之后,主存储设备首先将所述LUN的快照状态设置为完成状态,所述完成状态用于表示所述主存储设备已完成对所述LUN的快照处理;然后向镜像存储设备发送第一快照命令,镜像存储设备收到第一快照命令之后,将所述业务数据写入所述镜像LUN中。
快照处理模块502,用于对所述镜像LUN进行快照处理,所述镜像LUN的ID与所述LUN的ID相同。
在本发明实施例中,接收所述主存储设备发送的第一快照命令,所述第一快照命令包括所述LUN的ID,所述第一快照命令用于通知所述镜像存储设备,所述主存储设备已完成对所述LUN的快照处理;对所述镜像LUN进行快照处理,所述镜像LUN的ID与所述LUN的ID相同。从而在快照过程中不需阻塞或者悬挂I/O接口,不仅保障了主存储设备与镜像存储设备中的数据一致性,而且提高了快照操作的速率。
请参考图6,图6是本发明提出的一种快照处理装置的第三实施例的结构示意图。如图所示,该装置应用于存储系统中,所述存储系统包括主存储设备和镜像存储设备,所述主存储设备和所述镜像存储设备均处于工作模式,所述主存储设备包括逻辑单元LUN,所述镜像存储设备包括所述LUN的镜像LUN;所述装置为所述主存储设备。该装置可以包括:至少一个处理器601,例如CPU,至少一个接收器603,至少一个存储器604,至少一个发送器605,至少一个通信总线602。其中,通信总线602用于实现这些组件之间的连接通信。其中,本发明实施例中装置的接收器603和发送器605可以是有线发送端
口,也可以为无线设备,例如包括天线装置,用于与其他节点设备进行信令或数据的通信。存储器604可以是高速RAM存储器,也可以是非不稳定的存储器(non-volatile memory),例如至少一个磁盘存储器。存储器604可选的还可以是至少一个位于远离前述处理器601的存储装置。存储器604中存储一组程序代码,且处理器601用于调用存储器中存储的程序代码,用于执行以下操作:
接收快照请求命令,所述快照请求命令包括所述LUN的ID;
根据所述LUN的ID确定所述LUN,并将所述LUN的快照状态设置为准备状态,所述准备状态表示所述主存储设备进入对所述LUN进行快照处理的准备阶段;
向镜像存储设备发送第一快照命令,所述第一快照命令包括所述LUN的ID,所述第一快照命令用于通知所述镜像存储设备,所述LUN处于所述准备状态;
接收镜像存储设备发送第一快照命令的响应消息,所述响应消息用于通知所述主存储设备,所述镜像LUN处于准备状态;
对所述LUN进行快照处理。
可选的,在所述将所述LUN的快照状态设置为准备状态之后,处理器601还可以执行以下操作:
接收主机发送的写数据请求,所述写数据请求包括业务数据以及所述LUN的ID;
根据所述LUN的ID确定所述LUN处于所述准备状态后,将所述业务数据写入所述LUN;并且,将所述写数据请求转发给所述镜像存储设备。
可选的,在所述将所述LUN的快照状态设置为准备状态之后,处理器601还可以执行以下操作:
接收所述镜像存储设备发送的写数据请求,所述写数据请求包括业务数据以及所述LUN的ID;
根据所述LUN的ID确定所述LUN处于所述准备状态后,将所述业务数据写入所述LUN。
可选的,在所述对所述LUN进行快照处理之后,处理器601还可以执行以下操作:
将所述LUN的快照状态设置为完成状态,所述完成状态用于表示所述主存储设备已完成对所述LUN的快照处理;
向镜像存储设备发送第二快照命令,所述第二快照命令包括所述LUN的ID,所述快照完成命令用于通知所述镜像存储设备所述LUN处于完成状态;
接收镜像存储设备发送的所述第二快照命令的响应消息,所述响应消息用于通知所述主存储设备,所述镜像存储设备已完成所述镜像LUN的快照处理。
请参考图7,图7是本发明提出的一种快照处理装置的第四实施例的结构示意图。如图所示,该装置应用于存储系统中,所述存储系统包括主存储设备和镜像存储设备,所述主存储设备和所述镜像存储设备均处于工作模式,所述主存储设备包括逻辑单元LUN,所述镜像存储设备包括所述LUN的镜像LUN;所述装置为所述镜像存储设备。该装置可以包括:至少一个处理器701,例如CPU,至少一个接收器703,至少一个存储器704,至少一个发送器705,至少一个通信总线702。其中,通信总线702用于实现这些组件之间的连接通信。其中,本发明实施例中装置的接收器703和发送器705可以是有线发送端口,也可以为无线设备,例如包括天线装置,用于与其他节点设备进行信令或数据的通信。存储器704可以是高速RAM存储器,也可以是非不稳定的存储器(non-volatile memory),例如至少一个磁盘存储器。存储器704可选的还可以是至少一个位于远离前述处理器701的存储装置。存储器704中存储一组程序代码,且处理器701用于调用存储器中存储的程序代码,用于执行以下操作:
接收所述主存储设备发送的第一快照命令,所述第一快照命令包括所述LUN的ID,所述第一快照命令用于通知所述镜像存储设备,所述主存储设备已完成对所述LUN的快照处理;
对所述镜像LUN进行快照处理,所述镜像LUN的ID与所述LUN的ID相同。
可选的,在接收所述主存储设备发送的第一快照命令之前,处理器701还可以执行以下操作:
接收所述主存储设备发送的第二快照命令,所述第二快照命令包括所述LUN的ID,所述第二快照命令用于通知所述镜像存储设备,所述LUN处于所述准备状态;
根据所述LUN的ID确定所述镜像LUN,并将所述镜像LUN的快照状态设置为准备状态,所述准备状态表示所述镜像存储设备进入对所述镜像LUN进行快照处理的准备阶段;
向所述主存储设备发送所述第二快照命令的响应消息,所述响应消息用于通知所述主存储设备,所述镜像LUN处于准备状态。
可选的,处理器701还可以执行以下操作:
接收所述主存储设备发送的写数据请求,所述写数据请求包括业务数据以及所述LUN的ID;
将所述业务数据写入所述镜像LUN中。
可选的,处理器701还可以执行以下操作:
接收主机发送的写数据请求,所述写数据请求包括业务数据以及所述镜像LUN的ID;
向所述主存储设备转发所述写数据请求;
在接收所述主存储设备将所述业务数据写入所述LUN的消息之后,将所述业务数据写入所述镜像LUN中。
需要说明的是,对于前述的各个方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明并不受所描述的动作顺序的限制,因为依据本发明,某一些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本发明所必须的。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例
中没有详细描述的部分,可以参见其他实施例的相关描述。
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,存储介质可以包括:闪存盘、只读存储器(英文:Read-Only Memory,简称:ROM)、随机存取器(英文:Random Access Memory,简称:RAM)、磁盘或光盘等。
以上对本发明实施例所提供的内容下载方法及相关设备、系统进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。
Claims (16)
- 一种快照处理方法,其特征在于,所述方法应用于存储系统中,所述存储系统包括主存储设备和镜像存储设备,所述主存储设备和所述镜像存储设备均处于工作模式,所述主存储设备包括逻辑单元LUN,所述镜像存储设备包括所述LUN的镜像LUN;所述方法由所述主存储设备执行,包括:接收快照请求命令,所述快照请求命令包括所述LUN的ID;根据所述LUN的ID确定所述LUN,并将所述LUN的快照状态设置为准备状态,所述准备状态表示所述主存储设备进入对所述LUN进行快照处理的准备阶段;向镜像存储设备发送第一快照命令,所述第一快照命令包括所述LUN的ID,所述第一快照命令用于通知所述镜像存储设备,所述LUN处于所述准备状态;接收镜像存储设备发送第一快照命令的响应消息,所述响应消息用于通知所述主存储设备,所述镜像LUN处于准备状态;对所述LUN进行快照处理。
- 如权利要求1所述的方法,其特征在于,在所述将所述LUN的快照状态设置为准备状态之后,所述方法还包括:接收主机发送的写数据请求,所述写数据请求包括业务数据以及所述LUN的ID;根据所述LUN的ID确定所述LUN处于所述准备状态后,将所述业务数据写入所述LUN;并且,将所述写数据请求转发给所述镜像存储设备。
- 如权利要求1所述的方法,其特征在于,在所述将所述LUN的快照状态设置为准备状态之后,还包括:接收所述镜像存储设备发送的写数据请求,所述写数据请求包括业务数据以及所述LUN的ID;根据所述LUN的ID确定所述LUN处于所述准备状态后,将所 述业务数据写入所述LUN。
- 如权利要求1所述的方法,其特征在于,在所述对所述LUN进行快照处理之后,还包括:将所述LUN的快照状态设置为完成状态,所述完成状态用于表示所述主存储设备已完成对所述LUN的快照处理;向镜像存储设备发送第二快照命令,所述第二快照命令包括所述LUN的ID,所述快照完成命令用于通知所述镜像存储设备所述LUN处于完成状态;接收镜像存储设备发送的所述第二快照命令的响应消息,所述响应消息用于通知所述主存储设备,所述镜像存储设备已完成所述镜像LUN的快照处理。
- 一种快照处理方法,其特征在于,所述方法应用于存储系统中,所述存储系统包括主存储设备和镜像存储设备,所述主存储设备和镜像存储设备均处于工作模式,所述主存储设备包括逻辑单元LUN,所述镜像存储设备包括所述LUN的镜像LUN;所述方法由所述镜像存储设备执行,包括:接收所述主存储设备发送的第一快照命令,所述第一快照命令包括所述LUN的ID,所述第一快照命令用于通知所述镜像存储设备,所述主存储设备已完成对所述LUN的快照处理;对所述镜像LUN进行快照处理,所述镜像LUN的ID与所述LUN的ID相同。
- 如权利要求5所述的方法,其特征在于,在接收所述主存储设备发送的第一快照命令之前,所述方法还包括:接收所述主存储设备发送的第二快照命令,所述第二快照命令包括所述LUN的ID,所述第二快照命令用于通知所述镜像存储设备,所述LUN处于所述准备状态;根据所述LUN的ID确定所述镜像LUN,并将所述镜像LUN的 快照状态设置为准备状态,所述准备状态表示所述镜像存储设备进入对所述镜像LUN进行快照处理的准备阶段;向所述主存储设备发送所述第二快照命令的响应消息,所述响应消息用于通知所述主存储设备,所述镜像LUN处于准备状态。
- 如权利要求5所述的方法,其特征在于,所述方法还包括:接收所述主存储设备发送的写数据请求,所述写数据请求包括业务数据以及所述LUN的ID;将所述业务数据写入所述镜像LUN中。
- 如权利要求5所述的方法,其特征在于,所述方法还包括:接收主机发送的写数据请求,所述写数据请求包括业务数据以及所述镜像LUN的ID;向所述主存储设备转发所述写数据请求;在接收所述主存储设备将所述业务数据写入所述LUN的消息之后,将所述业务数据写入所述镜像LUN中。
- 一种快照处理装置,其特征在于,所述装置应用于存储系统中,所述存储系统包括主存储设备和镜像存储设备,所述主存储设备和所述镜像存储设备均处于工作模式,所述主存储设备包括逻辑单元LUN,所述镜像存储设备包括所述LUN的镜像LUN;所述装置为所述主存储设备,包括:命令接收模块,用于接收快照请求命令,所述快照请求命令包括所述LUN的ID;状态设置模块,用于根据所述LUN的ID确定所述LUN,并将所述LUN的快照状态设置为准备状态,所述准备状态表示所述主存储设备进入对所述LUN进行快照处理的准备阶段;命令发送模块,用于向镜像存储设备发送第一快照命令,所述第一快照命令包括所述LUN的ID,所述第一快照命令用于通知所述镜像存储设备,所述LUN处于所述准备状态;消息接收模块,用于接收镜像存储设备发送第一快照命令的响应消息,所述响应消息用于通知所述主存储设备,所述镜像LUN处于准备状态;快照处理模块,用于对所述LUN进行快照处理。
- 如权利要求9所述的装置,其特征在于,所述装置还包括:第一数据接收模块,用于接收主机发送的写数据请求,所述写数据请求包括业务数据以及所述LUN的ID;第一数据写入模块,用于根据所述LUN的ID确定所述LUN处于所述准备状态后,将所述业务数据写入所述LUN;并且,将所述写数据请求转发给所述镜像存储设备。
- 如权利要求9所述的装置,其特征在于,所述装置还包括:第二数据接收模块,用于接收所述镜像存储设备发送的写数据请求,所述写数据请求包括业务数据以及所述LUN的ID;第二数据写入模块,用于根据所述LUN的ID确定所述LUN处于所述准备状态后,将所述业务数据写入所述LUN。
- 如权利要求9所述的装置,其特征在于,所述状态设置模块,还用于将所述LUN的快照状态设置为完成状态,所述完成状态用于表示所述主存储设备已完成对所述LUN的快照处理;所述命令发送模块,还用于向镜像存储设备发送第二快照命令,所述第二快照命令包括所述LUN的ID,所述快照完成命令用于通知所述镜像存储设备所述LUN处于完成状态;所述消息接收模块,还用于接收镜像存储设备发送的所述第二快照命令的响应消息,所述响应消息用于通知所述主存储设备,所述镜像存储设备已完成所述镜像LUN的快照处理。
- 一种快照处理装置,其特征在于,所述装置应用于存储系统 中,所述存储系统包括主存储设备和镜像存储设备,所述主存储设备和镜像存储设备均处于工作模式,所述主存储设备包括逻辑单元LUN,所述镜像存储设备包括所述LUN的镜像LUN;所述装置为所述镜像存储设备,包括:第一命令接收模块,用于接收所述主存储设备发送的第一快照命令,所述第一快照命令包括所述LUN的ID,所述第一快照命令用于通知所述镜像存储设备,所述主存储设备已完成对所述LUN的快照处理;快照处理模块,用于对所述镜像LUN进行快照处理,所述镜像LUN的ID与所述LUN的ID相同。
- 如权利要求13所述的装置,其特征在于,所述装置还包括:第二命令接收模块,用于接收所述主存储设备发送的第二快照命令,所述第二快照命令包括所述LUN的ID,所述第二快照命令用于通知所述镜像存储设备,所述LUN处于所述准备状态;状态设置模块,用于根据所述LUN的ID确定所述镜像LUN,并将所述镜像LUN的快照状态设置为准备状态,所述准备状态表示所述镜像存储设备进入对所述镜像LUN进行快照处理的准备阶段;消息发送模块,用于向所述主存储设备发送所述第二快照命令的响应消息,所述响应消息用于通知所述主存储设备,所述镜像LUN处于准备状态。
- 如权利要求13所述的装置,其特征在于,所述装置还包括:第一数据接收模块,用于接收所述主存储设备发送的写数据请求,所述写数据请求包括业务数据以及所述LUN的ID;第一数据写入模块,用于将所述业务数据写入所述镜像LUN中。
- 如权利要求13所述的装置,其特征在于,所述装置还包括:第二数据接收模块,用于接收主机发送的写数据请求,所述写数据请求包括业务数据以及所述镜像LUN的ID;数据请求转发模块,用于向所述主存储设备转发所述写数据请求;第二数据写入模块,用于在接收所述主存储设备将所述业务数据写入所述LUN的消息之后,将所述业务数据写入所述镜像LUN中。
Priority Applications (3)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2017526915A JP6431197B2 (ja) | 2014-12-31 | 2015-12-21 | スナップショット処理方法および関係付けられたデバイス |
| EP15875121.4A EP3200079A4 (en) | 2014-12-31 | 2015-12-21 | Snapshot processing method and related device |
| US15/498,832 US10503415B2 (en) | 2014-12-31 | 2017-04-27 | Snapshot processing method and related device |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201410854105.3 | 2014-12-31 | ||
| CN201410854105.3A CN105808374B (zh) | 2014-12-31 | 2014-12-31 | 一种快照处理方法及相关设备 |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US15/498,832 Continuation US10503415B2 (en) | 2014-12-31 | 2017-04-27 | Snapshot processing method and related device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2016107443A1 true WO2016107443A1 (zh) | 2016-07-07 |
Family
ID=56284228
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2015/098112 Ceased WO2016107443A1 (zh) | 2014-12-31 | 2015-12-21 | 一种快照处理方法及相关设备 |
Country Status (5)
| Country | Link |
|---|---|
| US (1) | US10503415B2 (zh) |
| EP (1) | EP3200079A4 (zh) |
| JP (1) | JP6431197B2 (zh) |
| CN (1) | CN105808374B (zh) |
| WO (1) | WO2016107443A1 (zh) |
Families Citing this family (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107329701A (zh) * | 2017-06-29 | 2017-11-07 | 郑州云海信息技术有限公司 | 一种存储系统中双活卷的创建方法、装置及系统 |
| CN107391307A (zh) * | 2017-07-27 | 2017-11-24 | 郑州云海信息技术有限公司 | 存储区域网络存储设备快照功能的测试方法及装置 |
| CN107391314A (zh) * | 2017-07-31 | 2017-11-24 | 郑州云海信息技术有限公司 | 一种支持双活的数据一致性保持方法与装置 |
| CN109460187B (zh) * | 2018-11-09 | 2022-05-03 | 郑州云海信息技术有限公司 | 一种qcow2文件数据一致性验证方法及验证终端 |
| EP3896571B1 (en) * | 2018-12-29 | 2023-10-04 | Huawei Technologies Co., Ltd. | Data backup method, apparatus and system |
| CN114697351B (zh) * | 2020-12-30 | 2023-03-10 | 华为技术有限公司 | 一种存储管理方法、设备及介质 |
| US11561867B2 (en) * | 2021-01-11 | 2023-01-24 | EMC IP Holding Company LLC | Synchronizing data copy operations for storage system with active-active storage configuration |
| US12008018B2 (en) * | 2021-04-22 | 2024-06-11 | EMC IP Holding Company LLC | Synchronous remote replication of snapshots |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7356574B2 (en) * | 2003-02-25 | 2008-04-08 | Hewlett-Packard Development Company, L.P. | Apparatus and method for providing dynamic and automated assignment of data logical unit numbers |
| CN101562761A (zh) * | 2009-05-18 | 2009-10-21 | 杭州华三通信技术有限公司 | 一种光网络中的备份存储方法和系统 |
| CN102053876A (zh) * | 2009-11-06 | 2011-05-11 | 杭州华三通信技术有限公司 | 快照建立方法、系统及应用服务器 |
| CN103843309A (zh) * | 2013-11-22 | 2014-06-04 | 华为技术有限公司 | 数据同步方法和数据同步系统 |
Family Cites Families (19)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7120824B2 (en) * | 2003-05-09 | 2006-10-10 | International Business Machines Corporation | Method, apparatus and program storage device for maintaining data consistency and cache coherency during communications failures between nodes in a remote mirror pair |
| US7277997B2 (en) * | 2004-03-16 | 2007-10-02 | International Business Machines Corporation | Data consistency for mirroring updatable source data storage |
| JP2008507777A (ja) * | 2004-07-23 | 2008-03-13 | イーエムシー コーポレイション | データレプリカのリモート記憶 |
| JP2007286860A (ja) | 2006-04-17 | 2007-11-01 | Hitachi Ltd | データ転送方法及び情報処理装置 |
| JP2009181206A (ja) | 2008-01-29 | 2009-08-13 | Hitachi Ltd | ストレージシステム及びスナップショット構成の移行方法 |
| EP2307975A4 (en) * | 2008-07-02 | 2012-01-18 | Hewlett Packard Development Co | VERIFYING REMOTE COPIES OF DATA |
| US8788768B2 (en) * | 2010-09-29 | 2014-07-22 | International Business Machines Corporation | Maintaining mirror and storage system copies of volumes at multiple remote sites |
| US20120254124A1 (en) * | 2011-03-30 | 2012-10-04 | International Business Machines Corporation | System, method, and computer program product for disaster recovery using asynchronous mirroring |
| US8463746B2 (en) * | 2011-03-30 | 2013-06-11 | International Business Machines Corporation | Method and system for replicating data |
| US8566530B2 (en) * | 2011-07-22 | 2013-10-22 | International Business Machines Corporation | Prefetching source tracks for destaging updated tracks in a copy relationship |
| US9372910B2 (en) * | 2012-01-04 | 2016-06-21 | International Business Machines Corporation | Managing remote data replication |
| US8990263B2 (en) * | 2012-03-15 | 2015-03-24 | International Business Machines Corporation | Policy-based management of storage functions in data replication environments |
| US9135121B2 (en) * | 2012-10-16 | 2015-09-15 | International Business Machines Corporation | Managing updates and copying data in a point-in-time copy relationship expressed as source logical addresses and target logical addresses |
| US20150081628A1 (en) * | 2013-09-17 | 2015-03-19 | International Business Machines Corporation | Flashcopy reservation for flashcopy onto a synchronously-mirrored source |
| US9298507B2 (en) * | 2013-09-26 | 2016-03-29 | International Business Machines Corporation | Data processing resource management |
| US9529679B2 (en) * | 2013-11-13 | 2016-12-27 | Verizon Patent And Licensing Inc. | Volume snapshot in a shared environment |
| US10387446B2 (en) * | 2014-04-28 | 2019-08-20 | International Business Machines Corporation | Merging multiple point-in-time copies into a merged point-in-time copy |
| US9747047B2 (en) * | 2014-06-25 | 2017-08-29 | International Business Machines Corporation | Performing a remote point-in-time copy to a source and target storages in further mirror copy relationships |
| US9881014B1 (en) * | 2014-06-30 | 2018-01-30 | EMC IP Holding Company LLC | Snap and replicate for unified datapath architecture |
-
2014
- 2014-12-31 CN CN201410854105.3A patent/CN105808374B/zh active Active
-
2015
- 2015-12-21 EP EP15875121.4A patent/EP3200079A4/en not_active Ceased
- 2015-12-21 JP JP2017526915A patent/JP6431197B2/ja active Active
- 2015-12-21 WO PCT/CN2015/098112 patent/WO2016107443A1/zh not_active Ceased
-
2017
- 2017-04-27 US US15/498,832 patent/US10503415B2/en active Active
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7356574B2 (en) * | 2003-02-25 | 2008-04-08 | Hewlett-Packard Development Company, L.P. | Apparatus and method for providing dynamic and automated assignment of data logical unit numbers |
| CN101562761A (zh) * | 2009-05-18 | 2009-10-21 | 杭州华三通信技术有限公司 | 一种光网络中的备份存储方法和系统 |
| CN102053876A (zh) * | 2009-11-06 | 2011-05-11 | 杭州华三通信技术有限公司 | 快照建立方法、系统及应用服务器 |
| CN103843309A (zh) * | 2013-11-22 | 2014-06-04 | 华为技术有限公司 | 数据同步方法和数据同步系统 |
Non-Patent Citations (1)
| Title |
|---|
| See also references of EP3200079A4 * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN105808374A (zh) | 2016-07-27 |
| US10503415B2 (en) | 2019-12-10 |
| EP3200079A1 (en) | 2017-08-02 |
| JP6431197B2 (ja) | 2018-11-28 |
| US20170228181A1 (en) | 2017-08-10 |
| CN105808374B (zh) | 2019-02-05 |
| EP3200079A4 (en) | 2017-11-15 |
| JP2017536624A (ja) | 2017-12-07 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2016107443A1 (zh) | 一种快照处理方法及相关设备 | |
| CN106843749B (zh) | 写入请求处理方法、装置及设备 | |
| US8935496B2 (en) | Management method of virtual storage system and remote copy system | |
| CN104468521B (zh) | 在线迁移方法、装置和系统 | |
| US9003142B2 (en) | Volume swapping of point-in-time read-only target volumes | |
| CN107402722B (zh) | 一种数据迁移方法及存储设备 | |
| CN105426275B (zh) | 双活集群系统中容灾的方法及装置 | |
| CN103338118B (zh) | 一种通信网络连接方法及装置 | |
| CN106855834B (zh) | 一种数据备份方法、装置和系统 | |
| US12367143B2 (en) | Data caching method and apparatus, device, and storage medium | |
| CN109558273B (zh) | 一种磁盘阵列备份方法、电子设备及磁盘阵列 | |
| CN119557373A (zh) | 数据存储方法、装置、系统及存储介质 | |
| CN110633046A (zh) | 一种分布式系统的存储方法、装置、存储设备及存储介质 | |
| CN112612653B (zh) | 一种业务恢复方法、装置、仲裁服务器以及存储系统 | |
| CN110413686A (zh) | 一种数据写入方法、装置、设备及存储介质 | |
| US11238010B2 (en) | Sand timer algorithm for tracking in-flight data storage requests for data replication | |
| CN107678891A (zh) | 一种存储系统的双控方法、装置及可读存储介质 | |
| US9715477B2 (en) | Shared-bandwidth multiple target remote copy | |
| CN113312209A (zh) | 一种数据热备方法、装置、服务器和存储介质 | |
| CN105893186A (zh) | 一种存储容灾数据的验证方法、装置及系统 | |
| WO2020119608A1 (zh) | 基于Spark Shuffle的远程直接内存访问系统及方法 | |
| CN113641688B (zh) | 节点更新方法、相关装置及计算机程序产品 | |
| US20140068215A1 (en) | Method and apparatus for accessing data in a data storage system | |
| CN114138538B (zh) | 异常实例的处理方法、装置和电子设备 | |
| US11416160B1 (en) | Volume operation propagation for synchronous remote copy |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 15875121 Country of ref document: EP Kind code of ref document: A1 |
|
| REEP | Request for entry into the european phase |
Ref document number: 2015875121 Country of ref document: EP |
|
| ENP | Entry into the national phase |
Ref document number: 2017526915 Country of ref document: JP Kind code of ref document: A |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |