CN109445709B - Method and device for managing storage resources in virtualization system - Google Patents

Method and device for managing storage resources in virtualization system Download PDF

Info

Publication number
CN109445709B
CN109445709B CN201811305316.6A CN201811305316A CN109445709B CN 109445709 B CN109445709 B CN 109445709B CN 201811305316 A CN201811305316 A CN 201811305316A CN 109445709 B CN109445709 B CN 109445709B
Authority
CN
China
Prior art keywords
cfs
target
storage
host
cfs storage
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811305316.6A
Other languages
Chinese (zh)
Other versions
CN109445709A (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.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai 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 Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201811305316.6A priority Critical patent/CN109445709B/en
Publication of CN109445709A publication Critical patent/CN109445709A/en
Application granted granted Critical
Publication of CN109445709B publication Critical patent/CN109445709B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • G06F3/0607Improving or facilitating administration, e.g. storage management by facilitating the process of upgrading existing storage systems, e.g. for improving compatibility between host and storage device
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0662Virtualisation aspects
    • G06F3/0664Virtualisation aspects at device level, e.g. emulation of a storage device or system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method and a device for managing storage resources in a virtualization system. The method comprises the following steps: according to a preset time strategy, inquiring whether CFS storage which is not mounted due to host offline exists in one or at least two CFS storage domains of a cluster file system in a virtualization system or not to obtain an inquiry result; acquiring a target CFS storage domain in which the CFD storage is not mounted in the two continuous query results obtained according to the time strategy; and controlling the process of triggering the target CFS storage domain to automatically mount the CFD storage equipment which is not mounted.

Description

Method and device for managing storage resources in virtualization system
Technical Field
The present invention relates to the field of information processing, and in particular, to a method and an apparatus for managing storage resources in a virtualization system.
Background
A Cluster File System (CFS), also called File-level or File-based Storage, stores data in a hierarchical structure. Data is stored in files and folders, in the same format for storage and retrieval. For the Unix, Linux system, these data can be accessed using the network file system protocol, while for Windows, the server message block protocol is used for access.
In a virtualization environment, CFS storage is generally used as a shared storage pool, the shared storage pool may include a plurality of CFS storages, all hosts in a cluster may mount one or a plurality of CFS storages, a host is restarted or other abnormal conditions are down or off-line, the mounted shared CFS storage may be unloaded, and a user needs to manually mount one by one, which is acceptable in a small-scale environment.
In the related art, automatic mount is generally performed by monitoring storage offload on a host cyclically and then executing mount commands, however, CFS storage is currently unable to implement automatic mount.
Disclosure of Invention
In order to solve the technical problem, the invention provides a method and a device for managing storage resources in a virtualization system, which can implement automatic mount of CFS storage.
In order to achieve the object of the present invention, the present invention provides a method for managing storage resources in a virtualization system, comprising:
according to a preset time strategy, inquiring whether CFS storage which is not mounted due to host offline exists in one or at least two CFS storage domains of a cluster file system in a virtualization system or not to obtain an inquiry result;
acquiring a target CFS storage domain in which the CFD storage is not mounted in the two continuous query results obtained according to the time strategy;
and controlling the process of triggering the target CFS storage domain to automatically mount the CFD storage equipment which is not mounted.
In an exemplary embodiment, the process of controlling to trigger the target CFS storage domain to automatically mount an unpinned CFD storage device includes:
when at least two target CFS storage domains exist, controlling the at least two target CFS storage domains to execute a process of mounting the CFD storage equipment which is not mounted in the target CFS storage domains in parallel; and/or controlling the host of the target CFS storage domain to execute the flow of the uninstalled CFS storage according to a preset sequence.
In an exemplary embodiment, after the controlling triggers the process of the target CFS storage domain automatically mounting an unmounted CFD storage device, the method further comprises:
recording the times that the target CFS storage domain has continuously executed automatic mounting;
acquiring an execution result of executing automatic mounting by a host corresponding to the target CFS storage domain;
if the execution result is that the CFS storage is not successfully mounted, judging whether the number of times of continuously executing the automatic mounting of the target CFS storage domain reaches a preset number threshold value or not to obtain a judgment result;
and if the number threshold is reached, controlling the host corresponding to the target CFS storage domain to stop automatic mounting operation.
In an exemplary embodiment, before the controlling triggers the process of the target CFS storage domain automatically mounting an unmounted CFD storage device, the method further comprises:
detecting whether a new host is on line in the target CFS storage domain or not to obtain a detection result;
and if the detection result shows that no new host is on line in the target CFS storage domain, controlling the host corresponding to the target CFS storage domain to execute automatic mounting operation.
In an exemplary embodiment, the process of controlling to trigger the target CFS storage domain to automatically mount an unmounted CFD storage device includes:
recording the times that the target CFS storage domain has continuously executed automatic mounting;
determining the waiting time corresponding to the times of continuously executing the automatic mounting according to the preset waiting time;
and after the waiting time length is passed after the target CFS storage domain finishes mounting, starting a next new automatic mounting process of the target CFS domain.
In order to achieve the object of the present invention, the present invention provides a management apparatus for storage resources in a virtualization system, comprising:
the query module is used for querying whether CFS storage which is not mounted due to host offline exists in one or at least two CFS storage domains of the cluster file system in the virtualization system according to a preset time strategy to obtain a query result;
the first acquisition module is used for acquiring a target CFS storage domain of which the CFD storage is not mounted in the two continuous inquiry results obtained according to the time strategy;
and the first control module is used for controlling the process of triggering the target CFS storage domain to automatically mount the CFD storage equipment which is not mounted.
In an exemplary embodiment, the first control module is specifically configured to, when there are at least two target CFS storage domains, control the at least two target CFS storage domains to concurrently execute a process of mounting CFD storage devices that are not mounted in the target CFS storage domains; and/or controlling the host of the target CFS storage domain to execute the flow of the uninstalled CFS storage according to a preset sequence.
In an exemplary embodiment, the apparatus further comprises:
the recording module is used for recording the times of the target CFS storage domain continuously executing automatic mounting after controlling the process of triggering the target CFS storage domain to automatically mount the CFD storage equipment which is not mounted;
a second obtaining module, configured to obtain an execution result of executing automatic mount by a host corresponding to the target CFS storage domain;
the judging module is used for judging whether the number of times of continuously executing automatic mounting in the target CFS storage domain reaches a preset number threshold value or not if the execution result is that the CFS storage is not successfully mounted, so as to obtain a judgment result;
and the second control module is used for controlling the host corresponding to the target CFS storage domain to stop automatic mounting operation if the frequency threshold is reached.
In an exemplary embodiment, the apparatus further comprises:
the detection module is used for detecting whether a new host is on line in the target CFS storage domain to obtain a detection result;
and the first control module controls the host corresponding to the target CFS storage domain to execute automatic mounting operation when the detection result shows that no new host is on line in the target CFS storage domain.
In one exemplary embodiment, the first control module includes:
the recording unit is used for recording the times that the target CFS storage domain continuously executes automatic mounting;
the determining unit is used for determining the waiting time corresponding to the number of times of continuously executing the automatic mounting according to the preset waiting time;
and the starting unit is used for starting the next new automatic mounting process of the target CFS after the waiting time length passes after the mounting of the target CFS storage domain is finished.
According to the embodiment provided by the invention, whether CFS storage which is not mounted due to host offline exists in one or at least two cluster file system CFS storage domains in a virtualization system is inquired according to a preset time strategy to obtain an inquiry result, a target CFS storage domain which is not mounted in continuous two inquiry results obtained according to the time strategy is obtained, and the process of triggering the target CFS storage domain to automatically mount the CFD storage equipment which is not mounted is controlled, so that the reliability and accuracy of CFS storage automatic mounting are ensured, the maintenance cost can be reduced, and the core competitiveness of a product is improved.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
The accompanying drawings are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the example serve to explain the principles of the invention and not to limit the invention.
FIG. 1 is a flow chart of a method for managing storage resources in a virtualization system according to the present invention;
fig. 2 is a block diagram of a storage resource management device in the virtualization system according to the present invention.
Detailed Description
To make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be noted that the embodiments and features of the embodiments in the present application may be arbitrarily combined with each other without conflict.
The steps illustrated in the flow charts of the figures may be performed in a computer system such as a set of computer-executable instructions. Also, while a logical order is shown in the flow diagrams, in some cases, the steps shown or described may be performed in an order different than here.
Fig. 1 is a flowchart of a method for managing storage resources in a virtualization system according to the present invention. The method shown in fig. 1 comprises:
step 101, inquiring whether CFS storage which is not mounted due to host offline exists in one or at least two CFS storage domains of a cluster file system in a virtualization system according to a preset time strategy to obtain an inquiry result;
in step 101, the time strategy may be periodic or may be unequally spaced;
the virtualization system may include one or at least two CFS storage domains, and when performing the query operation, a part of the CFS storage domains may be queried, or all of the CFS storage domains may be queried;
102, acquiring a target CFS storage domain in which the CFD storage is not mounted in the two continuous query results obtained according to the time strategy;
in step 102, if there is no CFD storage mounted in the query results of two consecutive times, determining that the target CFS storage domain fails to execute CFS storage;
and 103, controlling a process of triggering the target CFS storage domain to automatically mount the CFD storage equipment which is not mounted.
In step 103, when there are at least two target CFS storage domains, controlling the at least two target CFS storage domains to execute a process of mounting CFD storage devices not mounted in the target CFS storage domains in parallel; and/or controlling the host of the target CFS storage domain to execute the flow of the uninstalled CFS storage according to a preset sequence.
After CFS storage off-line mounted on the host is caused due to the fact that the host is restarted or a large number of hosts are off-line under one situation in a large-batch virtualization environment, CFS storage of all the hosts is automatically mounted, the CFS storage domains are executed concurrently, the hosts in the CFS storage domains are executed serially, and CFS storage automatic mounting efficiency is improved.
According to the method embodiment provided by the invention, whether CFS storage which is not mounted due to host offline exists in one or at least two CFS storage domains of a cluster file system in a virtualization system is inquired according to a preset time strategy, an inquiry result is obtained, a target CFS storage domain which is not mounted and stored in CFD storage in two continuous inquiry results obtained according to the time strategy is obtained, and the process of triggering the target CFS storage domain to automatically mount the non-mounted CFD storage equipment is controlled, so that the reliability and the accuracy of CFS storage automatic mounting are ensured, the maintenance cost can be reduced, and the core competitiveness of a product is improved.
The method provided by the present invention is further described below:
prior to performing an auto mount of CFS storage, all hosts in the cluster that are already online must turn on O2CB service, but failure to obtain the mount status and O2CB service status of CFSs for other hosts on a single host may result in a failure to mount a host CFS storage or unavailability of shared storage. The method provided by the invention is characterized in that the CFS storage is automatically mounted at a management node end, the CFS storage is stood at the angle of a CFS storage domain, and all CFS mounting conditions of CFS unloaded due to offline in a corresponding cluster are globally managed.
In an exemplary embodiment, after the controlling triggers the target CFS storage domain to automatically mount an unmounted CFD storage device, the method further includes:
recording the times that the target CFS storage domain has continuously executed automatic mounting;
obtaining an execution result of executing automatic mounting by a host corresponding to the target CFS storage domain;
if the execution result is that the CFS storage is not successfully mounted, judging whether the number of times of continuously executing the automatic mounting of the target CFS storage domain reaches a preset number threshold value or not to obtain a judgment result;
and if the number threshold is reached, controlling the host corresponding to the target CFS storage domain to stop automatic mounting operation.
For example, each CFS storage domain is pre-configured to perform up to 15 auto mount operations. After configuring the CFS storage domain to execute the automatic mounting operation each time, acquiring an execution result of executing the automatic mounting by a host corresponding to the CFS storage domain; and if the execution result is that the CFS storage is not successfully mounted, judging whether the number of times of automatic mounting which is continuously executed reaches a number threshold value, and if so, stopping the automatic mounting operation of the CFS storage domain.
In the exemplary embodiment, by controlling the number of times that the CFS storage domain continuously attempts the automatic mount operation, the CFS storage domain avoids the occurrence of resource waste and system crash caused by unlimited attempts of automatic mount by the CFS storage domain.
In an exemplary embodiment, the process of controlling to trigger the target CFS storage domain to automatically mount an unmounted CFD storage device includes:
recording the times that the target CFS storage domain has continuously executed automatic mounting;
determining the waiting time corresponding to the times of continuously executing the automatic mounting according to the preset waiting time;
and starting a next new automatic mounting process of the target CFS domain after the waiting time length passes after the mounting of the target CFS storage domain is finished.
Specifically, the waiting duration corresponding to the number of times that automatic mounting has been continuously performed may be configured; for example, automatic mounting is performed every 15S within 1-5 times; 6-10 times, and automatic mounting is carried out every 1.5 minutes for 10-15 times; automatic mounting was performed every 3 minutes. When the automatic mounting operation is executed, the waiting time required for executing the next automatic mounting operation can be determined according to the currently executed automatic mounting times; and after the waiting time is reached, the automatic mounting operation is started.
In the exemplary embodiment, a method of gradually increasing the interval time is adopted, so that too many cycles, failure times or failure times are avoided.
In an exemplary embodiment, before the controlling triggers the target CFS storage domain to automatically mount an unmounted CFD storage device, the method further includes:
detecting whether a new host is on line in the target CFS storage domain or not to obtain a detection result;
and if the detection result shows that no new host is on line in the target CFS storage domain, controlling the host corresponding to the target CFS storage domain to execute automatic mounting operation.
In the present exemplary embodiment, for a CFS storage domain in a system, it is monitored whether there is a CFS storage unmount condition caused by a host offline: respectively acquiring CFS storage non-mounting conditions caused by host off-line twice for each CFS storage domain, and judging whether host off-line lists acquired twice are the same at an interval of 5 seconds, if so, indicating that no new host is on-line, determining that the host in the target CFS storage domain fails to perform automatic mounting, and if not, indicating that the new host is on-line and the new host is on-line, mounting the CFS storage belonging to the new on-line, so that mounting operation is not performed in the current time period, and collision with CFS storage operation of on-line mounting of the host is avoided; and performs an automatic mount operation in the next time period.
The following examples of applications provided by the present invention are further illustrated:
embodiment one of the invention
The embodiment provides a method for mounting a CFS storage, which includes:
1) the periodic detection is to perform a snoop operation for snooping whether there is a CFS storage unmount situation caused by the host going offline, wherein the periodic time may be set every 15S.
2) Monitoring whether a CFS storage uninstalling condition caused by host offline exists for all CFS storage domains in the system: and respectively acquiring the condition that the CFS storage is not mounted due to the offline of the host twice for each CFS storage domain, wherein the interval between the two times is 5 seconds, judging whether the host offline lists acquired twice are the same or not, if not, not processing the CFS storage in the current period, and waiting for the next period to process the current CFS storage again.
3) Performing automatic mounting operation for 15 times at most aiming at each CFS storage domain, wherein the execution time of the automatic mounting operation can adopt the following management strategies, including performing automatic mounting for 1-5 times every 15S, performing automatic mounting for 6-10 times every 1.5 minutes, and performing automatic mounting for 10-15 times every 3 minutes;
if there is still CFS storage for all hosts that go offline and online for that storage domain within 15 times, then no attempt is made to auto mount.
4) In each CFS storage domain, check to see if the O2CB service of all hosts under which the CFS needs to be automatically mounted has already been turned on, and if not, execute a start command to turn on O2 CB.
5) For the CFS domain in 4, check whether O2CB services of all the hosts needing to mount CFS storage are already turned on, and if all the hosts are already turned on, mount all their CFS storage needing to mount for each host, wherein some hosts may correspond to multiple CFS storages.
The method provided by the embodiment of the invention realizes the purpose of automatically mounting the CFD storage equipment which is not mounted in the CFS storage domain, ensures the reliability and the accuracy of the CFS storage automatic mounting, and can reduce the maintenance cost and improve the core competitiveness of the product.
Embodiment two of the invention
The second embodiment of the invention provides a CFS storage automatic mounting method, which is used for periodically inquiring whether all hosts in all CFS storage domains in a virtualization system have CFS storage non-mounting conditions caused by offline, if the CFS storage non-mounting conditions exist, CFS storage automatic mounting of the hosts is executed by taking the CFS storage domains as units, the CFS storage domains are executed concurrently, and automatic mounting commands are issued serially among the hosts in the CFS storage domains. The specific implementation process is as follows:
1) every cycle obtains all CFS storage domain lists in the system.
2) And iterating the CFS storage domain list, and acquiring all host lists corresponding to the current CFS storage domain according to the current CFS storage domain.
3) Comparing the host lists in the same CFS storage domain, judging whether each host has the condition of no mount caused by the offline of the host, and if so, recording the list < the host and the storage list of the CFS.
4) Executing comparison operation every 5s, comparing the cache lists generated twice, judging whether a new host appears, and if so, exiting the cycle; and waiting for the next period of processing, and otherwise, executing the step 5).
5) Judging whether the cache < CFS storage domain ID, the executed automatic mounting times > and the current CFS storage domain are contained, and if so, adding 1 to the executed automatic mounting times; if not, a new record is added, and the setting frequency is 0.
6) Judging whether the number of times of automatic mounting executed in the current CFS storage domain exceeds 15 times, and if so, not executing automatic mounting; if not, then auto mount is performed on the data in the list < host, unmounted CFS storage list >.
7) When the automatic mounting operation is executed, firstly, judging the execution times of the current CFS storage domain, and if the execution times are 6-10 times, pausing the current thread for 90 s; if it is 11-15 times, the current thread is suspended for 180 s.
8) Iteration list < host, not mount CFS storage list >, determine whether each host has started O2CB service, if not, execute start O2CB command.
9) List < host, not mounted CFS store list > is iterated multiple times, polling to see if each host has been turned on, polling for a maximum of 20 s.
10) If 9) the judgment result is true, then iterating the list < host, not-mounted CFS storage list > again, iterating the not-mounted CFS storage list aiming at each host, and executing the mounting command aiming at each not-mounted CFS storage list.
The method provided by the second embodiment of the invention periodically checks the CFS for the condition of non-mount caused by the offline of the host to eliminate the uninstalling operation manually executed by a user, records the checking result into a list < the host, the non-mount CFS storage list > corresponding to the CFS storage domain, automatically mounts the CFS storage of all the hosts, and enables multithreading to concurrently execute automatic mount, thereby solving the problem that the CFS storage mounted on the host is offline due to the simultaneous restart of the hosts or the offline of a large number of hosts in one situation under a virtualization environment, improving the efficiency of CFS storage automatic mount, ensuring the reliability and accuracy of CFS storage automatic mount, simultaneously reducing the maintenance cost and improving the core competitiveness of the product.
Fig. 2 is a block diagram of a storage resource management device in the virtualization system according to the present invention. The apparatus shown in fig. 2 comprises:
the query module 201 is configured to query, according to a preset time policy, whether CFS storage that is not mounted due to host offline exists in one or at least two CFS storage domains of a cluster file system in a virtualization system, to obtain a query result;
a first obtaining module 202, configured to obtain a target CFS storage domain in which an unmounted CFD storage exists in two consecutive query results obtained according to the time policy;
the first control module 203 is configured to control a process of triggering the target CFS storage domain to automatically mount an unmounted CFD storage device.
In an exemplary embodiment, the first control module 203 is specifically configured to, when there are at least two target CFS storage domains, control the at least two target CFS storage domains to concurrently execute a process of mounting CFD storage devices that are not mounted in the target CFS storage domains; and/or controlling the host of the target CFS storage domain to execute the flow of the uninstalled CFS storage according to a preset sequence.
In an exemplary embodiment, the apparatus further comprises:
the recording module is used for recording the times of the target CFS storage domain continuously executing automatic mounting after controlling the process of triggering the target CFS storage domain to automatically mount the CFD storage equipment which is not mounted;
the second obtaining module is used for obtaining an execution result of executing automatic mounting of the host corresponding to the target CFS storage domain;
the judging module is used for judging whether the number of times of continuously executing automatic mounting in the target CFS storage domain reaches a preset number threshold value or not if the execution result is that the CFS storage is not successfully mounted, so as to obtain a judgment result;
and the second control module is used for controlling the host corresponding to the target CFS storage domain to stop automatic mounting operation if the frequency threshold is reached.
In the exemplary embodiment, each CFS storage is executed up to 15 times, and for the storage case where the CFS is still stored without the host mounted, the automatic mounting is not executed any more, so that the mounting operation is frequently executed, which causes a risk to the system operation.
In one exemplary embodiment, the apparatus further comprises:
the detection module is used for detecting whether a new host is on line in the target CFS storage domain to obtain a detection result;
and if the detection result shows that no new host is online in the target CFS storage domain, the first control module 203 controls the host corresponding to the target CFS storage domain to execute an automatic mount operation.
In the exemplary embodiment, the interval of 5s is required, two detections are performed before and after, and the results of the two detections are compared to determine whether the results are the same or different, which indicates that the batch reboot host has not been completed, the operations in the storage domain in the current cycle are abandoned, and the operations are executed again in one cycle.
In an exemplary embodiment, the first control module 203 includes:
the recording unit is used for recording the times that the target CFS storage domain continuously executes automatic mounting;
the determining unit is used for determining the waiting time corresponding to the number of times of continuously executing the automatic mounting according to the preset waiting time;
and the starting unit is used for starting the next new automatic mounting process of the target CFS after the waiting time length passes after the mounting of the target CFS storage domain is finished.
In the exemplary embodiment, in order to avoid too frequent cycles, too many failures or too many times of execution failure, the interval time is gradually increased, i.e., the interval time is not suspended for 1-5 cycles, is suspended for 90s for 6-10 cycles, and is suspended for 180s for 11-15 cycles.
Before performing the auto mount, it is necessary to ensure that O2CB services are open for all online hosts in the CFS storage domain, iterate through the list of hosts, and perform a Start O2CB service command for hosts that do not have O2CB services open. The mount CFS storage command may be executed until O2CB service is turned on for all online hosts in the CFS storage domain.
According to the device embodiment provided by the invention, whether CFS storage which is not mounted due to host offline exists in one or at least two cluster file system CFS storage domains in a virtualization system is inquired according to a preset time strategy to obtain an inquiry result, a target CFS storage domain which is not mounted in each continuous two inquiry results obtained according to the time strategy is obtained, and the process of triggering the target CFS storage domain to automatically mount the CFD storage equipment which is not mounted is controlled, so that the reliability and accuracy of CFS storage automatic mounting are ensured, the maintenance cost can be reduced, and the core competitiveness of a product is improved.
It will be understood by those of ordinary skill in the art that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed by several physical components in cooperation. Some or all of the components may be implemented as software executed by a processor, such as a digital signal processor or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as is well known to those of ordinary skill in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, Digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by a computer. In addition, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to those skilled in the art.

Claims (10)

1. A management method of storage resources in a virtualization system is applied to a management node and comprises the following steps:
after the host is restarted or online, inquiring whether CFS storage which is not mounted due to the offline of the host exists in one or at least two CFS storage domains of the cluster file system in the virtualization system according to a preset time strategy to obtain an inquiry result;
acquiring a target CFS storage domain in which the CFD storage is not mounted in the two continuous query results obtained according to the time strategy;
controlling and triggering the target CFS storage domain to automatically mount the CFD storage equipment which is not mounted;
the mount operation of the same target CFS storage domain is obtained by the following methods, including:
acquiring a host list corresponding to the target CFS storage domain;
comparing host lists in the same target CFS storage domain to obtain whether CFS storage which is not mounted due to host offline exists in the target CFS domain or not, and obtaining a query result, wherein the query result records the corresponding relation between the host and the CFS storage which is not mounted;
and executing comparison operation at preset time intervals, judging whether a new host appears in the query results of two times, if not, polling each host, and controlling each host to execute a mounting command according to the corresponding relation between the host and the un-mounted CFS.
2. The method of claim 1, wherein the controlling triggers the target CFS storage domain to automatically mount an unmounted CFD storage device comprises:
when at least two target CFS storage domains exist, controlling the at least two target CFS storage domains to execute a process of mounting the CFD storage equipment which is not mounted in the target CFS storage domains in parallel; and/or controlling the host of the target CFS storage domain to execute the flow of the uninstalled CFS storage according to a preset sequence.
3. The method of claim 1, wherein after the controlling triggering the target CFS storage domain to automatically mount an unmounted CFD storage device, the method further comprises:
recording the times that the target CFS storage domain has continuously executed automatic mounting;
acquiring an execution result of executing automatic mounting by a host corresponding to the target CFS storage domain;
if the execution result is that the CFS storage is not successfully mounted, judging whether the number of times of continuously executing the automatic mounting of the target CFS storage domain reaches a preset number threshold value or not to obtain a judgment result;
and if the number threshold is reached, controlling the host corresponding to the target CFS storage domain to stop automatic mounting operation.
4. The method according to any of claims 1 to 3, wherein before the controlling triggering the target CFS storage domain to automatically mount the unmounted CFD storage device, the method further comprises:
detecting whether a new host is on line in the target CFS storage domain to obtain a detection result;
and if the detection result shows that no new host is on line in the target CFS storage domain, controlling the host corresponding to the target CFS storage domain to execute automatic mounting operation.
5. The method of claim 1, wherein the controlling triggers the target CFS storage domain to automatically mount an unmounted CFD storage device comprises:
recording the times that the target CFS storage domain has continuously executed automatic mounting;
determining the waiting time corresponding to the times of continuously executing the automatic mounting according to the preset waiting time;
and after the waiting time length is passed after the target CFS storage domain finishes mounting, starting a next new automatic mounting process of the target CFS domain.
6. A management device for storage resources in a virtualization system, applied to a management node, comprises:
the system comprises a query module, a storage module and a processing module, wherein the query module is used for querying whether CFS storage which is not mounted due to host offline exists in one or at least two CFS storage domains of a cluster file system in a virtualization system according to a preset time strategy after a host is restarted or online to obtain a query result;
the first acquisition module is used for acquiring a target CFS storage domain of which the CFD storage is not mounted in the two continuous inquiry results obtained according to the time strategy;
the first control module is used for controlling and triggering the process of automatically mounting the CFD storage equipment which is not mounted in the target CFS storage domain;
the mount operation of the same target CFS storage domain is obtained by the following methods, including:
acquiring a host list corresponding to the target CFS storage domain;
comparing host lists in the same target CFS storage domain to obtain whether CFS storage which is not mounted due to host offline exists in the target CFS storage domain or not, and obtaining a query result, wherein the query result records the corresponding relation between the host and the CFS storage which is not mounted;
and executing comparison operation at preset time intervals, judging whether a new host appears in the query results of two times, if not, polling each host, and controlling each host to execute a mounting command according to the corresponding relation between the host and the un-mounted CFS.
7. The apparatus of claim 6, wherein:
the first control module is specifically configured to, when there are at least two target CFS storage domains, control the at least two target CFS storage domains to concurrently execute a process of mounting an unmounted CFD storage device in the target CFS storage domain; and/or controlling the host of the target CFS storage domain to execute the flow of the uninstalled CFS storage according to a preset sequence.
8. The apparatus of claim 6, further comprising:
the recording module is used for recording the times of the target CFS storage domain which continuously executes automatic mounting after controlling and triggering the process of automatically mounting the CFD storage equipment which is not mounted in the target CFS storage domain;
the second obtaining module is used for obtaining an execution result of executing automatic mounting of the host corresponding to the target CFS storage domain;
the judging module is used for judging whether the number of times of continuously executing automatic mounting in the target CFS storage domain reaches a preset number threshold value or not if the execution result is that the CFS storage is not successfully mounted, so as to obtain a judgment result;
and the second control module is used for controlling the host corresponding to the target CFS storage domain to stop automatic mounting operation if the frequency threshold is reached.
9. The apparatus of any of claims 6 to 8, further comprising:
the detection module is used for detecting whether a new host is on line in the target CFS storage domain to obtain a detection result;
and the first control module controls the host corresponding to the target CFS storage domain to execute automatic mounting operation when the detection result shows that no new host is on line in the target CFS storage domain.
10. The apparatus of claim 6, wherein the first control module comprises:
the recording unit is used for recording the times that the target CFS storage domain continuously executes automatic mounting;
the determining unit is used for determining the waiting time corresponding to the number of times of continuously executing the automatic mounting according to the preset waiting time;
and the starting unit is used for starting the next new automatic mounting process of the target CFS after the waiting time length passes after the mounting of the target CFS storage domain is finished.
CN201811305316.6A 2018-11-05 2018-11-05 Method and device for managing storage resources in virtualization system Active CN109445709B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811305316.6A CN109445709B (en) 2018-11-05 2018-11-05 Method and device for managing storage resources in virtualization system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811305316.6A CN109445709B (en) 2018-11-05 2018-11-05 Method and device for managing storage resources in virtualization system

Publications (2)

Publication Number Publication Date
CN109445709A CN109445709A (en) 2019-03-08
CN109445709B true CN109445709B (en) 2022-09-20

Family

ID=65550407

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811305316.6A Active CN109445709B (en) 2018-11-05 2018-11-05 Method and device for managing storage resources in virtualization system

Country Status (1)

Country Link
CN (1) CN109445709B (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101883028B (en) * 2010-06-30 2015-06-24 中兴通讯股份有限公司 Method and device for detecting network file system server
US20170199770A1 (en) * 2014-06-23 2017-07-13 Getclouder Ltd. Cloud hosting systems featuring scaling and load balancing with containers
CN105634813A (en) * 2016-01-04 2016-06-01 浪潮电子信息产业股份有限公司 Method for automatically switching nodes under double-computer environment based on network
CN106557354B (en) * 2016-11-17 2020-12-25 华为技术有限公司 Method for setting attribute parameters of private image and computer equipment
CN107070972B (en) * 2016-12-30 2020-02-07 中国银联股份有限公司 Distributed file processing method and device
CN107733702A (en) * 2017-09-29 2018-02-23 郑州云海信息技术有限公司 The method and apparatus that operational state of mainframe is managed in group system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
《cifs自动挂载》;ty3219;《CSDN》;20140215;全文 *
《ubuntu 开机 自动挂载 airport time capsule》;lugechao;《CSDN》;20131130;全文 *

Also Published As

Publication number Publication date
CN109445709A (en) 2019-03-08

Similar Documents

Publication Publication Date Title
US10511480B2 (en) Message flow management for virtual networks
US10846185B2 (en) Method for processing acquire lock request and server
CN110830283B (en) Fault detection method, device, equipment and system
CN107453932B (en) Distributed storage system management method and device
CN112003917B (en) File storage management method, system, device and medium
CN110888889A (en) Data information updating method, device and equipment
CN110888769B (en) Data processing method and computer equipment
CN111342986B (en) Distributed node management method and device, distributed system and storage medium
US20210377370A1 (en) Method for implementing high availability of bare metal node based on openstack and electronic device using the same
CN114296909A (en) Automatic node capacity expansion and reduction method and system according to kubernets event
CN109445709B (en) Method and device for managing storage resources in virtualization system
CN106411643B (en) BMC detection method and device
CN110555009B (en) Processing method and device for Network File System (NFS) service
CN111625264B (en) Method, device, equipment and medium for upgrading multi-level management system
CN111124275B (en) Monitoring service optimization method and device of distributed block storage system
US20230283571A1 (en) Default gateway management method, gateway manager, server, and storage medium
CN110262875B (en) Communication method and system of Windows virtual machine and KVM host based on patch mechanism
CN113608767A (en) Service upgrade processing method, electronic device and storage medium
CN111078465A (en) Data recovery method and device and computer readable storage medium
CN112817543A (en) Data storage method, system, device, equipment and medium
CN112579247A (en) Method and device for determining task state
CN109271347B (en) Starting method, device and equipment for storage unit of distributed file system
CN110442467B (en) Data sharing method, terminal and computer readable storage medium
CN116938711A (en) Firmware upgrading method and device, electronic equipment and storage medium
CN110572303B (en) Method and device for automatically discovering nodes

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