Data writing method and device for double live volumes in storage system

文档序号:1904111 发布日期:2021-11-30 浏览:2次 中文

阅读说明:本技术 一种存储系统中双活卷的数据写入方法及装置 (Data writing method and device for double live volumes in storage system ) 是由 蒋米传 于 2021-07-29 设计创作,主要内容包括:本申请公开了一种存储系统中双活卷的数据写入方法及装置,所述方法包括:首先获取主机的数据处理请求;其中,主机的数据处理请求包括读请求和/或写请求,然后当主机的数据处理请求包括读请求时,利用存储系统中双活卷的主站点处理该读请求,并向主机返回数据,或者,当主机的数据处理请求包括写请求时,利用存储系统中双活卷的主站点和辅站点同时处理该写请求,并在主站点或辅站点出现故障时,暂时中断故障站点对主机的数据处理请求的响应。可见,本申请是在存储系统中双活卷的主站点或辅站点出现故障发生后,暂停采用双写模式,从而提高了存储系统中双活卷的数据处理效率,保证了存储系统在处理数据时的IO性能保持最优,减少了主机等待时间。(The application discloses a data writing method and a device of double live volumes in a storage system, wherein the method comprises the following steps: firstly, acquiring a data processing request of a host; the data processing request of the host comprises a read request and/or a write request, then when the data processing request of the host comprises the read request, the main station of the double-active volume in the storage system is used for processing the read request and returning data to the host, or when the data processing request of the host comprises the write request, the main station and the auxiliary station of the double-active volume in the storage system are used for simultaneously processing the write request, and when the main station or the auxiliary station fails, the response of the failed station to the data processing request of the host is temporarily interrupted. Therefore, according to the method and the device, after the main site or the auxiliary site of the double live volumes in the storage system fails, the double writing mode is suspended, so that the data processing efficiency of the double live volumes in the storage system is improved, the IO performance of the storage system is kept optimal when the data is processed, and the host waiting time is reduced.)

1. A method for writing data to a dual live volume in a storage system, the method comprising:

acquiring a data processing request of a host; the data processing request of the host comprises a read request and/or a write request;

when the data processing request of the host computer comprises a read request, processing the read request by using a primary site of a double-active volume in a storage system, and returning data to the host computer;

when the data processing request of the host comprises a write request, the primary site and the secondary site of the double live volumes in the storage system are used for simultaneously processing the write request, and when the primary site or the secondary site fails, the response of the failed site to the data processing request of the host is temporarily interrupted.

2. The method according to claim 1, wherein when the data processing request of the host includes a write request, the primary site and the secondary site of the dual live volume in the storage system are used for simultaneously processing the write request, and when the primary site or the secondary site fails, the response of the failed site to the data processing request of the host is temporarily interrupted, and the method comprises the following steps:

when the data processing request of the host comprises a write request, simultaneously processing the write request by using a primary site and an auxiliary site of a double live volume in a storage system, determining a failed site when the primary site or the auxiliary site does not successfully write back over a first preset time, and setting the failed site to be in a failure state;

in a second preset time, the fault site does not acquire the write request of the host any more and suspends the background synchronous process of the double live volumes;

after the second preset time, starting a background synchronous task of the double live volumes;

in the synchronization process, if the write timeout occurs again at the fault site, the host write request is shielded again for a second preset time.

3. The method of claim 2, further comprising:

and when the response overtime times of the fault site exceed a preset threshold value, judging that the disk system where the fault site is located has a fault, and sending warning information to a user.

4. The method of claim 1, wherein when the failed site is a primary site, the method further comprises:

and performing role conversion on the primary site and the secondary site of the double live volumes in the storage system to obtain a conversion result.

5. The method according to claim 2, wherein the first preset time is any value within 20 minutes to 30 minutes; the second preset time is any value within 20 minutes to 30 minutes.

6. An apparatus for writing data to a dual live volume in a storage system, the apparatus comprising:

the acquisition unit is used for acquiring a data processing request of the host; the data processing request of the host comprises a read request and/or a write request;

the first processing unit is used for processing the read request by using a primary site of a double-active volume in a storage system and returning data to the host when the data processing request of the host comprises the read request;

and the second processing unit is used for simultaneously processing the write request by using the primary site and the secondary site of the double live volumes in the storage system when the data processing request of the host comprises the write request, and temporarily interrupting the response of the failed site to the data processing request of the host when the primary site or the secondary site fails.

7. The apparatus of claim 6, wherein the second processing unit comprises:

the determining subunit is configured to, when the data processing request of the host includes a write request, simultaneously process the write request by using a primary site and an auxiliary site of a dual live volume in the storage system, and determine a failed site when the primary site or the auxiliary site does not successfully return the write after exceeding a first preset time, and set the failed site to a failure state;

a suspension subunit, configured to, within a second preset time, the failed site no longer obtains the write request of the host, and suspend the background synchronization process of the dual live volumes;

the promoter unit is used for starting the background synchronous task of the double live rolls after the second preset time;

and the shielding subunit is used for shielding the host write request for a second preset time again if the write timeout occurs again in the fault site in the synchronization process.

8. The apparatus of claim 7, further comprising:

and the sending unit is used for judging that the disk system where the fault site is located has a fault when the response timeout times of the fault site exceed a preset threshold value, and sending warning information to a user.

9. The apparatus of claim 6, further comprising:

and the conversion unit is used for carrying out role conversion on the primary site and the secondary site of the double live volumes in the storage system to obtain a conversion result.

10. The device according to claim 7, wherein the first preset time is any value within 20 minutes to 30 minutes; the second preset time is any value within 20 minutes to 30 minutes.

Technical Field

The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for writing data in a dual live volume in a storage system.

Background

With the rapid development of computer technology, the network data processing amount is increased along with storm wind, and the requirement on the processing speed of data in a storage system is higher and higher.

At present, a storage system usually performs data processing by using a storage double-active mode, the storage double-active mode is a mechanism that can continue to provide services when a single point of failure occurs, and a double-active volume enables host data to be stored in two different locations (storage pools) in real time, one is a primary site (primary site) and the other is a secondary site (secondary site), so that the storage system has data backup and can ensure that a service is not interrupted when a single point of failure occurs, and the storage system is a reliable data disaster recovery method. In order to maintain data consistency, the host needs to respond to the write result after the data is completely written in both sites, so that when a certain site is abnormal, the host may wait too long, which affects the service processing speed.

Therefore, how to improve the data processing efficiency of the dual live volumes in the storage system and reduce the waiting time of the host is a problem to be solved.

Disclosure of Invention

In order to solve the above problems, the present application provides a method and an apparatus for writing data of dual live volumes in a storage system, and the specific technical solution is as follows:

in a first aspect, the present application provides a method for writing data to a dual live volume in a storage system, where the method includes:

acquiring a data processing request of a host; the data processing request of the host comprises a read request and/or a write request;

when the data processing request of the host computer comprises a read request, processing the read request by using a primary site of a double-active volume in a storage system, and returning data to the host computer;

when the data processing request of the host comprises a write request, the primary site and the secondary site of the double live volumes in the storage system are used for simultaneously processing the write request, and when the primary site or the secondary site fails, the response of the failed site to the data processing request of the host is temporarily interrupted.

In an alternative implementation, when the data processing request of the host includes a write request, the processing of the write request by the primary site and the secondary site of the dual live volume in the storage system at the same time, and when a failure occurs at the primary site or the secondary site, temporarily interrupting a response of the failed site to the data processing request of the host includes:

when the data processing request of the host comprises a write request, simultaneously processing the write request by using a primary site and an auxiliary site of a double live volume in a storage system, determining a failed site when the primary site or the auxiliary site does not successfully write back over a first preset time, and setting the failed site to be in a failure state;

in a second preset time, the fault site does not acquire the write request of the host any more and suspends the background synchronous process of the double live volumes;

after the second preset time, starting a background synchronous task of the double live volumes;

in the synchronization process, if the write timeout occurs again at the fault site, the host write request is shielded again for a second preset time.

In an optional implementation, the method further includes:

and when the response overtime times of the fault site exceed a preset threshold value, judging that the disk system where the fault site is located has a fault, and sending warning information to a user.

In an optional implementation manner, when the failed site is a primary site, the method further includes:

and performing role conversion on the primary site and the secondary site of the double live volumes in the storage system to obtain a conversion result.

In an optional implementation manner, the first preset time is any value within 20 minutes to 30 minutes; the second preset time is any value within 20 minutes to 30 minutes.

In a second aspect, the present application provides an apparatus for data writing to dual live volumes in a storage system, the apparatus comprising:

the acquisition unit is used for acquiring a data processing request of the host; the data processing request of the host comprises a read request and/or a write request;

the first processing unit is used for processing the read request by using a primary site of a double-active volume in a storage system and returning data to the host when the data processing request of the host comprises the read request;

and the second processing unit is used for simultaneously processing the write request by using the primary site and the secondary site of the double live volumes in the storage system when the data processing request of the host comprises the write request, and temporarily interrupting the response of the failed site to the data processing request of the host when the primary site or the secondary site fails.

In an optional implementation manner, the second processing unit includes:

the determining subunit is configured to, when the data processing request of the host includes a write request, simultaneously process the write request by using a primary site and an auxiliary site of a dual live volume in the storage system, and determine a failed site when the primary site or the auxiliary site does not successfully return the write after exceeding a first preset time, and set the failed site to a failure state;

a suspension subunit, configured to, within a second preset time, the failed site no longer obtains the write request of the host, and suspend the background synchronization process of the dual live volumes;

the promoter unit is used for starting the background synchronous task of the double live rolls after the second preset time;

and the shielding subunit is used for shielding the host write request for a second preset time again if the write timeout occurs again in the fault site in the synchronization process.

In an optional implementation, the apparatus further includes:

and the sending unit is used for judging that the disk system where the fault site is located has a fault when the response timeout times of the fault site exceed a preset threshold value, and sending warning information to a user.

In an optional implementation, the apparatus further includes:

and the conversion unit is used for carrying out role conversion on the primary site and the secondary site of the double live volumes in the storage system to obtain a conversion result.

In an optional implementation manner, the first preset time is any value within 20 minutes to 30 minutes; the second preset time is any value within 20 minutes to 30 minutes.

In the data writing method of the double live volumes in the storage system, firstly, a data processing request of a host is obtained; the data processing request of the host comprises a read request and/or a write request, then when the data processing request of the host comprises the read request, the main station of the double-active volume in the storage system is used for processing the read request and returning data to the host, or when the data processing request of the host comprises the write request, the main station and the auxiliary station of the double-active volume in the storage system are used for simultaneously processing the write request, and when the main station or the auxiliary station fails, the response of the failed station to the data processing request of the host is temporarily interrupted. Therefore, according to the embodiment of the application, after the main site or the auxiliary site of the double live volumes in the storage system fails, the double writing mode is suspended, so that the data processing efficiency of the double live volumes in the storage system is improved, the IO performance of the storage system is kept optimal when the data is processed, and the host waiting time is reduced.

Drawings

In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive labor.

Fig. 1 is a flowchart of a data writing method for dual live volumes in a storage system according to an embodiment of the present application;

FIG. 2 is a schematic structural diagram illustrating a data write structure of a dual live volume in a storage system according to an embodiment of the present application;

fig. 3 is a schematic structural diagram of a data writing apparatus for dual live volumes in a storage system according to an embodiment of the present application.

Detailed Description

The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.

In order to facilitate understanding of the technical solutions provided in the present application, the following briefly describes the research background of the technical solutions in the present application.

The dual live volumes can enable host data to be stored in two different positions (storage pools) in real time, one is a primary site (primary site) and the other is a secondary site (secondary site), so that the dual live volumes have data backup and can ensure that services are not interrupted when a single point of failure occurs, and the dual live volumes are a reliable data disaster tolerance method. In order to maintain data consistency, the host needs to respond to the write result after the data is completely written in both sites, so that when a certain site is abnormal, the host may wait too long, which affects the service processing speed. Therefore, how to improve the data processing efficiency of the dual live volumes in the storage system and reduce the waiting time of the host is a problem to be solved.

Based on this, in order to solve the above problem, the present application provides a method and an apparatus for writing data of dual live volumes in a storage system, so as to improve the data processing efficiency of the dual live volumes in the storage system and reduce the latency of a host.

The following describes a data writing method for dual live volumes in a storage system according to an embodiment of the present application in detail with reference to the accompanying drawings. Referring to fig. 1, which shows a flowchart of a data writing method for a dual live volume in a storage system according to an embodiment of the present application, the embodiment may include the following steps:

s101: acquiring a data processing request of a host; the data processing request of the host comprises a read request and/or a write request.

It should be noted that storage tiebacks may enable information to be shared, accessed, or moved within and between data centers, thereby consolidating various storage systems into a single resource. It allows simultaneous data access to a storage system between two geographically separated data centers, i.e. a primary site and a secondary site, transparent to the customer and guarantees reliability and availability of the data. Professional virtual storage software runs on a cluster type hardware engine, a host cluster can simultaneously access the same double live volumes through storage at two sides, and double centers simultaneously provide external services, so that the resource utilization rate can be improved.

In this embodiment, in order to improve the data processing efficiency of the dual live volumes in the storage system and reduce the waiting time of the host, the data processing request of the host needs to be acquired first to execute the following step S102. The data processing request of the host comprises a read request and/or a write request.

S102: when the data processing request of the host computer comprises a read request, the main site of the double active volume in the storage system is used for processing the read request, and data is returned to the host computer.

In this embodiment, after the data processing request of the host is acquired in step S101, as shown in the left diagram of fig. 2, when the data processing request of the host includes a read request, the primary site of the dual live volume in the storage system may be used to process the read request, and return data to the host within the allowed timeout. Thereby enabling the high performance pool to be preferentially guaranteed to receive processing requests to maximize system read performance.

S103: when the data processing request of the host comprises a write request, the primary site and the secondary site of the double live volume in the storage system are used for simultaneously processing the write request, and when the primary site or the secondary site fails, the response of the failed site to the data processing request of the host is temporarily interrupted.

In this embodiment, after the data processing request of the host is acquired in step S101, further, as shown in the left diagram of fig. 2, when the data processing request of the host includes a write request, the write request is processed simultaneously by using the primary site and the secondary site of the dual live volumes in the storage system, and in case of normal read and write, both sides will successfully write back to the host within the allowed timeout period. However, when the primary site or the secondary site fails, the response of the failed site to the data processing request of the host needs to be temporarily interrupted, so as to reduce the host read-write delay caused by the failure. For example, as shown in the right diagram of fig. 2, if the secondary station (secondary) cannot respond to the host write request, the system executes a data write policy with failure handling, i.e., temporarily interrupts the response of the secondary station (secondary) to the host data processing request, so as to reduce the host read-write delay caused by the failure.

An optional implementation manner is that the specific implementation process of step S103 is: when the data processing request of the host comprises a write request, the primary site and the secondary site of the double live volumes in the storage system are used for simultaneously processing the write request, and when the primary site or the secondary site does not successfully write back over a first preset time, the failed site is determined, and the failed site is set to be in a failure state. Then, in a second preset time, the fault station does not acquire the write request of the host, and the background synchronous process of the double live volumes is suspended. And then, after a second preset time, starting a background synchronization task of the double live volumes, and in the synchronization process, if the write timeout occurs again at the fault site, shielding the host write request for the second preset time again.

Specifically, in this implementation, for a host write request, when the host write request arrives, data is written to two sites (i.e., the primary site and the secondary site) simultaneously, and the default timeout is a first preset time (defined herein as t). When the time of successful writing returned by a certain station is more than t, the writing operation of the station is ended, then the station is set to be in a failure state, the bitmap is updated, different synchronous data are marked, and the host writing request returns success. Then for a second preset time period (defined here as t1), the site of the failed state will not receive a write request and the background synchronization process of the dual live volume will be suspended. And then after a second preset time period t1, starting a data background synchronization task of the double live volumes, and if the write timeout occurs again at the site in the failure state in the synchronization process, shielding the host write request t1 time again.

Further, an optional implementation manner is that when the response timeout times of the failed site exceeds a preset threshold, it is determined that the disk system where the failed site is located fails, and a warning message is sent to the user, so as to provide a decision basis for the user. The specific implementation form of the warning message is not limited, and for example, the warning message may be a voice broadcast, a light flash, or a buzzer sound.

The specific values of the first preset time, the second preset time and the preset threshold may be determined according to actual conditions and empirical values, which are not limited in the embodiment of the present application, for example, the first preset time may be set to any value within 20 minutes to 30 minutes; setting the second preset time to any value within 20 minutes to 30 minutes; the preset threshold is set to 5 times, etc.

In addition, an optional implementation manner is that, when the failed site is the primary site, the primary site and the secondary site of the dual live volumes in the storage system may be subjected to role conversion to obtain a conversion result, so as to preferentially ensure that the high-performance storage pool receives the processing request to maximize the read-write performance of the system.

In summary, in the data writing method for dual live volumes in a storage system provided by this embodiment, a data processing request of a host is first obtained; the data processing request of the host comprises a read request and/or a write request, then when the data processing request of the host comprises the read request, the main station of the double-active volume in the storage system is used for processing the read request and returning data to the host, or when the data processing request of the host comprises the write request, the main station and the auxiliary station of the double-active volume in the storage system are used for simultaneously processing the write request, and when the main station or the auxiliary station fails, the response of the failed station to the data processing request of the host is temporarily interrupted. Therefore, according to the embodiment of the application, after the main site or the auxiliary site of the double live volumes in the storage system fails, the double writing mode is suspended, so that the data processing efficiency of the double live volumes in the storage system is improved, the IO performance of the storage system is kept optimal when the data is processed, and the host waiting time is reduced.

Based on the above data writing method for dual live volumes in a storage system, the present application also provides a data writing apparatus for dual live volumes in a storage system, as shown in fig. 3, the apparatus includes:

an obtaining unit 301, configured to obtain a data processing request of a host; the data processing request of the host comprises a read request and/or a write request;

a first processing unit 302, configured to, when a data processing request of the host includes a read request, process the read request by using a primary site of a dual active volume in a storage system, and return data to the host;

a second processing unit 303, configured to, when the data processing request of the host includes a write request, simultaneously process the write request by using the primary site and the secondary site of the dual live volume in the storage system, and when a failure occurs at the primary site or the secondary site, temporarily interrupt a response of the failed site to the data processing request of the host.

In an implementation manner of this embodiment, the second processing unit 303 includes:

the determining subunit is configured to, when the data processing request of the host includes a write request, simultaneously process the write request by using a primary site and an auxiliary site of a dual live volume in the storage system, and determine a failed site when the primary site or the auxiliary site does not successfully return the write after exceeding a first preset time, and set the failed site to a failure state;

a suspension subunit, configured to, within a second preset time, the failed site no longer obtains the write request of the host, and suspend the background synchronization process of the dual live volumes;

the promoter unit is used for starting the background synchronous task of the double live rolls after the second preset time;

and the shielding subunit is used for shielding the host write request for a second preset time again if the write timeout occurs again in the fault site in the synchronization process.

In an implementation manner of this embodiment, the apparatus further includes:

and the sending unit is used for judging that the disk system where the fault site is located has a fault when the response timeout times of the fault site exceed a preset threshold value, and sending warning information to a user.

In an implementation manner of this embodiment, the apparatus further includes:

and the conversion unit is used for carrying out role conversion on the primary site and the secondary site of the double live volumes in the storage system to obtain a conversion result.

In an implementation manner of this embodiment, the first preset time is any value within 20 minutes to 30 minutes; the second preset time is any value within 20 minutes to 30 minutes.

In summary, in the data writing device for dual live volumes in a storage system provided in this embodiment, a data processing request of a host is first obtained; the data processing request of the host comprises a read request and/or a write request, then when the data processing request of the host comprises the read request, the main station of the double-active volume in the storage system is used for processing the read request and returning data to the host, or when the data processing request of the host comprises the write request, the main station and the auxiliary station of the double-active volume in the storage system are used for simultaneously processing the write request, and when the main station or the auxiliary station fails, the response of the failed station to the data processing request of the host is temporarily interrupted. Therefore, according to the embodiment of the application, after the main site or the auxiliary site of the double live volumes in the storage system fails, the double writing mode is suspended, so that the data processing efficiency of the double live volumes in the storage system is improved, the IO performance of the storage system is kept optimal when the data is processed, and the host waiting time is reduced.

It should be noted that, in the present specification, the embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. For the system or the device disclosed by the embodiment, the description is simple because the system or the device corresponds to the method disclosed by the embodiment, and the relevant points can be referred to the method part for description.

It is further noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

11页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种卷处理方法、系统、设备及计算机可读存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类