Service takeover method, storage device, and service takeover apparatus
Abstract
The present disclosure describes example service takeover methods, storage devices, and service takeover apparatuses. In one example, when a communication fault occurs between two storage devices in a storage system, the two storage devices respectively obtain running statuses of the two storage devices. A running status can reflect current usage of one or more system resources of a particular storage device. Then, a delay duration is determined according to the running statuses, where the delay duration is a duration for which the storage device waits before sending an arbitration request to a quorum server. The two storage devices respectively send, after the delay duration, arbitration requests to the quorum server to request to take over a service. The quorum server then can select a storage device in a relatively better running status to take over a host service.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1. A service takeover method in a storage system, wherein the storage system comprises a first storage device, a second storage device, and a quorum server, wherein data communication is performed between the first storage device and the second storage device by using a link, and wherein the service takeover method being performed by the first storage device comprises:
obtaining a running status of the first storage device when a communication fault occurs between the first storage device and the second storage device, wherein the running status reflects current usage of a system resource of the first storage device, and wherein the system resource comprises at least one of: a processor resource, a hard disk resource, a cache resource, or a host bandwidth resource;
determining a delay duration according to the running status that reflects the current usage of the system resource of the first storage device, wherein the delay duration is a duration for which the first storage device waits before sending an arbitration request to the quorum server, wherein the delay duration for which the first storage device waits before sending the arbitration request to the quorum server is proportional to a running status value indicating the current usage of the system resource of the first storage device; and
sending, after the delay duration, the arbitration request to the quorum server to request to take over a service.
2. The service takeover method according to claim 1 , wherein the obtaining a running status of the first storage device comprises:
reading a running status value of the first storage device, wherein the running status value is a sum of status values of all system resources, wherein a status value of each system resource is obtained according to a current usage ratio of each system resource and a preset correspondence, and wherein the correspondence comprises at least one of a correspondence between a current usage ratio of the processor resource and a status value of the processor resource, a correspondence between a current usage ratio of the hard disk resource and a status value of the hard disk resource, a correspondence between a current usage ratio of the cache resource and a status value of the cache resource, and a correspondence between a current usage ratio of the host bandwidth resource and a status value of the host bandwidth resource.
3. The service takeover method according to claim 2 , wherein the determining the delay duration according to the running status comprises: determining the delay duration according to the running status value and a formula T=k*S, wherein T is the delay duration, S is the running status value, and k is any value.
4. The service takeover method according to claim 3 , wherein k=1.
5. The service takeover method according to claim 2 , wherein the storage system further comprises a host, wherein the first storage device communicates with the host by using a front-end port, and wherein, before the reading the running status value of the first storage device, the service takeover method further comprises:
detecting a status of the front-end port;
determining that the status of the front-end port is valid; and
in response to determining that the status of the front-end port is valid, reading the running status value of the first storage device.
6. A storage device, wherein the storage device is located in a storage system, and the storage device comprises:
a communications interface, the communications interface configured to communicate with another storage device and a quorum server in the storage system; and
at least one processor, the at least one processor configured to:
obtain a running status of the storage device when determining that a communication fault occurs between the storage device and the another storage device, wherein the running status reflects current usage of a system resource of the storage device, and wherein the system resource comprises at least one of: a processor resource, a hard disk resource, a cache resource, and a host bandwidth resource;
determine a delay duration according to the running status, wherein the delay duration is a duration for which the storage device waits before sending an arbitration request to the quorum server, wherein the delay duration for which the first storage device waits before sending the arbitration request to the quorum server is proportional to a running status value indicating the current usage of the system resource of the first storage device; and
send, using the communications interface and after the delay duration, the arbitration request to the quorum server to request to take over a service.
7. The storage device according to claim 6 , wherein the at least one processor is configured to read a running status value of the storage device, wherein the running status value is a sum of status values of all system resources, wherein a status value of each system resource is obtained according to a current usage ratio of each system resource and a preset correspondence, and wherein the correspondence comprises at least one of a correspondence between a current usage ratio of the processor resource and a status value of the processor resource, a correspondence between a current usage ratio of the hard disk resource and a status value of the hard disk resource, a correspondence between a current usage ratio of the cache resource and a status value of the cache resource, and a correspondence between a current usage ratio of the host bandwidth resource and a status value of the host bandwidth resource.
8. The storage device according to claim 7 , wherein the at least one processor is configured to determine the delay duration according to the running status value and a formula T=k*S, wherein T is the delay duration, S is the running status value, and k is any value.
9. The storage device according to claim 8 , wherein k=1.
10. The storage device according to claim 7 , wherein the storage system further comprises a host, wherein the storage device further comprises a front-end port, and wherein the storage device communicates with the host by using the front-end port; and
the at least one processor is further configured to, before reading the running status value of the storage device:
detect a status of the front-end port;
determine that the status of the front-end port is valid; and
in response to determining that the status of the front-end port is valid, read the running status value of the storage device.Join the waitlist — get patent alerts
Track US10705930B2 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.