CN116257170A - Batch disk mounting method and device and electronic equipment - Google Patents

Batch disk mounting method and device and electronic equipment Download PDF

Info

Publication number
CN116257170A
CN116257170A CN202111508635.9A CN202111508635A CN116257170A CN 116257170 A CN116257170 A CN 116257170A CN 202111508635 A CN202111508635 A CN 202111508635A CN 116257170 A CN116257170 A CN 116257170A
Authority
CN
China
Prior art keywords
disk
target
mounting
batch
target node
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
CN202111508635.9A
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.)
China Mobile Communications Group Co Ltd
China Mobile Information Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile 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 China Mobile Communications Group Co Ltd, China Mobile Information Technology Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202111508635.9A priority Critical patent/CN116257170A/en
Publication of CN116257170A publication Critical patent/CN116257170A/en
Pending legal-status Critical Current

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/061Improving I/O performance
    • 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/0638Organizing or formatting or addressing of data
    • G06F3/0643Management of files
    • 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]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application relates to the technical field of Internet application, and provides a batch disk mounting method, a batch disk mounting device and electronic equipment. The method comprises the following steps: acquiring access address information of a plurality of nodes of a disk to be mounted; accessing a target node according to the access address information, and determining a target disk which can be mounted in the target node and a target data directory of the disk which needs to be mounted; and mounting the target disk to the target data directory to finish disk mounting of the target node. The batch disk mounting method, the batch disk mounting device and the electronic equipment can realize automatic batch disk mounting of large-scale nodes, are suitable for operation and maintenance of a super-large-scale Hadoop cluster, and can solve the problem of automatic disk mounting of a super-large-scale Hadoop cloud platform.

Description

Batch disk mounting method and device and electronic equipment
Technical Field
The application relates to the technical field of internet application, in particular to a batch disk mounting method and device and electronic equipment.
Background
In the big data era, various data are generated at all times in each industry, how to efficiently calculate and store the massive data becomes a challenge facing to Internet enterprises, so the construction requirement on a super-large-scale Hadoop cloud platform is more and more intense, the increase of cluster scale presents a challenge to the operation and maintenance capability of the platform, in the cluster operation and maintenance process, fault operations such as restarting of machines and disk replacement often occur, and the problem of mass disk mounting becomes the necessary capability of the operation and maintenance of the super-large-scale Hadoop cloud platform.
The prior disk mounting technical scheme often needs a user to log in a host in advance to find configuration information corresponding to the disk to be mounted when mounting the disk, or needs the user to log in each host in advance to configure required related information, so that automatic disk mounting cannot be realized, and the method is not suitable for operation and maintenance of a super-large-scale cluster.
Disclosure of Invention
Aiming at the problems existing in the prior art, the embodiment of the application provides a batch disk mounting method, a batch disk mounting device and electronic equipment.
In a first aspect, an embodiment of the present application provides a method for mounting a batch of magnetic disks, including:
acquiring access address information of a plurality of nodes of a disk to be mounted;
accessing a target node according to the access address information, and determining a target disk which can be mounted in the target node and a target data directory of the disk which needs to be mounted;
and mounting the target disk to the target data directory to finish disk mounting of the target node.
Optionally, the determining the target disk capable of being mounted in the target node includes:
and determining the target disk which can be mounted in the target node according to the information of the available disk in the target node and the information of the mounted disk.
Optionally, the determining the target data directory of the target node where the disk needs to be mounted includes:
and determining a target data directory of the disk to be mounted in the target node according to the disk damage log information in the target node.
Optionally, the mounting the target disk to the target data directory includes:
partitioning and formatting the target disk, and obtaining a UUID (universal unique identifier) of the partitioned and formatted target disk;
writing the UUID into a mount file fstab to update mount equipment corresponding to the target data directory;
and executing a mounting command, and mounting the target disk to the target data directory.
Optionally, after the target node is accessed according to the access address information, the method further includes:
and closing all services of the target node.
Optionally, after the target disk is mounted to the target data directory, the method further includes:
checking whether the target disk is successfully mounted;
and if the target disk is successfully mounted, starting all services of the target node.
Optionally, the method further comprises:
if the target disk is not successfully mounted, restarting the target node, and after restarting the target node, checking whether the target disk is successfully mounted again.
Optionally, the access address information includes internet protocol IP address information.
In a second aspect, an embodiment of the present application provides a batch disk mounting apparatus, including:
the acquisition module is used for acquiring access address information of a plurality of nodes of the disk to be mounted;
the determining module is used for accessing the target node according to the access address information and determining a target disk which can be mounted in the target node and a target data directory of the disk which needs to be mounted;
and the mounting module is used for mounting the target disk to the target data catalog to finish disk mounting of the target node.
In a third aspect, an embodiment of the present application provides an electronic device, including a processor and a memory storing a computer program, where the processor implements the steps of the batch disk mounting method described in the first aspect when executing the program.
In a fourth aspect, embodiments of the present application provide a computer program product comprising a computer program which, when executed by a processor, implements the steps of the batch disk mounting method of the first aspect.
According to the batch disk mounting method, the batch disk mounting device and the electronic equipment, a user can write the access address information of batch nodes of the disk to be mounted into the file, the server running program automatically reads the access address information in the file to remotely access the target node, automatic disk mounting is completed in the target node, and the user does not need to input the information of the disk to be mounted or other information such as mounting instructions corresponding to the disk to be mounted. Compared with the prior art, the disk mounting efficiency is improved, the use method is simple, the automatic batch disk mounting of large-scale nodes can be realized, the method is suitable for the operation and maintenance of the ultra-large-scale Hadoop cluster, and the problem of automatic disk mounting of the ultra-large-scale Hadoop cloud platform can be solved.
Drawings
For a clearer description of the present application or of the prior art, the drawings that are used in the description of the embodiments or of the prior art will be briefly described, it being apparent that the drawings in the description below are some embodiments of the present application, and that other drawings may be obtained from these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a method for mounting a batch of magnetic disks according to an embodiment of the present application;
FIG. 2 is a schematic diagram of an implementation of a batch disk mounting method according to an embodiment of the present disclosure;
FIG. 3 is a schematic structural diagram of a batch disk mounting device according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the present application more apparent, the technical solutions in the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
Fig. 1 is a flow chart of a batch disk mounting method according to an embodiment of the present application. Referring to fig. 1, an embodiment of the present application provides a method for mounting a batch of magnetic disks, which may include the following steps:
step 100, access address information of a plurality of nodes of a disk to be mounted is obtained;
in particular, during the cluster operation and maintenance process, there are frequent machine downtime, restarting, disk replacement and other fault operations, and how to realize automatic mounting of large-scale disks becomes the necessary capability of the ultra-large-scale cluster operation and maintenance.
For convenience of description, in the embodiment of the present application, the method for mounting a batch of magnetic disks is described by taking a super-large-scale Hadoop cloud platform as an example, and of course, those skilled in the art should understand that the method for mounting a batch of magnetic disks provided in the embodiment of the present application may also be applied to other scenarios in which automatic mounting of a batch of magnetic disks needs to be implemented.
The node in the embodiment of the present application may refer to a node in a Hadoop cluster, and may also be referred to as a host, where executing the batch disk mounting method provided in the embodiment of the present application may be a certain node in the cluster, for example, a certain server.
When the condition that batch disk mounting is needed occurs, a user can write access address information of a plurality of nodes of the disk to be mounted into a file, and an application program of a server reads the file to acquire the access address information of the plurality of nodes of the disk to be mounted.
The access address information may include an access address and an access password, where the access address information is used for a server to remotely access a node of the disk to be mounted, and perform a disk mounting operation in the node of the disk to be mounted. Alternatively, the access address information may include internet protocol (Internet Protocol, IP) address information, so that the server may remotely access the node of the disk to be mounted using the acquired IP address and access password of the node of each disk to be mounted.
Step 101, accessing a target node according to access address information, and determining a target disk which can be mounted in the target node and a target data directory of the disk which needs to be mounted;
specifically, after the server obtains access address information of a plurality of nodes of the disk to be mounted, the server can access the nodes of the disk to be mounted one by one according to the sequence to execute disk mounting operation, and for a certain selected target node, after the server remotely accesses the target node, the server needs to determine a target disk which can be mounted in the target node, namely a disk which is not mounted in the available disk, wherein the target disk is generally a newly added disk, for example, a new disk which is replaced after a bad disk appears in the target node; and meanwhile, the target data directory of the disk to be mounted in the target node is required to be determined, wherein the target data directory can be a newly built data directory or a data directory mounted on a bad disk before.
It should be noted that the target disk and the target data directory may be one or more, which is not limited herein. When the target disk or the target data directory is multiple, the mounted disk can be selected according to the disk capacity required by the target data directory, or can be selected arbitrarily, or can be selected in other realizable manners, and the like. For example, the number of target disks is 2, the number of target data directories is 2, when disk mounting is performed, one target disk can be selected for mounting according to the required disk capacity of the first target data directory, and the other target disk is selected for mounting by the second target data directory.
And 102, mounting the target disk to a target data directory to finish disk mounting of the target node.
Specifically, after determining the target disk and the target data directory in the target node, the server may perform operations related to disk mount in the target node, and mount the target disk to the target data directory, thereby completing disk mount of the target node.
And repeating the steps to realize automatic disk mounting of all batch nodes of the disk to be mounted.
According to the batch disk mounting method, a user can write access address information of batch nodes of the disk to be mounted into a file, a server running program automatically reads the access address information in the file to remotely access a target node, automatic disk mounting is completed in the target node, and the user does not need to input the information of the disk to be mounted or other information such as mounting instructions corresponding to the disk to be mounted. Compared with the prior art, the disk mounting efficiency is improved, the use method is simple, the automatic batch disk mounting of large-scale nodes can be realized, the method is suitable for the operation and maintenance of the ultra-large-scale Hadoop cluster, and the problem of automatic disk mounting of the ultra-large-scale Hadoop cloud platform can be solved.
Optionally, determining the target disk capable of being mounted in the target node includes:
and determining the target disk which can be mounted in the target node according to the information of the available disk and the information of the mounted disk in the target node.
Specifically, when determining a target disk that can be mounted in a target node, the server can firstly query information of all disks currently available in the target node and information of the disks that are already mounted normally, and can determine that the disks that are not mounted in the currently available disks are remained, namely the target disk, by comparing the information.
For example, if the system command queries that all disks currently available in the target node include sda1, sda2, sda3, and sdb, and the mounted disk includes sda1, sda2, and sda3, then it may be determined that sdb is the target disk.
Optionally, determining the target data directory of the disk to be mounted in the target node includes:
and determining a target data directory of the disk to be mounted in the target node according to the disk damage log information in the target node.
Specifically, when the server determines that the target data directory of the disk needs to be mounted in the target node, the server may query the disk damage log information in the target node, that is, the log information related to the disk damage, for example, the log file storing the disk damage record, where the data directory mounted on the original bad disk is recorded, and the data directory is the target data directory needing to be mounted with the new disk.
Optionally, mounting the target disk to the target data directory includes:
partitioning and formatting the target disk, and obtaining a UUID (universal unique identifier) of the partitioned and formatted target disk;
writing the UUID into the fstab of the mounting file to update the mounting device corresponding to the target data catalog;
and executing the mounting command to mount the target disk to the target data directory.
Specifically, after determining the target disk, the target disk needs to be partitioned and formatted before being mounted, and after the partitioning and formatting are completed, the universal unique identification code (Universally Unique Identifier, UUID) of the disk after the formatting can be obtained.
Because mount will fail after the host is restarted, disk partition information needs to be written to the/etc/fstab file to have it permanently mounted. Taking the example that a new disk is replaced after a disk is damaged by a node, in an original fstab file, UUIDs of < file systems > corresponding to a target data directory are UUIDs of original bad disks, so that the UUIDs of the target disks after partition and formatting are required to be written into the fstab file to replace the UUIDs of the original bad disks, and mounting equipment corresponding to the target data directory in the fstab file is used as the target disk, so that the target disk is automatically mounted to the target data directory when a host is started every time.
After updating the mount device corresponding to the target data directory in the mount file fstab, the server may further execute a mount command, for example, a mount command, to mount the target disk to the target data directory.
Optionally, after accessing the target node according to the access address information, the method further comprises:
all services of the target node are turned off.
Specifically, to avoid the disk mounting process affecting the program running on the target node, the server may close all services (which may be understood as all system services) of the target node after remotely logging in to access the target node, and then perform disk mounting on the target node.
Optionally, after mounting the target disk to the target data directory, the method further comprises:
checking whether the target disk is successfully mounted;
and if the target disk is successfully mounted, starting all services of the target node.
Specifically, after the server mounts the target disk to the target data directory, it may further check whether the target disk is mounted successfully (may be determined by querying the mounted disk information through a system command), and after it is determined that the target disk is mounted successfully, all services of the target node may be started.
Optionally, the method further comprises:
if the target disk is not successfully mounted, restarting the target node, and after restarting the target node, checking whether the target disk is successfully mounted again.
Specifically, if the server detects that the target disk is not successfully mounted, the target node can be shut down and restarted, after the target node is restarted, whether the target disk is successfully mounted is checked again, if the mounting is successful, all services of the target node are started, otherwise, the disk can be mounted again, the target node is restarted, or error reporting information is returned, and the like.
Fig. 2 is an implementation schematic diagram of a batch disk mounting method provided in an embodiment of the present application, and as shown in fig. 2, the main steps are as follows:
step 200, receiving a node to be mounted, which is transmitted by a user through an application program.
Specifically, the user writes the IP address information (including the access password corresponding to each node) of the batch of nodes to be mounted into a file, and the application program of the server reads the file and sequentially receives the nodes to be mounted which are transmitted by the user.
Step 201, all services of the node are closed.
Specifically, after the server accesses the node to be mounted according to the IP address information, all the services of the node are closed first, so that the influence of the disk mounting process on the program running on the node is avoided.
Step 202, obtaining a disk which can be mounted.
Specifically, the server obtains new disk information that can be mounted by comparing the existing available disk drive with the disk drive that has been mounted normally.
Step 203, obtaining a data directory to be mounted.
Specifically, the server acquires the data directory to be mounted through the disk damage log information.
Step 204, partitioning and formatting the new disk.
Specifically, after the server obtains the information of the new disk that can be mounted, an instruction can be executed to partition and format the new disk that can be mounted.
Step 205, obtaining the uuid of the newly mounted disk, and replacing the old uuid in the/etc/fstab.
Specifically, after the server partitions and formats the new disk, the uuid of the new mounted disk is obtained to replace the uuid of the old disk (i.e. the original bad disk, i.e. the disk on which the data directory needs to be mounted is originally mounted) in the mounted file/etc/fstab.
Step 206, mounting the disk.
Specifically, the server executes the mount instruction to mount the new disk to the data directory to be mounted.
Step 207, checking whether the mounting is successful.
Specifically, the server checks the data directory information to be mounted to determine whether the disk is mounted successfully, if so, step 208 is executed, otherwise, step 209 is executed.
Step 208, starting all services of the node.
Specifically, if the server determines that the disk mounting is successful, all services of the node are started, and the disk mounting of the node is finished.
Step 209, restarting the host.
Specifically, if the server finds that the disk mounting is unsuccessful, restarting the host (namely the node), and after the host is detected to be restarted successfully, rechecking whether the disk to be mounted is mounted successfully or not.
The batch disk mounting device provided in the embodiment of the present application is described below, and the batch disk mounting device described below and the batch disk mounting method described above may be referred to correspondingly.
Fig. 3 is a schematic structural diagram of a batch disk mounting device according to an embodiment of the present application. Referring to fig. 3, an embodiment of the present application provides a batch disk mounting device, which may include:
the acquisition module 300 is configured to acquire access address information of a plurality of nodes of a disk to be mounted;
a determining module 310, configured to access the target node according to the access address information, and determine a target disk that can be mounted in the target node and a target data directory of the disk that needs to be mounted;
and the mounting module 320 is configured to mount the target disk to the target data directory, thereby completing disk mounting of the target node.
Optionally, determining the target disk capable of being mounted in the target node includes:
and determining the target disk which can be mounted in the target node according to the information of the available disk and the information of the mounted disk in the target node.
Optionally, determining the target data directory of the disk to be mounted in the target node includes:
and determining a target data directory of the disk to be mounted in the target node according to the disk damage log information in the target node.
Optionally, mounting the target disk to the target data directory includes:
partitioning and formatting the target disk, and obtaining a UUID (universal unique identifier) of the partitioned and formatted target disk;
writing the UUID into the fstab of the mounting file to update the mounting device corresponding to the target data catalog;
and executing the mounting command to mount the target disk to the target data directory.
Optionally, the determining module 310 is further configured to:
all services of the target node are turned off.
Optionally, the mounting module 320 is further configured to:
checking whether the target disk is successfully mounted;
and if the target disk is successfully mounted, starting all services of the target node.
Optionally, the mounting module 320 is further configured to:
if the target disk is not successfully mounted, restarting the target node, and after restarting the target node, checking whether the target disk is successfully mounted again.
Optionally, the access address information comprises internet protocol, IP, address information.
It should be noted that, the above device provided in this embodiment of the present application can implement all the method steps implemented in the method embodiment and achieve the same technical effects, and detailed descriptions of the same parts and beneficial effects as those of the method embodiment in this embodiment are omitted.
Fig. 4 is a schematic structural diagram of an electronic device provided in an embodiment of the present application, as shown in fig. 4, the electronic device may include: processor 410, communication interface (Communication Interface) 420, memory 430 and communication bus 440, wherein processor 410, communication interface 420 and memory 430 communicate with each other via communication bus 440. Processor 410 may call a computer program in memory 430 to perform the steps of a batch disk mounting method, including, for example: acquiring access address information of a plurality of nodes of a disk to be mounted; accessing a target node according to the access address information, and determining a target disk which can be mounted in the target node and a target data directory of the disk which needs to be mounted; and mounting the target disk to the target data directory to finish disk mounting of the target node.
Further, the logic instructions in the memory 430 described above may be implemented in the form of software functional units and may be stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, embodiments of the present application further provide a computer program product, where the computer program product includes a computer program, where the computer program may be stored on a non-transitory computer readable storage medium, where the computer program when executed by a processor is capable of executing the steps of the batch disk mounting method provided in the foregoing embodiments, where the steps include: acquiring access address information of a plurality of nodes of a disk to be mounted; accessing a target node according to the access address information, and determining a target disk which can be mounted in the target node and a target data directory of the disk which needs to be mounted; and mounting the target disk to the target data directory to finish disk mounting of the target node.
In another aspect, embodiments of the present application further provide a processor readable storage medium storing a computer program, where the computer program is configured to cause a processor to execute the steps of the batch disk mounting method provided in the foregoing embodiments, for example, including: acquiring access address information of a plurality of nodes of a disk to be mounted; accessing a target node according to the access address information, and determining a target disk which can be mounted in the target node and a target data directory of the disk which needs to be mounted; and mounting the target disk to the target data directory to finish disk mounting of the target node.
The processor-readable storage medium may be any available medium or data storage device that can be accessed by a processor, including, but not limited to, magnetic storage (e.g., floppy disks, hard disks, magnetic tape, magneto-optical disks (MOs), etc.), optical storage (e.g., CD, DVD, BD, HVD, etc.), semiconductor storage (e.g., ROM, EPROM, EEPROM, nonvolatile storage (NAND FLASH), solid State Disk (SSD)), and the like.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and are not limiting thereof; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the corresponding technical solutions.

Claims (11)

1. A batch disk mounting method is characterized by comprising the following steps:
acquiring access address information of a plurality of nodes of a disk to be mounted;
accessing a target node according to the access address information, and determining a target disk which can be mounted in the target node and a target data directory of the disk which needs to be mounted;
and mounting the target disk to the target data directory to finish disk mounting of the target node.
2. The batch disk mounting method according to claim 1, wherein the determining the target disk mountable in the target node includes:
and determining the target disk which can be mounted in the target node according to the information of the available disk in the target node and the information of the mounted disk.
3. The batch disk mounting method according to claim 1, wherein the determining the target data directory of the target node on which the disk needs to be mounted includes:
and determining a target data directory of the disk to be mounted in the target node according to the disk damage log information in the target node.
4. The batch disk mounting method of claim 1 wherein said mounting said target disk to said target data directory comprises:
partitioning and formatting the target disk, and obtaining a UUID (universal unique identifier) of the partitioned and formatted target disk;
writing the UUID into a mount file fstab to update mount equipment corresponding to the target data directory;
and executing a mounting command, and mounting the target disk to the target data directory.
5. The batch disk mounting method according to claim 1, wherein after the target node is accessed according to the access address information, the method further comprises:
and closing all services of the target node.
6. The batch disk mounting method of claim 5 wherein after mounting the target disk to the target data directory, the method further comprises:
checking whether the target disk is successfully mounted;
and if the target disk is successfully mounted, starting all services of the target node.
7. The batch disk mounting method of claim 6, further comprising:
if the target disk is not successfully mounted, restarting the target node, and after restarting the target node, checking whether the target disk is successfully mounted again.
8. The batch disk mounting method of any one of claims 1 to 7 wherein the access address information includes internet protocol, IP, address information.
9. A batch disk mounting apparatus, comprising:
the acquisition module is used for acquiring access address information of a plurality of nodes of the disk to be mounted;
the determining module is used for accessing the target node according to the access address information and determining a target disk which can be mounted in the target node and a target data directory of the disk which needs to be mounted;
and the mounting module is used for mounting the target disk to the target data catalog to finish disk mounting of the target node.
10. An electronic device comprising a processor and a memory storing a computer program, characterized in that the processor implements the steps of the batch disk mounting method of any one of claims 1 to 8 when executing the computer program.
11. A computer program product comprising a computer program, characterized in that the computer program when executed by a processor implements the steps of the batch disk mounting method of any one of claims 1 to 8.
CN202111508635.9A 2021-12-10 2021-12-10 Batch disk mounting method and device and electronic equipment Pending CN116257170A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111508635.9A CN116257170A (en) 2021-12-10 2021-12-10 Batch disk mounting method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111508635.9A CN116257170A (en) 2021-12-10 2021-12-10 Batch disk mounting method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN116257170A true CN116257170A (en) 2023-06-13

Family

ID=86686734

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111508635.9A Pending CN116257170A (en) 2021-12-10 2021-12-10 Batch disk mounting method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN116257170A (en)

Similar Documents

Publication Publication Date Title
CN112131099B (en) Version upgrading test method and device
CN107479823B (en) Data verification method and device in random read-write file test
CN108848418B (en) Set-top box centralized upgrading method
CN108595119B (en) Data synchronization method and distributed system
CN108932249B (en) Method and device for managing file system
CN106777126B (en) Data online migration method supporting heterogeneous time sequence database
EP2564329A2 (en) Dismounting a storage volume
CN110275793B (en) Detection method and equipment for MongoDB data fragment cluster
CN110532123B (en) Fault transfer method and device of HBase system
US11061889B2 (en) Systems and methods of managing manifest refresh in a database
CN114860506A (en) Linux file system repairing method, system, device and storage medium
CN111045710B (en) Method, equipment and medium for upgrading SAS-Expander firmware based on IPMI command
CN116257170A (en) Batch disk mounting method and device and electronic equipment
CN110956284A (en) Method, system, equipment and storage medium for maintaining reliability of product information
CN113703823A (en) BMC (baseboard management controller) firmware upgrading method and device, electronic equipment and storage medium
CN112988708A (en) Version updating method and device, computer readable storage medium and processor
US20200210606A1 (en) Quarantining storage objects using a quarantine list
CN111131051A (en) Route issuing method and device
CN112000641B (en) Data storage method, device and system
WO2024000535A1 (en) Partition table update method and apparatus, and electronic device and storage medium
CN111176886A (en) Database mode switching method and device and electronic equipment
CN111666035B (en) Management method and device of distributed storage system
CN117687695A (en) Information processing method, information processing device, electronic equipment and storage medium
CN110943871B (en) Resource interval adjusting method and device
CN108768673B (en) Method and device for ending charging

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