WO2017097233A1 - 一种数据存储负载的容错方法及iptv系统 - Google Patents

一种数据存储负载的容错方法及iptv系统 Download PDF

Info

Publication number
WO2017097233A1
WO2017097233A1 PCT/CN2016/109077 CN2016109077W WO2017097233A1 WO 2017097233 A1 WO2017097233 A1 WO 2017097233A1 CN 2016109077 W CN2016109077 W CN 2016109077W WO 2017097233 A1 WO2017097233 A1 WO 2017097233A1
Authority
WO
WIPO (PCT)
Prior art keywords
disk
data
iptv
configuration file
stored
Prior art date
Application number
PCT/CN2016/109077
Other languages
English (en)
French (fr)
Inventor
王莉
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2017097233A1 publication Critical patent/WO2017097233A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/231Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion
    • H04N21/23113Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion involving housekeeping operations for stored content, e.g. prioritizing content for deletion because of storage space restrictions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/231Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion
    • H04N21/2312Data placement on disk arrays

Definitions

  • the present invention relates to the field of data fault tolerance technology, and in particular, to a fault tolerance method for a data storage load and an IPTV system.
  • the system With the IPTV (Internet Protocol Television) system (hereinafter referred to as the system) becoming more mature, all the functional modules of the system's general-purpose server are deployed on the unified blade server, and the hardware design is double.
  • the form of the system disk is designed to protect the redundancy of the system.
  • RAID Redundant Arrays of Independent Disks
  • the RAID is divided into three categories: full soft, semi-soft semi-hard and full hard.
  • an embodiment of the present invention provides a fault tolerance method for a data storage load and an IPTV system.
  • system load is intensified during use, and RAID is used.
  • the embodiment of the present invention adopts the following technical solutions:
  • An embodiment of the present invention provides a fault tolerance method for a data storage load, which is applied to an IPTV system having a dual system disk, and the method includes:
  • the system data stored in the data disk is used for fault tolerance processing according to the configuration file.
  • the method further includes:
  • the timing task is configured in the configuration file, and the timing task includes: one of a task of periodically detecting a data disk abnormality, a task of periodically detecting a system disk, and a task of periodically backing up metadata and service data.
  • the second data storage path recorded in the configuration file is read to store subsequent system data in the IPTV system to the new data disk.
  • performing fault tolerance processing by using the system data stored in the data disk according to the configuration file further includes:
  • the decoupling the dual system disks into independent system disks and data disks includes:
  • the coupling relationship between the first system disk and the second system disk in the dual system disk of the IPTV system is released;
  • the first system disk is formatted and labeled as the data disk, and the second system disk is marked as the system disk.
  • the partitioning or soft connecting the data disk to the system disk includes:
  • the second configuration parameter pre-stored in the configuration file is read, and the pre-stored second configuration parameter includes at least one of a partition number, a partition size, a format format, and a mount path of the data disk. Or a variety;
  • the partitioning or soft connecting the data disk to the system disk includes:
  • the third configuration parameter pre-stored in the configuration file is read, where the pre-stored third configuration parameter includes at least: a number of partitions of the data disk, a partition size, a formatted format, and data migration of the system disk. One or more of a path, and a soft connection directory of the data disk;
  • Another embodiment of the present invention further provides an IPTV system, the system having a dual system disk, the system further comprising:
  • a decoupling module configured to decouple the dual system disks into independent system disks and data disks
  • a relationship establishing module configured to mount or softly connect the data disk partition to the system disk, and record the first configuration parameters related to the data disk and the system disk into a configuration file;
  • a storage module configured to store, according to the configuration file, system data generated during use of the IPTV system to the data disk;
  • the fault-tolerant processing module is configured to perform fault-tolerant processing by using system data stored in the data disk according to the configuration file when detecting that the IPTV system is faulty.
  • system further includes:
  • a configuration module configured to configure a timing task in the configuration file, the timing task includes: a task of periodically detecting a data disk abnormality, a task of periodically detecting a system disk, and a task of periodically backing up metadata and service data or A variety.
  • the fault tolerant processing module includes:
  • a first detecting submodule configured to detect an operating state of the data disk
  • a first reading submodule configured to read a first data storage path recorded in the configuration file when the data storage amount in the data disk reaches a preset maximum value or the data disk is in an abnormal state, so that the Subsequent system data in the IPTV system is stored to the system disk;
  • a second reading submodule configured to read a second data storage path recorded in the configuration file when a new data disk is detected in the IPTV system, so that subsequent system data storage in the IPTV system is performed To the new data disk.
  • the fault-tolerant processing module further includes:
  • a second detecting submodule configured to detect an operating state of the system disk
  • a third detecting submodule configured to detect when the system disk is in an abnormal state Is there a new system disk in the IPTV system?
  • Copying a sub-module configured to: when a new system disk is present in the IPTV system, copy metadata in the system data that is periodically backed up to the new system disk, so that the new system disk is based on The metadata automatically starts data loading and version running.
  • the decoupling module includes:
  • a determining submodule configured to determine whether the IPTV system is a dual system disk
  • a relationship release submodule configured to cancel a coupling relationship between the first system disk and the second system disk in the dual system disk of the IPTV system when the IPTV system is a dual system disk;
  • the formatting sub-module is configured to mark the first system disk as the data disk and the second system disk as the system disk.
  • the relationship establishing module includes:
  • the first process closes the submodule and is set to close the use process of the IPTV system
  • a third reading sub-module configured to read a second configuration parameter pre-stored in the configuration file, where the pre-stored second configuration parameter includes at least: a number of partitions of the data disk, a partition size, and a format One or more of the format and the mount path;
  • a partition sub-module configured to partition the data disk according to the pre-stored second configuration parameter, and modify a default data save path in the IPTV system
  • the first relationship establishing submodule is configured to establish a mounting relationship between the data disk and the system disk after the IPTV system is restarted.
  • the relationship establishing module includes:
  • the second process closes the submodule and is set to close the use process of the IPTV system
  • a fourth reading sub-module configured to read a third configuration parameter pre-stored in the configuration file, where the pre-stored third configuration parameter includes at least: a number of partitions of the data disk, a partition size, and a format One or more of a format, a data migration path of the system disk, and a soft connection directory of the data disk;
  • a second relationship establishing submodule configured to perform according to the pre-stored third configuration parameter
  • the data disk is partitioned, and after the IPTV system is restarted, a soft connection relationship between the data disk and the system disk is established.
  • a computer storage medium is further provided, and the computer storage medium may store an execution instruction for implementing the fault tolerance method of the data storage load in the above embodiment.
  • the above solution introduces a scheme of decoupling dual system disks into independent system disks and data disks.
  • the independent data disks will reduce the instability of the system due to heavy data load.
  • sexuality the system data is stored in the data disk to reduce the data load of the system disk, and the content stored in the data disk obtained after the decoupling is used for fault tolerance processing when the system has a problem, thereby improving the processing of the system.
  • FIG. 1 is a schematic flow chart of a first embodiment of the present invention
  • FIG. 2 is a first schematic diagram of a second embodiment of the present invention.
  • FIG. 3 is a second schematic diagram of a second embodiment of the present invention.
  • FIG. 4 is a schematic flow chart of a third embodiment of the present invention.
  • Figure 5 is a first schematic diagram of a flow chart of a fourth embodiment of the present invention.
  • FIG. 6 is a second schematic diagram of a flow chart of a fourth embodiment of the present invention.
  • Figure 7 is a block diagram 1 of a sixth embodiment of the present invention.
  • Figure 8 is a block diagram 2 of a sixth embodiment of the present invention.
  • FIG. 9 is a schematic diagram showing the relationship between a data disk and a system disk in the present invention.
  • Figure 10 is a schematic overall flow chart of a fifth embodiment of the present invention.
  • an embodiment of the present invention discloses a fault tolerance method for a data storage load, which is applied to an IPTV system having a dual system disk, and the method includes:
  • Step 101 Decouple the dual system disks into independent system disks and data disks.
  • the solution is implemented on the basis that the IPTV system has two system disks.
  • the two system disks of the IPTV system need to be decoupled, and one of the two system disks is divided into independent data disks, and the other is A system disk is reserved.
  • Step 102 Mount or softly connect the data disk partition to the system disk, and record the first configuration parameters related to the data disk and the system disk into a configuration file.
  • the relationship between the data disk and the system disk obtained by decoupling in step 101 is established, and in the process of establishing the relationship between the two, different configuration parameters corresponding to the above two methods are generated, for example, The mount path of the partition mount, the storage path of the data, etc., and record the configuration parameters into the configuration file, so as to be read and utilized in the subsequent operation.
  • Step 103 Store system data generated during use of the IPTV system to the data disk according to the configuration file.
  • the system data generated by the IPTV during use is stored to the data disk according to the configuration file in step 102 and the first configuration parameter recorded in the configuration file, and the system data may include service data and a element related to the system itself. Data, to avoid overloading the system disk, causing the overall operation and processing performance of the system.
  • Step 104 When detecting that the IPTV system is faulty, according to the configuration file, Fault tolerance processing is performed using system data stored in the data disk.
  • the IPTV system is periodically detected. When it is detected that the IPTV system is faulty, the fault tolerance processing of the system is performed according to the parameters recorded in the configuration file and the system data stored in the data disk in step 103.
  • the solution introduces a method for decoupling dual system disks into independent system disks and data disks, especially for the case where the IPTV service data is heavily loaded, and the independent data disks may reduce the system load due to heavy data load.
  • the instability of the system the system data is stored in the data disk to reduce the data load of the system disk, and the content stored in the data disk obtained by using the decoupling is fault-tolerant when the system has a problem, thereby Improve the processing power of the system and improve the reliability and overall performance of the system.
  • the method further includes: configuring a timing task in the configuration file, the timing task comprising: a task of periodically detecting a data disk abnormality, a task of periodically detecting a system disk, and a task of periodically backing up metadata and service data or A variety.
  • the configuration file that is, for the partition size of the data disk, the number of partitions, the format type, the disk mount path is configurable; in addition, the path to roll back the data of the system disk is also configurable, for the system disk data
  • the path to the data disk is also configurable; the data backup mode (full amount, increment) and rollback mode can also be configured; the corresponding system timed task time can also be configured; and the timed task can be set in the configuration file.
  • the timing task can be specifically set according to requirements.
  • the timing task can include: periodically detecting the abnormality of the data disk, and timing the system disk. Tasks for regularly backing up metadata and business data, and because of the scalability of the system, you can reserve extensions for tasks. These attributes can be reflected in the configuration files mentioned above.
  • this embodiment further describes the process of performing fault tolerance processing by using the system data stored in the data disk according to the configuration file when detecting that the IPTV system is faulty in step 104.
  • different processing methods are adopted, and two cases are specifically included herein.
  • the specific processing process includes the following steps:
  • Step 201 Detect the working state of the data disk.
  • Step 202 When the data storage amount in the data disk reaches a preset maximum value or the data disk is in an abnormal state, reading the first data storage path recorded in the configuration file, so that the subsequent system in the IPTV system Data is stored to the system disk.
  • the system needs to perform timing detection on the system disk and the data disk.
  • it is necessary to detect the working state of the data disk and if it is detected that the system data stored in the data disk has reached the maximum storage capacity, that is, when the data disk is full, or the data disk exists In the abnormal state, the abnormal state can be a read/write exception, a disk corruption, etc., and cannot continue to perform corresponding tasks in the system.
  • the data disk is not in normal operation.
  • the first data storage path recorded in the configuration file is read, the first data storage path is a data storage path capable of storing subsequent data in the system to the system disk, by reading the first in the configuration file
  • the data storage path is used to save the data in the subsequent operation of the system without being affected by the abnormal situation, and ensure the normal operation of the system, wherein the first data storage path may be pre-written or may be in the establishment of the data disk and the system disk.
  • the storage path in the configuration file is recorded when the partition is mounted or soft-connected. Restrictions.
  • Step 203 When a new data disk is detected in the IPTV system, the second data storage path recorded in the configuration file is read, so that subsequent system data in the IPTV system is stored to the new data. plate.
  • the data disk When the data disk is not processed in a normal working state, the data disk can be changed, and a new data disk is available in the system. When the new data disk is detected, the new data disk is detected. Reading a second data storage path in the configuration file, where the second storage path is The next data in the system can be stored to the data storage path in the data disk, and the second data storage path in the configuration file is read to store the data in the system in the data disk as much as possible, thereby reducing the data of the system disk.
  • the load quantity ensures the smoothness of the system operation, wherein the second data storage path may be pre-written or may be recorded in the configuration file when establishing a partition mount relationship or a soft connection relationship between the data disk and the system disk.
  • the storage path here is not limited.
  • the specific processing includes the following steps:
  • Step 301 Detect an operating state of the system disk.
  • Step 302 When the system disk is in an abnormal state, detecting whether a new system disk appears in the IPTV system.
  • the system needs to detect the system disk and the data disk periodically. Here, you need to check the working status of the system disk.
  • the abnormal state may be caused by abnormal reading and writing of the system disk and disk damage. The operation of the system has been seriously affected. It is necessary to detect whether there is a new system disk that appears after the timely processing in the IPTV system. The process may be that a disk disk is processed by an external person to generate a new system disk. .
  • Step 303 When a new system disk appears in the IPTV system, copy metadata in the system data that is periodically backed up to the new system disk, so that the new system disk is based on the element. Data, automatically start data loading and version running.
  • the system there is a timing task for periodically backing up system data in the data disk, and the system data stored in the data disk is periodically backed up in order to pass the metadata pair in the backed up data when the system disk is abnormal.
  • the system disk is used as a data rollback operation.
  • the metadata in the backed up system data is copied to The new system disk enables the new system disk to automatically start data loading and version running according to the metadata of the backup, thereby ensuring the fault tolerance processing capability of the IPTV system.
  • the dual system disk will be decoupled to A description of the specific process of the independent system disk and data disk. As shown in FIG. 4, the process specifically includes:
  • Step 401 Determine whether the IPTV system is a dual system disk.
  • Step 402 When the IPTV system is a dual system disk, cancel the coupling relationship between the first system disk and the second system disk in the dual system disk of the IPTV system.
  • Step 403 Format the first system disk and mark the data disk, and mark the second system disk as the system disk.
  • Steps 401 to 403 mainly describe the operations to be performed before the data in the IPTV system is migrated from storage to system disk to storage to the data disk.
  • the dual system disks need to be decoupled into independent system disks and data disks, where first need Determine the IPTV system to see if it is a dual-system disk mode. If it is a dual-system disk, it is necessary to release the coupling relationship between the two system disks. If the two system disks are specifically disk array RAID combination First, it is necessary to detect the RAID state between the disks to release the corresponding RAID mode. If it is a single disk mode, the above steps need not be performed.
  • the system disk and the data disk need to be confirmed, the first system disk is formatted and marked as a data disk, and the remaining one system disk, that is, the second system disk is marked as a system disk.
  • the process of mounting the data disk partition to the system disk includes:
  • Step 501 Close the use process of the IPTV system.
  • Step 502 Read a second configuration parameter pre-stored in the configuration file, where the pre-stored second configuration parameter includes at least: a number of partitions, a partition size, a format format, and a mount path of the data disk. One or more.
  • Step 503 Partition the data disk according to the pre-stored second configuration parameter, and modify a default data save path in the IPTV system.
  • the default data save path in the system is modified.
  • some data storage paths are the default paths.
  • the dual system disk has changed. You need to modify the default save path to adapt to the site.
  • the diversity of the default data save path is based on the second configuration parameter pre-stored in the read configuration file, and the corresponding modification is performed according to the pre-stored data save path in the second configuration parameter.
  • Step 504 After the IPTV system is restarted, establish a mounting relationship between the data disk and the system disk.
  • the second configuration parameter includes at least: setting the number of partitions of the data disk to 2, and the partition size is 300G, 300G, the format type is ext4, the mounted path is /home/log, /home/msyql; sda1-->/home/log, sda2-->/home/msyql.
  • the process of softly connecting the data disk to the system disk includes:
  • Step 601 Turn off the use process of the IPTV system.
  • Step 602 Read a third configuration parameter pre-stored in the configuration file, where the pre-stored third configuration parameter includes at least: a number of partitions of the data disk, a partition size, a formatted format, and the system disk. One or more of a data migration path and a soft connection directory of the data disk.
  • Step 603 Partition the data disk according to the pre-stored third configuration parameter, and establish a soft connection relationship between the data disk and the system disk after the IPTV system is restarted.
  • the third configuration parameter includes at least: the format format of the data disk is ext3, and the partition is The number is 1. There are two paths to implement data migration of the original system disk. One is the log data /home/log of the service and the platform.
  • the soft connection directory of the data disk is set to /home/softlink/ Log, the other is the system's mysql data, the path is /home/mysql, the data disk's soft connection directory is set to /home/softlink/mysql, restart the system to complete the independent data disk process, to achieve the final soft connection, and then The data stream in the IPTV system is recorded to the data disk.
  • the first step start the scheduled backup data.
  • the second step read the configuration file information, according to the characteristics of the data to be backed up, select the backup method (incremental, full amount), such as incremental backup of mysql and other business data, the use of full backup system platform metadata and so on.
  • the third step periodically detecting the working state of the data disk and the working state of the system disk.
  • the fourth step corresponding data disk, because a large amount of system data, including business data and system metadata, etc. are migrated to the data disk for storage, so the data disk is likely to be filled. If it is detected that the data disk is full, go to the fifth step. If the data disk is not full, you can further determine whether there is an abnormality in the read/write status of the data disk. Always go to the sixth step.
  • Step 5 In the case that the data disk is full, in order not to affect the use of system data, the system automatically resets the board, reloads the backup data, changes the data storage path, and restores the system data storage path to the corresponding directory of the system disk. Next, re-write the data to the system disk until the data disk read and write status returns to normal, that is, after the new data disk is re-intervened into the system, the working mode of the independent data disk is restored, and the service data and metadata are restored and switched.
  • the system data is stored in the data disk.
  • Step 6 Both the data disk and the system disk can have the possibility of reading and writing abnormalities and bad disks. If the corresponding data disk is broken, you need to restore the data storage to the system disk according to the fifth step. After the data disk read and write status is good, switch the data storage to the data disk. If the corresponding system disk is broken, you need to perform a disk swap operation on the bad system disk, copy some metadata backed up to the data disk to the new system disk, use the backed up data to implement data rollback, and automatically start the metadata. The loading and version running ensure the normal operation of the system and improve the fault tolerance of the system. If there is no abnormality in the system disk or data disk and the data disk is full, go to the third step.
  • the task of creating and managing a scheduled task, the backup data mentioned above, and the process of rolling back data to the system disk are all performed by one timed task.
  • the embodiment of the present invention further discloses an IPTV system, which has a dual system disk. As shown in FIG. 7, the system further includes a decoupling module 701, a relationship establishing module 702, a storage module 703, and a fault tolerance processing module 704.
  • the decoupling module 701 is configured to decouple the dual system disk into an independent system disk and a data disk; the relationship establishing module 702 is configured to mount or softly connect the data disk to the system disk, and the data is The first configuration parameter related to the disk and the system disk is recorded in the configuration file, and the storage module 703 is configured to store system data generated during the use of the IPTV system to the data disk according to the configuration file; the fault tolerance processing module 704 , configured to use the system data stored in the data disk according to the configuration file when detecting that the IPTV system is faulty Perform fault tolerance processing.
  • This solution decouples the dual system disks in the IPTV system into independent system disks and data disks. Especially for the IPTV service data in the case of heavy load, the independent data disk will reduce the instability of the system due to heavy data load. Sexuality, using the content stored in the data disk obtained after decoupling, when the system has a problem, the system is fault-tolerant, thereby improving the fault-tolerant processing capability of the system and improving the reliability and overall performance of the system.
  • the system further includes: a configuration module 705.
  • the configuration module 705 is configured to configure a timing task in the configuration file, the timing task includes: one of: a task of periodically detecting a data disk abnormality, a task of periodically detecting a system disk, and a task of periodically backing up metadata and service data.
  • a configuration module 705. is configured to configure a timing task in the configuration file, the timing task includes: one of: a task of periodically detecting a data disk abnormality, a task of periodically detecting a system disk, and a task of periodically backing up metadata and service data.
  • the fault tolerance processing module 704 includes: a first detection submodule 7041, a first read submodule 7042, and a second read submodule 7043.
  • the first detecting sub-module 7041 is configured to detect an operating state of the data disk.
  • the first reading sub-module 7042 is configured to read when the data storage amount in the data disk reaches a preset maximum value or the data disk is in an abnormal state.
  • the second reading sub-module 7043 is configured to read when a new data disk is detected in the IPTV system
  • the second data storage path recorded in the configuration file is taken to store subsequent system data in the IPTV system to the new data disk.
  • the fault tolerance processing module 704 further includes: a second detection submodule 7044, a third detection submodule 7045, and a replication submodule 7046.
  • the second detecting submodule 7044 is configured to detect an operating state of the system disk; the third detecting submodule 7045 is configured to detect whether a new system disk appears in the IPTV system when the system disk is in an abnormal state; the copy submodule 7046, configured to: when a new system disk appears in the IPTV system, copy the metadata in the regularly backed up system data to the new system disk, so that the new system disk automatically starts data loading according to the metadata.
  • the version runs.
  • the decoupling module 701 includes: a determining submodule 7011, a relationship releasing submodule 7012, and a formatting submodule 7013.
  • the determining sub-module 7011 is configured to determine whether the IPTV system is a dual-system disk; and the relationship release sub-module 7012 is configured to release the first system disk in the dual-system disk of the IPTV system when the IPTV system is a dual-system disk.
  • the coupling relationship with the second system disk; the formatting sub-module 7013 is configured to mark the first system disk as a data disk and the second system disk as a system disk.
  • the relationship establishing module 702 includes: a first process closing submodule 7021, a third reading submodule 7022, a partition submodule 7023, and a first relationship establishing submodule 7024.
  • the first process closes the sub-module 7021 and is set to close the use process of the IPTV system.
  • the third read sub-module 7022 is configured to read the second configuration parameter pre-stored in the configuration file, and the second pre-stored parameter.
  • the configuration parameter includes at least one of a number of partitions of the data disk, a partition size, a formatted format, and a mounting path.
  • the partitioning submodule 7023 is configured to perform the data disk according to the pre-stored second configuration parameter. Partitioning, modifying the default data storage path in the IPTV system; the first relationship establishing sub-module 7024 is configured to establish a mounting relationship between the data disk and the system disk after the IPTV system is restarted.
  • the relationship establishing module 702 includes: a second process closing submodule 7025, a fourth reading submodule 7026, and a second relationship establishing submodule 7027.
  • the second process closing sub-module 7025 is configured to close the use process of the IPTV system; the fourth read sub-module 7026 is configured to read the third configuration parameter pre-stored in the configuration file, and the pre-stored third
  • the configuration parameter includes at least one of: a number of partitions of the data disk, a partition size, a format format, a data migration path of the system disk, and a soft connection directory of the data disk; and a second relationship establishing submodule 7027, setting The data disk is partitioned according to the pre-stored third configuration parameter, and after the IPTV system is restarted, a soft connection relationship between the data disk and the system disk is established.
  • the two system disks are decoupled into independent system disks and data disks, and the system is shared by using an independent data disk.
  • Disk IO pressure using non-RAID mode, enhance the system's fault tolerance for data files, reduce the data load of the system disk, and ensure the normal operation of the system.
  • the foregoing technical solution provided by the embodiment of the present invention can be applied to a solution for decoupling a dual system disk into an independent system disk and a data disk in a fault tolerance process of a data storage load, especially when the IPTV service data is heavily loaded.
  • Independent data disk will reduce the instability of the system due to heavy data load.
  • the system data will be stored in the data disk to reduce the data load of the system disk.
  • the content stored in the data disk obtained after decoupling is When there is a problem in the system, the system is fault-tolerant, which improves the processing power of the system and improves System reliability and overall performance.

Landscapes

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

Abstract

一种数据存储负载的容错方法及IPTV系统,涉及数据容错技术领域,其中方法包括:将所述双系统盘解耦合为独立的系统盘和数据盘(101);将所述数据盘分区挂载或软连接至所述系统盘,并将与所述数据盘及所述系统盘相关的第一配置参数分别记录到配置文件中(102);根据所述配置文件,将所述IPTV系统使用过程中产生的系统数据存储至所述数据盘(103);在检测到IPTV系统出现故障时,根据所述配置文件,利用所述数据盘中存储的系统数据进行容错处理(104),提高了系统的处理能力,提升系统的可靠性及整体性能。

Description

一种数据存储负载的容错方法及IPTV系统 技术领域
本发明涉及数据容错技术领域,尤其涉及一种数据存储负载的容错方法及IPTV系统。
背景技术
随着IPTV(Internet Protocol Television,交互式网络电视)系统(以下简称系统)的日趋成熟化,系统的通用服务器的所有功能模块都集中部署在统一刀片服务器上,另外在硬件设计上采用的是双系统盘的形式,目的是对系统的冗余起到保护的作用。对应双系统盘,一般按照通用的双盘管理方法,可以采用RAID(Redundant Arrays of Independent Disks,磁盘阵列)方式。而RAID分全软、半软半硬与全硬三类。
从现有应用的情况来看,无论系统采用哪一种RAID方式,一方面系统盘上存在持续写日志和数据库写操作,另外一方面由于RAID的校验,对系统的处理能力有很大的影响,当服务器负载比较重的时候,会大大影响服务器效率,造成了系统负载加剧,输入输出等待时间持续冲高,影响到系统的服务质量,这样看来RAID的双系统盘并未给我们可靠性保证,反而降低了系统的性能。
发明内容
为了克服上述问题,本发明实施例提供一种数据存储负载的容错方法及IPTV系统,为了解决目前IPTV系统中使用单系统盘开局或使用RAID开局后,使用过程中出现系统负载加剧,及由RAID的不可靠性而带来的系统性能降低的问题。
为了解决上述技术问题,本发明实施例采用如下技术方案:
本发明的一个实施例,提供了一种数据存储负载的容错方法,应用于具有双系统盘的IPTV系统,所述方法包括:
将所述双系统盘解耦合为独立的系统盘和数据盘;
将所述数据盘分区挂载或软连接至所述系统盘,并将与所述数据盘及所述系统盘相关的第一配置参数分别记录到配置文件中;
根据所述配置文件,将所述IPTV系统使用过程中产生的系统数据存储至所述数据盘;
在检测到IPTV系统出现故障时,根据所述配置文件,利用所述数据盘中存储的系统数据进行容错处理。
可选地,所述方法还包括:
在所述配置文件中配置定时任务,所述定时任务包括:定时检测数据盘异常的任务、定时检测系统盘的任务以及定时备份元数据和业务数据的任务中的一种或多种。
可选地,所述在检测到IPTV系统出现故障时,根据所述配置文件,利用所述数据盘中存储的系统数据进行容错处理,包括:
检测所述数据盘的工作状态;
当所述数据盘内数据存储量达到预设最大值或所述数据盘处于异常状态时,读取配置文件中记录的第一数据存储路径,以使所述IPTV系统中后续的系统数据存储至所述系统盘;
当检测到所述IPTV系统中有新的数据盘出现时,读取配置文件中记录的第二数据存储路径,以使所述IPTV系统中后续的系统数据存储至所述新的数据盘。
可选地,所述在检测到IPTV系统出现故障时,根据所述配置文件,利用所述数据盘中存储的系统数据进行容错处理,还包括:
检测所述系统盘的工作状态;
当所述系统盘处于异常状态时,检测所述IPTV系统内是否有新的系 统盘出现;
当所述IPTV系统内有新的系统盘出现时,将定时备份的所述系统数据中的元数据复制至所述新的系统盘,以使所述新的系统盘根据所述元数据,自动启动数据加载和版本运行。
可选地,所述将所述双系统盘解耦合为独立的系统盘和数据盘,包括:
判断所述IPTV系统中是否为双系统盘;
当所述IPTV系统中为双系统盘时,解除所述IPTV系统的双系统盘中的第一系统盘与第二系统盘的耦合关系;
将所述第一系统盘格式化后标记为所述数据盘,将所述第二系统盘标记为所述系统盘。
可选地,所述将所述数据盘分区挂载或软连接至所述系统盘,包括:
关闭对所述IPTV系统的使用进程;
读取所述配置文件中预存储的第二配置参数,所述预存储的第二配置参数至少包括:所述数据盘的分区个数、分区大小、格式化格式和挂载路径中的一种或多种;
根据所述预存储的第二配置参数,对所述数据盘进行分区,修改所述IPTV系统中默认的数据存盘路径;
在所述IPTV系统重新启动之后,建立所述数据盘与所述系统盘之间的挂载关系。
可选地,所述将所述数据盘分区挂载或软连接至所述系统盘,包括:
关闭对所述IPTV系统的使用进程;
读取所述配置文件中预存储的第三配置参数,所述预存储的第三配置参数至少包括:所述数据盘的分区个数、分区大小、格式化格式、所述系统盘的数据迁移路径、和所述数据盘的软连接目录中的一种或多种;
根据所述预存储的第三配置参数,对所述数据盘进行分区,并在所述IPTV系统重新启动之后,建立所述数据盘与所述系统盘之间的软连接关 系。
本发明的另一个实施例,还提供了一种IPTV系统,所述系统具有双系统盘,所述系统还包括:
解耦合模块,设置为将所述双系统盘解耦合为独立的系统盘和数据盘;
关系建立模块,设置为将所述数据盘分区挂载或软连接至所述系统盘,并将与所述数据盘及所述系统盘相关的第一配置参数分别记录到配置文件中;
存储模块,设置为根据所述配置文件,将所述IPTV系统使用过程中产生的系统数据存储至所述数据盘;
容错处理模块,设置为在检测到IPTV系统出现故障时,根据所述配置文件,利用所述数据盘中存储的系统数据进行容错处理。
可选地,所述系统还包括:
配置模块,设置为在所述配置文件中配置定时任务,所述定时任务包括:定时检测数据盘异常的任务、定时检测系统盘的任务以及定时备份元数据和业务数据的任务中的一种或多种。
可选地,所述容错处理模块包括:
第一检测子模块,设置为检测所述数据盘的工作状态;
第一读取子模块,设置为当所述数据盘内数据存储量达到预设最大值或所述数据盘处于异常状态时,读取配置文件中记录的第一数据存储路径,以使所述IPTV系统中后续的系统数据存储至所述系统盘;
第二读取子模块,设置为当检测到所述IPTV系统中有新的数据盘出现时,读取配置文件中记录的第二数据存储路径,以使所述IPTV系统中后续的系统数据存储至所述新的数据盘。
可选地,所述容错处理模块还包括:
第二检测子模块,设置为检测所述系统盘的工作状态;
第三检测子模块,设置为当所述系统盘处于异常状态时,检测所述 IPTV系统内是否有新的系统盘出现;
复制子模块,设置为当所述IPTV系统内有新的系统盘出现时,将定时备份的所述系统数据中的元数据复制至所述新的系统盘,以使所述新的系统盘根据所述元数据,自动启动数据加载和版本运行。
可选地,所述解耦合模块包括:
判断子模块,设置为判断所述IPTV系统中是否为双系统盘;
关系解除子模块,设置为当所述IPTV系统中为双系统盘时,解除所述IPTV系统的双系统盘中的第一系统盘与第二系统盘的耦合关系;
格式化子模块,设置为将所述第一系统盘格式化后标记为所述数据盘,将所述第二系统盘标记为所述系统盘。
可选地,所述关系建立模块包括:
第一进程关闭子模块,设置为关闭对所述IPTV系统的使用进程;
第三读取子模块,设置为读取所述配置文件中预存储的第二配置参数,所述预存储的第二配置参数至少包括:所述数据盘的分区个数、分区大小、格式化格式和挂载路径中的一种或多种;
分区子模块,设置为根据所述预存储的第二配置参数,对所述数据盘进行分区,修改所述IPTV系统中默认的数据存盘路径;
第一关系建立子模块,设置为在所述IPTV系统重新启动之后,建立所述数据盘与所述系统盘之间的挂载关系。
可选地,所述关系建立模块包括:
第二进程关闭子模块,设置为关闭对所述IPTV系统的使用进程;
第四读取子模块,设置为读取所述配置文件中预存储的第三配置参数,所述预存储的第三配置参数至少包括:所述数据盘的分区个数、分区大小、格式化格式、所述系统盘的数据迁移路径、和所述数据盘的软连接目录中的一种或多种;
第二关系建立子模块,设置为根据所述预存储的第三配置参数,对所 述数据盘进行分区,并在所述IPTV系统重新启动之后,建立所述数据盘与所述系统盘之间的软连接关系。
在本发明实施例中,还提供了一种计算机存储介质,该计算机存储介质可以存储有执行指令,该执行指令用于执行上述实施例中的数据存储负载的容错方法的实现。
本发明实施例的有益效果是:
上述方案,引入了双系统盘解耦合为独立系统盘和数据盘的方案,尤其针对IPTV业务数据在负载比较重的情况下,独立数据盘会降低系统由于数据负载重而导致系统存在的不稳定性,将系统数据存储在数据盘中来减少系统盘的数据负载量,利用解耦合之后得到的数据盘中存储的内容在当系统出现问题时,对系统进行容错处理,从而提高了系统的处理能力,提升系统的可靠性及整体性能。
附图说明
图1为本发明中第一实施例的流程示意图;
图2为本发明中第二实施例的流程示意图一;
图3为本发明中第二实施例的流程示意图二;
图4为本发明中第三实施例的流程示意图;
图5为本发明中第四实施例的流程示意图一;
图6为本发明中第四实施例的流程示意图二;
图7为本发明中第六实施例的模块框图一;
图8为本发明中第六实施例的模块框图二;
图9为本发明中数据盘与系统盘之间建立关系后的关系示意图;
图10为本发明中第五实施例的整体流程示意图。
具体实施方式
下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。
第一实施例
如图1所示,本发明实施例公开了一种数据存储负载的容错方法,应用于具有双系统盘的IPTV系统,该方法包括:
步骤101:将所述双系统盘解耦合为独立的系统盘和数据盘。
本方案是在IPTV系统具有两个系统盘的基础之上进行执行,首先需要将IPTV系统的两个系统盘进行解耦合操作,将两个系统盘中的一个分化为独立的数据盘,对另一个系统盘作保留。
步骤102:将所述数据盘分区挂载或软连接至所述系统盘,并将与所述数据盘及所述系统盘相关的第一配置参数分别记录到配置文件中。
将在步骤101中解耦合得到的数据盘及系统盘之间建立挂载或软连接的关系,在两者的关系建立过程中会产生一些与上述两种方式相对应的不同的配置参数,例如分区挂载的挂载路径,数据的存储路径等,将该些配置参数记录至配置文件中,以便于接下来操作过程中的读取及利用。
步骤103:根据所述配置文件,将所述IPTV系统使用过程中产生的系统数据存储至所述数据盘。
根据步骤102中的配置文件及该配置文件中记录的第一配置参数,将IPTV在使用过程中产生的系统数据存储至数据盘,该系统数据可能包括的有业务数据及与系统本身相关的元数据,避免系统盘中负载过重,引起系统的整体运行及处理性能。
步骤104:在检测到IPTV系统出现故障时,根据所述配置文件,利 用所述数据盘中存储的系统数据进行容错处理。
对IPTV系统进行定时检测,在检测到IPTV系统出现故障时,根据配置文件中记录的参数,及利用在步骤103中存储在数据盘中的系统数据进行对系统的容错处理。
在本实施例中,本方案引入了双系统盘解耦合为独立系统盘和数据盘的方法,尤其针对IPTV业务数据在负载比较重的情况下,独立数据盘会降低系统由于数据负载重而导致系统存在的不稳定性,将系统数据存储在数据盘中来减少系统盘的数据负载量,利用解耦合之后得到的数据盘中存储的内容在当系统出现问题时,对系统进行容错处理,从而提高了系统的处理能力,提升系统的可靠性及整体性能。
其中,该方法还包括:在该配置文件中配置定时任务,该定时任务包括:定时检测数据盘异常的任务、定时检测系统盘的任务以及定时备份元数据和业务数据的任务中的一种或多种。
相应地,结合图9,本方案提到的在对两个系统盘作解耦合操作后,独立数据盘与系统盘之间涉及的有两种关系形式,一种是软连接的方式,一种是磁盘分区挂载的方式,由于在实际操作过程中,现场局点的多元化和个性化,考虑兼容性和通用性,本方案采用数据配置的方式,操作的行为和对象都是统一的写在配置文件中:即对于数据盘的分区大小,分区个数,格式化类型,磁盘挂载路径是可以配置的;另外对系统盘的数据要回滚的路径也是可以配置的,对于系统盘数据到数据盘的路径也是可以配置的;针对数据备份方式(全量,增量)和回滚的方式也是可以配置的;对应系统的定时任务时间也是可以配置的;且可以在配置文件中设置定时任务,定时任务可以根据需要进行具体设置,定时任务可以包括:定时检测数据盘异常的任务、定时检测系统盘的任务、定时备份元数据和业务数据的任务,另外由于系统的可扩展性,可以预留有任务的扩展区,这些属性都可以通过上述提到配置文件中来体现。
第二实施例
在第一实施例基础上,本实施例将对步骤104中的在检测到IPTV系统出现故障时,根据该配置文件,利用数据盘中存储的系统数据进行容错处理的过程进行进一步描述,该过程在IPTV系统出现不同问题时,采用不同的处理手段,这里具体包括两种情况。
一方面,如图2所示,针对于数据盘出现问题时,具体处理过程包括如下步骤:
步骤201:检测所述数据盘的工作状态。
步骤202:当所述数据盘内数据存储量达到预设最大值或所述数据盘处于异常状态时,读取配置文件中记录的第一数据存储路径,以使所述IPTV系统中后续的系统数据存储至所述系统盘。
系统中需要对系统盘与数据盘进行定时检测,这里需要检测数据盘的工作状态,且如果检测到数据盘中存储的系统数据已达到最大存储容量,即数据盘已满时,或数据盘存在异常状态时,该异常状态可以是读写异常、磁盘损坏等状况,无法继续在系统中执行相应的任务时,此时为了使系统的运行不受影响,只要检测到数据盘不处于正常的工作状态,就读取配置文件中记录的第一数据存储路径,该第一数据存储路径为能够使系统中的后续数据存储至系统盘中的数据存储路径,通过读取配置文件中的该第一数据存储路径,来使系统后续运行中的数据保存不受异常情况的影响,保证系统的正常运行,其中该第一数据存储路径可以是预编写进去的也可以是在建立数据盘与系统盘之间的分区挂载关系或软连接关系时记录进配置文件中的存储路径,这里具体不做限制。
步骤203:当检测到所述IPTV系统中有新的数据盘出现时,读取配置文件中记录的第二数据存储路径,以使所述IPTV系统中后续的系统数据存储至所述新的数据盘。
当对不处于正常的工作状态数据盘及时做出处理后,这里可以是对数据盘做换盘处理,系统中出现了新的可供使用的数据盘,当检测到该新的数据盘出现后,读取配置文件中的第二数据存储路径,该第二存储路径为 能够使系统中接下来的数据存储至数据盘中的数据存储路径,通过读取配置文件中的该第二数据存储路径,来尽量使系统中的数据存储在数据盘中,减少系统盘的数据负载量,保证系统运行的流畅度,其中该第二数据存储路径可以是预编写进去的也可以是在建立数据盘与系统盘之间的分区挂载关系或软连接关系时记录进配置文件中的存储路径,这里具体不做限制。
另一方面,如图3所示,针对于数据盘出现问题时,具体处理过程包括如下步骤:
步骤301:检测所述系统盘的工作状态。
步骤302:当所述系统盘处于异常状态时,检测所述IPTV系统内是否有新的系统盘出现。
系统中需要对系统盘与数据盘进行定时检测,这里需要检测系统盘的工作状态,当系统盘处于异常状态时,该异常状态可能是由系统盘的读写异常、磁盘损坏造成的,此时系统的运行已收到严重影响,需要检测判断该IPTV系统中是否有经过及时的处理之后出现的新的系统盘,该过程可以是由外部人员对系统盘进行换盘处理而产生新的系统盘。
步骤303:当所述IPTV系统内有新的系统盘出现时,将定时备份的所述系统数据中的元数据复制至所述新的系统盘,以使所述新的系统盘根据所述元数据,自动启动数据加载和版本运行。
在系统中,存在定时对数据盘中的系统数据进行备份的定时任务,对数据盘中存储的系统数据进行定时备份是为了在当系统盘出现异常时,通过该备份的数据中的元数据对系统盘作数据回滚操作,当检测到系统中出现新的系统盘时,此时为了保证该新的系统盘能快速的恢复至原来的使用状态,将备份的系统数据中的元数据复制至该新的系统盘,使得该新的系统盘根据备份的元数据实现自动启动数据加载和版本运行,进而保证IPTV系统的容错处理能力。
第三实施例
基于第一实施例,本实施例中,将对步骤101中将双系统盘解耦合为 独立的系统盘和数据盘的具体过程做出描述。如图4所示,该过程具体包括:
步骤401:判断所述IPTV系统中是否为双系统盘。
步骤402:当所述IPTV系统中为双系统盘时,解除所述IPTV系统的双系统盘中的第一系统盘与第二系统盘的耦合关系。
步骤403:将所述第一系统盘格式化后标记为所述数据盘,将所述第二系统盘标记为所述系统盘。
步骤401至403中主要说明的是IPTV系统中的数据从存储至系统盘迁移到存储至数据盘之前要做的操作,需要将双系统盘解耦合为独立的系统盘和数据盘,其中首先需要对IPTV系统进行判断,查看该系统中是否为双系统盘模式,如果是双系统盘,就要解除两个系统盘的耦合关系,如果两个系统盘之间具体为磁盘阵列RAID的磁盘组合方式,则先要检测磁盘之间的RAID状态来解除相应的RAID模式,如果是单盘的方式,则不需要操作上述的步骤。在解除两个系统盘之间的耦合关系后,需要确认系统盘与数据盘,将第一系统盘格式化后标记为数据盘,将其余的一个系统盘即第二系统盘标记为系统盘,确认好数据盘后,需要记录数据盘的序列号到配置文件中,可以避免系统重新启动的时候数据盘的盘符发生变化导致的误操作磁盘的错误。
第四实施例
在第一实施例基础上,本实施例中将对步骤102中将数据盘分区挂载至系统盘或将数据盘软连接至系统盘的过程作出描述。
一方面,如图5所示,将数据盘分区挂载至系统盘的过程包括:
步骤501:关闭对所述IPTV系统的使用进程。
步骤502:读取所述配置文件中预存储的第二配置参数,所述预存储的第二配置参数至少包括:所述数据盘的分区个数、分区大小、格式化格式和挂载路径中的一种或多种。
在对数据盘进行分区挂载时,需要关闭对IPTV系统的使用的相关进程,读取预存储的配置文件中的配置参数,该配置参数用以接下来的分区挂载过程中使用。
步骤503:根据所述预存储的第二配置参数,对所述数据盘进行分区,修改所述IPTV系统中默认的数据存盘路径。
这里修改系统中默认的数据存盘路径是指在系统安装时,有的数据存盘路径为默认的路径,而此时的双系统盘已发生变化,需要对默认的存盘路径进行修改,为了适应局点的多样性,这里对默认的数据存盘路径的修改是以读取配置文件中预存储的第二配置参数为基础的,根据第二配置参数中预存储的数据存盘路径进行相对应的修改。
步骤504:在所述IPTV系统重新启动之后,建立所述数据盘与所述系统盘之间的挂载关系。
这里,我们将通过举例说明步骤501至504中的分区挂载的方式操作过程。在操作前先要关闭加密狗,停止当前系统的版本运行,停止mysql服务,读取配置文件,此例子中第二配置参数中至少包括:设置数据盘的分区个数为2,分区大小分别是300G,300G,格式化类型是ext4,挂载的路径为/home/log,/home/msyql;sda1-->/home/log,sda2-->/home/msyql。由于在安装mysql的时候,会默认数据的写盘路径,这里需要根据配置文件中的存盘路径,将msyql的存盘路径修改为/home/mysql;为了系统重启磁盘挂载不丢失,需要修改/etc/fstab使系统自动加载磁盘,然后重新启动系统实现最终的分区挂载,进而将IPTV系统中的数据流控到数据盘。
另一方面,如图6所示,将数据盘软连接至系统盘的过程包括:
步骤601:关闭对所述IPTV系统的使用进程。
步骤602:读取所述配置文件中预存储的第三配置参数,所述预存储的第三配置参数至少包括:所述数据盘的分区个数、分区大小、格式化格式、所述系统盘的数据迁移路径、和所述数据盘的软连接目录中的一种或多种。
步骤603:根据所述预存储的第三配置参数,对所述数据盘进行分区,并在所述IPTV系统重新启动之后,建立所述数据盘与所述系统盘之间的软连接关系。
这里,我们将通过举例说明步骤601至603中的软连接的方式操作过程。在操作前同样要先关闭加密狗,停止当前系统的版本运行,停止mysql服务,读取配置文件,此例子中第三配置参数中至少包括有:设置数据盘的格式化格式为ext3,分区个数是1,要实现原系统盘的数据迁移的路径有两个,一个是业务的和平台的所有的日志数据/home/log,对应地,数据盘的软连接目录设置为/home/softlink/log,另一个是系统的mysql数据,路径是/home/mysql,数据盘的软连接目录设置为/home/softlink/mysql,重新启动系统完成独立数据盘的过程,实现最终的软连接,进而将IPTV系统中的数据流记录到数据盘。
第五实施例
如图10所示,为使本发明实施例目的、技术方案优点更加清楚,本实施例将进一步结合具体实现场景进行说明。
第一步:启动定时备份数据。
第二步:读取配置文件信息,根据要备份的数据特性,选择备份的方式(增量、全量),比如采用增量备份mysql等业务数据、采用全量备份系统平台的元数据等等。
第三步:定时检测数据盘的工作状态和系统盘的工作状态。
因为在实际情况中,无论怎样,数据盘和系统盘都是会坏的,所以要设置一个定时任务,对磁盘进行检测,在发现磁盘坏了的情况下,更换新的磁盘,并恢复系统的正常运行。
第四步:对应数据盘,由于大量的系统数据,包括业务数据及系统的元数据等都迁移到数据盘上进行存储,所以数据盘存在被写满的可能性。如果检测得出数据盘存满了,则转到第五步,如果数据盘没有存满,可以进一步判断数据盘的读写状态是否存在异常,若数据盘的读写状态存在异 常则转到第六步。
第五步:在数据盘满的情况下,为了不影响系统数据的使用,在系统自动复位单板后重新加载备份数据,改变数据存储路径,将系统数据的存储路径恢复到系统盘对应的目录下面,重新使数据写到系统盘上面,直到数据盘读写状态恢复正常,即有新的数据盘重新介入到系统中后,重新恢复独立数据盘的工作模式,恢复并切换业务数据和元数据等系统数据存储至数据盘中。
第六步:无论是数据盘还是系统盘都可以存在读写异常,坏盘的可能性。对应数据盘坏了,需要按照第五步的方式恢复数据的存储至系统盘,待数据盘读写状态好了后在切换数据存储至数据盘。对应系统盘坏了的情况下,需要对坏的系统盘进行换盘操作,把备份到数据盘的一些元数据复制到新的系统盘,利用备份的数据实现数据回滚,并自动启动元数据的加载和版本运行,保证系统的正常运行,提高系统的容错能力。如果在系统盘或者数据盘都没有发现异常的情况下和数据盘满的情况下,转到第三步。
且进一步地,本发明中可以是:实施定时任务创建与管理,上述提到的备份数据,回滚数据到系统盘的过程,都是通过一个一个定时任务完成的。
第六实施例
本发明实施例还公开了一种IPTV系统,该系统具有双系统盘,如图7所示,该系统还包括:解耦合模块701、关系建立模块702、存储模块703、容错处理模块704。
其中,解耦合模块701,设置为将该双系统盘解耦合为独立的系统盘和数据盘;关系建立模块702,设置为将数据盘分区挂载或软连接至该系统盘,并将与数据盘及所述系统盘相关的第一配置参数分别记录到配置文件中;存储模块703,设置为根据该配置文件,将IPTV系统使用过程中产生的系统数据存储至该数据盘;容错处理模块704,设置为在检测到IPTV系统出现故障时,根据该配置文件,利用数据盘中存储的系统数据 进行容错处理。
本方案将IPTV系统中的双系统盘解耦合为独立系统盘和数据盘,尤其针对IPTV业务数据在负载比较重的情况下,独立数据盘会降低系统由于数据负载重而导致系统存在的不稳定性,利用解耦合之后得到的数据盘中存储的内容在当系统出现问题时,对系统进行容错处理,从而提高了系统的容错处理能力,提升系统的可靠性及整体性能。
如图8所示,进一步地,该系统还包括:配置模块705。该配置模块705,设置为在配置文件中配置定时任务,该定时任务包括:定时检测数据盘异常的任务、定时检测系统盘的任务以及定时备份元数据和业务数据的任务中的一种或多种。
具体地,其中容错处理模块704包括:第一检测子模块7041、第一读取子模块7042、第二读取子模块7043。
其中,第一检测子模块7041,设置为检测数据盘的工作状态;第一读取子模块7042,设置为当数据盘内数据存储量达到预设最大值或数据盘处于异常状态时,读取配置文件中记录的第一数据存储路径,以使IPTV系统中后续的系统数据存储至系统盘;第二读取子模块7043,设置为当检测到IPTV系统中有新的数据盘出现时,读取配置文件中记录的第二数据存储路径,以使IPTV系统中后续的系统数据存储至新的数据盘。
进一步地,该容错处理模块704还包括:第二检测子模块7044、第三检测子模块7045、复制子模块7046。
其中,第二检测子模块7044,设置为检测系统盘的工作状态;第三检测子模块7045,设置为当系统盘处于异常状态时,检测IPTV系统内是否有新的系统盘出现;复制子模块7046,设置为当IPTV系统内有新的系统盘出现时,将定时备份的系统数据中的元数据复制至新的系统盘,以使该新的系统盘根据该元数据,自动启动数据加载和版本运行。
具体地,该解耦合模块701包括:判断子模块7011、关系解除子模块7012、格式化子模块7013。
其中,判断子模块7011,设置为判断IPTV系统中是否为双系统盘;关系解除子模块7012,设置为当IPTV系统中为双系统盘时,解除IPTV系统的双系统盘中的第一系统盘与第二系统盘的耦合关系;格式化子模块7013,设置为将第一系统盘格式化后标记为数据盘,将第二系统盘标记为系统盘。
具体地,该关系建立模块702包括:第一进程关闭子模块7021、第三读取子模块7022、分区子模块7023、第一关系建立子模块7024。
其中,第一进程关闭子模块7021,设置为关闭对IPTV系统的使用进程;第三读取子模块7022,设置为读取该配置文件中预存储的第二配置参数,该预存储的第二配置参数至少包括:数据盘的分区个数、分区大小、格式化格式和挂载路径中的一种或多种;分区子模块7023,设置为根据预存储的第二配置参数,对数据盘进行分区,修改IPTV系统中默认的数据存盘路径;第一关系建立子模块7024,设置为在IPTV系统重新启动之后,建立数据盘与系统盘之间的挂载关系。
具体地,该关系建立模块702包括:第二进程关闭子模块7025、第四读取子模块7026、第二关系建立子模块7027。
其中,第二进程关闭子模块7025,设置为关闭对IPTV系统的使用进程;第四读取子模块7026,设置为读取该配置文件中预存储的第三配置参数,该预存储的第三配置参数至少包括:数据盘的分区个数、分区大小、格式化格式、系统盘的数据迁移路径、和数据盘的软连接目录中的一种或多种;第二关系建立子模块7027,设置为根据预存储的第三配置参数,对该数据盘进行分区,并在IPTV系统重新启动之后,建立数据盘与系统盘之间的软连接关系。
本发明实施例中的上述方案里,在现有技术的双系统盘的前提下,解耦合两个系统盘,使之变为独立的系统盘和数据盘,采用独立数据盘的方式来分担系统盘IO压力,利用非RAID的方式,增强系统对数据文件的容错能力,减少系统盘的数据负载量,保证系统的正常运行能力。
本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。
尽管已描述了本发明实施例的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明实施例范围的所有变更和修改。
最后,还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者终端设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者终端设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者终端设备中还存在另外的相同要素。
以上所述的是本发明的优选实施方式,应当指出对于本技术领域的普通人员来说,在不脱离本发明所述的原理前提下还可以作出若干改进和润饰,这些改进和润饰也在本发明的保护范围内。
工业实用性
本发明实施例提供的上述技术方案,可以应用于数据存储负载的容错过程中,通过引入双系统盘解耦合为独立系统盘和数据盘的方案,尤其针对IPTV业务数据在负载比较重的情况下,独立数据盘会降低系统由于数据负载重而导致系统存在的不稳定性,将系统数据存储在数据盘中来减少系统盘的数据负载量,利用解耦合之后得到的数据盘中存储的内容在当系统出现问题时,对系统进行容错处理,从而提高了系统的处理能力,提升 系统的可靠性及整体性能。

Claims (14)

  1. 一种数据存储负载的容错方法,应用于具有双系统盘的IPTV系统,所述方法包括:
    将所述双系统盘解耦合为独立的系统盘和数据盘;
    将所述数据盘分区挂载或软连接至所述系统盘,并将与所述数据盘及所述系统盘相关的第一配置参数分别记录到配置文件中;
    根据所述配置文件,将所述IPTV系统使用过程中产生的系统数据存储至所述数据盘;
    在检测到IPTV系统出现故障时,根据所述配置文件,利用所述数据盘中存储的系统数据进行容错处理。
  2. 根据权利要求1所述的容错方法,其中,所述方法还包括:
    在所述配置文件中配置定时任务,所述定时任务包括:定时检测数据盘异常的任务、定时检测系统盘的任务以及定时备份元数据和业务数据的任务中的一种或多种。
  3. 根据权利要求1所述的容错方法,其中,所述在检测到IPTV系统出现故障时,根据所述配置文件,利用所述数据盘中存储的系统数据进行容错处理,包括:
    检测所述数据盘的工作状态;
    当所述数据盘内数据存储量达到预设最大值或所述数据盘处于异常状态时,读取配置文件中记录的第一数据存储路径,以使所述IPTV系统中后续的系统数据存储至所述系统盘;
    当检测到所述IPTV系统中有新的数据盘出现时,读取配置文件中记录的第二数据存储路径,以使所述IPTV系统中后续的系统数据 存储至所述新的数据盘。
  4. 根据权利要求3所述的容错方法,其中,所述在检测到IPTV系统出现故障时,根据所述配置文件,利用所述数据盘中存储的系统数据进行容错处理,还包括:
    检测所述系统盘的工作状态;
    当所述系统盘处于异常状态时,检测所述IPTV系统内是否有新的系统盘出现;
    当所述IPTV系统内有新的系统盘出现时,将定时备份的所述系统数据中的元数据复制至所述新的系统盘,以使所述新的系统盘根据所述元数据,自动启动数据加载和版本运行。
  5. 根据权利要求1所述的容错方法,其中,所述将所述双系统盘解耦合为独立的系统盘和数据盘,包括:
    判断所述IPTV系统中是否为双系统盘;
    当所述IPTV系统中为双系统盘时,解除所述IPTV系统的双系统盘中的第一系统盘与第二系统盘的耦合关系;
    将所述第一系统盘格式化后标记为所述数据盘,将所述第二系统盘标记为所述系统盘。
  6. 根据权利要求1所述的容错方法,其中,所述将所述数据盘分区挂载或软连接至所述系统盘,包括:
    关闭对所述IPTV系统的使用进程;
    读取所述配置文件中预存储的第二配置参数,所述预存储的第二配置参数至少包括:所述数据盘的分区个数、分区大小、格式化格式 和挂载路径中的一种或多种;
    根据所述预存储的第二配置参数,对所述数据盘进行分区,修改所述IPTV系统中默认的数据存盘路径;
    在所述IPTV系统重新启动之后,建立所述数据盘与所述系统盘之间的挂载关系。
  7. 根据权利要求1所述的容错方法,其中,所述将所述数据盘分区挂载或软连接至所述系统盘,包括:
    关闭对所述IPTV系统的使用进程;
    读取所述配置文件中预存储的第三配置参数,所述预存储的第三配置参数至少包括:所述数据盘的分区个数、分区大小、格式化格式、所述系统盘的数据迁移路径、和所述数据盘的软连接目录中的一种或多种;
    根据所述预存储的第三配置参数,对所述数据盘进行分区,并在所述IPTV系统重新启动之后,建立所述数据盘与所述系统盘之间的软连接关系。
  8. 一种IPTV系统,所述系统具有双系统盘,所述系统还包括:
    解耦合模块,设置为将所述双系统盘解耦合为独立的系统盘和数据盘;
    关系建立模块,设置为将所述数据盘分区挂载或软连接至所述系统盘,并将与所述数据盘及所述系统盘相关的第一配置参数分别记录到配置文件中;
    存储模块,设置为根据所述配置文件,将所述IPTV系统使用过程中产生的系统数据存储至所述数据盘;
    容错处理模块,设置为在检测到IPTV系统出现故障时,根据所述配置文件,利用所述数据盘中存储的系统数据进行容错处理。
  9. 根据权利要求8所述的IPTV系统,其中,所述系统还包括:
    配置模块,设置为在所述配置文件中配置定时任务,所述定时任务包括:定时检测数据盘异常的任务、定时检测系统盘的任务以及定时备份元数据和业务数据的任务中的一种或多种。
  10. 根据权利要求8所述的IPTV系统,其中,所述容错处理模块包括:
    第一检测子模块,设置为检测所述数据盘的工作状态;
    第一读取子模块,设置为当所述数据盘内数据存储量达到预设最大值或所述数据盘处于异常状态时,读取配置文件中记录的第一数据存储路径,以使所述IPTV系统中后续的系统数据存储至所述系统盘;
    第二读取子模块,设置为当检测到所述IPTV系统中有新的数据盘出现时,读取配置文件中记录的第二数据存储路径,以使所述IPTV系统中后续的系统数据存储至所述新的数据盘。
  11. 根据权利要求10所述的IPTV系统,其中,所述容错处理模块还包括:
    第二检测子模块,设置为检测所述系统盘的工作状态;
    第三检测子模块,设置为当所述系统盘处于异常状态时,检测所述IPTV系统内是否有新的系统盘出现;
    复制子模块,设置为当所述IPTV系统内有新的系统盘出现时,将定时备份的所述系统数据中的元数据复制至所述新的系统盘,以使所述新的系统盘根据所述元数据,自动启动数据加载和版本运行。
  12. 根据权利要求8所述的IPTV系统,其中,所述解耦合模块包括:
    判断子模块,设置为判断所述IPTV系统中是否为双系统盘;
    关系解除子模块,设置为当所述IPTV系统中为双系统盘时,解除所述IPTV系统的双系统盘中的第一系统盘与第二系统盘的耦合关系;
    格式化子模块,设置为将所述第一系统盘格式化后标记为所述数据盘,将所述第二系统盘标记为所述系统盘。
  13. 根据权利要求8所述的IPTV系统,其中,所述关系建立模块包括:
    第一进程关闭子模块,设置为关闭对所述IPTV系统的使用进程;
    第三读取子模块,设置为读取所述配置文件中预存储的第二配置参数,所述预存储的第二配置参数至少包括:所述数据盘的分区个数、分区大小、格式化格式和挂载路径中的一种或多种;
    分区子模块,设置为根据所述预存储的第二配置参数,对所述数据盘进行分区,修改所述IPTV系统中默认的数据存盘路径;
    第一关系建立子模块,设置为在所述IPTV系统重新启动之后,建立所述数据盘与所述系统盘之间的挂载关系。
  14. 根据权利要求8所述的IPTV系统,其中,所述关系建立模块包括:
    第二进程关闭子模块,设置为关闭对所述IPTV系统的使用进程;
    第四读取子模块,设置为读取所述配置文件中预存储的第三配置 参数,所述预存储的第三配置参数至少包括:所述数据盘的分区个数、分区大小、格式化格式、所述系统盘的数据迁移路径、和所述数据盘的软连接目录中的一种或多种;
    第二关系建立子模块,设置为根据所述预存储的第三配置参数,对所述数据盘进行分区,并在所述IPTV系统重新启动之后,建立所述数据盘与所述系统盘之间的软连接关系。
PCT/CN2016/109077 2015-12-11 2016-12-08 一种数据存储负载的容错方法及iptv系统 WO2017097233A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510920875.8A CN106874141A (zh) 2015-12-11 2015-12-11 一种数据存储负载的容错方法及iptv系统
CN201510920875.8 2015-12-11

Publications (1)

Publication Number Publication Date
WO2017097233A1 true WO2017097233A1 (zh) 2017-06-15

Family

ID=59012559

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/109077 WO2017097233A1 (zh) 2015-12-11 2016-12-08 一种数据存储负载的容错方法及iptv系统

Country Status (2)

Country Link
CN (1) CN106874141A (zh)
WO (1) WO2017097233A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113110955A (zh) * 2021-04-15 2021-07-13 山东英信计算机技术有限公司 一种系统盘修复方法、存储介质及设备
CN113806107A (zh) * 2021-08-25 2021-12-17 济南浪潮数据技术有限公司 一种对象拷贝方法、装置、设备及存储介质

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109213429B (zh) * 2017-06-30 2021-07-23 伊姆西Ip控股有限责任公司 存储管理方法和设备
CN112770148A (zh) * 2019-10-21 2021-05-07 海信视像科技股份有限公司 显示设备、数据查询方法及数据存储方法
CN111782439B (zh) * 2020-07-09 2023-06-06 河北工业大学 一种基于水平编码的双盘循环校验方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101668224A (zh) * 2009-09-21 2010-03-10 中兴通讯股份有限公司 用于网络电视应急的方法及系统
CN102103533A (zh) * 2011-02-25 2011-06-22 华中科技大学 一种双盘容错磁盘阵列中单盘重构的方法
CN102841863A (zh) * 2012-07-10 2012-12-26 上海德拓信息技术有限公司 采用双硬盘读写操作的数据备援方法
CN104407931A (zh) * 2014-10-28 2015-03-11 国云科技股份有限公司 一种获取虚拟机损坏系统盘镜像的方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101668224A (zh) * 2009-09-21 2010-03-10 中兴通讯股份有限公司 用于网络电视应急的方法及系统
CN102103533A (zh) * 2011-02-25 2011-06-22 华中科技大学 一种双盘容错磁盘阵列中单盘重构的方法
CN102841863A (zh) * 2012-07-10 2012-12-26 上海德拓信息技术有限公司 采用双硬盘读写操作的数据备援方法
CN104407931A (zh) * 2014-10-28 2015-03-11 国云科技股份有限公司 一种获取虚拟机损坏系统盘镜像的方法

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113110955A (zh) * 2021-04-15 2021-07-13 山东英信计算机技术有限公司 一种系统盘修复方法、存储介质及设备
CN113110955B (zh) * 2021-04-15 2022-12-27 山东英信计算机技术有限公司 一种系统盘修复方法、存储介质及设备
CN113806107A (zh) * 2021-08-25 2021-12-17 济南浪潮数据技术有限公司 一种对象拷贝方法、装置、设备及存储介质
CN113806107B (zh) * 2021-08-25 2024-02-13 济南浪潮数据技术有限公司 一种对象拷贝方法、装置、设备及存储介质

Also Published As

Publication number Publication date
CN106874141A (zh) 2017-06-20

Similar Documents

Publication Publication Date Title
WO2017097233A1 (zh) 一种数据存储负载的容错方法及iptv系统
US7698592B2 (en) Apparatus and method for controlling raid array rebuild
US7613946B2 (en) Apparatus, system, and method for recovering a multivolume data set
WO2018098972A1 (zh) 一种日志恢复方法、存储装置和存储节点
WO2012075845A1 (zh) 分布式文件系统
TW201324130A (zh) 複數個磁碟陣列系統之資料儲存方法及資料儲存系統
US7975171B2 (en) Automated file recovery based on subsystem error detection results
US20040103246A1 (en) Increased data availability with SMART drives
CN105183581A (zh) 一种数据库容灾系统
JP2007334593A (ja) Raidコントローラおよびraid装置
US10503620B1 (en) Parity log with delta bitmap
WO2014101412A1 (zh) 一种磁盘重构方法及其装置
US20100287338A1 (en) Selective mirroring method
JP2006059347A (ja) ジャーナリングを使用した記憶システム
WO2010139245A1 (zh) 一种读写存储卡的方法及装置
WO2024113685A1 (zh) 一种raid阵列的数据恢复方法及相关装置
CN111984365B (zh) 一种虚拟机虚拟磁盘双活实现方法及系统
WO2021088367A1 (zh) 数据恢复方法及相关设备
JP6540334B2 (ja) システム、情報処理装置、および情報処理方法
US20130086413A1 (en) Fast i/o failure detection and cluster wide failover
US20060215456A1 (en) Disk array data protective system and method
JPH09269871A (ja) ディスクアレイ装置におけるデータ再冗長化方式
US7529776B2 (en) Multiple copy track stage recovery in a data storage system
US10664346B2 (en) Parity log with by-pass
US20090177916A1 (en) Storage system, controller of storage system, control method of storage system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16872422

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16872422

Country of ref document: EP

Kind code of ref document: A1