CN116204502A - NAS storage service method and system with high availability - Google Patents

NAS storage service method and system with high availability Download PDF

Info

Publication number
CN116204502A
CN116204502A CN202310483490.4A CN202310483490A CN116204502A CN 116204502 A CN116204502 A CN 116204502A CN 202310483490 A CN202310483490 A CN 202310483490A CN 116204502 A CN116204502 A CN 116204502A
Authority
CN
China
Prior art keywords
nas storage
storage server
management module
band management
nas
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.)
Granted
Application number
CN202310483490.4A
Other languages
Chinese (zh)
Other versions
CN116204502B (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.)
Hunan Bojiang Information Technology Co Ltd
Original Assignee
Hunan Bojiang Information 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 Hunan Bojiang Information Technology Co Ltd filed Critical Hunan Bojiang Information Technology Co Ltd
Priority to CN202310483490.4A priority Critical patent/CN116204502B/en
Publication of CN116204502A publication Critical patent/CN116204502A/en
Application granted granted Critical
Publication of CN116204502B publication Critical patent/CN116204502B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention discloses a high-availability NAS storage service method and a system, which can solve the problem that the performance and the stability of a NAS storage server are defective; specifically, the hardware of the application adopts a combination of a dual-node processor unit, a hot backup RAID card, a hot backup network card and an out-of-band management controller, and the software adopts a combination of a Debian operating system and a ZFS file system. The hardware design based on the dual processor unit, the hot standby RAID card and the hot standby network card has higher availability compared with the existing NAS server with single processor unit, single RAID card and single network card; based on ZFS file system, carrying out corresponding operation on user data corresponding to operation instruction sent by user terminal; the combination of the operating system and the file system is more stable and has higher performance than the prior art.

Description

NAS storage service method and system with high availability
Technical Field
The invention relates to the technical field of NAS storage, in particular to a high-availability NAS storage service method and system.
Background
With the development of information technology, the amount of electronic data is increasing; the storage space on a personal computer often fails to meet the storage needs of the user. Thus, NAS (Network Attached Storage) stores server applications. The NAS storage server is a centralized storage device, and a user stores data in a centralized manner on a storage medium of the NAS storage server and accesses the data in a storage space of the NAS storage server through the Internet, so that the method is convenient and quick.
The NAS storage server realizes the function of centralized shared storage and meets the requirement of users on storage space. However, the reliability and security of the existing NAS storage server for the stored data are to be improved; the concrete steps are as follows: the existing NAS storage servers employ traditional file systems, such as ext4, xfs, etc., which make performance and stability on NAS storage servers defective.
Disclosure of Invention
The invention mainly aims to provide a high-availability NAS storage service method and a high-availability NAS storage service system, and aims to solve the problem that the performance and stability of an NAS storage server are defective due to the fact that the traditional file system is adopted by the traditional NAS storage server.
The technical scheme provided by the invention is as follows:
a NAS storage service method with high availability is applied to a NAS storage service system with high availability; the system comprises a NAS storage server and a user terminal; the NAS storage server comprises a processor, a preset storage interface, an out-of-band management module, a memory unit and a disk array consisting of a RAID card and a plurality of hard disk units; the disk array is used for storing user data; the user terminal is used for establishing communication connection with the NAS storage server through a network; the preset storage interface is used for accessing the external storage to the NAS storage server; the NAS storage server runs a Debian operating system; the disk array uses a ZFS file system to store data; the method comprises the following steps:
the processor acquires an operation instruction sent by the user terminal based on the data transmission standard of the Internet and the network file protocol, and performs corresponding operation on user data corresponding to the operation instruction based on the ZFS file system;
the out-of-band management module acquires the operation information of the NAS storage server and the state information of the disk array in a serial port communication or I2C bus communication mode, wherein the operation information of the NAS storage server comprises the occupancy rate of a processor, the utilization rate of a memory unit, the number of current processes, the number of current operation range and the current started time; the state information of the disk array comprises the number of stored files, the used space of the disk array and the available space of the disk array;
the user terminal establishes communication connection with the NAS storage server based on the network so as to acquire the operation information of the NAS storage server and the state information of the disk array.
Preferably, the NAS storage server runs with virtual machines and containers; the method further comprises the steps of:
the NAS storage server starts a virtual machine and a container;
the processor starts running of a preset application program in the virtual machine or the container;
the predetermined application program manages the user data based on the management instruction transmitted from the user terminal.
Preferably, the NAS storage server further includes a monitoring module; the out-of-band management module is in communication connection with the monitoring module; the method further comprises the steps of:
the monitoring module acquires health state information in the working process of the NAS storage server in real time and sends the health state information to the out-of-band management module, wherein the health state information comprises working current, working voltage and equipment temperature;
the out-of-band management module judges whether the NAS storage server is in an abnormal state or not based on the health state information;
if the NAS storage server is in an abnormal state and is not in a downtime state, the out-of-band management module generates an emergency control instruction and sends the emergency control instruction to the NAS storage server;
the NAS storage server interrupts the modification process of the user data based on the emergency control instruction and prohibits the user terminal from accessing the user data;
if the NAS storage server is in an abnormal state and in a downtime state, the out-of-band management module controls the NAS storage server to be powered off and restarted.
Preferably, the out-of-band management module determines whether the NAS storage server is in an abnormal state based on the health status information, including:
the out-of-band management module judges whether the NAS storage server meets a first condition based on the health status information, wherein the first condition is as follows: at least one of an operating current greater than a current threshold, an operating voltage greater than a voltage threshold, and a device temperature greater than a first temperature threshold is satisfied;
if the first condition is met, the out-of-band management module determines that the NAS storage server is in an abnormal state;
if the NAS storage server is in an abnormal state, the out-of-band management module generates and sends a downtime detection instruction to the NAS storage server;
the NAS storage server sends feedback information of preset times to the out-of-band management module based on the downtime detection instruction, and the time interval of each sending is a first preset duration;
the out-of-band management module judges whether the interval time between any 2 pieces of received adjacent feedback information is a first preset duration or not;
if yes, the out-of-band management module determines that the NAS storage server is not in a downtime state;
if not, the out-of-band management module determines that the NAS storage server is in a downtime state.
Preferably, the NAS storage server interrupts a modification process of the user data based on the emergency control instruction, and prohibits the user terminal from accessing the user data, and then further includes:
the out-of-band management module sends alarm information that the health state of the NAS storage server is abnormal to the user terminal;
if the NAS storage server is no longer in an abnormal state, the out-of-band management module sends a recovery control instruction to the NAS storage server;
and the NAS storage server continuously executes the modification process of the user data based on the recovery control instruction and allows the user terminal to access the user data.
Preferably, the RAID card comprises a first RAID card and a second RAID card; the first RAID card and the second RAID card are both in communication connection with the hard disk unit; the method further comprises the steps of:
after the NAS storage server is started, setting a first RAID card as a working card and setting a second RAID card as a hot standby card, wherein the working card is used for executing a calculation task in the daily operation process of the disk array, and the hot standby clamping block is in a hot standby state;
the NAS storage server judges whether a second condition is met in real time, wherein the second condition is that the processor and the memory unit work normally, but the user terminal cannot access user data in the disk array;
if yes, the NAS storage server determines the first RAID card as a hot standby card and determines the second RAID card as a working card.
Preferably, the NAS storage server determines the first RAID card as a hot standby card and determines the second RAID card as a working card, and then further includes:
the out-of-band management module sends a read-write test instruction to the NAS storage server;
the NAS storage server performs read-write test on user data in the disk array based on the read-write test instruction, generates first test result information and sends the first test result information to the out-of-band management module, wherein the test result information comprises that the read-write test is successful or the read-write test fails;
when the first test result information is that the read-write test is successful, the out-of-band management module generates alarm information for replacing the first RAID card and sends the alarm information to the user terminal.
Preferably, the NAS storage server performs a read-write test on user data in the disk array based on a read-write test instruction, generates first test result information, and sends the first test result information to the out-of-band management module, and then further includes:
when the first test result information is that the read-write test fails, the NAS storage server starts a soft RAID module program to realize a soft RAID card function so that the user terminal accesses user data in the hard disk based on the soft RAID card function;
the NAS storage server performs read-write test on user data in the disk array through a soft RAID card function based on the read-write test instruction, generates second test result information and sends the second test result information to the out-of-band management module;
and when the second test result information is the test failure, the out-of-band management module generates alarm information for replacing the hard disk unit and sends the alarm information to the user terminal.
Preferably, the processor comprises a first processor and a second processor; the method further comprises the steps of:
after the NAS storage server is started, the first processor is set as a main processor, and the second computing module is set as a standby processor, wherein the main processor is used for executing computing tasks in the daily operation process of the NAS storage server, and the standby processor is in a dormant state;
the monitoring module detects the occupancy rate and the temperature value of the main processor in real time;
when the occupancy rate of the main processor is larger than the preset occupancy rate or the temperature value of the main processor is larger than a second temperature threshold value, the NAS storage server marks the main processor at the current moment as an abnormal processor;
the NAS storage server switches the standby processor to the main processor and sets the exception processor as the standby processor.
The invention also provides a high-availability NAS storage service system, which is applied to any one of the high-availability NAS storage service methods; the system comprises a NAS storage server and a user terminal; the NAS storage server comprises a processor, a preset storage interface, an out-of-band management module, a memory unit and a disk array consisting of a RAID card and a plurality of hard disk units; the disk array is used for storing user data; the user terminal is used for establishing communication connection with the NAS storage server through a network; the preset storage interface is used for accessing the external storage to the NAS storage server; the NAS storage server runs a Debian operating system; disk arrays use ZFS file systems for data storage.
Through the technical scheme, the following beneficial effects can be realized:
the NAS storage service method with high availability can solve the problem that the performance and the stability of the NAS storage server are defective; specifically, the existing NAS storage server adopts traditional file systems, such as ext4, xfs and the like, the performance and stability of the file systems are insufficient when the file systems are applied to the storage server, and the application adopts the combination of a Debian operating system and a ZFS file system, and performs corresponding operation on user data corresponding to an operation instruction sent by a user terminal based on the ZFS file system; compared with the existing combination of an operating system and a file system, the method has the advantages of being more stable, higher in availability and higher in performance; and the user can also acquire the running information of the NAS storage server and the state information of the disk array through an iSCSI data transmission mode, serial port communication and SSH command lines, and display and check the running information and the state information through a WEB management interface, so that the system is more convenient.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to the structures shown in these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a first embodiment of a high availability NAS storage service method according to the present invention;
fig. 2 is a schematic structural diagram of a high availability NAS storage service system according to the present invention.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
The invention provides a high-availability NAS storage service method and a high-availability NAS storage service system.
As shown in fig. 1 and fig. 2, in a first embodiment of a high availability NAS storage service method provided by the present invention, the high availability NAS storage service method is applied to a high availability NAS storage service system; the system comprises a NAS storage server and a user terminal; the NAS storage server comprises a processor, a preset storage interface (comprising a SATA interface, an NVMe interface and a USB interface), an out-of-band management module, a memory unit and a disk array consisting of a RAID card (Redundant Arrays of Independent Disks) and a plurality of hard disk units (the disk array is a scheme for storing the same data in different places of the plurality of hard disk units; by placing the data on the plurality of hard disk units, the input and output operations can be overlapped in a balanced manner, the performance is improved, and because the average fault interval time is increased by the plurality of hard disks, the fault tolerance is also increased by storing redundant data); the disk array is used for storing user data; the user terminal is used for establishing communication connection with the NAS storage server through a network; the preset storage interface is used for accessing an external memory (such as a SATA mechanical hard disk, an NVMe solid hard disk and a U disk) into the NAS storage server; the NAS storage server runs a Debian operating system; the disk array uses ZFS (Zettabyte File System) file system to store data; the embodiment comprises the following steps:
step S110: the processor acquires operation instructions (such as operation instructions of reading, writing, inquiring, modifying and the like) sent by the user terminal based on the data transmission standards (such as nfs, samba data transmission standards) of the Internet (such as a tera-net) and the network file protocol, and performs corresponding operation on user data corresponding to the operation instructions based on the ZFS file system.
Specifically, the existing NAS storage server adopts traditional file systems, such as ext4, xfs and the like, and the performance and stability of the file systems applied to the storage server are insufficient.
Specifically, the user terminal may further perform corresponding operations on the user data corresponding to the operation instruction based on the operation instruction (for example, the operation instruction of reading, writing, querying, modifying, etc.) sent by the data transmission standard of iSCSI (Internet Small Computer System Interface).
Step S120: the out-of-band management module acquires the operation information of the NAS storage server and the state information of the disk array in a serial port communication or I2C bus communication mode, wherein the operation information of the NAS storage server comprises a processor state, a RAID card state, a processor occupancy rate, a memory unit utilization rate, a current process number, a current operation number and a current started duration; the state information for the disk array includes the number of storage files, the disk array space available, and the disk array space available.
Specifically, a local manager (using an out-of-band management module) acquires the operation information of the NAS storage server through a serial port or an I2C bus communication mode; a user terminal (comprising an administrator and a general user) can acquire the operation information of the NAS storage server through a network; whether the local administrator or the user terminal, the NAS storage server operation information is acquired from the out-of-band management module through the network. The out-of-band management module acquires the running information of the NAS storage server through the I2C;
step S130: the user terminal establishes a communication connection with the NAS storage server based on a network (for example, in the manner of SSH command lines) to acquire operation information of the NAS storage server and status information of the disk array.
Specifically, the user terminal may also display, through the WEB management interface, operation information of the NAS storage server and status information of the disk array. The user may also obtain the running information of the NAS storage server and the state information of the disk array through the SSH command line.
The NAS storage service method with high availability can solve the problem that the performance and the stability of the NAS storage server are defective; specifically, the existing NAS storage server adopts traditional file systems, such as ext4, xfs and the like, the performance and stability of the file systems are insufficient when the file systems are applied to the storage server, and the application adopts the combination of a Debian operating system and a ZFS file system, and performs corresponding operation on user data corresponding to an operation instruction sent by a user terminal based on the ZFS file system; compared with the existing combination of an operating system and a file system, the method has the advantages of being more stable, higher in availability and higher in performance; and the user can also acquire the running information of the NAS storage server and the state information of the disk array through an iSCSI data transmission mode, serial port communication and SSH command lines, and display and check the running information and the state information through a WEB management interface, so that the system is more convenient.
In a second embodiment of a high availability NAS storage service method provided by the present invention, based on the first embodiment, a NAS storage server runs with a virtual machine and a container; the embodiment further comprises the following steps:
step S210: the NAS storage server starts the virtual machine and container.
Step S210: the processor initiates execution of the predetermined application in a virtual machine or container, wherein a source file of the predetermined application is stored on the disk array.
Step S210: the predetermined application program manages the user data based on the management instruction transmitted from the user terminal.
Specifically, a container is a unit for binding a software application with all its necessary files into one runtime environment. As a unit, the container can move and run on any operating system in any environment, and the application expansion requirement of a user can be met more conveniently.
Specifically, for the existing NAS storage server, the user can only use the software functions preloaded by the system, cannot expand more functions, and greatly limits the use requirements of the user. In this application, the user terminal can implement an application expansion function through the container and the virtual machine (i.e. the container is running on the virtual machine), for example, the predetermined application in this embodiment is a photo browsing application function application; that is, by starting a predetermined application program, the corresponding user data can be managed based on a management instruction (e.g., a photo viewing instruction) sent by the user terminal (i.e., the corresponding photo is displayed on the user terminal).
In a third embodiment of the high availability NAS storage service method provided by the present invention, based on the first embodiment, the NAS storage server further includes a monitoring module; the out-of-band management module is in communication connection with the monitoring module; the out-of-band management module and the monitoring module are separately powered with the NAS storage server body so as to ensure that the out-of-band management module and the monitoring module can work independently; the embodiment further comprises the following steps:
step S310: the monitoring module acquires health state information in the working process of the NAS storage server in real time and sends the health state information to the out-of-band management module, wherein the health state information comprises working current, working voltage and equipment temperature;
specifically, the device temperatures herein include, but are not limited to, motherboard temperature, processor temperature, memory unit temperature, and hard disk unit temperature.
Step S320: the out-of-band management module determines whether the NAS storage server is in an abnormal state or a downtime state based on the health status information.
Specifically, the out-of-band management refers to a management chip and a management function independent of a server, so that health status monitoring and intelligent management of the server are realized. I.e., the out-of-band management module here is used to monitor health status of NAS storage servers.
Step S330: if the NAS storage server is in an abnormal state and is not in a downtime state, the out-of-band management module generates an emergency control instruction and sends the emergency control instruction to the NAS storage server.
Step S340: the NAS storage server interrupts the modification process of the user data based on the emergency control instruction and prohibits the user terminal from accessing the user data.
Specifically, if the NAS storage server is in an abnormal state, it is indicated that the NAS storage server is at risk of downtime, in order to ensure safety and integrity of user data, execution of a modification process of the user data is temporarily interrupted, and access of the user terminal to the user data is prohibited, so as to avoid a situation that the user data is lost due to unexpected downtime in the process of executing the modification process of the user data or in the process of accessing the user data by the user terminal.
Step S350: if the NAS storage server is in an abnormal state and in a downtime state, the out-of-band management module controls the NAS storage server to be powered off and restarted.
Specifically, the method comprises the following steps; by arranging the out-of-band management module and the monitoring module, the health state of the NAS storage server can be monitored in real time, so that the abnormal state of the NAS storage server is known in time, preventive measures are taken in time, particularly, the execution of the modification process of the user data is temporarily interrupted, the user terminal is forbidden to access the user data, and the situation that the user data is lost due to unexpected downtime in the process of executing the modification process of the user data or the user terminal accessing the user data is avoided; and once the NAS storage server has a downtime fault, the out-of-band management module can timely control the NAS storage server to be powered off and restarted, so that the NAS storage server is timely repaired, the use experience of a user is ensured, and the user data in the NAS storage server can be safer and more reliable.
In a fourth embodiment of the high availability NAS storage service method according to the present invention, based on the third embodiment, step S320 includes the steps of:
step S410: the out-of-band management module judges whether the NAS storage server meets a first condition based on the health status information, wherein the first condition is as follows: at least one of an operating current greater than a current threshold, an operating voltage greater than a voltage threshold, and a device temperature greater than a first temperature threshold is satisfied.
Step S420: if the first condition is met, the out-of-band management module determines that the NAS storage server is in an abnormal state.
Specifically, if the first condition is satisfied, it is indicated that the NAS storage server is in an abnormal state. And the steps above give a specific scheme of how to determine that the NAS storage server is in an abnormal state.
Step S430: if the NAS storage server is in an abnormal state, the out-of-band management module generates and sends a downtime detection instruction to the NAS storage server.
Step S440: and the NAS storage server sends feedback information of preset times (for example, 10 times) to the out-of-band management module based on the downtime detection instruction, and the sending interval time of each time is a first preset duration (for example, 1 s).
Step S450: the out-of-band management module judges whether the interval time between any 2 pieces of received adjacent feedback information is a first preset duration.
If yes, step S460 is executed: the out-of-band management module determines that the NAS storage server is not in a downtime state.
Specifically, if so, it is described that the NAS storage server is in an abnormal operation state, but is in a down state, and can still execute the storage task.
If not, go to step S470: the out-of-band management module determines that the NAS storage server is in a downtime state.
Specifically, if not, it is indicated that the NAS storage server is not able to normally send feedback information to the out-of-band management module, that is, in a downtime state.
In a fifth embodiment of the high availability NAS storage service method according to the present invention, based on the third embodiment, step S340 further includes the following steps:
step S510: and the out-of-band management module sends alarm information that the health state of the NAS storage server is abnormal to the user terminal.
Specifically, when the NAS storage server is in an abnormal state, the out-of-band management module sends alarm information that the health state of the NAS storage server is abnormal to the user terminal so as to remind the user to process in time.
Step S520: and if the NAS storage server is no longer in an abnormal state, the out-of-band management module sends a recovery control instruction to the NAS storage server.
Step S530: and the NAS storage server continuously executes the modification process of the user data based on the recovery control instruction and allows the user terminal to access the user data.
In a sixth embodiment of the high availability NAS storage service method provided by the present invention, based on the first embodiment, the RAID card includes a first RAID card and a second RAID card; the first RAID card and the second RAID card are both in communication connection with the hard disk unit; the embodiment further comprises the following steps:
step S610: after the NAS storage server is started, the first RAID card is set as a working card, and the second RAID card is set as a hot standby card, wherein the working card is used for executing a calculation task in the daily operation process of the disk array, and the hot standby card block is in a hot standby state (namely, the first RAID card and the second RAID card are in a double-machine hot standby relationship).
Step S620: and the NAS storage server judges whether a second condition is met in real time, wherein the second condition is that the processor and the memory unit work normally, but the user terminal cannot access the user data in the disk array.
Specifically, if the processor and the memory unit work normally, but the user terminal cannot access the user data in the disk array, it can be determined that the RAID card (specifically, the working card) has a fault.
If yes, step S630 is executed: the NAS storage server determines the first RAID card as a hot standby card and the second RAID card as a working card.
Specifically, the first RAID card and the second RAID card are switched to ensure that a user can normally access user data, so that the operation stability of the NAS storage server is improved.
Specifically, the existing NAS storage server has only one RAID card, and a plurality of hard disk units are connected through the RAID card, so that it is necessary to ensure that the RAID card always works normally, and once the RAID is abnormal, user data cannot be accessed and user data is easy to lose.
In the application, the RAID card comprises a first RAID card and a second RAID card; the hot standby function can be realized by setting 2 RAID cards. When one RAID card works, the other RAID card is in a hot standby state, and once the working RAID card is abnormal, the other hot standby RAID card can be replaced in time.
In addition, the RAID recovery algorithm (such as RAID5 algorithm or RAID6 algorithm) is realized through the RAID card, so that the correctness of the user data is ensured. The data are stored in the storage medium after the RAID recovery algorithm is operated by the RAID card, and the data can be used by a user after the RAID recovery algorithm is operated by the RAID card during reading.
In a seventh embodiment of the high availability NAS storage service method according to the present invention, based on the sixth embodiment, step S630 further includes the following steps:
step S710: and the out-of-band management module sends a read-write test instruction to the NAS storage server.
Step S720: the NAS storage server performs read-write test on user data in the disk array based on the read-write test instruction, generates first test result information and sends the first test result information to the out-of-band management module, wherein the test result information comprises any one of successful read-write test or failure read-write test.
Step S730: when the first test result information is that the read-write test is successful, the out-of-band management module generates alarm information for replacing the first RAID card and sends the alarm information to the user terminal.
Specifically, after the second RAID card is switched to the working card, the NAS storage server performs read-write test on user data in the disk array based on the read-write test instruction, and when the first test result information is that the read-write test is successful, the first RAID card is truly failed before the first test result information indicates that the user data cannot be read, so that the out-of-band management module generates alarm information for replacing the first RAID card and sends the alarm information to the user terminal, and the user is reminded of replacing the first RAID card in time.
In an eighth embodiment of the high availability NAS storage service method according to the present invention, based on the seventh embodiment, step S720 further includes the following steps:
step S810: when the first test result information is that the read-write test fails, the NAS storage server starts a soft RAID module program to realize a soft RAID card function, so that the user terminal accesses user data in the hard disk based on the soft RAID card function.
Specifically, after the second RAID card is switched to the working card, if the first test result information is that the read-write test fails, there are two possibilities, that is, the second RAID card also fails, and that the hard disk unit fails, so that in order to further determine a specific cause, a subsequent step is required.
Step S820: and the NAS storage server performs read-write test on user data in the disk array through a soft RAID card function based on the read-write test instruction, generates second test result information and sends the second test result information to the out-of-band management module.
Specifically, the NAS storage server operates with a soft RAID module, thereby implementing a soft RAID function. Through the function of the soft RAID card, the data stored in the hard disk unit can be accessed directly through the RAID card, then the user data in the disk array is subjected to read-write test based on the function of the soft RAID card, and second test result information is obtained.
Step S830: and when the second test result information is the test failure, the out-of-band management module generates alarm information for replacing the hard disk unit and sends the alarm information to the user terminal.
Specifically, when the second test result information is a test failure, it indicates that the data cannot be read due to the failure of the second RAID card, that is, indicates that the hard disk unit has failed, and the out-of-band management module generates alarm information for replacing the hard disk unit and sends the alarm information to the user terminal.
Step S840: the NAS storage server determines whether user data in the hard disk unit is lost.
If yes, go to step S750: the NAS storage server repairs the user data in the hard disk units based on a RAID recovery algorithm (e.g., a RAID5 algorithm, or a RAID6 algorithm).
Specifically, if the user data in the hard disk unit is lost, the NAS storage server recovers the disk array based on the data in the hard disk unit and the RAID recovery algorithm of the RAID card, so as to ensure the data security. The application adopts a triple guarantee scheme of 2 entity RAID cards and a soft RAID card function, and can further ensure the stability and the safety of user data.
In a ninth embodiment of a high availability NAS storage service method according to the present invention, based on the third embodiment, the processor includes a first processor and a second processor; the embodiment further comprises the following steps:
step S910: after the NAS storage server is started, the first processor is set as a main processor, and the second computing module is set as a standby processor, wherein the main processor is used for executing computing tasks in the daily operation process of the NAS storage server, and the standby processor is in a dormant state.
Step S920: the monitoring module detects the occupancy rate and the temperature value of the main processor in real time.
Step S930: when the occupancy rate of the main processor is larger than the preset occupancy rate or the temperature value of the main processor is larger than the second temperature threshold value, the NAS storage server marks the main processor at the current moment as an abnormal processor.
Step S940: the NAS storage server switches the standby processor to the main processor and sets the exception processor as the standby processor.
Specifically, when the processor load of the NAS storage server is too large or the temperature is too high, the NAS storage server cannot work normally. To address this issue, the present application devised a dual node computing scheme (i.e., a first processor and a second processor are provided, with one processor being provided as the primary processor and the other processor being provided as the standby processor). And once the main processor is abnormal, the main processor is automatically switched to the standby processor. The high availability and stability of NAS storage servers is achieved through a dual node computing scheme.
In a tenth embodiment of the high availability NAS storage service method according to the present invention, based on the ninth embodiment, the method further includes the following steps:
step S1010: and if the NAS storage server is in a downtime state, marking the current main processor as an abnormal processor.
Specifically, if the crash occurs, the current main processor is directly marked as an abnormal processor.
Step S1020: the NAS storage server switches the standby processor to the main processor and sets the exception processor as the standby processor.
Step S1030: the NAS storage server user acquires a switching instruction input through the user terminal and switches the main processor and the standby processor based on the switching instruction.
Step S1040: the NAS storage server acquires a specified instruction input by a user through a WEB management interface of the user terminal.
Step S1050: when the main processor determined by the specified instruction and the actual main processor at the current moment are the same processor, a first feedback instruction (particularly, no switching is needed) is generated and sent to the user terminal.
Step S1060: when the main processor determined by the specified instruction is different from the actual main processor at the current moment, the main processor determined by the specified instruction is set as a main processor, the other processor is set as a standby processor, and then a second feedback instruction (specifically, switching completion) is generated and sent to the user terminal.
Specifically, the purpose of this embodiment is to enable a user to specify a main processor and a standby processor through a WEB management interface of a user terminal, or manually switch the main processor and the standby processor.
In an eleventh embodiment of the high availability NAS storage service method according to the present invention, based on the ninth embodiment, the present embodiment further includes the following steps:
step S1110: the NAS storage server acquires a second preset duration (for example, 1 day) input by the user terminal.
Specifically, the second preset duration is a period in which the NAS storage server automatically switches the active and standby processors. In this example, 1 day is taken as an example.
Step S1120: the out-of-band management module obtains a running log of the NAS storage server in a third preset time period (for example, 30 days) in the past, and averages the daily minimum occupancy rate of the processor in the third preset time period in the past based on the running log to obtain an average minimum occupancy rate, wherein the third preset time period is longer than the second preset time period.
Step S1130: if the working time of the main processor is longer than the first preset time (i.e. the working time is longer than 1 day), the NAS storage server determines whether the occupancy rate of the main processor is reduced to the average minimum occupancy rate within a fourth preset time (the fourth preset time is shorter than the second preset time, for example, 1 hour) from this moment.
If yes, go to step S1140: when the occupancy rate of the main processor is reduced to the average lowest occupancy rate, the NAS storage server switches the main processor and the standby processor.
Specifically, if the occupancy rate of the instruction book main processor is reduced to a lower level, the main and standby processors are switched at the moment, so that the influence on the use of the user can be reduced as much as possible.
If not, go to step S1150: after a third preset time period, the NAS storage server switches the main processor and the standby processor.
Specifically, if not, the main processor and the standby processor are directly switched after 1 hour without waiting all the time.
The invention also provides a high-availability NAS storage service system, which is applied to the high-availability NAS storage service method according to any one of the above; the system comprises a NAS storage server and a user terminal; the NAS storage server comprises a processor, a preset storage interface, a memory unit and a disk array consisting of a RAID card and a plurality of hard disk units; the disk array is used for storing user data; the user terminal is used for establishing communication connection with the NAS storage server through the tera network card; the preset storage interface is used for accessing the external storage to the NAS storage server; the NAS storage server runs a Debian operating system; disk arrays use ZFS file systems for data storage.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and including several instructions for causing a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The embodiments of the present invention have been described above with reference to the accompanying drawings, but the present invention is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those having ordinary skill in the art without departing from the spirit of the present invention and the scope of the claims, which are to be protected by the present invention.

Claims (9)

1. The NAS storage service method with high availability is characterized by being applied to a NAS storage service system with high availability; the system comprises a NAS storage server and a user terminal; the NAS storage server comprises a processor, a preset storage interface, an out-of-band management module, a memory unit and a disk array consisting of a RAID card and a plurality of hard disk units; the disk array is used for storing user data; the user terminal is used for establishing communication connection with the NAS storage server through a network; the preset storage interface is used for accessing the external storage to the NAS storage server; the NAS storage server runs a Debian operating system; the disk array uses a ZFS file system to store data; the method comprises the following steps:
the processor acquires an operation instruction sent by the user terminal based on the data transmission standard of the Internet and the network file protocol, and performs corresponding operation on user data corresponding to the operation instruction based on the ZFS file system;
the out-of-band management module acquires the operation information of the NAS storage server and the state information of the disk array in a serial port communication or I2C bus communication mode, wherein the operation information of the NAS storage server comprises the occupancy rate of a processor, the utilization rate of a memory unit, the number of current processes, the number of current operation range and the current started time; the state information of the disk array comprises the number of stored files, the used space of the disk array and the available space of the disk array;
the user terminal establishes communication connection with the NAS storage server based on a network so as to acquire the operation information of the NAS storage server and the state information of the disk array;
the NAS storage server also comprises a monitoring module; the out-of-band management module is in communication connection with the monitoring module; the method further comprises the steps of:
the monitoring module acquires health state information in the working process of the NAS storage server in real time and sends the health state information to the out-of-band management module, wherein the health state information comprises working current, working voltage and equipment temperature;
the out-of-band management module judges whether the NAS storage server is in an abnormal state or not based on the health state information;
if the NAS storage server is in an abnormal state and is not in a downtime state, the out-of-band management module generates an emergency control instruction and sends the emergency control instruction to the NAS storage server;
the NAS storage server interrupts the modification process of the user data based on the emergency control instruction and prohibits the user terminal from accessing the user data;
if the NAS storage server is in an abnormal state and in a downtime state, the out-of-band management module controls the NAS storage server to be powered off and restarted.
2. The high availability NAS storage service method of claim 1, wherein the NAS storage server runs a virtual machine and a container; the method further comprises the steps of:
the NAS storage server starts a virtual machine and a container;
the processor starts running of a preset application program in the virtual machine or the container;
the predetermined application program manages the user data based on the management instruction transmitted from the user terminal.
3. The high availability NAS storage service method of claim 1, wherein the out-of-band management module determines whether a NAS storage server is in an abnormal state based on health status information, comprising:
the out-of-band management module judges whether the NAS storage server meets a first condition based on the health status information, wherein the first condition is as follows: at least one of an operating current greater than a current threshold, an operating voltage greater than a voltage threshold, and a device temperature greater than a first temperature threshold is satisfied;
if the first condition is met, the out-of-band management module determines that the NAS storage server is in an abnormal state;
if the NAS storage server is in an abnormal state, the out-of-band management module generates and sends a downtime detection instruction to the NAS storage server;
the NAS storage server sends feedback information of preset times to the out-of-band management module based on the downtime detection instruction, and the time interval of each sending is a first preset duration;
the out-of-band management module judges whether the interval time between any 2 pieces of received adjacent feedback information is a first preset duration or not;
if yes, the out-of-band management module determines that the NAS storage server is not in a downtime state;
if not, the out-of-band management module determines that the NAS storage server is in a downtime state.
4. The high availability NAS storage service method according to claim 1, wherein the NAS storage server interrupts a modification process of user data and prohibits access of the user terminal to the user data based on an emergency control instruction, and further comprising:
the out-of-band management module sends alarm information that the health state of the NAS storage server is abnormal to the user terminal;
if the NAS storage server is no longer in an abnormal state, the out-of-band management module sends a recovery control instruction to the NAS storage server;
and the NAS storage server continuously executes the modification process of the user data based on the recovery control instruction and allows the user terminal to access the user data.
5. The high availability NAS storage service method according to claim 1, wherein the RAID card comprises a first RAID card and a second RAID card; the first RAID card and the second RAID card are both in communication connection with the hard disk unit; the method further comprises the steps of:
after the NAS storage server is started, setting a first RAID card as a working card and setting a second RAID card as a hot standby card, wherein the working card is used for executing a calculation task in the daily operation process of the disk array, and the hot standby clamping block is in a hot standby state;
the NAS storage server judges whether a second condition is met in real time, wherein the second condition is that the processor and the memory unit work normally, but the user terminal cannot access user data in the disk array;
if yes, the NAS storage server determines the first RAID card as a hot standby card and determines the second RAID card as a working card.
6. The high availability NAS storage service method of claim 5, wherein the NAS storage server determines a first RAID card as a hot standby card and a second RAID card as a working card, and further comprising:
the out-of-band management module sends a read-write test instruction to the NAS storage server;
the NAS storage server performs read-write test on user data in the disk array based on the read-write test instruction, generates first test result information and sends the first test result information to the out-of-band management module, wherein the test result information comprises that the read-write test is successful or the read-write test fails;
when the first test result information is that the read-write test is successful, the out-of-band management module generates alarm information for replacing the first RAID card and sends the alarm information to the user terminal.
7. The high availability NAS storage service method according to claim 6, wherein the NAS storage server performs a read-write test on user data in a disk array based on a read-write test instruction, generates first test result information, and sends the first test result information to an out-of-band management module, and further comprising:
when the first test result information is that the read-write test fails, the NAS storage server starts a soft RAID module program to realize a soft RAID card function so that the user terminal accesses user data in the hard disk based on the soft RAID card function;
the NAS storage server performs read-write test on user data in the disk array through a soft RAID card function based on the read-write test instruction, generates second test result information and sends the second test result information to the out-of-band management module;
and when the second test result information is the test failure, the out-of-band management module generates alarm information for replacing the hard disk unit and sends the alarm information to the user terminal.
8. The high availability NAS storage service method according to claim 1, wherein the processor comprises a first processor and a second processor; the method further comprises the steps of:
after the NAS storage server is started, the first processor is set as a main processor, and the second computing module is set as a standby processor, wherein the main processor is used for executing computing tasks in the daily operation process of the NAS storage server, and the standby processor is in a dormant state;
the monitoring module detects the occupancy rate and the temperature value of the main processor in real time;
when the occupancy rate of the main processor is larger than the preset occupancy rate or the temperature value of the main processor is larger than a second temperature threshold value, the NAS storage server marks the main processor at the current moment as an abnormal processor;
the NAS storage server switches the standby processor to the main processor and sets the exception processor as the standby processor.
9. A high availability NAS storage service system, wherein the system is applied to the high availability NAS storage service method according to any one of claims 1 to 8; the system comprises a NAS storage server and a user terminal; the NAS storage server comprises a processor, a preset storage interface, an out-of-band management module, a memory unit and a disk array consisting of a RAID card and a plurality of hard disk units; the disk array is used for storing user data; the user terminal is used for establishing communication connection with the NAS storage server through a network; the preset storage interface is used for accessing the external storage to the NAS storage server; the NAS storage server runs a Debian operating system; disk arrays use ZFS file systems for data storage.
CN202310483490.4A 2023-05-04 2023-05-04 NAS storage service method and system with high availability Active CN116204502B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310483490.4A CN116204502B (en) 2023-05-04 2023-05-04 NAS storage service method and system with high availability

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310483490.4A CN116204502B (en) 2023-05-04 2023-05-04 NAS storage service method and system with high availability

Publications (2)

Publication Number Publication Date
CN116204502A true CN116204502A (en) 2023-06-02
CN116204502B CN116204502B (en) 2023-07-04

Family

ID=86508009

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310483490.4A Active CN116204502B (en) 2023-05-04 2023-05-04 NAS storage service method and system with high availability

Country Status (1)

Country Link
CN (1) CN116204502B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030105767A1 (en) * 2001-11-22 2003-06-05 Koji Sonoda Storage system and control method
US20030187885A1 (en) * 2002-03-26 2003-10-02 Kunihiko Miyazaki File storage system and a NAS server
US20040098415A1 (en) * 2002-07-30 2004-05-20 Bone Jeff G. Method and apparatus for managing file systems and file-based data storage
WO2010071258A1 (en) * 2008-12-16 2010-06-24 (주)인디링스 Raid controller for independently managing file system
US20140082129A1 (en) * 2012-09-18 2014-03-20 Netapp, Inc. System and method for managing a system of appliances that are attached to a networked file system
CN106790565A (en) * 2016-12-27 2017-05-31 中国电子科技集团公司第五十二研究所 A kind of network attached storage group system
CN106802854A (en) * 2017-02-22 2017-06-06 郑州云海信息技术有限公司 A kind of failure monitoring system of multi controller systems
CN108804281A (en) * 2017-04-28 2018-11-13 阿自倍尔株式会社 facility monitoring device
CN112667164A (en) * 2020-12-30 2021-04-16 湖南博匠信息科技有限公司 Shared storage unit management monitoring method and system
CN113849230A (en) * 2021-08-30 2021-12-28 浪潮电子信息产业股份有限公司 Server starting method and device, electronic equipment and readable storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030105767A1 (en) * 2001-11-22 2003-06-05 Koji Sonoda Storage system and control method
US20030187885A1 (en) * 2002-03-26 2003-10-02 Kunihiko Miyazaki File storage system and a NAS server
US20040098415A1 (en) * 2002-07-30 2004-05-20 Bone Jeff G. Method and apparatus for managing file systems and file-based data storage
WO2010071258A1 (en) * 2008-12-16 2010-06-24 (주)인디링스 Raid controller for independently managing file system
US20140082129A1 (en) * 2012-09-18 2014-03-20 Netapp, Inc. System and method for managing a system of appliances that are attached to a networked file system
CN106790565A (en) * 2016-12-27 2017-05-31 中国电子科技集团公司第五十二研究所 A kind of network attached storage group system
CN106802854A (en) * 2017-02-22 2017-06-06 郑州云海信息技术有限公司 A kind of failure monitoring system of multi controller systems
CN108804281A (en) * 2017-04-28 2018-11-13 阿自倍尔株式会社 facility monitoring device
CN112667164A (en) * 2020-12-30 2021-04-16 湖南博匠信息科技有限公司 Shared storage unit management monitoring method and system
CN113849230A (en) * 2021-08-30 2021-12-28 浪潮电子信息产业股份有限公司 Server starting method and device, electronic equipment and readable storage medium

Also Published As

Publication number Publication date
CN116204502B (en) 2023-07-04

Similar Documents

Publication Publication Date Title
CN102394774B (en) Service state monitoring and failure recovery method for controllers of cloud computing operating system
US11157373B2 (en) Prioritized transfer of failure event log data
CN106802854B (en) Fault monitoring system of multi-controller system
CN111880906A (en) Virtual machine high-availability management method, system and storage medium
CN114637475A (en) Distributed storage system control method and device and readable storage medium
CN109308242A (en) A kind of dynamic monitoring and controlling method, device, equipment and storage medium
CN111181780A (en) HA cluster-based host pool switching method, system, terminal and storage medium
CN110099084A (en) A kind of method, system and computer-readable medium guaranteeing storage service availability
CN109254876A (en) The management method and device of database in cloud computing system
US20220334733A1 (en) Data restoration method and related device
CN107357800A (en) A kind of database High Availabitity zero loses solution method
CN111399766A (en) Data storage method, data reading method, device and system in storage system
CN116204502B (en) NAS storage service method and system with high availability
CN110309226A (en) A kind of unified backup of cloud database and recovery system
WO2023125702A1 (en) Cloud management method and system for battery swapping station, server, and storage medium
CN111475334A (en) TiDB database maintenance method and device, computer equipment and storage medium
WO2022228012A1 (en) Exception handling method, apparatus and system, and electronic device
CN114189429A (en) System, method, device and medium for monitoring server cluster faults
US20220318073A1 (en) Provisioning a computing subsystem including disaggregated hardware resources that comply with a power domain requirement for a workload
CN110647435A (en) Server, hard disk remote control method and control assembly
CN111475335A (en) Method, system, terminal and storage medium for fast recovery of database
CN117033084B (en) Virtual machine backup method and device, electronic equipment and storage medium
CN112463514A (en) Monitoring method and device for distributed cache cluster
Kitamura Configuration of a Power-saving High-availability Server System Incorporating a Hybrid Operation Method
JP2000148525A (en) Method for reducing load of active system in service processor duplex 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