CN116610379A - Method and device for starting pcsd service - Google Patents
Method and device for starting pcsd service Download PDFInfo
- Publication number
- CN116610379A CN116610379A CN202310509287.XA CN202310509287A CN116610379A CN 116610379 A CN116610379 A CN 116610379A CN 202310509287 A CN202310509287 A CN 202310509287A CN 116610379 A CN116610379 A CN 116610379A
- Authority
- CN
- China
- Prior art keywords
- pcsd
- service
- configuration file
- starting
- module
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 246
- 230000008569 process Effects 0.000 claims abstract description 201
- 230000008439 repair process Effects 0.000 claims abstract description 58
- 230000004048 modification Effects 0.000 claims abstract description 39
- 238000012986 modification Methods 0.000 claims abstract description 39
- 230000008676 import Effects 0.000 claims abstract description 13
- 230000006870 function Effects 0.000 claims description 10
- 230000000977 initiatory effect Effects 0.000 claims description 6
- 238000004590 computer program Methods 0.000 claims description 2
- 230000004044 response Effects 0.000 description 7
- 230000005856 abnormality Effects 0.000 description 5
- 230000005540 biological transmission Effects 0.000 description 4
- 238000010586 diagram Methods 0.000 description 3
- 230000006978 adaptation Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000010926 purge Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/02—Standardisation; Integration
- H04L41/0246—Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols
- H04L41/0273—Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols using web services for network management, e.g. simple object access protocol [SOAP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/50—Network service management, e.g. ensuring proper service fulfilment according to agreements
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The disclosure provides a method and a device for starting a pcsd service, wherein the method comprises the following steps: the starting process responds to a starting instruction, and an auxiliary process and a main process are established; acquiring a storage address of an SSL module and a configuration file required for starting the pcsd service; the SSL module is imported into the main process, and the storage address is sent to the main process and the auxiliary process; the main process is based on the SSL module and imports a tool kit module required for starting the pcsd service to the main process; based on the SSL module and the tool pack module, acquiring a configuration file from a storage address, and completing the starting of the pcsd service by adopting a disk and a network specified by the configuration file; the auxiliary process obtains a configuration file from the storage address; and detecting that the performance state of the disk and/or the network specified by the configuration file does not reach the standard, and executing a state repair operation and/or a configuration modification operation. According to the pcsd service starting method, the pcsd service is started by using the auxiliary process and the main process, and the overall starting speed can be improved.
Description
Technical Field
The technical scheme of the disclosure relates to the technical field of computers, in particular to a method and a device for starting a pcsd service.
Background
NAS (Network Attached Storage ) servers may provide file transfer services for computers in a network. In order to achieve high availability of file transfer services, multiple NAS servers are deployed in the network, including a primary NAS server and a backup NAS server. When a user wants to trigger a primary-to-backup handover (i.e., to re-serve one backup NAS server as the primary NAS server), the NAS service needs to be started The pcsd service on the device to send the pcs instruction for realizing the master-slave switch to the network 。
In the starting process of the pcsd service on the NAS server, if the disk and network performance states of the NAS server are poor, the time consumption is too long, and the starting failure is easy to cause.
Disclosure of Invention
In view of this, the embodiments of the present disclosure provide a method and apparatus for starting a pcsd service.
According to a first aspect of the present disclosure, a pcsd service initiation method is presented, the method comprising:
the method comprises the steps that a starting process of a pcsd service responds to an instruction for starting the pcsd service, and an auxiliary process and a main process of the pcsd service are created; acquiring file storage addresses of an SSL module and a configuration file required for starting the pcsd service, wherein the configuration file is used for designating a disk and a network adopted for starting the pcsd service; importing the SSL module into the main process, and sending the file storage address to the main process and the auxiliary process;
the main process imports a toolkit module required for starting the pcsd service to the main process based on the SSL module; based on the SSL module and the tool pack module, acquiring the configuration file from the file storage address, and executing SSL authentication by adopting a disk and a network specified by the configuration file to finish starting of the pcsd service;
The auxiliary process acquires the configuration file from the file storage address; if the performance state of the disk and/or the network specified by the configuration file is detected to be not up to standard, executing a state repair operation and/or a configuration modification operation;
wherein the state repair operation comprises: repairing the performance states of the disks and/or networks with the performance states not reaching the standard; the configuration modification operation includes: and changing the configuration file into a disk and/or a network with the specified performance state reaching the standard.
In combination with any one of the embodiments provided in the present disclosure, the configuration file includes a first information set and a second information set, where the first information set includes a first disk identifier and a first network identifier, the second information set includes a second disk identifier and a second network identifier, the first information set is validated by default, and the second information set is not validated by default;
the changing the configuration file to a disk and/or a network with specified performance state reaching the standard comprises the following steps:
and validating the second information set.
In connection with any of the embodiments provided in the present disclosure, the performing a state repair operation and/or a configuration modification operation includes:
Executing state repair operation on the disk and/or network with the performance state not reaching the standard, if the repair fails, continuing to execute the state repair operation until the times of executing the state repair operation reach the preset times;
and if the repair failure still occurs after the number of times of executing the state repair operation reaches the preset number of times, executing the configuration modification operation.
In connection with any one of the embodiments provided by the present disclosure, the method further comprises:
the auxiliary process creates a log storage area for storing a pcsd service starting log generated by the main process on a disk with the performance state reaching the standard specified by the configuration file;
the auxiliary process sends a first notification message indicating that creation of the log storage area is completed to the main process, so that the main process starts to perform SSL authentication.
In connection with any one of the embodiments provided by the present disclosure, the method further comprises:
if the main process determines that the start-up of the pcsd service fails, a second notification message indicating the start-up failure of the pcsd service is sent to the start-up process;
and the starting process responds to the second notification message and instructs the main process to acquire the configuration file from the storage address again so as to start the pcsd service again.
According to a second aspect of the present disclosure, there is provided a pcsd service initiation apparatus, the apparatus comprising:
the starting module of the pcsd service responds to the instruction for starting the pcsd service, and an auxiliary module and a main module of the pcsd service are created; acquiring file storage addresses of an SSL module and a configuration file required for starting the pcsd service, wherein the configuration file is used for designating a disk and a network adopted for starting the pcsd service; importing the SSL module into the main module, and sending the storage address to the main module and the auxiliary module;
the main module imports a toolkit module required for starting the pcsd service to the main module based on the SSL module; based on the SSL module and the tool pack module, acquiring the configuration file from the file storage address, and executing SSL authentication by adopting a disk and a network specified by the configuration file to finish starting of the pcsd service;
the auxiliary module acquires the configuration file from the file storage address; if the performance state of the disk and/or the network specified by the configuration file is detected to be not up to standard, executing a state repair operation and/or a configuration modification operation;
wherein the state repair operation comprises: repairing the performance states of the disks and/or networks with the performance states not reaching the standard; the configuration modification operation includes: and changing the configuration file into a disk and/or a network with the specified performance state reaching the standard.
According to a third aspect of the present disclosure, a NAS server is presented, on which a boot process of a pcsd service is run;
the starting process responds to an instruction for starting the pcsd service, and an auxiliary process and a main process of the pcsd service are created; acquiring file storage addresses of an SSL module and a configuration file required for starting the pcsd service, wherein the configuration file is used for designating a disk and a network adopted for starting the pcsd service; importing the SSL module into the main process, and sending the storage address to the main process and the auxiliary process;
the main process imports a toolkit module required for starting the pcsd service to the main process based on the SSL module; based on the SSL module and the tool pack module, acquiring the configuration file from the file storage address, and executing SSL authentication by adopting a disk and a network specified by the configuration file to finish starting of the pcsd service;
the auxiliary process acquires the configuration file from the file storage address; if the performance state of the disk and/or the network specified by the configuration file is detected to be not up to standard, executing a state repair operation and/or a configuration modification operation;
wherein the state repair operation comprises: repairing the performance states of the disks and/or networks with the performance states not reaching the standard; the configuration modification operation includes: and changing the configuration file into a disk and/or a network with the specified performance state reaching the standard.
According to a fourth aspect of the present disclosure, there is provided a computer readable storage medium storing machine readable instructions that, when invoked and executed by a processor, cause the processor to implement the functions of a start-up process, a main process, an auxiliary process of any of the embodiments of the present disclosure. According to a fifth aspect of the present disclosure, there is provided a computing device comprising
A processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the functions of the start-up process, the main process, the auxiliary process of any of the embodiments of the present disclosure.
The technical scheme provided by the embodiment of the disclosure can comprise the following beneficial effects:
according to the method and the device for starting the pcsd service, the pcsd service is started by using the auxiliary process and the main process of the pcsd service, and the overall starting speed can be improved. The auxiliary process is used for eliminating possible abnormality in the starting process of the pcsd service, reducing the occurrence probability of the conditions of starting overtime and misreporting termination of the pcsd service caused by the abnormality, improving the probability that the pcsd service can be normally started and improving the reliability of the pcsd service.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a flowchart of a method for starting a pcsd service according to an exemplary embodiment of the present disclosure;
FIG. 2 is a flowchart of another method for starting a pcsd service according to an exemplary embodiment of the present disclosure;
FIG. 3 is a flowchart of another method for starting a pcsd service according to an exemplary embodiment of the present disclosure;
FIG. 4 is a schematic diagram of a pcsd service initiation device according to an exemplary embodiment of the present disclosure;
fig. 5 is a schematic diagram of a computing device according to an exemplary embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
The terminology used in the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used in this disclosure and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used in this disclosure to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present disclosure. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "responsive to a determination", depending on the context.
The NAS server may provide shared file transfer services for computers in a network. In order to achieve high availability of file transfer services, multiple NAS servers are deployed in the network, including a primary NAS server and a backup NAS server. When the main NAS server fails, the backup NAS server is used for bearing the file transmission service of the main NAS server, so that the high availability of the file transmission service is realized.
When a user wants to trigger a primary-to-backup handover (i.e., one backup NAS server is re-served as the primary NAS server), the pcsd service on the NAS server needs to be started to send a pcs command to the network to implement the primary-to-backup handover 。 In the starting process of the pcsd service on the NAS server, if the disk and network performance states of the NAS server are poor, the overall time consumption of starting the pcsd service is too long, and further the starting failure is easy to cause.
In view of this, the disclosure provides a method for starting a pcsd service, in which an exception possibly existing in the starting process of the pcsd service can be removed by an auxiliary process, so that the probability of occurrence of the conditions of starting overtime and reporting error termination of the pcsd service caused by the exception is reduced, the probability that the pcsd service can be started normally is improved, and the reliability of the pcsd service is improved.
The pcsd service start method of the embodiment of the present disclosure is described in detail below with reference to the accompanying drawings.
FIG. 1 is a flowchart of a method for starting up a pcsd service according to an exemplary embodiment of the present disclosure. As shown in fig. 1, the exemplary embodiment method may include the steps of:
in step 100, a start process of the pcsd service creates an auxiliary process and a main process of the pcsd service in response to an instruction to start the pcsd service; acquiring file storage addresses of an SSL module and a configuration file required for starting the pcsd service; and importing the SSL module into the main process, and sending the file storage address to the main process and the auxiliary process.
The starting process of the pcsd service is used for starting the pcsd service, and in practical application, the starting process of the pcsd service can be systemd. The main process of the pcsd service is a process for executing the steps required for starting the pcsd service. The auxiliary process is a process for eliminating possible abnormality in the starting process of the pcsd service.
In practical application, when the user wants to trigger the active-standby switch and send a pcs command to the network, the start process of the pcsd service is considered to receive the command for starting the pcsd service. At this time, the starting process of the pcsd service may further create the auxiliary process and the main process of the pcsd service.
The SSL module contains code for logic to start the pcsd service. The configuration file is used for specifying the disk and network used for starting the pcsd service, for example, the configuration file may include the following information: network 1, disk a.
In practical application, the system md may obtain the module storage address of the SSL module and the file storage address of the configuration file from a pre-configured configuration file of the system md. Then, based on the module memory address, the SSL module is imported into the created host process, so that the host process performs the steps required to start the pcsd service based on the code in the SSL module. And finally, transmitting the file storage address of the configuration file to the main process and the auxiliary process so that the main process and the auxiliary process can read the configuration file based on the file storage address.
In an alternative example, the configuration files for different systems may be stored on multiple disks. When the default reading of the configuration file of the system md fails, the reading path of the configuration file of the system md can be modified, so that the system md reads the configuration file of the system md stored on other magnetic discs. Thereby reducing the probability of a boot failure of the pcsd service due to a failure of a profile read by systemd.
In an alternative example, module memory addresses of a plurality of the SSL modules may be stored in a configuration file of the system md. When the SSL module is not found based on the default module storage address of the SSL module, the module storage address of the SSL module can be modified, so that the system obtains the SSL module from the modified module storage address of the SSL module, and the probability of pcsd service startup failure caused by SSL module import failure is reduced.
In step 102, the main process imports a toolkit module required for starting the pcsd service to itself based on the SSL module; and based on the SSL module and the tool kit module, acquiring the configuration file from the file storage address, and executing SSL authentication by adopting a disk specified by the configuration file and a network to finish starting the pcsd service.
The kit module required for starting the pcsd service can specifically include: the system comprises a file read-write tool package module, a network connection tool package module, a file processing tool package module and an exception processing tool package module. The SSL authentication is network data transmission security authentication. After SSL authentication, both parties to the data transfer may trust each other. That is, SSL authentication can secure data transmission to some extent.
After receiving the SSL module imported by the starting process of the pcsd service, the main process executes codes contained in the SSL module, and the method specifically comprises the following steps:
and importing the toolkit module required for starting the pcsd service into the toolkit module, and then acquiring the configuration file from the file storage address based on the imported file read-write toolkit module in the toolkit module. For example, the configuration file described above may be obtained: network 1, disk a. At this time, the SSL authentication may be performed by using the network 1 and the disk a specified by the configuration file, and the aforementioned network connection toolkit module and the file processing toolkit module, so as to complete the start of the pcsd service.
In step 104, the auxiliary process obtains the configuration file from the file storage address; and if the performance state of the disk and/or the network specified by the configuration file is detected to be not up to the standard, executing a state repair operation and/or a configuration modification operation.
The performance states of the disk include at least: disk occupancy, disk response time, etc. The performance state of the network includes at least: network connection conditions, whether 2224 ports are intercepted by a firewall, etc.
In practical application, relevant staff can preset standard standards of the state. For example, the standard for meeting the standard of the occupancy rate of the magnetic disk can be set as follows: the disk occupancy is less than thirty percent. The standard of the response time of the magnetic disk is as follows: the response time of the disk is less than 0.05ms. The standard of the network connection condition is as follows: the network connection is normal. Standard standards for whether 2224 ports are intercepted by a firewall are: 2224 ports are not intercepted by the firewall.
The state repair operation includes: repairing performance states of disks and/or networks whose performance states are not up to standard. For example, the state repair operation corresponding to the disk state and the network state described above may be as follows: clearing unnecessary files, closing background unnecessary processes, reconnecting the network, and moving the 2224 port out of the interception range of the firewall. The configuration modification operation includes: and changing the configuration file into a disk and/or a network with the specified performance state reaching the standard. For example, the disk and network specified by the configuration file before modification are: network 1, disk a, the disk and network specified by the modified configuration file are: network 2, disk B.
In practical application, the starting process of the pcsd service may import a preset script into the auxiliary process, so that the auxiliary process executes the imported script to implement the following steps:
and the auxiliary process acquires the configuration file from the file storage address, and detects whether the performance states of the disk and the network specified by the configuration file reach the standard or not based on a preset standard reaching standard. And when the performance state of the disk or the network specified by the configuration file is determined to be not up to the standard, the following scheme is adopted for solving.
Scheme one: a state repair operation is performed.
Specifically, a state repair operation corresponding to a performance state that does not meet the standard is adopted for repair. For example, when it is determined that the disk occupancy is not up to standard, instructions may be used to purge unnecessary files. When it is determined that the network is not normally connected, the network may be reconnected using the instruction.
Scheme II: and executing configuration modification operation.
I.e. directly modifying the disk and/or network specified by the configuration file. For example, the network and disk specified by the configuration file before modification are respectively: network 1, disk a. The auxiliary process detects whether the performance states of the disk and the network specified by the configuration file reach the standard or not based on a preset standard, and finds that the network 1 is not normally connected, the disk occupancy rate of the disk A is seventy percent, and the performance states of the disk and the network specified by the configuration file reach the standard. At this time, the disk and network specified by the configuration file may be directly modified as follows: network 2, disk B.
Alternatively, only the network specified by the configuration file may be modified when it is determined that the network performance state in the configuration file does not reach the standard, and the disk performance state reaches the standard. When the disk performance state in the configuration file is determined to be not up to standard, and the network performance state is up to standard, only the disk specified by the configuration file is modified, and the configuration file can be specifically set by related staff based on actual conditions, which is not limited by the disclosure.
Illustratively, when performing the configuration modification operation, the following may be performed according to the following specific scheme:
the configuration file is preset in the configuration file, so that the configuration file comprises a first information group and a second information group. The first information set comprises a first disk identifier and a first network identifier, and the second information set comprises a second disk identifier and a second network identifier. The first information set is validated by default and the second information set is not validated by default. That is, when the configuration file is read, the first disk identifier and the first network identifier in the first information group are read by default.
When the auxiliary process determines that the first disk identifier or the first network identifier in the first information group does not reach the standard, the configuration file may be modified so that the first information group is not validated, and the second information group is validated. That is, such that when the configuration file is read, the second disk identification and the second network identification in the second information group are read by default.
For example, the configuration file may include a first information group: network 1, disk a, and second information group network 2, disk B. When the auxiliary process reads the configuration file based on the storage address of the configuration file, the first information group is read: network 1, disk a. When the auxiliary process determines that the performance state of the network 1 or the disk a does not reach the standard, the configuration file may be modified, so that when the auxiliary process reads the configuration file based on the storage address of the configuration file, the second information set is read: network 2, disk B.
Or, the auxiliary process may notify the main process when determining that the network 1 or the disk a in the first information set does not reach the standard, and when reading the configuration file, read the first information set instead of read the second information set.
Scheme III: a state repair operation and a configuration modification operation are performed.
Specifically, when the performance state of the disk or the network indicated by the configuration file is determined to be not up to standard, the state repair operation may be executed on the disk and/or the network whose performance state is not up to standard, and if the repair fails, the state repair operation is continuously executed until the number of times of executing the state repair operation reaches a preset number of times. And if the repair failure still occurs after the number of times of executing the state repair operation reaches the preset number of times, executing the configuration modification operation.
For example, the preset number of times may be 8 times or 10 times, which is not limited in the present disclosure. For convenience of description, description of the subsequent embodiments is made with the preset number of times being 10.
Taking the case that the disk occupancy rate does not reach the standard, when the disk occupancy rate of the disk indicated by the configuration file is determined to reach the standard, the instruction can be used for clearing unnecessary files first, when the disk occupancy rate corresponding to the disk still does not reach the standard after the first clearing is finished, the instruction is continued to be used for clearing the unnecessary files until the number of times of clearing the unnecessary files by the use instruction reaches 10, and when the disk occupancy rate of the disk still is determined to reach the standard, the configuration modification operation is executed. Thereby further increasing the probability that the pcsd service can be successfully started.
It should be noted that the above embodiments are described based on the processing performed by different processes, respectively, and the above described order is not the actual execution order of the processes. In practical application, the starting process of the pcsd service leads the SSL module into the main process, and the main process leads the tool kit module required for starting the pcsd service into the main process based on the SSL module, and the auxiliary process obtains the configuration file from the file storage address; and when the performance state of the disk and/or the network specified by the configuration file is detected to be unqualified, the steps of executing the state repair operation and/or the configuration modification operation are synchronously performed, under the theoretical condition, the speed of the auxiliary process for executing the steps is faster than that of the starting process of the pcsd service for leading the SSL module into the main process, and the main process is used for leading the speed of the tool kit module required for starting the pcsd service into the main process based on the SSL module, so that the main process can perform the subsequent process of starting the pcsd service based on the disk and the network indicated by the configuration file after the state repair operation and/or the configuration modification operation are executed based on the auxiliary process, and the probability of failure in starting the pcsd service caused by unqualified performance state of the disk or the network indicated by the configuration file is reduced.
According to the method for starting the pcsd service, which is provided by the embodiment of the disclosure, the pcsd service is started by using the auxiliary process and the main process of the pcsd service, so that the overall starting speed can be improved. The auxiliary process is used for eliminating possible abnormality in the starting process of the pcsd service, reducing the occurrence probability of the conditions of starting overtime and misreporting termination of the pcsd service caused by the abnormality, improving the probability that the pcsd service can be normally started and improving the reliability of the pcsd service.
In an embodiment, as shown in fig. 2, on the basis of the method shown in fig. 1, the method may further include:
in step 200, the auxiliary process creates a log storage area for storing a pcsd service start log generated by the main process on a disk with a performance state reaching a standard specified by the configuration file.
During the start-up of the pcsd service, the log generated during the start-up of the pcsd service needs to be recorded by means of some log storage area. For example, some temporary files need to be created to record the network status and SSL authentication results during the start-up of the pcsd service, etc. Alternatively, some log files need to be created to record the port snoop condition after the start of the pcsd service, etc.
Thus, the auxiliary process may create the log storage area on the disk specified by the current configuration file upon determining that the disk and network state specified by the current configuration file are up to standard. Or after determining that the state of the disk or the network specified by the current configuration file does not reach the standard but executing the corresponding state repair operation, the auxiliary process creates the log storage area on the disk specified by the current configuration file after making the specified state of the disk and the network reach the standard. Or, after determining that the state of the disk or the network specified by the current configuration file does not reach the standard and executing the corresponding state repair operation, the auxiliary process is still in the state of not reaching the standard, so that the configuration modification operation is executed, and the log storage area is created on the disk specified by the modified configuration file.
In step 202, the secondary process sends a first notification message to the primary process indicating that the log storage creation is complete, so that the primary process starts performing SSL authentication.
After the log storage area is created, the auxiliary process may send the first notification message to the main process, so that the main process continues to perform SSL authentication.
After the SSL authentication is performed, the main process may begin to monitor the interface for receiving the ps command, so as to begin to receive the ps command sent by the other NAS device. In practical application, the interface for receiving the ps instruction is a 2224 interface.
In an alternative example, after starting listening to the 2224 interface, a corresponding anomaly capture function may be started to capture anomaly parameters received via the interface. For example, the 2224 interface receives a pcs command, but the command is empty, at this time, an empty parameter exception can be thrown, the empty parameter exception can be captured through the exception capturing function, and the empty parameter exception is recorded in a related log so as to be used for relevant code personnel to check the problem, thereby solving the problem.
According to the method for starting the pcsd service, which is provided by the embodiment of the disclosure, the auxiliary process is used for replacing the log storage area required by the main process for creating the main process, namely, when the main process reads the configuration file, the auxiliary process synchronously executes the step of creating the log storage area, so that the overall starting speed can be improved.
In an embodiment, as shown in fig. 3, on the basis of the method shown in fig. 1, the method may further include:
in step 300, if the host process determines that the start-up of the pcsd service fails, the host process sends a second notification message to the start-up process indicating that the start-up of the pcsd service fails.
As described in the foregoing embodiment, although in theory, the auxiliary process obtains the configuration file from the file storage address, and when it is detected that the performance state of the disk and/or the network specified by the configuration file does not reach the standard, the speed of performing the state repair operation and/or the configuration modification operation is faster than the speed of importing the SSL module into the main process by the start-up process of the pcsd service, and the main process imports the toolkit module required for starting the pcsd service into itself based on the SSL module. However, in some cases, the execution speed of the auxiliary process may be slow, and at this time, the main process may read out the unqualified disk and network because the repair or modification is not performed, and use the unqualified disk and network to perform subsequent SSL authentication, so that the situation that the permission of the pcsd service takes too long due to poor performance states of the disk and network, and further causes a startup failure occurs.
When the master process determines that the start-up of the pcsd service fails, a second notification message for indicating that the start-up of the pcsd service fails may be sent to the start-up process.
In step 302, the boot process instructs the host process to retrieve the configuration file from the storage address again in response to the second notification message to restart the pcsd service.
In theory, when the host process starts the pcsd service based on the read network and disk, and it is determined that the pcsd service fails to start, the auxiliary process should have successfully performed the steps of acquiring the configuration file from the file storage address, and performing a state repair operation and/or a configuration modification operation when it is detected that the performance state of the disk and/or the network specified by the configuration file does not reach the standard, so that the start process, after receiving the second notification message sent by the host process, may instruct the host process to acquire the configuration file from the storage address again, thereby starting the pcsd service again. At this time, the disk and the network specified by the configuration file are the modified up-to-standard disk and network.
In the method for starting the pcsd service provided in the embodiment of the present disclosure, when the host process determines that the starting of the pcsd service fails, a second notification message indicating that the starting of the pcsd service fails is sent to the starting process, and after receiving the second notification message, the starting process may instruct the host process to acquire the configuration file from the storage address again, so as to restart the pcsd service, thereby avoiding a long-time stop of the pcsd service.
For the foregoing method embodiments, for simplicity of explanation, the methodologies are shown as a series of acts, but one of ordinary skill in the art will appreciate that the present disclosure is not limited by the order of acts described, as some steps may occur in other orders or concurrently in accordance with the disclosure.
Further, those skilled in the art will also appreciate that the embodiments described in the specification are all alternative embodiments, and that the acts and modules referred to are not necessarily required by the present disclosure.
Corresponding to the embodiment of the application function implementation method, the disclosure also provides an embodiment of the application function implementation device and a corresponding terminal.
Fig. 4 is a schematic structural diagram of a pcsd service initiation apparatus according to an exemplary embodiment of the present disclosure, and as shown in fig. 4, the pcsd service initiation apparatus may include:
a start module 41 of the pcsd service, configured to create an auxiliary module 42 and a main module 43 of the pcsd service in response to an instruction to start the pcsd service; acquiring file storage addresses of an SSL module and a configuration file required for starting the pcsd service, wherein the configuration file is used for designating a disk and a network adopted for starting the pcsd service; the SSL module is led into the main module 43, and the storage address is sent to the main module 43 and the auxiliary module 42.
The main module 43 is configured to import, to itself, a toolkit module required for starting the pcsd service based on the SSL module; and based on the SSL module and the tool kit module, acquiring the configuration file from the file storage address, and executing SSL authentication by adopting a disk specified by the configuration file and a network to finish starting the pcsd service.
The auxiliary module 42 is configured to obtain the configuration file from the file storage address; and if the performance state of the disk and/or the network specified by the configuration file is detected to be not up to the standard, executing a state repair operation and/or a configuration modification operation.
Wherein the state repair operation comprises: repairing the performance states of the disks and/or networks with the performance states not reaching the standard; the configuration modification operation includes: and changing the configuration file into a disk and/or a network with the specified performance state reaching the standard.
Optionally, the configuration file includes a first information group and a second information group, the first information group includes a first disk identifier and a first network identifier, the second information group includes a second disk identifier and a second network identifier, the first information group is validated by default, and the second information group is not validated by default.
The auxiliary module 42, when changing the configuration file to a disk and/or network with specified performance status meeting the standard, includes:
and validating the second information set.
Optionally, the auxiliary module 42, when performing a state repair operation and/or a configuration modification operation, includes:
and executing state repair operation on the disk and/or the network with the performance state not reaching the standard, and if the repair fails, continuing to execute the state repair operation until the times of executing the state repair operation reach the preset times.
And if the repair failure still occurs after the number of times of executing the state repair operation reaches the preset number of times, executing the configuration modification operation.
Optionally, the auxiliary module 42 is further configured to create a log storage area for storing a pcsd service start log generated by the main process on a disk with a performance state specified by the configuration file reaching a standard.
The auxiliary module 42 is further configured to send a first notification message to the main module 43, where the first notification message indicates that the log storage area is created, so that the main module 43 starts performing SSL authentication.
Optionally, the main module 43 is further configured to send a second notification message to the start module 41, where the second notification message indicates that the start of the pcsd service fails, if it is determined that the start of the pcsd service fails.
The starting module 41 is further configured to instruct, in response to the second notification message, the main module 43 to retrieve the configuration file from the storage address again, so as to restart the pcsd service.
For the device embodiments, reference is made to the description of the method embodiments for the relevant points, since they essentially correspond to the method embodiments. The apparatus embodiments described above are merely illustrative, wherein the elements described above as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the objectives of the disclosed solution. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
Accordingly, the embodiment of the disclosure provides a NAS server, on which a starting process of a pcsd service is run.
The starting process responds to an instruction for starting the pcsd service, and an auxiliary process and a main process of the pcsd service are created; acquiring file storage addresses of an SSL module and a configuration file required for starting the pcsd service, wherein the configuration file is used for designating a disk and a network adopted for starting the pcsd service; and importing the SSL module into the main process, and sending the storage address to the main process and the auxiliary process.
The main process imports a toolkit module required for starting the pcsd service to the main process based on the SSL module; and based on the SSL module and the tool kit module, acquiring the configuration file from the file storage address, and executing SSL authentication by adopting a disk specified by the configuration file and a network to finish starting the pcsd service.
The auxiliary process acquires the configuration file from the file storage address; and if the performance state of the disk and/or the network specified by the configuration file is detected to be not up to the standard, executing a state repair operation and/or a configuration modification operation.
Wherein the state repair operation comprises: repairing the performance states of the disks and/or networks with the performance states not reaching the standard; the configuration modification operation includes: and changing the configuration file into a disk and/or a network with the specified performance state reaching the standard.
Accordingly, embodiments of the present disclosure provide a computing device, as shown in fig. 5, comprising: a processor 51; a memory 52 for storing processor-executable instructions; wherein the above-mentioned processor 51 is configured to perform the functions of a start-up process, a main process, an auxiliary process in any of the embodiments of the present disclosure.
Accordingly, embodiments of the present disclosure provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the functions of the start-up process, the main process, and the auxiliary process in any of the embodiments of the present disclosure.
The computer readable storage medium may be ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any adaptations, uses, or adaptations of the disclosure following the general principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims (10)
1. A method for starting a pcsd service, the method comprising:
the method comprises the steps that a starting process of a pcsd service responds to an instruction for starting the pcsd service, and an auxiliary process and a main process of the pcsd service are created; acquiring file storage addresses of an SSL module and a configuration file required for starting the pcsd service, wherein the configuration file is used for designating a disk and a network adopted for starting the pcsd service; importing the SSL module into the main process, and sending the file storage address to the main process and the auxiliary process;
The main process imports a toolkit module required for starting the pcsd service to the main process based on the SSL module; based on the SSL module and the tool pack module, acquiring the configuration file from the file storage address, and executing SSL authentication by adopting a disk and a network specified by the configuration file to finish starting of the pcsd service;
the auxiliary process acquires the configuration file from the file storage address; if the performance state of the disk and/or the network specified by the configuration file is detected to be not up to standard, executing a state repair operation and/or a configuration modification operation;
wherein the state repair operation comprises: repairing the performance states of the disks and/or networks with the performance states not reaching the standard; the configuration modification operation includes: and changing the configuration file into a disk and/or a network with the specified performance state reaching the standard.
2. The method of claim 1, wherein the configuration file comprises a first information set and a second information set, the first information set comprising a first disk identifier and a first network identifier, the second information set comprising a second disk identifier and a second network identifier, the first information set being validated by default and the second information set being not validated by default;
The changing the configuration file to a disk and/or a network with specified performance state reaching the standard comprises the following steps:
and validating the second information set.
3. The method according to claim 1, wherein the performing a state repair operation and/or a configuration modification operation comprises:
executing state repair operation on the disk and/or network with the performance state not reaching the standard, if the repair fails, continuing to execute the state repair operation until the times of executing the state repair operation reach the preset times;
and if the repair failure still occurs after the number of times of executing the state repair operation reaches the preset number of times, executing the configuration modification operation.
4. The method according to claim 1, wherein the method further comprises:
the auxiliary process creates a log storage area for storing a pcsd service starting log generated by the main process on a disk with the performance state reaching the standard specified by the configuration file;
the auxiliary process sends a first notification message indicating that creation of the log storage area is completed to the main process, so that the main process starts to perform SSL authentication.
5. The method according to claim 1, wherein the method further comprises:
If the main process determines that the start-up of the pcsd service fails, a second notification message indicating the start-up failure of the pcsd service is sent to the start-up process;
and the starting process responds to the second notification message and instructs the main process to acquire the configuration file from the storage address again so as to start the pcsd service again.
6. A pcsd service initiation device, the device comprising:
the starting module of the pcsd service responds to the instruction for starting the pcsd service, and an auxiliary module and a main module of the pcsd service are created; acquiring file storage addresses of an SSL module and a configuration file required for starting the pcsd service, wherein the configuration file is used for designating a disk and a network adopted for starting the pcsd service; importing the SSL module into the main module, and sending the storage address to the main module and the auxiliary module;
the main module imports a toolkit module required for starting the pcsd service to the main module based on the SSL module; based on the SSL module and the tool pack module, acquiring the configuration file from the file storage address, and executing SSL authentication by adopting a disk and a network specified by the configuration file to finish starting of the pcsd service;
The auxiliary module acquires the configuration file from the file storage address; if the performance state of the disk and/or the network specified by the configuration file is detected to be not up to standard, executing a state repair operation and/or a configuration modification operation;
wherein the state repair operation comprises: repairing the performance states of the disks and/or networks with the performance states not reaching the standard; the configuration modification operation includes: and changing the configuration file into a disk and/or a network with the specified performance state reaching the standard.
7. The apparatus of claim 6, wherein the configuration file comprises a first set of information and a second set of information, the first set of information comprising a first disk identification and a first network identification, the second set of information comprising a second disk identification and a second network identification, the first set of information being validated by default and the second set of information being not validated by default;
the auxiliary module, when changing the configuration file into a disk and/or network with specified performance state reaching standard, comprises:
and validating the second information set.
8. A NAS server, characterized in that a boot process of a pcsd service is run on the NAS server;
The starting process responds to an instruction for starting the pcsd service, and an auxiliary process and a main process of the pcsd service are created; acquiring file storage addresses of an SSL module and a configuration file required for starting the pcsd service, wherein the configuration file is used for designating a disk and a network adopted for starting the pcsd service; importing the SSL module into the main process, and sending the storage address to the main process and the auxiliary process;
the main process imports a toolkit module required for starting the pcsd service to the main process based on the SSL module; based on the SSL module and the tool pack module, acquiring the configuration file from the file storage address, and executing SSL authentication by adopting a disk and a network specified by the configuration file to finish starting of the pcsd service;
the auxiliary process acquires the configuration file from the file storage address; if the performance state of the disk and/or the network specified by the configuration file is detected to be not up to standard, executing a state repair operation and/or a configuration modification operation;
wherein the state repair operation comprises: repairing the performance states of the disks and/or networks with the performance states not reaching the standard; the configuration modification operation includes: and changing the configuration file into a disk and/or a network with the specified performance state reaching the standard.
9. A computer readable storage medium having stored thereon a computer program, which when executed by a processor performs the functions of a start-up process, a main process, an auxiliary process in a method according to any of claims 1-5.
10. A computing device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the functions of a start-up process, a main process, an auxiliary process in the method of any of claims 1-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310509287.XA CN116610379A (en) | 2023-05-04 | 2023-05-04 | Method and device for starting pcsd service |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310509287.XA CN116610379A (en) | 2023-05-04 | 2023-05-04 | Method and device for starting pcsd service |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116610379A true CN116610379A (en) | 2023-08-18 |
Family
ID=87679211
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310509287.XA Pending CN116610379A (en) | 2023-05-04 | 2023-05-04 | Method and device for starting pcsd service |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116610379A (en) |
-
2023
- 2023-05-04 CN CN202310509287.XA patent/CN116610379A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110807064B (en) | Data recovery device in RAC distributed database cluster system | |
CN108429629A (en) | Equipment fault restoration methods and device | |
JP2018509841A (en) | Mobile terminal, maintenance server, and method and apparatus for maintaining virtual SIM card | |
US20130121136A1 (en) | Mobile terminal and failure recovery method thereof | |
CN109245953B (en) | Network configuration method and device | |
CN106534467A (en) | Screen abnormity processing method and processing device, and terminal | |
CN111897697B (en) | Server hardware fault repairing method and device | |
CN111104282A (en) | Node processing method and device based on block chain | |
CN111342986B (en) | Distributed node management method and device, distributed system and storage medium | |
CN103324554A (en) | Standby system device, a control method, and a program thereof | |
CN111026585A (en) | Storage server hot standby switching method in recording and broadcasting system | |
CN115686951A (en) | Fault processing method and device for database server | |
CN117118814A (en) | Cloud resource switching method, device, equipment and medium based on multi-cloud management platform | |
CN109104314B (en) | Method and device for modifying log configuration file | |
CN110968456B (en) | Method and device for processing fault disk in distributed storage system | |
CN116610379A (en) | Method and device for starting pcsd service | |
CN110764940A (en) | Processing method and device for service exception of distributed system | |
CN115373916A (en) | Abnormality detection method, abnormality detection device, electronic apparatus, and computer-readable storage medium | |
CN116225607A (en) | Database management method and device | |
CN105790975A (en) | Service processing operation execution method and device | |
JP2015057685A (en) | Monitoring system | |
CN109408123B (en) | Method and device for reloading configuration file | |
CN114745426A (en) | Method, device and equipment for monitoring abnormity of terminal, readable storage medium and system | |
CN114490231A (en) | Database arbitration service scheduling method and system | |
CN111400094A (en) | Method, device, equipment and medium for restoring factory settings of server 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 |