CN117215597A - Method for realizing DRBD (digital video broadcasting device) adaptation to multiple operating system kernels - Google Patents

Method for realizing DRBD (digital video broadcasting device) adaptation to multiple operating system kernels Download PDF

Info

Publication number
CN117215597A
CN117215597A CN202311093367.8A CN202311093367A CN117215597A CN 117215597 A CN117215597 A CN 117215597A CN 202311093367 A CN202311093367 A CN 202311093367A CN 117215597 A CN117215597 A CN 117215597A
Authority
CN
China
Prior art keywords
drbd
kernel
deployment
node
resource
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311093367.8A
Other languages
Chinese (zh)
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.)
Inspur Cloud Information Technology Co Ltd
Original Assignee
Inspur Cloud 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 Inspur Cloud Information Technology Co Ltd filed Critical Inspur Cloud Information Technology Co Ltd
Priority to CN202311093367.8A priority Critical patent/CN117215597A/en
Publication of CN117215597A publication Critical patent/CN117215597A/en
Pending legal-status Critical Current

Links

Abstract

The invention provides a method for realizing the adaptation of a DRBD to a plurality of operating system kernels, which belongs to the field of container cloud platforms. The method and the device support automatic deployment of the DRBD through the component script, support automatic identification of different operating system kernels, and automatically execute adaptation operation according to the different kernels, ensure that the DRBD can be successfully deployed, and realize adaptation of the DRBD to a plurality of operating system kernels.

Description

Method for realizing DRBD (digital video broadcasting device) adaptation to multiple operating system kernels
Technical Field
The invention relates to the related technical fields of DRBD, container cloud platform and the like, in particular to a method for realizing the adaptation of DRBD to a plurality of operating system kernels.
Background
With the development of cloud computing services, it is becoming more and more common to deploy applications on the cloud, and a cloud service platform is used as an environment for running an application container on the cloud, so that a high-availability and high-reliability environment needs to be provided for clients. The data is used as the basis of application operation, and the security and integrity of the data are particularly important in the process of realizing high availability. The backup of the data is done, so that the data can be quickly recovered when the application fails, and the backup is one of the key means for supporting high availability.
The DRBD technology is a technology supporting high reliability of storage, and ensures data backup to other nodes by using a data synchronization mode, when a main node is down, the main node and the standby node can be automatically and quickly switched to the standby node and continue to provide services to the outside through main-standby switching, so that the loss of data is reduced, and the service interruption time is shortened.
DRBD is run in the form of a kernel module in the kernel of the node host, and thus, conditions and operation procedures required for DRBD installation and deployment may be different in environments of different operating system kernels. In order to enable users to deploy and use DRBD in the same manner in the environments of different operating system kernels, without having to consider operational differences, it is an important condition to implement the adaptation of DRBD to multiple operating system kernels.
At present, the DRBD is deployed in the environments of different operating system kernels to solve the problem of adaptation, and a uniform deployment scheme does not exist.
Disclosure of Invention
In order to solve the technical problems, the invention provides a method for realizing the adaptation of a DRBD to a plurality of operating system kernels. The method and the device support automatic deployment of the DRBD through the component script, support automatic identification of different operating system kernels, and automatically execute adaptation operation according to the different kernels, ensure that the DRBD can be successfully deployed, and realize adaptation of the DRBD to a plurality of operating system kernels.
The method can support the preparation of the kernel version and the required environment of the automatic detection node operating system, support the automatic compiling and loading of the DRBD kernel module and the automatic installation of the DRBD-Utils through a dock container, and support the automatic flushing of the DRBD configuration through a resource definition file to start the DRBD data synchronization service, thereby removing the environmental influence and realizing the deployment and use of the DRBD in different operating system kernel environments.
The technical scheme of the invention is as follows:
a method for realizing the adaptation of a DRBD to a plurality of operating system kernels comprises the steps of automatically detecting the preparation of kernel versions and required environments of node operating system kernels, automatically compiling and loading a DRBD kernel module and automatically installing a DRBD-Utils through a dock container, automatically brushing a resource definition file into a DRBD configuration to start a DRBD data synchronization service, and realizing the automatic flow from the DRBD deployment to the use on the environments of different operating system kernels.
Further, the method comprises the steps of,
preparation of the automation detection node operating system kernel versions and the required environment is supported, including but not limited to 3.10, 4.15, 4.19, 5.4, 5.10, 5.14.
Further, the method comprises the steps of,
preparation of the kernel version of the automated inspection node operating system and the required environment is supported, including but not limited to installation of development packages of kernel, kernel-level, kernel-tools-libs, etc.
Further, the method comprises the steps of,
and supporting automatic compiling and loading of the DRBD kernel module and automatic installation of the DRBD-Utils through a dock container, wherein when the kernel module is compiled, the environments of the ubuntu, uos and kulin systems use DRBD-bionic mirror image starting containers, and the environments of the centOS system use DRBD-centOS7 mirror image starting containers.
Further, the method comprises the steps of,
the DRBD data synchronization service is supported to be started through automatic flushing of the DRBD configuration by a resource definition file, wherein relevant parameters in the resource definition file comprise, but are not limited to, resource names, synchronization protocols, DRBD device paths to be mapped, device mounting points and node peer-to-peer information for configuring DRBD resources, and the node peer-to-peer information comprises, but is not limited to, node ids, node names, physical disks for underlying storage of the DRBD resources, whether the node is a master node, ip addresses of the nodes and the like.
Further, the method comprises the steps of,
and supporting the automatic flushing of the DRBD configuration through the resource definition file to start the DRBD data synchronization service, rendering the configuration file only at the opposite node of the resource definition, and refreshing the configuration.
The invention has the beneficial effects that
The invention supports the preparation of the kernel version and the required environment of the automatic detection node operating system, the automatic compiling and loading of the DRBD kernel module through a dock container and the automatic installation of the DRBD-Utils, and the automatic flushing of the DRBD configuration through a resource definition file to start the DRBD data synchronization service. In particular, the method comprises the steps of,
1. the method supports the preparation of the kernel version and the required environment of the automatic detection node operating system, installs the environment conditions necessary for compiling the DRBD kernel module such as a kernel development kit and the like, and ensures that the DRBD kernel module can be successfully compiled and loaded in different kernel environments.
2. Supporting the automatic compiling and loading of the DRBD kernel module and the installation of the DRBD-Utils through a dock container. And the advantage of the dock container is utilized, and the corresponding mirror image operation dock container is selected in different environments, so that the management and the operation are convenient.
3. Supporting automatic flushing of DRBD configuration by resource definition files to initiate DRBD data synchronization services. By combining the two points, the automatic flow from deployment to use can be realized, the manual operation is simplified, and the cost for using the DRBD is reduced.
Drawings
Fig. 1 is a schematic of the workflow of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments, and all other embodiments obtained by those skilled in the art without making any inventive effort based on the embodiments of the present invention are within the scope of protection of the present invention.
With the development of cloud computing services, more and more important services have been deployed to run on the cloud. In order to guarantee high reliability of cloud services, security of cloud data is an important ring. The DRBD technology is a technology supporting high reliability of local storage, and ensures data backup to other nodes by using a data synchronization mode.
The invention provides a method for realizing the adaptation of a DRBD to a plurality of operating system kernels, which mainly comprises the following three parts:
(1) Environmental detection and preparation: and aiming at different operating system kernels, performing differentiated operation, and detecting and preparing environmental conditions required by DRBD deployment. In particular, the method comprises the steps of,
a. operating system kernel versions used by the query environment include, but are not limited to, 3.10, 4.15, 4.19, 5.4, 5.10, 5.14.
b. Check if the required kernel development packages have been installed, including but not limited to kernel, kernel-level, kernel-tools-libs, etc. development packages.
If the corresponding development kit is installed, detecting whether the version of the installed development kit is consistent with the kernel version. If the deployment environments are consistent, preparing the deployment environments; if the two types of the development kits are inconsistent, the environment is regarded as the environment without the corresponding development kit, and further processing is needed.
c. A kernel development kit corresponding to the kernel version of the operating system is installed.
When the corresponding kernel development kit needs to be installed, the process is completed by offline installation of deb/rpm offline files of the kernel development kit. Preparing required offline files into different images in advance, such as a central-central image, and automatically pulling the corresponding images when the installation is required, so as to finish the corresponding installation; and the mirror image is not additionally pulled without installation, so that the storage resources of the corresponding machine nodes are saved.
After the steps are finished, the detection and preparation of the DRBD deployment environment are finished.
(2) Deployment of DRBD: the DRBD deployment comprises the compiling and loading of a DRBD kernel module and the installation of a DRBD-Utils. The compiling deployment of the DRBD kernel module can be carried out in different environments by using the same dockerrun command through running the docker container, and only the corresponding docker deployment mirror image is selected among different systems, so that the management and the use are convenient. In particular, the method comprises the steps of,
a. the operating system type of the deployment environment is checked, including but not limited to ubuntu, uos, kylin, centOS, openEuler, etc. the mainstream linux operating system is commonly available on the market.
And b, compiling and loading the DRBD kernel module.
And aiming at different operating systems, running corresponding dock containers to perform compiling operation of the DRBD kernel module, wherein the environments of the ubuntu, uos and kylin systems use DRBD-bionic mirror image starting containers, the environment of the centOS system uses DRBD-centOS7 mirror image starting containers, the openeuler system uses DRBD-flag mirror image starting containers and the like. After the container is started, the kernel compiling is automatically executed, and after the compiling is completed, the kernel is loaded into the system kernel through a modprobe to provide service.
After the above steps are completed, the drbd kernel module can be used, but cannot be operated, and further installation and deployment of drbd-utetails are required.
Installation of drbd-ntils. DRBD-ntils are tools for managing the operation of DRBD. To adapt to different operating system kernel environments, the drbd-uteis tool is compiled using the dock container as well. By running the docker container, the runnable binary file of drbd-uteis compiled statically and mapped to the node through the soft connection, so that the command related to drbd operation including drbdadm and the like can be executed on the node.
After the above steps are finished, DRBD deployment is finished, DRBD in the machine can be normally installed and used, and next resources need to be imported to start DRBD service.
(3) Resource import of DRBD: after drbd is deployed, the resources of drbd need to be defined to determine which directories need to be backed up by drbd for synchronization to enable the function of drbd.
The method prepares related DRBD resource definition files in advance before deployment, automatically introduces related definition resources after completing the deployment of DRBD, and starts a DRBD data synchronization function by brushing related configuration files in a master node and a slave node using DRBD data synchronization. In particular, the method comprises the steps of,
a. a file defining DRBD resources is prepared.
The related parameters of the DRBD resource need to be defined in the required resource file include, but are not limited to, resource names, synchronization protocols, DRBD device paths to be mapped, device mounting points and node peer-to-peer information for configuring the DRBD resource, wherein the node pair information includes, but is not limited to, node ids, node names, physical disks for underlying storage of the DRBD resource, whether the node is a master node, an ip address of the node and the like.
b. And reading node information defined by the resources, and logging in the corresponding two opposite end nodes to perform resource writing operation. For nodes that do not do resource definition, no operations need to be performed.
c. And respectively analyzing the resource definition files at the two opposite end nodes, packaging the resource definition files into templates of the DRBD resource configuration files, and placing the configuration files after rendering into paths of the corresponding DRBD configuration files.
d. Logging in the drbd master node defined by the resource file, entering a resource configuration file path, and writing in a primary file to define the node as the master resource of the drbd resource.
e. And refreshing the DRBD configuration through a drbdadm command, and mounting a corresponding storage path of the DRBD, thereby starting the backup synchronization service of the related resources.
(4) Upgrading of DRBD: when the relevant kernel module is loaded in the environment, the drbd upgrading operation can be directly performed by using the method. In particular, the method comprises the steps of,
a. and (5) environment detection and preparation. This step is consistent with deployment.
Deployment of drbd. And acquiring version information of the drbd kernel module deployed in the node through the modinfo command, and comparing the version information with the drbd kernel version to be upgraded. If the installed version is lower than the new version to be updated, executing a drbd deployment process, wherein the operation steps are consistent with deployment; if the installed version is higher than the version to be updated, no operation is performed, and the stability of the environment drbd kernel version is maintained.
And c, importing resources of DRBD. If the drbd kernel is updated, the drbd related resources need to be refreshed again by executing the drbdadm related command, so that corresponding services are provided.
By the technical scheme, the DRBD can be deployed and used in the environments of different operating system kernels by using the same deployment method, and the DRBD service is automatically deployed and corresponding service flows are started without additional manual intervention in the process.
The foregoing description is only illustrative of the preferred embodiments of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims (10)

1. A method for realizing DRBD adapting to a plurality of operating system kernels is characterized in that,
and automatically detecting the kernel version of the node operating system and the preparation of the required environment, automatically compiling and loading the kernel module of the DRBD through a dock container, automatically installing the DRBD-Utils, automatically brushing the DRBD configuration through a resource definition file, and starting the DRBD data synchronization service to realize the automatic flow of the DRBD deployment to use on the environments of different operating system kernels.
2. The method of claim 1, wherein the step of determining the position of the substrate comprises,
the environment detection and preparation specifically comprises:
1) Automating the preparation of the node operating system kernel versions and the required environment, the supported operating system kernel versions including 3.10, 4.15, 4.19, 5.4, 5.10, 5.14;
2) Automatically detecting the preparation of the kernel version of the node operating system and the required environment, wherein the preparation of the environment comprises the installation of kernel, kernel-level, kernel-tools and kernel-tools-libs;
3) A kernel development kit corresponding to the kernel version of the operating system is installed.
3. The method of claim 2, wherein the step of determining the position of the substrate comprises,
if the corresponding development kit is installed, detecting whether the version of the installed development kit is consistent with the kernel version;
if the deployment environments are consistent, preparing the deployment environments;
if the two types of the development kits are inconsistent, the environment is regarded as the environment without the corresponding development kit, and further processing is needed.
4. The method of claim 3, wherein the step of,
loading a DRBD kernel module through automated compiling of a dock container and automatically installing a DRBD-Utils;
the compiling deployment of the DRBD kernel module can be carried out in different environments by using the same dockerrun command through running the docker container, and only the corresponding docker deployment mirror image is needed to be selected among different systems.
5. The method of claim 4, wherein the step of determining the position of the first electrode is performed,
the deployment of the DRBD comprises the following steps:
a. checking the type of an operating system of the deployment environment;
compiling and loading a DRBD kernel module;
installation of drbd-ntils.
6. The method of claim 5, wherein the step of determining the position of the probe is performed,
when the kernel module is compiled, the environments of the ubuntu, uos and kylin systems use drbd-bionic mirror image starting containers, and the environments of the centOS system use drbd-centOS7 mirror image starting containers; the openeuler system uses drbd-flacter mirror image to start the container; after the container is started, the kernel compiling is automatically executed, and after the compiling is completed, the kernel is loaded into the system kernel through a modprobe to provide service;
after the above steps are completed, the drbd kernel module can be used, but cannot be operated, and further installation and deployment of drbd-utetails are required.
7. The method of claim 6, wherein the step of providing the first layer comprises,
compiling and running a drbd-utils tool by using a mode of a docker container; by running the docker container, the runnable binary file of drbd-uteis compiled statically and mapped to the node through soft connection, so that the command related to drbd operation can be executed on the node.
8. The method of claim 1, wherein the step of determining the position of the substrate comprises,
after drbd is deployed, the resource of the drbd needs to be defined to determine the directory which needs to be backed up and synchronized through the drbd, so as to enable the function of the drbd;
related DRBD resource definition files are prepared in advance before deployment, related definition resources are automatically introduced after the DRBD deployment is completed, related configuration files are brushed into a master node and a slave node which use DRBD data synchronization, and a DRBD data synchronization function is started.
9. The method of claim 8, wherein the step of determining the position of the first electrode is performed,
automatically brushing a DRBD configuration to start a DRBD data synchronization service through a resource definition file, rendering a configuration file only at a corresponding node defined by the resource, and refreshing the configuration;
preparing a relevant DRBD resource definition file, including
a. Relevant parameters in the resource definition file;
b. reading node information defined by resources, and logging in corresponding two opposite end nodes to perform resource writing operation; for nodes which are not subjected to resource definition, no operation is required to be executed;
c. analyzing the resource definition files at two opposite end nodes respectively, packaging the resource definition files into templates of DRBD resource configuration files, and placing the configuration files after rendering into paths of corresponding DRBD configuration files;
d. logging in a drbd master node defined by a resource file, entering a resource configuration file path, writing a primary file, and defining the node as a master resource of the drbd resource;
e. and refreshing the DRBD configuration through a drbdadm command, and mounting a corresponding storage path of the DRBD, thereby starting the backup synchronization service of the related resources.
10. The method of claim 9, wherein the step of determining the position of the substrate comprises,
DRBD upgrade: when the related kernel module is loaded in the environment, the method can be used for directly carrying out the upgrading operation of drbd; comprising the steps of (a) a step of,
a. detecting and preparing environment; this step is consistent with deployment;
b, deploying DRBD; acquiring version information of a drbd kernel module deployed in the node through a modinfo command, and comparing the version information with a drbd kernel version to be upgraded; if the installed version is lower than the new version to be updated, executing a drbd deployment process, wherein the operation steps are consistent with deployment; if the installed version is higher than the version to be upgraded, no operation is performed;
c, importing resources of DRBD; if the drbd kernel is updated, the drbd related resources need to be refreshed again by executing the drbdadm related command, so that corresponding services are provided.
CN202311093367.8A 2023-08-29 2023-08-29 Method for realizing DRBD (digital video broadcasting device) adaptation to multiple operating system kernels Pending CN117215597A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311093367.8A CN117215597A (en) 2023-08-29 2023-08-29 Method for realizing DRBD (digital video broadcasting device) adaptation to multiple operating system kernels

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311093367.8A CN117215597A (en) 2023-08-29 2023-08-29 Method for realizing DRBD (digital video broadcasting device) adaptation to multiple operating system kernels

Publications (1)

Publication Number Publication Date
CN117215597A true CN117215597A (en) 2023-12-12

Family

ID=89045316

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311093367.8A Pending CN117215597A (en) 2023-08-29 2023-08-29 Method for realizing DRBD (digital video broadcasting device) adaptation to multiple operating system kernels

Country Status (1)

Country Link
CN (1) CN117215597A (en)

Similar Documents

Publication Publication Date Title
US11137991B2 (en) Installation of software onto a computer
CA2481712C (en) A software distribution method and system
US9465625B2 (en) Provisioning of operating environments on a server in a networked environment
US10922067B1 (en) System and method for installing, updating and uninstalling applications
JP5535484B2 (en) Automated software testing framework
US8010504B2 (en) Increasing application availability during automated enterprise deployments
US20070169101A1 (en) Multi-Branch Management for Updating Software
JPH076026A (en) Method for guarantee of interchangeablity of configuration management and component and method for exclusion of non- interchangeability of resident software and migration software
US9043781B2 (en) Algorithm for automated enterprise deployments
US9256509B1 (en) Computing environment analyzer
CN110795356B (en) System and method for realizing one-key deployment and automatic test of software based on secure
US20050108704A1 (en) Software distribution application supporting verification of external installation programs
CN113642004A (en) Container mirror image security scanning and repairing method, device and equipment
CN101877655A (en) Network management system, network management server and method
US20210141632A1 (en) Automated software patching for versioned code
CN117290059B (en) Cross-chip architecture linux virtual machine transfer method and system
CN111611160B (en) Software testing method, device, equipment and storage medium
CN107222355B (en) Server upgrading method and device
CN117215597A (en) Method for realizing DRBD (digital video broadcasting device) adaptation to multiple operating system kernels
CN111324496B (en) Method and device for detecting bare metal
CN116185462B (en) Method, system, computer and readable storage medium for front-end application upgrade
CN117389713B (en) Storage system application service data migration method, device, equipment and medium
CN101771573B (en) Method for forecasting business interruption time in software updating process and device therefor
CN116225617A (en) Management migration method and device for container instance, electronic equipment and storage medium
CN112947949A (en) Application program installation method and device and electronic equipment

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