CN108664363B - NAS LUN access control method and device based on double control - Google Patents

NAS LUN access control method and device based on double control Download PDF

Info

Publication number
CN108664363B
CN108664363B CN201810471322.2A CN201810471322A CN108664363B CN 108664363 B CN108664363 B CN 108664363B CN 201810471322 A CN201810471322 A CN 201810471322A CN 108664363 B CN108664363 B CN 108664363B
Authority
CN
China
Prior art keywords
main control
virtual disk
control computer
access request
side access
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810471322.2A
Other languages
Chinese (zh)
Other versions
CN108664363A (en
Inventor
王晓强
史建才
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Perabytes Technology Co ltd
Original Assignee
Perabytes Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Perabytes Technology Co ltd filed Critical Perabytes Technology Co ltd
Priority to CN201810471322.2A priority Critical patent/CN108664363B/en
Publication of CN108664363A publication Critical patent/CN108664363A/en
Application granted granted Critical
Publication of CN108664363B publication Critical patent/CN108664363B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/20Error 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/2053Error 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/2089Redundant storage control functionality
    • G06F11/2092Techniques of failing over between control units
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/20Error 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/2053Error 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/2056Error 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
    • G06F11/2082Data synchronisation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Hardware Redundancy (AREA)

Abstract

The invention discloses a dual-control-based NAS LUN access control method and device. The method comprises the following steps: receiving a server side access request, and judging whether a main control computer is in a fault state; if the main control machine is in a fault state, the non-main control machine receives a server side access request and sends the server side access request to a virtual disk of the non-main control machine for caching; judging whether the virtual disk of the main control computer is in a fault state; if the virtual disk of the main control computer is in a non-fault state, sending a server-side access request to the virtual disk cache of the main control computer, and sending the server-side access request to the LUN storage unit through the virtual disk of the main control computer; and the LUN storage unit receives and processes the server-side access request and returns a processing result to the non-master controller. The method and the device solve the problem that the output of the NAS LUN to the server side can be continuously and uninterruptedly provided after the main control machine and the non-main control machine are switched, and avoid the operation failure of the main control machine or the disconnection of the server side by the server side before.

Description

NAS LUN access control method and device based on double control
Technical Field
The invention relates to the field of computers, in particular to a dual-control-based NAS LUN access control method and device.
Background
At present, in a conventional dual-control Storage control system, access to a NAS LUN (Network Attached Storage Logical Unit Number) is exclusive. That is, if the main control computer reads and writes one NAS path, the non-main control computer does not know the NAS path, which causes resource waste of the controller, and the server side can only access the NAS LUN through one machine.
The NAS LUN is mapped to a server side through an NFS (Network File System) after passing through a File System, and a data cache is arranged under the File System. When the master control machine goes wrong, the master control machine is switched to the non-master control machine to work, the data cache in the master control machine is lost, the operation of the front server end on the master control machine fails, and therefore resource waste is caused, and even the server end is disconnected. Although the SCST TARGET LUN approach can map LUNs to non-masters, it is cumbersome to operate and not synchronized with data caching, and still may result in disconnection on the server side.
Disclosure of Invention
In view of this, the present invention provides a dual-control-based NAS LUN access control method and apparatus, which solve the problem of controlling access to NAS LUNs by two dual-control machines simultaneously, and provide continuous and uninterrupted NAS LUN output to a server after switching between a master controller and a non-master controller.
Based on the above object, the present invention provides a NAS LUN access control method based on dual control, which includes:
receiving a server side access request, and judging whether a main control computer is in a fault state;
if the main control machine is in a fault state, the non-main control machine receives the server side access request and sends the server side access request to a virtual disk of the non-main control machine for caching;
judging whether the virtual disk of the main control computer is in a fault state; the main control machine virtual disk and the non-main control machine virtual disk are mirror disks which are created in advance;
if the virtual disk of the main control computer is in a non-failure state, sending the server-side access request to the virtual disk cache of the main control computer, and sending the server-side access request to an LUN storage unit through the virtual disk of the main control computer;
and the LUN storage unit receives and processes the server-side access request and returns a processing result to the non-main control computer.
Further, the main control machine virtual disk and the non-main control machine virtual disk perform real-time synchronization of cache data;
the main control computer virtual disk is established between a main control computer file system and the LUN storage unit, the main control computer virtual disk is in communication connection with the main control computer file system, and the main control computer virtual disk cache is in communication connection with the LUN storage unit;
the non-main control computer virtual disk is created between a non-main control computer file system of a non-main control computer and the LUN storage unit, and the non-main control computer virtual disk is in communication connection with the non-main control computer file system.
Further, the non-master control machine receives the server side access request, and directly sends the server side access request to the virtual disk of the non-master control machine for caching through the file system of the non-master control machine.
Further, if the virtual disk of the main control computer is in a failure state, establishing a communication connection between the virtual disk of the non-main control computer and the LUN storage unit, and directly sending the server-side access request to the LUN storage unit through the virtual disk of the non-main control computer.
Further, if the master control machine is in a non-fault state, the method comprises the following steps:
the main control computer receives the server side access request and sends the server side access request to the virtual disk of the main control computer for caching;
the main control machine virtual disk sends the server side access request to the LUN storage unit, and simultaneously synchronizes the server side access request to the non-main control machine virtual disk for caching through a gigabit network card;
and the LUN storage unit receives and processes the server-side access request and returns a processing result to the main control computer.
Further, the process of creating the virtual disk of the master controller and the virtual disk of the non-master controller includes:
creating a logical volume in the main control computer, generating a configuration file, and generating a virtual disk of the main control computer according to the logical volume;
synchronizing the disk information of the virtual disk of the master control machine and the configuration file to the non-master control machine;
and the non-main control computer generates the non-main control computer virtual disk according to the disk information of the main control computer virtual disk and the configuration file, wherein the main control computer virtual disk and the non-main control computer virtual disk are mirror image virtual disks.
Further, the configuration file comprises master control machine information, non-master control machine ip information, disk array creation information, master control machine mark information and non-master control machine mark information.
Further, if the server-side access request is a read request and the master controller is in a fault state, then:
the non-main control computer receives the server side access request and judges whether data corresponding to the server side access request exist in the virtual disk of the non-main control computer;
if yes, directly reading corresponding data and returning the data to the non-main control computer; otherwise, the server-side access request is sent to the virtual disk of the main control computer, and corresponding data is read from the LUN storage unit through the virtual disk of the main control computer.
Further, if the server-side access request is a read request and the master controller is in a non-failure state, then:
the main control computer receives the server side access request and sends the server side access request to the virtual disk of the main control computer;
judging whether data corresponding to the server side access request exists in the virtual disk of the main control computer;
if yes, directly reading corresponding data and returning the data to the main control computer; otherwise, reading corresponding data from the LUN storage unit through the virtual disk of the main controller.
The invention also provides a NAS LUN access control device based on double control, which comprises:
the receiving module is used for receiving a server-side access request;
the first judgment module is used for judging whether the main control machine is in a fault state;
the first sending module is used for receiving the server side access request by the non-main control computer and sending the server side access request to the virtual disk of the non-main control computer for caching if the main control computer is in a fault state;
the second judgment module is used for judging whether the virtual disk of the main control computer is in a fault state; the main control machine virtual disk and the non-main control machine virtual disk are mirror disks which are created in advance;
the second sending module is used for sending the server-side access request to the virtual disk cache of the main control computer and sending the server-side access request to the LUN storage unit through the virtual disk of the main control computer if the virtual disk of the main control computer is in a non-failure state;
and the processing module is used for receiving and processing the server-side access request by the LUN storage unit and returning a processing result to the non-main control computer.
From the above, the NAS LUN access control method and apparatus based on dual-control provided by the present invention create the virtual disk under the file system on the LUN, so that the operation is flexible and changeable, and the method and apparatus have more versatility; the file system is modified to enable data to bypass a data cache in the file system and be directly stored in a cache of the virtual disk, so that even if the main control computer fails, the data cache in the main control computer can be reserved, and the operation failure of the main control computer by the server side or the disconnection of the server side is avoided.
Drawings
FIG. 1 is a flowchart of a NAS LUN access control method based on dual-control according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a NAS LUN access control apparatus based on dual-control according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to specific embodiments and the accompanying drawings.
It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are used for distinguishing two entities with the same name but different names or different parameters, and it should be noted that "first" and "second" are merely for convenience of description and should not be construed as limitations of the embodiments of the present invention, and they are not described in any more detail in the following embodiments.
Fig. 1 is a flowchart of a NAS LUN access control method based on dual control according to an embodiment of the present invention.
Fig. 2 is a schematic structural diagram of a NAS LUN access control apparatus based on dual-control according to an embodiment of the present invention.
In one embodiment of the invention, the method comprises:
s100, receiving a server-side access request. In a specific embodiment, the server-side access request may be a read request or a write request.
And S200, judging whether the main control machine is in a fault state.
After receiving an access request of a server to a control system, the system firstly judges whether a main control computer in the double-control storage control system is in a fault state. If the main control computer is in a non-failure state, the process skips to step S501, and the main control computer receives the server-side access request for processing. If the main control machine is in a failure state, the process jumps to step S300, the non-main control machine is switched to the main control machine through the HA (High Available, dual cluster system), and the non-main control machine directly receives the access request of the server side for processing.
S300, the non-main control computer receives the server side access request and sends the server side access request to the virtual disk of the non-main control computer for caching.
Preferably, the non-main control computer virtual disk is created between a non-main control computer file system of the non-main control computer and the LUN storage unit, the non-main control computer virtual disk is in communication connection with the non-main control computer file system, and the non-main control computer virtual disk is not in communication connection with the LUN storage unit and the disk corresponding to the LUN storage unit.
Furthermore, by modifying the file system of the non-master controller, after the non-master controller receives the server-side access request, the server-side access request is directly sent to the virtual disk of the non-master controller for caching through the file system of the non-master controller, and data caching is not performed in the file system of the non-master controller.
S400, judging whether the virtual disk of the main control computer is in a fault state, if the virtual disk of the main control computer and the path below the virtual disk of the main control computer are in the fault state, jumping to step 401, and needing a non-main control end to directly establish connection with an LUN storage unit; if the virtual disk of the main control computer is not in a failure state, that is, only the path above the virtual disk of the main control computer fails, and the paths below the virtual disk of the main control computer and the virtual disk of the main control computer work normally, the process skips to step 500.
Preferably, the virtual disk of the master control machine and the virtual disk of the non-master control machine are mirror disks created in advance, and the virtual disk of the master control machine and the virtual disk of the non-master control machine perform real-time synchronization of cache data through a gigabit network card, so as to ensure consistency of the cache data in the virtual disk of the master control machine and the virtual disk of the non-master control machine.
And S500, sending the server-side access request to the virtual disk cache of the main control computer, and sending the server-side access request to the LUN storage unit through the virtual disk of the main control computer.
Preferably, the virtual disk of the master computer is created between the file system of the master computer and the LUN storage unit, the virtual disk of the master computer is in communication connection with the file system of the master computer, and the virtual disk cache of the master computer is in direct communication connection with the LUN storage unit and the disk corresponding to the LUN storage unit.
Preferably, the virtual disk of the host computer is not limited between the file system of the host computer and the LUN storage unit, and can be created at any position to meet the requirement, so that the operation is flexible and variable, and the method has high universality.
S600, the LUN storage unit receives and processes the server-side access request, and returns a processing result to the non-main control computer.
In some embodiments, if the master controller is in a non-failure state, the master controller receives the server-side access request for processing, and the specific steps include:
s501, the main control computer receives the server side access request and sends the server side access request to the virtual disk of the main control computer for caching.
Preferably, the file system of the main control computer is modified, so that after receiving the access request of the server side, the main control computer does not cache data in the file system of the main control computer, and the access request of the server side is directly sent to the virtual disk of the non-main control computer for caching through the file system of the main control computer. When the main control computer has a problem, the main control computer is switched to the non-main control computer to work, the cache data can be lost if being stored in the file system of the main control computer, and the cache data can be reserved if being stored in the virtual disk of the main control computer, so that the operation on the double control system by the server end can be reserved, on one hand, the efficiency of data access can be improved, and on the other hand, the disconnection between the server end and the double control system can be avoided.
And S502, the virtual disk of the main control computer sends the server-side access request to the LUN storage unit, and the server-side access request is synchronized to the virtual disk of the non-main control computer for caching through a gigabit network card.
S503, the LUN storage unit receives and processes the server access request, and returns the processing result to the main control computer.
In some embodiments, if the virtual disk of the master is in a failure state, then:
s401, establishing a communication connection between the non-main control machine virtual disk and the LUN storage unit, and directly sending the server-side access request to the LUN storage unit through the non-main control machine virtual disk.
In other embodiments of the present invention, the process of creating the virtual disk of the master controller and the virtual disk of the non-master controller includes:
s201, creating a logic volume in the main control computer, generating a configuration file, generating a virtual disk of the main control computer according to the logic volume, and creating a cache for the virtual disk of the main control computer.
Preferably, the configuration file includes master control machine information, non-master control machine ip information, disk array creation information, master control machine flag information, non-master control machine flag information, and the like.
And S202, synchronizing the disk information of the virtual disk of the main control computer and the configuration file to the non-main control computer.
Preferably, the disk information of the virtual disk of the host includes the size, name, type, operation method, and the like of the LUN storage unit.
And S203, the non-main control computer generates the non-main control computer virtual disk according to the disk information of the main control computer virtual disk and the configuration file, wherein the main control computer virtual disk and the non-main control computer virtual disk are mirror image virtual disks. And then starting the NFS service, and outputting the NAS LUN to the server side.
When the virtual disk is established for the system disk on the main control computer, the same virtual disk is automatically established on the non-main control computer. The actual operation of the physical disk is only completed in one machine, so that the phenomenon that the data of the physical disk is inconsistent with the expected data due to the fact that two machines simultaneously operate the same system disk can be well avoided.
In some embodiments of the invention, when the master is in a fault state, i.e. the non-master processes data access requests directly:
if the server side access request is a read request, then: the non-master control machine receives the server side access request and judges whether data corresponding to the server side access request exist in the cache of the virtual disk of the non-master control machine or not; if yes, directly reading corresponding data and returning the data to the non-main control computer; otherwise, the server-side access request is sent to the virtual disk of the main control computer, and corresponding data is read from the LUN storage unit through the virtual disk of the main control computer.
If the server-side access request is a write request, then: the non-main control computer receives the server access request, writes the data into the cache of the virtual disk of the non-main control computer, and sends the data to the main control computer for processing; after receiving the data, the main control computer writes the data into the cache of the virtual disk of the main control computer and flushes the data into the LUN storage unit corresponding to the virtual disk of the main control computer.
Specifically, submit _ bio () submits bio (a data structure carrying read/write data of a virtual disk) to the virtual disk of the non-master controller, submit _ bio () calls generic _ make _ request () to submit bio to a request queue request _ request maintained by a virtual disk drive of the virtual disk of the non-master controller, when registering the virtual disk, initialize a request queue request _ request, and register vdisk _ make _ request to q- > majrequest _ fn (). When the generic _ make _ request () is called, q- > make _ request _ fn () is called, namely, a request queue processing method vdisk _ make _ request () of the virtual disk is called to process the bio.
If the request is a write request, storing the data in the bio into the cache of the virtual disk of the non-main control computer, calling a kernel _ sendmsg through a cache _ mirror to send the bio data to the main control computer, informing the non-main control computer of the completion of the data processing of the main control computer, calling an end _ msg by the non-main control computer to inform the upper layer of the virtual disk of the non-main control computer, and ending the bio processing. The main control machine stores the data sent by the non-main control machine into the cache of the virtual disk of the main control machine, and the data is marked dirty, so that the data is flushed into the LUN storage unit corresponding to the virtual disk and the corresponding disk.
If the request is a read request, firstly, whether corresponding data exists in the cache of the virtual disk of the non-main control computer is checked, and if the corresponding data exists, the data is directly read out and returned to the bio; if not, calling the kernel _ sendmsg through the cache _ mirror to forward the bio to the main control computer, reading corresponding data from the corresponding LUN storage unit and the corresponding disk by the main control computer, returning the data to the non-main control computer, calling the kernel _ servmsg by the non-main control computer to receive the data, and after all the data are processed, informing the upper layer bio of the virtual disk of the non-main control computer to finish processing by the non-main control computer by the end _ msg.
In other embodiments of the present invention, if the master controller is in a non-failure state, that is, when the master controller directly processes a data access request:
if the server side access request is a read request, then: the main control computer receives the server side access request and sends the server side access request to the virtual disk of the main control computer; judging whether data corresponding to the server side access request exists in the virtual disk of the main control computer; if yes, directly reading corresponding data and returning the data to the main control computer; otherwise, reading corresponding data from the LUN storage unit and the corresponding disk through the virtual disk of the main control computer.
If the server-side access request is a write request, then: and the main control computer receives the server side access request, writes the data into the cache of the virtual disk of the main control computer, stores the data into an LUN storage unit corresponding to the virtual disk of the main control computer, and synchronizes the data into the cache of the virtual disk of the non-main control computer for storage.
Specifically, submit _ bio () submits bio (a data structure carrying read/write data of a virtual disk) to a virtual disk of a host computer, submit _ bio () calls generic _ make _ request () to submit bio to a request queue request _ request maintained by a virtual disk drive of the virtual disk of the host computer, initialize a request queue request _ request when registering the virtual disk, and register vdisk _ make _ request to q- > make _ request _ fn (). And calling q- > make _ request _ fn () when the generic _ make _ request () is called, namely calling a request queue processing method vdisk _ make _ request () of the virtual disk to process the bio.
If the request is a write request, two copies are generated by cloning the bio, one copy stores the data in the virtual disk cache of the main control computer, then the submit _ bio is called to flash the data of the bio in the virtual disk cache of the main control computer to the disk corresponding to the lun storage unit, after the disk corresponding to the lun storage unit finishes processing the bio, the bio processing ending function of the lun storage unit is called, and then the vdisk _ end _ bio () is called. And another bio calls kernel _ sendmsg through cache _ mirror () to send the bio to the virtual disk cache of the non-main control computer for storage, the non-main control computer finishes processing, the main control computer is informed, and the main control computer calls end _ msg () to finish the bio.
If the request is a read request, cloning is not carried out in vdisk _ make _ request (), the bio is directly traversed in the virtual disk cache of the main control computer, if data exists in the virtual disk cache of the main control computer, the data is directly read from the cache and fed back to the main control computer, and the bio is finished after reading. If not, the submit _ bio () is called to read data from the disk of lun corresponding to the virtual disk of the master controller. And calling vdisk _ end _ bio after the data is completely read, and then calling end _ bio to inform the upper layer bio of the virtual disk of the main control computer of ending the processing.
The virtual disk created under the file system above the LUN storage unit can not only provide an output disk for the NAS LUN, but also provide an output disk for the SAN LUN. The difference between NAS LAN and SAN LUN is only in the way the disk is operated: the NAS LUN needs to establish a file system, such as an xfs file system, on a disk, mount the disk to a directory, and then output the disk. The SAN LUN outputs the whole disk without establishing a file system. All are operations of the upper layer of the disk, but how the upper layer operates is not concerned with the virtual disk, so the virtual disk created under the file system above the LUN storage unit and the detailed access control method in the present invention are also applicable to the SAN LUN.
The embodiment of the present invention further provides a dual-control-based NAS LUN access control apparatus, including:
and the receiving module is used for receiving the access request of the server side.
And the first judgment module is used for judging whether the main control machine is in a fault state.
And the first sending module is used for receiving the server side access request by the non-main control computer and sending the server side access request to the virtual disk of the non-main control computer for caching if the main control computer is in a fault state.
The second judgment module is used for judging whether the virtual disk of the main control computer is in a fault state; the virtual disk of the master control machine and the virtual disk of the non-master control machine are mirror disks created in advance.
And the second sending module is used for sending the server side access request to the virtual disk cache of the main control computer and sending the server side access request to the LUN storage unit through the virtual disk of the main control computer if the virtual disk of the main control computer is in a non-failure state.
And the processing module is used for receiving and processing the server-side access request by the LUN storage unit and returning a processing result to the non-main control computer.
According to the NAS LUN access control method and device based on double control, the virtual disk is established above the LUN under the file system, so that the operation is flexible and changeable, and the method and device are more universal; the file system is modified so that data bypasses a data cache in the file system and is directly stored in a cache of the virtual disk, so that the data cache in the main control computer can be reserved even if the main control computer fails, and the operation failure of the main control computer by a server side or the disconnection of the server side is avoided; when a server side accesses the NAS LUN through the NFS, the same LUN can be accessed through the main control computer, the fact that the disks can only be operated on one side at the same time is guaranteed, and the problem of data inconsistency is avoided; the virtual disk of the main control computer and the virtual disk of the non-main control computer are mirror disks, so that the consistency of data is ensured; not only can an output disk be provided for a NAS LUN, but also for a SAN LUN.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, is limited to these examples; within the idea of the invention, also features in the above embodiments or in different embodiments may be combined, steps may be implemented in any order, and there are many other variations of the different aspects of the invention as described above, which are not provided in detail for the sake of brevity.
In addition, well known power/ground connections to Integrated Circuit (IC) chips and other components may or may not be shown within the provided figures for simplicity of illustration and discussion, and so as not to obscure the invention. Furthermore, devices may be shown in block diagram form in order to avoid obscuring the invention, and also in view of the fact that specifics with respect to implementation of such block diagram devices are highly dependent upon the platform within which the present invention is to be implemented (i.e., specifics should be well within purview of one skilled in the art). Where specific details (e.g., circuits) are set forth in order to describe example embodiments of the invention, it should be apparent to one skilled in the art that the invention can be practiced without, or with variation of, these specific details. Accordingly, the description is to be regarded as illustrative instead of restrictive.
While the present invention has been described in conjunction with specific embodiments thereof, many alternatives, modifications, and variations of these embodiments will be apparent to those of ordinary skill in the art in light of the foregoing description. For example, other memory architectures (e.g., dynamic ram (dram)) may use the discussed embodiments.
The embodiments of the invention are intended to embrace all such alternatives, modifications and variances that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, substitutions, improvements and the like that may be made without departing from the spirit and principles of the invention are intended to be included within the scope of the invention.

Claims (9)

1. A NAS LUN access control method based on double control is characterized by comprising the following steps:
receiving a server side access request, and judging whether a main control computer is in a fault state;
if the main control machine is in a fault state, the non-main control machine receives the server side access request and sends the server side access request to a virtual disk of the non-main control machine for caching; modifying a file system of a non-master control machine to enable the non-master control machine to receive a server-side access request;
judging whether the virtual disk of the main control computer is in a fault state; the main control machine virtual disk and the non-main control machine virtual disk are mirror disks which are created in advance; the non-main control machine virtual disk is created between a non-main control machine file system of a non-main control machine and an LUN storage unit, and the non-main control machine virtual disk is in communication connection with the non-main control machine file system; the non-main control computer receives the server side access request, and directly sends the server side access request to the virtual disk of the non-main control computer for caching through the file system of the non-main control computer;
if the virtual disk of the main control computer is in a non-failure state, sending the server-side access request to the virtual disk cache of the main control computer, and sending the server-side access request to an LUN storage unit through the virtual disk of the main control computer;
and the LUN storage unit receives and processes the server-side access request and returns a processing result to the non-main control computer.
2. The dual-control-based NAS LUN access control method according to claim 1, wherein the virtual disk of the master controller and the virtual disk of the non-master controller perform real-time synchronization of cache data;
the main control computer virtual disk is established between a main control computer file system and the LUN storage unit, the main control computer virtual disk is in communication connection with the main control computer file system, and the main control computer virtual disk cache is in communication connection with the LUN storage unit.
3. The NAS LUN access control method according to claim 1, wherein if the primary control virtual disk is in a failure state, a communication connection between the non-primary control virtual disk and the LUN storage unit is established, and the server-side access request is directly sent to the LUN storage unit through the non-primary control virtual disk.
4. The dual-control based NAS LUN access control method of claim 1, wherein if the master is in a non-failure state:
the main control computer receives the server side access request and sends the server side access request to the virtual disk of the main control computer for caching;
the main control machine virtual disk sends the server side access request to the LUN storage unit, and simultaneously synchronizes the server side access request to the non-main control machine virtual disk for caching through a gigabit network card;
and the LUN storage unit receives and processes the server-side access request and returns a processing result to the main control computer.
5. The dual-control-based NAS LUN access control method according to claim 1, wherein the creation process of the master virtual disk and the non-master virtual disk comprises:
creating a logical volume in the main control computer, generating a configuration file, and generating a virtual disk of the main control computer according to the logical volume;
synchronizing the disk information of the virtual disk of the master control machine and the configuration file to the non-master control machine;
and the non-main control computer generates the non-main control computer virtual disk according to the disk information of the main control computer virtual disk and the configuration file, wherein the main control computer virtual disk and the non-main control computer virtual disk are mirror image virtual disks.
6. The dual-control-based NAS LUN access control method according to claim 5, wherein the configuration file comprises master control machine information, non-master control machine ip information, disk array creation information, master control machine flag information and non-master control machine flag information.
7. The NAS LUN access control method according to claim 1, wherein if the server-side access request is a read request and the master controller is in a failure state, then:
the non-main control computer receives the server side access request and judges whether data corresponding to the server side access request exist in the virtual disk of the non-main control computer;
if yes, directly reading corresponding data and returning the data to the non-main control computer; otherwise, the server-side access request is sent to the virtual disk of the main control computer, and corresponding data is read from the LUN storage unit through the virtual disk of the main control computer.
8. The dual-control-based NAS LUN access control method according to claim 4, wherein if the server side access request is a read request and the master controller is in a non-failure state:
the main control computer receives the server side access request and sends the server side access request to the virtual disk of the main control computer;
judging whether data corresponding to the server side access request exists in the virtual disk of the main control computer;
if yes, directly reading corresponding data and returning the data to the main control computer; otherwise, reading corresponding data from the LUN storage unit through the virtual disk of the main controller.
9. An NAS LUN access control apparatus based on dual-steering, comprising:
the receiving module is used for receiving a server-side access request;
the first judgment module is used for judging whether the main control machine is in a fault state;
the first sending module is used for receiving the server side access request by the non-main control computer and sending the server side access request to the virtual disk of the non-main control computer for caching if the main control computer is in a fault state;
the second judgment module is used for judging whether the virtual disk of the main control computer is in a fault state; the main control machine virtual disk and the non-main control machine virtual disk are mirror disks which are created in advance; the non-main control machine virtual disk is created between a non-main control machine file system of a non-main control machine and an LUN storage unit, and the non-main control machine virtual disk is in communication connection with the non-main control machine file system; the non-main control computer receives the server side access request, and directly sends the server side access request to the virtual disk of the non-main control computer for caching through the file system of the non-main control computer;
the second sending module is used for sending the server-side access request to the virtual disk cache of the main control computer and sending the server-side access request to the LUN storage unit through the virtual disk of the main control computer if the virtual disk of the main control computer is in a non-failure state;
and the processing module is used for receiving and processing the server-side access request by the LUN storage unit and returning a processing result to the non-main control computer.
CN201810471322.2A 2018-05-17 2018-05-17 NAS LUN access control method and device based on double control Active CN108664363B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810471322.2A CN108664363B (en) 2018-05-17 2018-05-17 NAS LUN access control method and device based on double control

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810471322.2A CN108664363B (en) 2018-05-17 2018-05-17 NAS LUN access control method and device based on double control

Publications (2)

Publication Number Publication Date
CN108664363A CN108664363A (en) 2018-10-16
CN108664363B true CN108664363B (en) 2021-10-29

Family

ID=63779901

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810471322.2A Active CN108664363B (en) 2018-05-17 2018-05-17 NAS LUN access control method and device based on double control

Country Status (1)

Country Link
CN (1) CN108664363B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109067927A (en) * 2018-10-24 2018-12-21 郑州云海信息技术有限公司 A kind of starting method, activation system and the relevant apparatus of NAS system
CN110018939A (en) * 2019-03-28 2019-07-16 山东超越数控电子股份有限公司 A kind of hard disk on-line fault diagnosis method based on SCSI protocol

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101163128A (en) * 2006-10-13 2008-04-16 贾波 Network attacked storage apparatus
CN103856502A (en) * 2012-11-29 2014-06-11 北京华胜天成科技股份有限公司 Method and NAS cluster system for realizing mirror image document thermal migration of virtual machine
US9672160B1 (en) * 2012-12-31 2017-06-06 EMC IP Holding Company LLC System and method for caching data

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7383378B1 (en) * 2003-04-11 2008-06-03 Network Appliance, Inc. System and method for supporting file and block access to storage object on a storage appliance
CN106302609B (en) * 2015-06-08 2020-02-28 阿里巴巴集团控股有限公司 Access method and device
CN105204779B (en) * 2015-09-14 2018-10-02 北京鲸鲨软件科技有限公司 SCSI TARGET access control methods based on dual control and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101163128A (en) * 2006-10-13 2008-04-16 贾波 Network attacked storage apparatus
CN103856502A (en) * 2012-11-29 2014-06-11 北京华胜天成科技股份有限公司 Method and NAS cluster system for realizing mirror image document thermal migration of virtual machine
US9672160B1 (en) * 2012-12-31 2017-06-06 EMC IP Holding Company LLC System and method for caching data

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
SAN存储设备的软/硬件架构设计与实现;李广涛;《中国优秀硕士学位论文全文数据库 信息科技辑2009年第11期》;20091115;第14-16、73-77页,图3-1、图6-1、图6-2、图6-3、图6-4、图6-5 *

Also Published As

Publication number Publication date
CN108664363A (en) 2018-10-16

Similar Documents

Publication Publication Date Title
US9692823B2 (en) Inter-protocol copy offload
US9081754B1 (en) Method and apparatus for cascaded replication using a multi splitter
US10223007B1 (en) Predicting IO
EP2731013A1 (en) Backing up method, device, and system for virtual machine
US9317375B1 (en) Managing cache backup and restore for continuous data replication and protection
CN105630632B (en) The method and virtual machine administration device that a kind of virtual machine recovers
JP2016505960A (en) Increased offload token size for compatibility
WO2017067404A1 (en) Method of creating mirror file in logical volume, method of initiating virtual machine, and server
CN108664363B (en) NAS LUN access control method and device based on double control
CN107817951B (en) Method and device for realizing Ceph cluster fusion
JP2008225765A (en) Network storage system, its management method, and control program
JP2015162091A (en) Storage control apparatus, storage system, storage control method, and storage control program
JP2010044635A (en) File server system and file server system boot method
JP5466650B2 (en) Apparatus and method for managing storage copy service system
KR101778907B1 (en) Cache and non-cache usage in a distributed storage system
CN107153671B (en) Method and equipment for realizing multi-file copy reading and writing in distributed system
CN104517067A (en) Method, device and system for data access
KR101601877B1 (en) Apparatus and method for client's participating in data storage of distributed file system
CN109753229B (en) Data migration method and device, network attached storage equipment and storage medium
CN109298977A (en) A kind of virtual machine business quick recovery method, system, device and storage medium
CN111767169B (en) Data processing method, device, electronic equipment and storage medium
US10409504B2 (en) Soft-switch in storage system
CN109165117B (en) Data processing method and system
CN107145302B (en) Method and equipment for executing file writing in distributed storage system
US11860719B2 (en) Method for implementing storage service continuity in storage system, front-end interface card, and storage system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant