CN117111844A - Method, device, equipment and medium for creating RAID - Google Patents

Method, device, equipment and medium for creating RAID Download PDF

Info

Publication number
CN117111844A
CN117111844A CN202311041057.1A CN202311041057A CN117111844A CN 117111844 A CN117111844 A CN 117111844A CN 202311041057 A CN202311041057 A CN 202311041057A CN 117111844 A CN117111844 A CN 117111844A
Authority
CN
China
Prior art keywords
array
matched
disks
array card
disk
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
CN202311041057.1A
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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202311041057.1A priority Critical patent/CN117111844A/en
Publication of CN117111844A publication Critical patent/CN117111844A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • 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/0614Improving the reliability of storage systems
    • 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/0629Configuration or reconfiguration of storage systems
    • 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/064Management of blocks
    • 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/0671In-line storage system
    • G06F3/0683Plurality of storage devices
    • G06F3/0689Disk arrays, e.g. RAID, JBOD

Abstract

The application provides a method, a device, equipment and a medium for creating RAID. By the method, when determining which RAID array card and which disk is matched with the RAID array card are used for establishing RAID, the RAID array card can be fully automatically determined, manual participation can be omitted, manual workload can be reduced, labor cost can be reduced, the possibility of human error can be overcome due to the fact that manual participation is omitted, determination accuracy is improved, and determination efficiency is improved. And secondly, uniform determining modes are used for servers of all batches to be shipped, the granularity of the determining modes is all servers, the batch of the servers can not be produced, different determining modes can not be set for the servers of different batches, the number of the determining modes to be set is small, and therefore, the workload required for setting the determining modes is low and the universality is strong.

Description

Method, device, equipment and medium for creating RAID
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method for creating a RAID, an apparatus for creating a RAID, an electronic device, and a readable storage medium.
Background
With the rapid development of technology, the server is applied more and more widely in various industries, so that the demands of various industries on the server are gradually increased, and secondly, the demands of various industries on the operating system of the server are increased along with the water fluctuation. Currently, many clients require the KOS operating system to be preloaded in their intended servers so that the KOS operating system in the server can be used later to process data.
The KOS operating system supports various chip architectures and computing scenes such as x86, ARM and the like, and is a server operating system oriented to the intelligent computing age. Through the soft and hard collaborative optimization, the artificial intelligence, the virtualization, the cloud native and other applications based on the KOS are enhanced in the aspects of development efficiency, operation efficiency, expansibility and the like. The maintainability of the system can be effectively improved, the hot upgrading of the kernel and the application software and the like are supported, and the KOS becomes the first choice of industry users, so that the popularization of the KOS operating system in the field of servers has high value.
However, it is necessary to create a RAID (Redundant Array of Independent Disks, redundant array of disks) in the server before the KOS operating system is preloaded on the server, and then install the KOS operating system on the RAID.
RAID combines a plurality of relatively cheap hard disks through RAID array cards to form a hard disk array group, so that the performance of the hard disk array group reaches or exceeds that of an expensive and huge-capacity hard disk. Depending on the level selected, RAID has one or more of the following benefits over a single hard disk: enhancing data integration, enhancing fault tolerance, increasing throughput or capacity, etc.
In some cases, the server is preloaded with a plurality of RAID array cards, including LSI array cards and PMC array cards, and different disks are mounted on each array card, so that it is necessary to determine which RAID array card and which disk it is collocated on to create a RAID before creating a RAID. At the position ofDetermining that a target RAID array card is needed and determining that the target RAID array card is needed Matched target magnetic disk woundUnder the condition of establishing RAID, establishing RAID according to the target RAID array card and the target disk collocated with the target RAID array card.
At present, when determining which RAID array card and which disk to be matched with the RAID array card are created, a worker can manually specify which RAID array card in a server and which disk to be matched with the RAID array card on site, but as the number of servers needing to be preloaded with KOS is increased, the array cards in each server are not identical, and the disks matched with different array cards in the same server are not identical, so that the workload of manually specifying which RAID array card in each server and which disk to be matched with the RAID array card on site by the worker is large, the time consumption is long, the error is easy, and the labor cost is high.
Disclosure of Invention
In order to solve the above problems, the present application provides a method of creating a RAID, an apparatus for creating a RAID, an electronic device, and a readable storage medium.
The embodiment of the application provides a method for creating RAID, which is applied to a server and comprises the following steps:
detecting whether a first array card matched with only two magnetic disks exists in a server or not; the two magnetic disks collocated with the first array card are the same in type; the type of the magnetic disk at least comprises a solid state disk or a mechanical hard disk;
under the condition that a first array card matched with only two disks exists in a server, creating RAID1 according to the first array card and the two disks matched with the first array card;
or,
under the condition that a first array card matched with only two magnetic disks does not exist in the server, detecting whether a second array card matched with only one magnetic disk exists in the server or not;
under the condition that a second array card matched with only one disk exists in the server, creating RAID0 according to the second array card and the disk matched with the second array card;
or,
detecting whether a third array card matched with more than three magnetic disks exists in the server under the condition that the second array card matched with only one magnetic disk does not exist in the server;
In the case that a third array card collocated with more than three disks exists in the server, creating RAID1 according to the third array card and two disks with the same type in the more than three disks collocated with the third array card.
In an alternative implementation, the first array card collocated in the server and only collocated with two disks is a plurality of cards;
the creating RAID1 according to the first array card and the two disks collocated by the first array card comprises the following steps:
detecting whether a first array card matched with two solid state disks exists in the plurality of first array cards;
under the condition that a first array card matched with two solid state disks exists in the plurality of first array cards, creating RAID1 according to the first array card matched with the two solid state disks and the two solid state disks matched with the first array card matched with the two solid state disks;
or,
detecting whether a first array card matched with two mechanical hard disks exists in the plurality of first array cards under the condition that the first array card matched with two solid state disks does not exist in the plurality of first array cards;
under the condition that a first array card matched with two mechanical hard disks exists in the plurality of first array cards, RAID1 is created according to the first array card matched with the two mechanical hard disks and the two mechanical hard disks matched with the first array card matched with the two mechanical hard disks.
In an optional implementation manner, at least two first array cards matched with two solid state disks are arranged;
the creating RAID1 according to the first array card matching with the two solid state disks and the two solid state disks matching with the first array card matching with the two solid state disks comprises the following steps:
selecting a first array card with the lowest sum of capacities of the matched solid state disks from at least two first array cards matched with the two solid state disks;
and creating RAID1 according to the selected first array card and the two solid state disks collocated with the selected first array card.
In an alternative implementation, there are at least two first array cards collocated with two mechanical hard disks;
the creating RAID1 according to the first array card collocated with the two mechanical hard disks and the two mechanical hard disks collocated with the first array card collocated with the two mechanical hard disks comprises the following steps:
selecting a first array card with the lowest sum of capacities of matched mechanical hard disks from at least two first array cards matched with two mechanical hard disks;
RAID1 is created according to the selected first array card and the two mechanical hard disks collocated with the selected first array card.
In an alternative implementation, the server is provided with a plurality of second array cards matched with one disk;
The creating RAID0 according to the second array card and one disk collocated by the second array card includes:
detecting whether a second array card matched with a solid state disk exists in the plurality of second array cards;
under the condition that a second array card matched with one solid state disk exists in the plurality of second array cards, RAID0 is established according to the second array card matched with the one solid state disk and the solid state disk matched with the second array card matched with the one solid state disk;
or,
detecting whether a second array card matched with a mechanical hard disk exists in the plurality of second array cards under the condition that the second array card matched with the solid state hard disk does not exist in the plurality of second array cards;
and under the condition that a plurality of second array cards are matched with the second array card of one mechanical hard disk, creating RAID0 according to the second array card matched with the mechanical hard disk and the mechanical hard disk matched with the second array card matched with the mechanical hard disk.
In an optional implementation manner, at least two second array cards matched with one solid state disk are arranged;
the creating RAID0 according to the second array card collocated with the solid state disk and the solid state disk collocated with the second array card collocated with the solid state disk comprises the following steps:
Selecting a second array card with the lowest capacity of the matched solid state disk from at least two second array cards matched with one solid state disk;
and creating RAID0 according to the selected second array card and the selected solid state disk matched with the second array card.
In an alternative implementation, there are at least two second array cards collocated with a mechanical hard disk;
the creating RAID0 according to the second array card collocated with the mechanical hard disk and the mechanical hard disk collocated with the second array card collocated with the mechanical hard disk comprises the following steps:
selecting a second array card with the lowest capacity of the matched mechanical hard disk from at least two second array cards matched with one mechanical hard disk;
RAID0 is created according to the selected second array card and one mechanical hard disk collocated with the selected second array card.
In an alternative implementation, the server is provided with more than three third array cards matched with more than three magnetic disks;
the creating RAID1 according to the third array card and two identical disks in more than three disks collocated by the third array card comprises the following steps:
detecting whether a matched magnetic disk exists in a plurality of third array cards or not, wherein the matched magnetic disk comprises the third array cards of two solid state disks;
Under the condition that a matched magnetic disk comprises a third array card of two solid state disks in the plurality of third array cards, creating RAID1 according to the matched magnetic disk comprising the third array card of two solid state disks and the matched magnetic disk comprising the two solid state disks;
or,
detecting whether a matched disk comprises a third array card of two mechanical hard disks or not in the plurality of third array cards under the condition that the matched disk does not comprise the third array cards of two solid state disks in the plurality of third array cards;
in the case that there is a third array card in which the collocated disk includes two mechanical hard disks in the plurality of third array cards, RAID1 is created according to the third array card in which the collocated disk includes two mechanical hard disks and the two mechanical hard disks collocated by the third array card in which the collocated disk includes two mechanical hard disks.
In an alternative implementation, the collocated magnetic disk comprises at least two third array cards of two solid state disks;
the creating RAID1 according to the matched disk including the third array card of the two solid state disks and the matched disk including the two solid state disks includes:
Selecting a third array card with the lowest sum of capacities of the two matched solid state disks from the third array cards of which the at least two matched magnetic disks comprise the two solid state disks;
and creating RAID1 according to the selected third array card and the two solid state disks collocated with the selected third array card.
In an alternative implementation, the collocated magnetic disk comprises at least two third array cards of two mechanical hard disks;
the creating RAID1 according to the matched disk including the third array card of two mechanical hard disks and the matched disk including the two mechanical hard disks includes:
selecting a third array card with the lowest sum of capacities of the two matched mechanical hard disks from the third array cards with at least two matched magnetic disks comprising the two mechanical hard disks;
RAID1 is created according to the selected third array card and the two mechanical hard disks collocated with the selected third array card.
The embodiment of the invention provides a device for creating RAID, which is applied to a server and comprises the following components:
the first detection module is used for detecting whether a first array card matched with only two magnetic disks exists in the server or not; the two magnetic disks collocated with the first array card are the same in type; the type of the magnetic disk at least comprises a solid state disk or a mechanical hard disk;
The first creating module is used for creating RAID1 according to the first array card and the two disks collocated by the first array card under the condition that the first array card collocated by the two disks exists in the server;
or,
the second detection module is used for detecting whether a second array card matched with only one magnetic disk exists in the server or not under the condition that the first array card matched with only two magnetic disks does not exist in the server;
the second creating module is used for creating RAID0 according to the second array card and one disk matched with the second array card under the condition that the second array card matched with only one disk exists in the server;
or,
the third detection module is used for detecting whether a third array card matched with more than three magnetic disks exists in the server under the condition that the second array card matched with only one magnetic disk does not exist in the server;
and the third creating module is used for creating RAID1 according to the third array card and two disks with the same type in the three or more disks collocated by the third array card under the condition that the third array card collocated with the three or more disks exists in the server.
In an alternative implementation, the first array card collocated in the server and only collocated with two disks is a plurality of cards;
The first creation module includes:
the first detection unit is used for detecting whether a first array card matched with two solid state disks exists in the plurality of first array cards;
the first creating unit is used for creating RAID1 according to the first array card matched with the two solid state disks and the two solid state disks matched with the first array card matched with the two solid state disks under the condition that the first array cards matched with the two solid state disks exist in the plurality of first array cards;
or,
the second detection unit is used for detecting whether the first array cards matched with the two mechanical hard disks exist in the plurality of first array cards under the condition that the first array cards matched with the two solid state disks do not exist in the plurality of first array cards;
the second creating unit is configured to create RAID1 according to the first array card matching two mechanical hard disks and the two mechanical hard disks matching the first array card matching two mechanical hard disks when there are first array cards matching two mechanical hard disks in the plurality of first array cards.
In an optional implementation manner, at least two first array cards matched with two solid state disks are arranged;
the first creation unit includes:
the first selecting subunit is used for selecting a first array card with the lowest sum of capacities of the matched solid state disks from at least two first array cards matched with the two solid state disks;
The first creating subunit is configured to create RAID1 according to the selected first array card and the two solid state disks collocated with the selected first array card.
In an alternative implementation, there are at least two first array cards collocated with two mechanical hard disks;
the second creation unit includes:
a second selecting subunit, configured to select, from at least two first array cards collocated with two mechanical hard disks, a first array card with a lowest sum of capacities of the collocated mechanical hard disks;
and the second creation subunit is used for creating RAID1 according to the selected first array card and the two mechanical hard disks collocated with the selected first array card.
In an alternative implementation, the server is provided with a plurality of second array cards matched with one disk;
the second creation module includes:
the third detection unit is used for detecting whether a second array card matched with a solid state disk exists in the plurality of second array cards;
the third creating unit is used for creating RAID0 according to the second array card matched with the solid state disk and the solid state disk matched with the second array card matched with the solid state disk under the condition that the second array card matched with the solid state disk exists in the plurality of second array cards;
Or,
the fourth detection unit is used for detecting whether a second array card matched with a mechanical hard disk exists in the plurality of second array cards under the condition that the second array card matched with the solid state hard disk does not exist in the plurality of second array cards;
and the fourth creating unit is used for creating RAID0 according to the second array card matched with one mechanical hard disk and the mechanical hard disk matched with the second array card matched with one mechanical hard disk under the condition that the second array card matched with one mechanical hard disk exists in the plurality of second array cards.
In an optional implementation manner, at least two second array cards matched with one solid state disk are arranged;
the third creation unit includes:
the third selecting subunit is used for selecting a second array card with the lowest capacity of the matched solid state disk from at least two second array cards matched with one solid state disk;
and the third creating subunit is used for creating RAID0 according to the selected second array card and the selected solid state disk collocated with the second array card.
In an alternative implementation, there are at least two second array cards collocated with a mechanical hard disk;
the fourth creation unit includes:
a fourth selecting subunit, configured to select, from at least two second array cards collocated with one mechanical hard disk, a second array card with a lowest capacity of the collocated mechanical hard disk;
And the fourth creating subunit is used for creating RAID0 according to the selected second array card and one mechanical hard disk collocated with the selected second array card.
In an alternative implementation, the server is provided with more than three third array cards matched with more than three magnetic disks;
the third creation module includes:
the fifth detection unit is used for detecting whether a matched magnetic disk exists in the plurality of third array cards or not, wherein the third array card comprises two solid state disks;
a fifth creating unit, configured to create RAID1 according to, when there are matched disks including two solid state disks in the plurality of third array cards, the matched disks including the two solid state disks and the two solid state disks matched by the matched disks including the two solid state disks;
or,
the sixth detection unit is configured to detect whether a matched disk includes a third array card of two mechanical hard disks in the plurality of third array cards when the matched disk includes two third array cards of two solid state disks in the plurality of third array cards;
and a sixth creating unit, configured to create RAID1 according to the matched magnetic disk including the two mechanical hard disks of the third array card and the matched magnetic disk including the two mechanical hard disks of the third array card matched with the two mechanical hard disks of the third array card when there is a matched magnetic disk including the two mechanical hard disks of the third array card in the plurality of third array cards.
In an alternative implementation, the collocated magnetic disk comprises at least two third array cards of two solid state disks;
the fifth creation unit includes:
a fifth selecting subunit, configured to select, from among the at least two matched magnetic disks that include the third array cards of the two solid state disks, a third array card that has a sum of capacities of the two matched solid state disks that is the lowest;
and the fifth creating subunit is used for creating RAID1 according to the selected third array card and the two solid state disks collocated by the selected third array card.
In an alternative implementation, the collocated magnetic disk comprises at least two third array cards of two mechanical hard disks;
the sixth creation unit includes:
a sixth selecting subunit, configured to select, from among the at least two matched third array cards whose magnetic disks include two mechanical hard disks, a third array card whose sum of capacities of the two matched mechanical hard disks is the lowest;
and a sixth creating subunit, configured to create RAID1 according to the selected third array card and the two mechanical hard disks collocated with the selected third array card.
The embodiment of the invention provides electronic equipment, which is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
A memory for storing a computer program;
and a processor for implementing the method as described above when executing the program stored on the memory.
Embodiments of the present application provide a readable storage medium, which when executed by a processor of an electronic device, enables the electronic device to perform a method as described above.
By the method, when determining which RAID array card and which disk is matched with the RAID array card are used for establishing RAID, the RAID array card can be fully automatically determined, manual participation can be omitted, manual workload can be reduced, labor cost can be reduced, the possibility of human error can be overcome due to the fact that manual participation is omitted, determination accuracy is improved, and determination efficiency is improved.
And secondly, uniform determining modes are used for servers of all batches to be shipped, the granularity of the determining modes is all servers, the batch of the servers can not be produced, different determining modes can not be set for the servers of different batches, the number of the determining modes to be set is small, and therefore, the workload required for setting the determining modes is low and the universality is strong.
Drawings
FIG. 1 illustrates a flow chart of steps of a method of creating RAID provided by one embodiment of the present application;
FIG. 2 is a schematic diagram showing the sequence of selecting an array card and a disk provided by one embodiment of the application;
FIG. 3 illustrates a block diagram of an apparatus for creating RAID according to one embodiment of the present application;
fig. 4 shows a block diagram of an electronic device according to an embodiment of the application.
Detailed Description
In order that the above-recited objects, features and advantages of the present application will become more readily apparent, a more particular description of the application will be rendered by reference to the appended drawings and appended detailed description.
Prior to the description of the solution of the present application, technical terms that may be related to the present application will be explained.
KOS: an operating system for a server.
LSI array card: RAID controllers from Broadcom are commercially available in the series of cards 9440, 9460, 9560, etc.
PMC array card: RAID controllers of Adaptec company are commonly used in the market, such as 8222, 8202 series cards.
The store li64: the LSI array card is applied under the system OS, and RAID of different levels such as RAID1, RAID0 and the like can be realized through the tool.
arccon f: the PMC array card is applied under the system OS, and RAID of different levels such as RAID1, RAID0 and the like can be realized through the tool.
PXE: pre-boot Execution Environment, a protocol designed by Intel, allows a computer to download a boot image from a remote server over a network and load an installation file or the entire operating system.
BOM: bill of Materials (bill of materials) is commonly used in the fields of manufacturing, industrial design, electronic device design, and the like. BOM generally refers to a list of components of a product and information about the number, specifications, descriptions, etc. of each component.
Referring to fig. 1, a flowchart illustrating steps of a method for creating RAID according to an embodiment of the present invention is applied to a server, where the method includes:
in step S101, it is detected whether there is a first array card collocated in the server and only two disks are collocated. The two disks collocated by the first array card are of the same type. The type of magnetic disk at least comprises a solid state disk or a mechanical disk.
The type of array card present on the server may be detected first, and the type of array card includes an LSI array card or a PMC array card.
For LSI array cards present on the server, the relevant information for LSI array cards can be called up using the garcili 64 tool.
For example, the type of the array card existing on the server (the type at this time is LSI) may be called by using the garcili 64 tool, and the index number of the LSI array card (the index numbers of different array cards existing on the server are different) may be called by using the garcili 64 tool, the type of the magnetic disk collocated with the LSI array card, the number of magnetic disks collocated with the LSI array card, the type of the magnetic disk collocated with the LSI array card (the type of the magnetic disk includes solid state disk, mechanical hard disk, etc.), the capacity of the magnetic disk collocated with the LSI array card, and whether the LSI array card is collocated with only one type of magnetic disk (or whether the LSI array card is collocated with only solid state disk).
The retrieved information about the LSI array card may be embodied in a data structure, for example, the data structure may be as follows:
lsi=${i}|model=${model}|num=${num}|onlyincard=${only}|type=${type}|size=${size}
lsi is the type of array card, and the parts separated by "=" behind "|" are respectively represented by: the index number of the LSI array card, the type of the disk in which the LSI array card is paired, the number of the disks in which the LSI array card is paired, whether the LSI array card is paired with only one type of disk (or whether the LSI array card is paired with only a solid state disk), the type of the disk in which the LSI array card is paired, and the capacity of the disk in which the LSI array card is paired.
For example, in one example, there are two LSI array cards on the server.
The information about two LSI array cards called using the garcali 64 tool is as follows:
lsi=0|model=MZ7L3480HCHQ-00B7C|num=2|onlyincard=0|type=SSD|size=446.625GB。
lsi=1|model=ST6000NM019B-2TG103|num=12|onlyincard=0|type=HDD|si ze=5.457TB。
for PMC array cards present on a server, the arcconf tool may be used to retrieve information about the PMC array card.
For example, the arcconf tool may be used to retrieve the type of array card that exists on the server (where the type is PMC), the arcconf tool may also be used to retrieve the index number of the PMC array card (where the index numbers of different array cards that exist on the server are different), the type of disk that the PMC array card mates with, the number of disks that the PMC array card mates with, the type of disk that the PMC array card mates with (the type of disk includes solid state disk and mechanical disk, etc.), the capacity of the disk that the PMC array card mates with, and whether the PMC array card mates with only one type of disk (or whether the PMC array card mates with only solid state disk).
The relevant information of the retrieved PMC array card may be embodied in a data structure, for example, the data structure may be as follows:
pmc=${i}|model=${model}|num=${num}|onlyincard=${only}|type=${type}|size=${size}。
pmc is the type of array card, and the parts separated by "=" behind "|" represent the meanings of: the index serial number of the PMC array card, the type of the matched magnetic disk of the PMC array card, the number of the matched magnetic disks of the PMC array card, whether the PMC array card is matched with only one type of magnetic disk (or whether the PMC array card is matched with only a solid state disk), the type of the matched magnetic disk of the PMC array card and the capacity of the matched magnetic disk of the PMC array card.
For example, in one example, there is one PMC array card on the server.
The relevant information for one PMC array card called using arcconf tool is as follows:
pmc=1|model=ST16000NM000J-2TW103|num=13|onlyincard=1|type=HD D|size=15259648MB。
when the number of matched magnetic disks of the LSI array card in the related information of the LSI array card is 2 and the types of the matched magnetic disks are the same (for example, both are solid-state hard disks or both are mechanical hard disks, etc.), the LSI array card may be determined to be the first array card matched and only two magnetic disks are matched.
Or, in the case that the number of matched magnetic disks of the PMC array card in the related information of the PMC array card is 2 and the types of the matched magnetic disks are the same (for example, both are solid state hard disks or both are mechanical hard disks, etc.), it may be determined that the PMC array card is the first array card matched and only matches two magnetic disks.
In the case that there is a first array card collocated in the server and only two disks are collocated, in step S102, RAID1 is created according to the first array card and the two disks collocated by the first array card.
In one embodiment of the present application, the first array card collocated in the server and only collocated with two disks is one, so that RAID1 can be created according to the one first array card and the two disks collocated with the one first array card.
In another embodiment of the present application, the first array card collocated in the server and collocated with only two disks is plural. Thus, one first array card may be selected among the plurality of first array cards, and RAID1 may then be created from the selected one first array card and the two disks collocated with the selected one first array card.
The type of the magnetic disk matched with the array card comprises a solid state disk or a mechanical hard disk and the like.
Therefore, whether the first array cards matched with the two solid state disks exist in the plurality of first array cards can be detected.
When the number of matched magnetic disks of the LSI type first array card in the related information of the LSI type first array card is 2 and the types of matched magnetic disks are all solid-state disks, the LSI type first array card may be determined to be the first array card matched with two solid-state disks.
Or, in the related information of the first array card of the PMC type, the number of matched magnetic disks of the first array card of the PMC type is 2, and the types of the matched magnetic disks are all solid state disks, it may be determined that the first array card of the PMC type is the first array card matched with two solid state disks.
Under the condition that the first array cards matched with the two solid state disks exist in the plurality of first array cards, RAID1 can be established according to the first array cards matched with the two solid state disks and the two solid state disks matched with the first array cards matched with the two solid state disks.
For example, in one example, in the plurality of first array cards, the first array card collocated with the two solid state disks is one, so that RAID1 can be created according to the first array card collocated with the two solid state disks and the two solid state disks collocated with the first array card collocated with the two solid state disks.
Or in another example, in the plurality of first array cards, there are at least two first array cards collocated with two solid state disks, so that a first array card with the lowest sum of capacities of the collocated solid state disks can be selected from the at least two first array cards collocated with the two solid state disks, and then RAID1 is created according to the selected first array card and the two solid state disks collocated with the selected first array card. Therefore, the storage space occupied by creating RAID1 can be reduced as much as possible, more storage space can be used for the server to do other things, and the utilization rate of the storage space is improved.
Or, under the condition that the first array cards matched with the two solid state disks do not exist in the plurality of first array cards, whether the first array cards matched with the two mechanical disks exist in the plurality of first array cards or not can be detected.
Wherein, in the case where the number of matched magnetic disks of the LSI type first array card in the related information of the LSI type first array card is 2 and the types of matched magnetic disks are all mechanical hard disks, it is possible to determine that the LSI type first array card is the first array card matched with two mechanical hard disks.
Or, in the case that the number of matched magnetic disks of the first array card of the PMC type in the related information of the first array card of the PMC type is 2 and the types of the matched magnetic disks are all mechanical hard disks, it may be determined that the first array card of the PMC type is the first array card matched with two mechanical hard disks.
In the case that the first array cards matched with the two mechanical hard disks exist in the plurality of first array cards, RAID1 may be created according to the first array cards matched with the two mechanical hard disks and the two mechanical hard disks matched with the first array cards matched with the two mechanical hard disks.
For example, in one example, in the plurality of first array cards, the first array card collocated with the two mechanical hard disks is one, so that RAID1 may be created according to the one first array card collocated with the two mechanical hard disks and the two mechanical hard disks collocated with the one first array card collocated with the two mechanical hard disks.
Alternatively, in another example, the first array cards collocated with the two mechanical hard disks are at least two in the plurality of first array cards, so that the first array card with the lowest sum of capacities of the collocated mechanical hard disks in the at least two first array cards collocated with the two mechanical hard disks can be selected, and then the RAID1 is created according to the selected first array card and the two mechanical hard disks collocated with the selected first array card. Therefore, the storage space occupied by creating RAID1 can be reduced as much as possible, more storage space can be used for the server to do other things, and the utilization rate of the storage space is improved.
In the application, RAID1 is preferably established according to the first array card matched with the two solid state disks and the two solid state disks matched with the first array card matched with the two solid state disks, and RAID1 is established according to the first array card matched with the two mechanical disks and the two mechanical disks matched with the first array card matched with the two mechanical disks under the condition that the first array card matched with the two solid state disks does not exist in the plurality of first array cards, so that the performance of the established RAID1 is higher than that of the mechanical disks as much as possible, and the performance of the established RAID1 is higher as much as possible, and the performance of a KOS system preloaded on the established RAID1 is improved.
In the present application, the level of RAID includes: RAID0, RAID1, RAID0+1, RAID1+0, RAID3, RAID4, RAID5, and RAID6 are common, and RAID0, RAID1, RAID5, and the like, and the number of disks required for each level of RAID is different, for example, RAID0 may be created using 1 disk, RAID0 may be created using 2 disks, or RAID1 may be created using 3 or 4 disks, and RAID6 may be created using 3 or 4 disks.
In the case that the first array card matched with only two disks does not exist in the server, in step S103, it is detected whether the second array card matched with only one disk exists in the server.
Wherein, in the case where the number of matched magnetic disks of the LSI array card in the information about the LSI array card is 1, it is possible to determine that this LSI array card is a second array card that is matched and matches only one magnetic disk.
Alternatively, in the case that the number of disks collocated with the PMC array card in the related information of the PMC array card is 1, it may be determined that this PMC array card is a second array card collocated with only one disk.
In the case that there is a second array card collocated in the server and only one disk is collocated, in step S104, RAID0 is created according to the second array card and the one disk collocated by the second array card.
In one embodiment of the present application, the second array card collocated in the server and collocated with only one disk is one, so that RAID0 can be created according to the one second array card and the one disk collocated with the one second array card.
In another embodiment of the present application, the server has a plurality of second array cards collocated with one disk. Thus, one second array card may be selected among the plurality of second array cards, and then RAID0 may be created from the selected one second array card and the two disks collocated with the selected one second array card.
The type of the magnetic disk matched with the array card comprises a solid state disk or a mechanical hard disk and the like.
Therefore, whether the second array card matched with one solid state disk exists in the plurality of second array cards can be detected.
Wherein, in the case that the number of matched magnetic disks of the LSI type second array card in the related information of the LSI type second array card is 1 and the type of matched magnetic disk is a solid state disk, the LSI type second array card may be determined to be a second array card matched with a solid state disk.
Or, in the related information of the second array card of the PMC type, the number of matched disks of the second array card of the PMC type is 1, and the type of the matched disks is a solid state disk, it may be determined that the second array card of the PMC type is a second array card matched with a solid state disk.
Under the condition that a plurality of second array cards are matched with a second array card of a solid state disk, RAID0 can be established according to the second array card matched with the solid state disk and the solid state disk matched with the second array card of the solid state disk.
For example, in one example, in the plurality of second array cards, the second array card collocated with one solid state disk is one, so that RAID0 can be created according to the one second array card collocated with one solid state disk and the one solid state disk collocated with the one second array card collocated with one solid state disk.
Or in another example, in the plurality of second array cards, at least two second array cards matched with one solid state disk are arranged. Therefore, the second array card with the lowest capacity of the matched solid state disk can be selected from the at least two second array cards matched with one solid state disk, and RAID0 is built according to the selected second array card and the selected solid state disk matched with the second array card. Therefore, the storage space occupied by creating RAID0 can be reduced as much as possible, more storage space can be used for the server to do other things, and the utilization rate of the storage space is improved.
Or, under the condition that the second array card matched with one solid state disk does not exist in the plurality of second array cards, whether the second array card matched with one mechanical hard disk exists in the plurality of second array cards or not can be detected.
Wherein, in the case where the number of matched magnetic disks of the LSI type second array card in the related information of the LSI type second array card is 1 and the type of matched magnetic disk is a mechanical hard disk, it is possible to determine that this LSI type second array card is a second array card matched with one mechanical hard disk.
And determining that the second array card of the PMC type is the second array card collocated with a mechanical hard disk under the condition that the number of matched magnetic disks of the second array card of the PMC type in the related information of the second array card of the PMC type is 1 and the type of the matched magnetic disks is the mechanical hard disk.
In the case that there is a second array card collocated with one mechanical hard disk in the plurality of second array cards, RAID0 may be created according to the second array card collocated with one mechanical hard disk and one mechanical hard disk collocated with the second array card collocated with one mechanical hard disk.
For example, in one example, in the plurality of second array cards, the second array card collocated with one mechanical hard disk is one, so RAID0 may be created according to the one second array card collocated with one mechanical hard disk and the one mechanical hard disk collocated with the one second array card collocated with one mechanical hard disk.
Or, in another example, the number of the second array cards collocated with one mechanical hard disk is at least two in the plurality of first array cards. Thus, the second array card with the lowest capacity of the matched mechanical hard disk can be selected from at least two second array cards matched with one mechanical hard disk. RAID0 is then created based on the selected second array card and the selected second array card collocated with a mechanical hard disk. Therefore, the storage space occupied by creating RAID0 can be reduced as much as possible, more storage space can be used for the server to do other things, and the utilization rate of the storage space is improved.
In the application, RAID0 is preferably established according to the second array card matched with one solid state disk and one solid state disk matched with the second array card matched with one solid state disk, and RAID0 is established according to the second array card matched with one mechanical disk and one mechanical disk matched with the second array card matched with one mechanical disk under the condition that the second array card matched with one solid state disk does not exist in a plurality of second array cards, so that the performance of the established RAID0 is higher than that of the mechanical disk as much as possible, and the performance of the established RAID0 is higher as much as possible, and the performance of a KOS system preloaded on the established RAID0 is improved.
In the case that there is no second array card collocated with only one disk in the server, in step S105, it is detected whether there is a third array card collocated with more than three disks in the server.
Wherein, in the case where the number of matched magnetic disks of the LSI array card in the information about the LSI array card is 3 or more, it is possible to determine that this LSI array card is a third array card matched with three or more magnetic disks.
Or, in the case that the number of disks collocated with the PMC array card in the related information of the PMC array card is 3 or more, it may be determined that the PMC array card is a third array card collocated with three or more disks.
In the case where there is a third array card collocated with three or more disks in the server, in step S106, RAID1 is created according to the third array card and two disks of the same type among the three or more disks collocated with the third array card.
In one embodiment of the present application, the third array card with the same type as the at least two disks collocated with more than three disks in the server is one, and then RAID1 may be created according to the one third array card and two disks with the same type as the at least two disks collocated with the one third array card.
In one embodiment of the present application, the server has a plurality of third array cards with more than three disks and at least two disks with the same type, one third array card may be selected from the plurality of third array cards, and then RAID1 may be created according to the selected one third array card and the two disks with the same type in the three more than three disks with which the selected one third array card is collocated.
The type of the magnetic disk matched with the array card comprises a solid state disk or a mechanical hard disk and the like.
Therefore, whether the matched magnetic disk in the plurality of third array cards comprises the third array cards of the two solid state disks can be detected.
Wherein, in the case that the number of matched disks of the LSI type third array card in the related information of the LSI type third array card is 3 or more and the type of matched disk is a solid state disk, it may be determined that the LSI type third array card is a matched disk including a third array card of two solid state disks.
Or, in the case that the number of matched disks of the PMC type third array card in the related information of the PMC type third array card is 3 or more and the type of the matched disks is a solid state disk, it may be determined that the PMC type third array card is the third array card of the matched disk including two solid state disks.
Under the condition that the matched magnetic disk comprises the third array cards of the two solid state disks in the plurality of third array cards, RAID1 can be established according to the matched magnetic disk comprising the third array cards of the two solid state disks and the matched magnetic disk comprising the two solid state disks.
For example, in one example, in the plurality of third array cards, the collocated magnetic disk includes one third array card of two solid state disks. Thus, RAID1 may be created according to the one third array card with the matched disk including two solid state disks and the two solid state disks with the matched disk including the one third array card with the two solid state disks.
Or, in another example, in the plurality of third array cards, the collocated magnetic disk includes at least two third array cards of two solid state disks. Therefore, the third array card with the lowest sum of the capacities of the two matched solid state disks can be selected from the third array cards with at least two matched magnetic disks comprising the two solid state disks. And then creating RAID1 according to the selected third array card and the two solid state disks collocated with the selected third array card. Therefore, the storage space occupied by creating RAID1 can be reduced as much as possible, more storage space can be used for the server to do other things, and the utilization rate of the storage space is improved.
Or, in the case that no matched disk includes two third array cards of the solid state disks in the plurality of third array cards, it may be detected whether there is a matched disk including two third array cards of the mechanical hard disks in the plurality of third array cards.
Wherein, in the case where the number of matched disks of the LSI type third array card in the related information of the LSI type third array card is 3 or more and the type of matched disk is a mechanical hard disk, it may be determined that this LSI type third array card is a matched disk including two mechanical hard disks.
Or, in the case that the number of matched disks of the PMC type third array card in the related information of the PMC type third array card is 3 or more and the type of the matched disk is a mechanical hard disk, it may be determined that the PMC type third array card is the third array card whose matched disk includes two mechanical hard disks.
In the case where there is a third array card in which the collocated disk includes two mechanical hard disks in the plurality of third array cards, RAID1 may be created according to the third array card in which the collocated disk includes two mechanical hard disks and the two mechanical hard disks collocated by the third array card in which the collocated disk includes two mechanical hard disks.
For example, in one example, in the plurality of third array cards, the collocated disk includes one third array card of two mechanical hard disks, and thus RAID1 may be created from the one third array card of the collocated disk including two mechanical hard disks and the two mechanical hard disks collocated with the one third array card of the collocated disk including two mechanical hard disks.
Alternatively, in another example, the collocated magnetic disk includes at least two third array cards of two mechanical hard disks in the plurality of third array cards. Thus, the third array card with the lowest sum of the capacities of the two matched mechanical hard disks can be selected from the third array cards with at least two matched magnetic disks comprising the two mechanical hard disks. RAID1 is then created based on the selected third array card and the two mechanical hard disks collocated with the selected third array card. Therefore, the storage space occupied by creating RAID1 can be reduced as much as possible, more storage space can be used for the server to do other things, and the utilization rate of the storage space is improved.
In the application, RAID1 is preferably established according to the matched disk comprising the third array cards of the two solid state disks and the matched disk comprising the two solid state disks, and RAID1 is established according to the matched disk comprising the third array cards of the two mechanical disks and the matched disk comprising the two mechanical disks under the condition that the matched disk comprising the third array cards of the two solid state disks does not exist in the plurality of third array cards. Therefore, the created RAID1 can be on the solid state disk as much as possible, and the performance of the solid state disk is always higher than that of the mechanical hard disk, so that the created RAID1 can be higher as much as possible, and the performance of the KOS system preloaded on the created RAID1 can be improved.
In summary, the order in which the array cards and disks collocated with the array cards are selected to create a RAID in the present application may be as shown in FIG. 2.
Secondly, before the RAID is created, the determined data comprise the type of the array card, the index serial number of the array card, the model number of the disk collocated with the array card and the like. The array card for creating RAID can be determined according to the type of the array card and the index serial number of the array card, and the disk for creating RAID can be determined according to the type of the disk collocated by the array card, so that RAID can be created according to the determined array card and the determined disk collocated by the array card.
After determining the array card and determining the disk collocated with the array card, how to create the RAID may refer to the current existing generation mode, which is not limited by the present application, and the present application focuses on determining the array card and the disk used for creating the RAID.
The scheme of the application is also applicable to the situation that one or more LSI array cards exist in a server, one or more PMC array cards exist in the server, or one or more LSI array cards and one or more PMC array cards are mixed and matched in the server.
After creating the RAID, the KOS operating system may be automatically installed on the RAID.
By the method, when determining which RAID array card and which disk is matched with the RAID array card are used for establishing RAID, the RAID array card can be fully automatically determined, manual participation can be omitted, manual workload can be reduced, labor cost can be reduced, the possibility of human error can be overcome due to the fact that manual participation is omitted, determination accuracy is improved, and determination efficiency is improved.
And secondly, uniform determining modes are used for servers of all batches to be shipped, the granularity of the determining modes is all servers, the batch of the servers can not be produced, different determining modes can not be set for the servers of different batches, the number of the determining modes to be set is small, and therefore, the workload required for setting the determining modes is low and the universality is strong.
It should be noted that, for simplicity of description, the method embodiments are shown as a series of acts, but it should be understood by those skilled in the art that the embodiments are not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred embodiments, and that the acts are not necessarily required by the embodiments of the application.
Referring to fig. 3, a block diagram of an apparatus for creating RAID according to an embodiment of the present invention is shown and applied to a server, where the apparatus includes:
the first detection module 11 is configured to detect whether a first array card collocated with only two disks exists in the server; the two magnetic disks collocated with the first array card are the same in type; the type of the magnetic disk at least comprises a solid state disk or a mechanical hard disk;
the first creating module 12 is configured to create RAID1 according to the first array card and the two disks collocated by the first array card in a case where there is a first array card collocated in the server and only two disks are collocated;
or,
the second detection module 13 is configured to detect whether a second array card matched with only one disk exists in the server if the first array card matched with only two disks does not exist in the server;
a second creating module 14, configured to create RAID0 according to the second array card and one disk collocated by the second array card in a case where there is a second array card collocated in the server and only one disk is collocated;
or,
the third detecting module 15 is configured to detect whether a third array card collocated with more than three disks exists in the server under the condition that the second array card collocated with only one disk does not exist in the server;
And the third creating module 16 is configured to create RAID1 according to the third array card and two disks of the same type of the three or more disks collocated by the third array card when there are the third array cards collocated with the three or more disks in the server.
In an alternative implementation, the first array card collocated in the server and only collocated with two disks is a plurality of cards;
the first creation module includes:
the first detection unit is used for detecting whether a first array card matched with two solid state disks exists in the plurality of first array cards;
the first creating unit is used for creating RAID1 according to the first array card matched with the two solid state disks and the two solid state disks matched with the first array card matched with the two solid state disks under the condition that the first array cards matched with the two solid state disks exist in the plurality of first array cards;
or,
the second detection unit is used for detecting whether the first array cards matched with the two mechanical hard disks exist in the plurality of first array cards under the condition that the first array cards matched with the two solid state disks do not exist in the plurality of first array cards;
the second creating unit is configured to create RAID1 according to the first array card matching two mechanical hard disks and the two mechanical hard disks matching the first array card matching two mechanical hard disks when there are first array cards matching two mechanical hard disks in the plurality of first array cards.
In an optional implementation manner, at least two first array cards matched with two solid state disks are arranged;
the first creation unit includes:
the first selecting subunit is used for selecting a first array card with the lowest sum of capacities of the matched solid state disks from at least two first array cards matched with the two solid state disks;
the first creating subunit is configured to create RAID1 according to the selected first array card and the two solid state disks collocated with the selected first array card.
In an alternative implementation, there are at least two first array cards collocated with two mechanical hard disks;
the second creation unit includes:
a second selecting subunit, configured to select, from at least two first array cards collocated with two mechanical hard disks, a first array card with a lowest sum of capacities of the collocated mechanical hard disks;
and the second creation subunit is used for creating RAID1 according to the selected first array card and the two mechanical hard disks collocated with the selected first array card.
In an alternative implementation, the server is provided with a plurality of second array cards matched with one disk;
the second creation module includes:
the third detection unit is used for detecting whether a second array card matched with a solid state disk exists in the plurality of second array cards;
The third creating unit is used for creating RAID0 according to the second array card matched with the solid state disk and the solid state disk matched with the second array card matched with the solid state disk under the condition that the second array card matched with the solid state disk exists in the plurality of second array cards;
or,
the fourth detection unit is used for detecting whether a second array card matched with a mechanical hard disk exists in the plurality of second array cards under the condition that the second array card matched with the solid state hard disk does not exist in the plurality of second array cards;
and the fourth creating unit is used for creating RAID0 according to the second array card matched with one mechanical hard disk and the mechanical hard disk matched with the second array card matched with one mechanical hard disk under the condition that the second array card matched with one mechanical hard disk exists in the plurality of second array cards.
In an optional implementation manner, at least two second array cards matched with one solid state disk are arranged;
the third creation unit includes:
the third selecting subunit is used for selecting a second array card with the lowest capacity of the matched solid state disk from at least two second array cards matched with one solid state disk;
and the third creating subunit is used for creating RAID0 according to the selected second array card and the selected solid state disk collocated with the second array card.
In an alternative implementation, there are at least two second array cards collocated with a mechanical hard disk;
the fourth creation unit includes:
a fourth selecting subunit, configured to select, from at least two second array cards collocated with one mechanical hard disk, a second array card with a lowest capacity of the collocated mechanical hard disk;
and the fourth creating subunit is used for creating RAID0 according to the selected second array card and one mechanical hard disk collocated with the selected second array card.
In an alternative implementation, the server is provided with more than three third array cards matched with more than three magnetic disks;
the third creation module includes:
the fifth detection unit is used for detecting whether a matched magnetic disk exists in the plurality of third array cards or not, wherein the third array card comprises two solid state disks;
a fifth creating unit, configured to create RAID1 according to, when there are matched disks including two solid state disks in the plurality of third array cards, the matched disks including the two solid state disks and the two solid state disks matched by the matched disks including the two solid state disks;
or,
the sixth detection unit is configured to detect whether a matched disk includes a third array card of two mechanical hard disks in the plurality of third array cards when the matched disk includes two third array cards of two solid state disks in the plurality of third array cards;
And a sixth creating unit, configured to create RAID1 according to the matched magnetic disk including the two mechanical hard disks of the third array card and the matched magnetic disk including the two mechanical hard disks of the third array card matched with the two mechanical hard disks of the third array card when there is a matched magnetic disk including the two mechanical hard disks of the third array card in the plurality of third array cards.
In an alternative implementation, the collocated magnetic disk comprises at least two third array cards of two solid state disks;
the fifth creation unit includes:
a fifth selecting subunit, configured to select, from among the at least two matched magnetic disks that include the third array cards of the two solid state disks, a third array card that has a sum of capacities of the two matched solid state disks that is the lowest;
and the fifth creating subunit is used for creating RAID1 according to the selected third array card and the two solid state disks collocated by the selected third array card.
In an alternative implementation, the collocated magnetic disk comprises at least two third array cards of two mechanical hard disks;
the sixth creation unit includes:
a sixth selecting subunit, configured to select, from among the at least two matched third array cards whose magnetic disks include two mechanical hard disks, a third array card whose sum of capacities of the two matched mechanical hard disks is the lowest;
And a sixth creating subunit, configured to create RAID1 according to the selected third array card and the two mechanical hard disks collocated with the selected third array card.
By the method, when determining which RAID array card and which disk is matched with the RAID array card are used for establishing RAID, the RAID array card can be fully automatically determined, manual participation can be omitted, manual workload can be reduced, labor cost can be reduced, the possibility of human error can be overcome due to the fact that manual participation is omitted, determination accuracy is improved, and determination efficiency is improved.
And secondly, uniform determining modes are used for servers of all batches to be shipped, the granularity of the determining modes is all servers, the batch of the servers can not be produced, different determining modes can not be set for the servers of different batches, the number of the determining modes to be set is small, and therefore, the workload required for setting the determining modes is low and the universality is strong.
For the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments for relevant points.
Fig. 4 is a block diagram illustrating an electronic device 700, according to an example embodiment. For example, the electronic device 700 may be a mobile phone, computer, digital broadcast terminal, messaging device, game console, tablet device, medical device, exercise device, personal digital assistant, or the like.
Referring to fig. 4, an electronic device 700 may include one or more of the following components: a processing component 702, a memory 704, a power component 706, a multimedia component 708, an audio component 710, an input/output (I/O) interface 712, a sensor component 714, and a communication component 716.
The processing component 702 generally controls overall operation of the electronic device 700, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing element 702 may include one or more processors 720 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 702 can include one or more modules that facilitate interaction between the processing component 702 and other components. For example, the processing component 702 may include a multimedia module to facilitate interaction between the multimedia component 708 and the processing component 702.
Memory 704 is configured to store various types of data to support operations at device 700. Examples of such data include instructions for any application or method operating on the electronic device 700, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 704 may be implemented by any type or combination of volatile or nonvolatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
The power component 704 provides power to the various components of the electronic device 700. Power component 704 can include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for electronic device 700.
The multimedia component 708 includes a screen between the electronic device 700 and the user that provides an output interface. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or slide action, but also the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 708 includes a front-facing camera and/or a rear-facing camera. When the electronic device 700 is in an operational mode, such as a shooting mode or a video mode, the front camera and/or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
The audio component 710 is configured to output and/or input audio signals. For example, the audio component 710 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 700 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may be further stored in the memory 704 or transmitted via the communication component 716. In some embodiments, the audio component 710 further includes a speaker for outputting audio signals.
The I/O interface 712 provides an interface between the processing component 702 and peripheral interface modules, which may be a keyboard, click wheel, buttons, etc. These buttons may include, but are not limited to: homepage button, volume button, start button, and lock button.
The sensor assembly 714 includes one or more sensors for providing status assessment of various aspects of the electronic device 700. For example, the sensor assembly 714 may detect an on/off state of the device 700, a relative positioning of the components, such as a display and keypad of the electronic device 700, a change in position of the electronic device 700 or a component of the electronic device 700, the presence or absence of a user's contact with the electronic device 700, an orientation or acceleration/deceleration of the electronic device 700, and a change in temperature of the electronic device 700. The sensor assembly 714 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 714 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 714 may also include an acceleration sensor, a gyroscopic sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 716 is configured to facilitate communication between the electronic device 700 and other devices, either wired or wireless. The electronic device 700 may access a wireless network based on a communication standard, such as WiFi,2G, or 3G, or a combination thereof. In one exemplary embodiment, the communication part 714 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component 714 further includes a Near Field Communication (NFC) module to facilitate short range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device 700 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic elements for executing the methods described above.
In an exemplary embodiment, a non-transitory computer readable storage medium is also provided, such as memory 704, including instructions executable by processor 720 of electronic device 700 to perform the above-described method. For example, the non-transitory computer readable storage medium may be ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
A non-transitory computer readable storage medium, which when executed by a processor of a server, enables the server to perform a method of creating a RAID, applied to the server, the method comprising:
detecting whether a first array card matched with only two magnetic disks exists in a server or not; the two magnetic disks collocated with the first array card are the same in type; the type of the magnetic disk at least comprises a solid state disk or a mechanical hard disk;
under the condition that a first array card matched with only two disks exists in a server, creating RAID1 according to the first array card and the two disks matched with the first array card;
or,
under the condition that a first array card matched with only two magnetic disks does not exist in the server, detecting whether a second array card matched with only one magnetic disk exists in the server or not;
under the condition that a second array card matched with only one disk exists in the server, creating RAID0 according to the second array card and the disk matched with the second array card;
or,
detecting whether a third array card matched with more than three magnetic disks exists in the server under the condition that the second array card matched with only one magnetic disk does not exist in the server;
In the case that a third array card collocated with more than three disks exists in the server, creating RAID1 according to the third array card and two disks with the same type in the more than three disks collocated with the third array card.
In an alternative implementation, the first array card collocated in the server and only collocated with two disks is a plurality of cards;
the creating RAID1 according to the first array card and the two disks collocated by the first array card comprises the following steps:
detecting whether a first array card matched with two solid state disks exists in the plurality of first array cards;
under the condition that a first array card matched with two solid state disks exists in the plurality of first array cards, creating RAID1 according to the first array card matched with the two solid state disks and the two solid state disks matched with the first array card matched with the two solid state disks;
or,
detecting whether a first array card matched with two mechanical hard disks exists in the plurality of first array cards under the condition that the first array card matched with two solid state disks does not exist in the plurality of first array cards;
under the condition that a first array card matched with two mechanical hard disks exists in the plurality of first array cards, RAID1 is created according to the first array card matched with the two mechanical hard disks and the two mechanical hard disks matched with the first array card matched with the two mechanical hard disks.
In an optional implementation manner, at least two first array cards matched with two solid state disks are arranged;
the creating RAID1 according to the first array card matching with the two solid state disks and the two solid state disks matching with the first array card matching with the two solid state disks comprises the following steps:
selecting a first array card with the lowest sum of capacities of the matched solid state disks from at least two first array cards matched with the two solid state disks;
and creating RAID1 according to the selected first array card and the two solid state disks collocated with the selected first array card.
In an alternative implementation, there are at least two first array cards collocated with two mechanical hard disks;
the creating RAID1 according to the first array card collocated with the two mechanical hard disks and the two mechanical hard disks collocated with the first array card collocated with the two mechanical hard disks comprises the following steps:
selecting a first array card with the lowest sum of capacities of matched mechanical hard disks from at least two first array cards matched with two mechanical hard disks;
RAID1 is created according to the selected first array card and the two mechanical hard disks collocated with the selected first array card.
In an alternative implementation, the server is provided with a plurality of second array cards matched with one disk;
The creating RAID0 according to the second array card and one disk collocated by the second array card includes:
detecting whether a second array card matched with a solid state disk exists in the plurality of second array cards;
under the condition that a second array card matched with one solid state disk exists in the plurality of second array cards, RAID0 is established according to the second array card matched with the one solid state disk and the solid state disk matched with the second array card matched with the one solid state disk;
or,
detecting whether a second array card matched with a mechanical hard disk exists in the plurality of second array cards under the condition that the second array card matched with the solid state hard disk does not exist in the plurality of second array cards;
and under the condition that a plurality of second array cards are matched with the second array card of one mechanical hard disk, creating RAID0 according to the second array card matched with the mechanical hard disk and the mechanical hard disk matched with the second array card matched with the mechanical hard disk.
In an optional implementation manner, at least two second array cards matched with one solid state disk are arranged;
the creating RAID0 according to the second array card collocated with the solid state disk and the solid state disk collocated with the second array card collocated with the solid state disk comprises the following steps:
Selecting a second array card with the lowest capacity of the matched solid state disk from at least two second array cards matched with one solid state disk;
and creating RAID0 according to the selected second array card and the selected solid state disk matched with the second array card.
In an alternative implementation, there are at least two second array cards collocated with a mechanical hard disk;
the creating RAID0 according to the second array card collocated with the mechanical hard disk and the mechanical hard disk collocated with the second array card collocated with the mechanical hard disk comprises the following steps:
selecting a second array card with the lowest capacity of the matched mechanical hard disk from at least two second array cards matched with one mechanical hard disk;
RAID0 is created according to the selected second array card and one mechanical hard disk collocated with the selected second array card.
In an alternative implementation, the server is provided with more than three third array cards matched with more than three magnetic disks;
the creating RAID1 according to the third array card and two identical disks in more than three disks collocated by the third array card comprises the following steps:
detecting whether a matched magnetic disk exists in a plurality of third array cards or not, wherein the matched magnetic disk comprises the third array cards of two solid state disks;
Under the condition that a matched magnetic disk comprises a third array card of two solid state disks in the plurality of third array cards, creating RAID1 according to the matched magnetic disk comprising the third array card of two solid state disks and the matched magnetic disk comprising the two solid state disks;
or,
detecting whether a matched disk comprises a third array card of two mechanical hard disks or not in the plurality of third array cards under the condition that the matched disk does not comprise the third array cards of two solid state disks in the plurality of third array cards;
in the case that there is a third array card in which the collocated disk includes two mechanical hard disks in the plurality of third array cards, RAID1 is created according to the third array card in which the collocated disk includes two mechanical hard disks and the two mechanical hard disks collocated by the third array card in which the collocated disk includes two mechanical hard disks.
In an alternative implementation, the collocated magnetic disk comprises at least two third array cards of two solid state disks;
the creating RAID1 according to the matched disk including the third array card of the two solid state disks and the matched disk including the two solid state disks includes:
Selecting a third array card with the lowest sum of capacities of the two matched solid state disks from the third array cards of which the at least two matched magnetic disks comprise the two solid state disks;
and creating RAID1 according to the selected third array card and the two solid state disks collocated with the selected third array card.
In an alternative implementation, the collocated magnetic disk comprises at least two third array cards of two mechanical hard disks;
the creating RAID1 according to the matched disk including the third array card of two mechanical hard disks and the matched disk including the two mechanical hard disks includes:
selecting a third array card with the lowest sum of capacities of the two matched mechanical hard disks from the third array cards with at least two matched magnetic disks comprising the two mechanical hard disks;
RAID1 is created according to the selected third array card and the two mechanical hard disks collocated with the selected third array card.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described by differences from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other.
It will be apparent to those skilled in the art that embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the invention may take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiment and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or terminal device comprising the element.
The foregoing has described in detail a method of creating a RAID, an apparatus for creating a RAID, an electronic device, and a readable storage medium provided by the present invention, and specific examples have been applied herein to illustrate the principles and embodiments of the present invention, and the description of the foregoing examples is only for aiding in the understanding of the method of the present invention and the core concept thereof; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present invention, the present description should not be construed as limiting the present invention in view of the above.

Claims (22)

1. A method of creating a RAID, applied to a server, the method comprising:
detecting whether a first array card matched with only two magnetic disks exists in a server or not; the two magnetic disks collocated with the first array card are the same in type; the type of the magnetic disk at least comprises a solid state disk or a mechanical hard disk;
under the condition that a first array card matched with only two disks exists in a server, creating RAID1 according to the first array card and the two disks matched with the first array card;
or,
under the condition that a first array card matched with only two magnetic disks does not exist in the server, detecting whether a second array card matched with only one magnetic disk exists in the server or not;
Under the condition that a second array card matched with only one disk exists in the server, creating RAID0 according to the second array card and the disk matched with the second array card;
or,
detecting whether a third array card matched with more than three magnetic disks exists in the server under the condition that the second array card matched with only one magnetic disk does not exist in the server;
in the case that a third array card collocated with more than three disks exists in the server, creating RAID1 according to the third array card and two disks with the same type in the more than three disks collocated with the third array card.
2. The method of claim 1, wherein the first array card collocated in the server and collocated with only two disks is a plurality of;
the creating RAID1 according to the first array card and the two disks collocated by the first array card comprises the following steps:
detecting whether a first array card matched with two solid state disks exists in the plurality of first array cards;
under the condition that a first array card matched with two solid state disks exists in the plurality of first array cards, creating RAID1 according to the first array card matched with the two solid state disks and the two solid state disks matched with the first array card matched with the two solid state disks;
Or,
detecting whether a first array card matched with two mechanical hard disks exists in the plurality of first array cards under the condition that the first array card matched with two solid state disks does not exist in the plurality of first array cards;
under the condition that a first array card matched with two mechanical hard disks exists in the plurality of first array cards, RAID1 is created according to the first array card matched with the two mechanical hard disks and the two mechanical hard disks matched with the first array card matched with the two mechanical hard disks.
3. The method of claim 2, wherein there are at least two first array cards collocated with two solid state disks;
the creating RAID1 according to the first array card matching with the two solid state disks and the two solid state disks matching with the first array card matching with the two solid state disks comprises the following steps:
selecting a first array card with the lowest sum of capacities of the matched solid state disks from at least two first array cards matched with the two solid state disks;
and creating RAID1 according to the selected first array card and the two solid state disks collocated with the selected first array card.
4. The method of claim 2, wherein there are at least two first array cards collocated with two mechanical hard disks;
The creating RAID1 according to the first array card collocated with the two mechanical hard disks and the two mechanical hard disks collocated with the first array card collocated with the two mechanical hard disks comprises the following steps:
selecting a first array card with the lowest sum of capacities of matched mechanical hard disks from at least two first array cards matched with two mechanical hard disks;
RAID1 is created according to the selected first array card and the two mechanical hard disks collocated with the selected first array card.
5. The method of claim 1, wherein the second array card collocated with one disk in the server is a plurality of;
the creating RAID0 according to the second array card and one disk collocated by the second array card includes:
detecting whether a second array card matched with a solid state disk exists in the plurality of second array cards;
under the condition that a second array card matched with one solid state disk exists in the plurality of second array cards, RAID0 is established according to the second array card matched with the one solid state disk and the solid state disk matched with the second array card matched with the one solid state disk;
or,
detecting whether a second array card matched with a mechanical hard disk exists in the plurality of second array cards under the condition that the second array card matched with the solid state hard disk does not exist in the plurality of second array cards;
And under the condition that a plurality of second array cards are matched with the second array card of one mechanical hard disk, creating RAID0 according to the second array card matched with the mechanical hard disk and the mechanical hard disk matched with the second array card matched with the mechanical hard disk.
6. The method of claim 5, wherein there are at least two second array cards with one solid state disk;
the creating RAID0 according to the second array card collocated with the solid state disk and the solid state disk collocated with the second array card collocated with the solid state disk comprises the following steps:
selecting a second array card with the lowest capacity of the matched solid state disk from at least two second array cards matched with one solid state disk;
and creating RAID0 according to the selected second array card and the selected solid state disk matched with the second array card.
7. The method of claim 5, wherein there are at least two second array cards collocated with a mechanical hard disk;
the creating RAID0 according to the second array card collocated with the mechanical hard disk and the mechanical hard disk collocated with the second array card collocated with the mechanical hard disk comprises the following steps:
selecting a second array card with the lowest capacity of the matched mechanical hard disk from at least two second array cards matched with one mechanical hard disk;
RAID0 is created according to the selected second array card and one mechanical hard disk collocated with the selected second array card.
8. The method of claim 1, wherein the server has a plurality of third array cards collocated with more than three disks;
the creating RAID1 according to the third array card and two identical disks in more than three disks collocated by the third array card comprises the following steps:
detecting whether a matched magnetic disk exists in a plurality of third array cards or not, wherein the matched magnetic disk comprises the third array cards of two solid state disks;
under the condition that a matched magnetic disk comprises a third array card of two solid state disks in the plurality of third array cards, creating RAID1 according to the matched magnetic disk comprising the third array card of two solid state disks and the matched magnetic disk comprising the two solid state disks;
or,
detecting whether a matched disk comprises a third array card of two mechanical hard disks or not in the plurality of third array cards under the condition that the matched disk does not comprise the third array cards of two solid state disks in the plurality of third array cards;
in the case that there is a third array card in which the collocated disk includes two mechanical hard disks in the plurality of third array cards, RAID1 is created according to the third array card in which the collocated disk includes two mechanical hard disks and the two mechanical hard disks collocated by the third array card in which the collocated disk includes two mechanical hard disks.
9. The method of claim 8, wherein the collocated disk comprises at least two third array cards of two solid state disks;
the creating RAID1 according to the matched disk including the third array card of the two solid state disks and the matched disk including the two solid state disks includes:
selecting a third array card with the lowest sum of capacities of the two matched solid state disks from the third array cards of which the at least two matched magnetic disks comprise the two solid state disks;
and creating RAID1 according to the selected third array card and the two solid state disks collocated with the selected third array card.
10. The method of claim 8, wherein the collocated disk comprises at least two third array cards of two mechanical hard disks;
the creating RAID1 according to the matched disk including the third array card of two mechanical hard disks and the matched disk including the two mechanical hard disks includes:
selecting a third array card with the lowest sum of capacities of the two matched mechanical hard disks from the third array cards with at least two matched magnetic disks comprising the two mechanical hard disks;
RAID1 is created according to the selected third array card and the two mechanical hard disks collocated with the selected third array card.
11. An apparatus for creating a RAID, applied to a server, comprising:
the first detection module is used for detecting whether a first array card matched with only two magnetic disks exists in the server or not; the two magnetic disks collocated with the first array card are the same in type; the type of the magnetic disk at least comprises a solid state disk or a mechanical hard disk;
the first creating module is used for creating RAID1 according to the first array card and the two disks collocated by the first array card under the condition that the first array card collocated by the two disks exists in the server;
or,
the second detection module is used for detecting whether a second array card matched with only one magnetic disk exists in the server or not under the condition that the first array card matched with only two magnetic disks does not exist in the server;
the second creating module is used for creating RAID0 according to the second array card and one disk matched with the second array card under the condition that the second array card matched with only one disk exists in the server;
or,
the third detection module is used for detecting whether a third array card matched with more than three magnetic disks exists in the server under the condition that the second array card matched with only one magnetic disk does not exist in the server;
And the third creating module is used for creating RAID1 according to the third array card and two disks with the same type in the three or more disks collocated by the third array card under the condition that the third array card collocated with the three or more disks exists in the server.
12. The apparatus of claim 11, wherein the first array of cards collocated in the server and collocated with only two disks is a plurality of cards;
the first creation module includes:
the first detection unit is used for detecting whether a first array card matched with two solid state disks exists in the plurality of first array cards;
the first creating unit is used for creating RAID1 according to the first array card matched with the two solid state disks and the two solid state disks matched with the first array card matched with the two solid state disks under the condition that the first array cards matched with the two solid state disks exist in the plurality of first array cards;
or,
the second detection unit is used for detecting whether the first array cards matched with the two mechanical hard disks exist in the plurality of first array cards under the condition that the first array cards matched with the two solid state disks do not exist in the plurality of first array cards;
the second creating unit is configured to create RAID1 according to the first array card matching two mechanical hard disks and the two mechanical hard disks matching the first array card matching two mechanical hard disks when there are first array cards matching two mechanical hard disks in the plurality of first array cards.
13. The device of claim 12, wherein there are at least two first array cards collocated with two solid state disks;
the first creation unit includes:
the first selecting subunit is used for selecting a first array card with the lowest sum of capacities of the matched solid state disks from at least two first array cards matched with the two solid state disks;
the first creating subunit is configured to create RAID1 according to the selected first array card and the two solid state disks collocated with the selected first array card.
14. The apparatus of claim 12, wherein there are at least two first array cards collocated with two mechanical hard disks;
the second creation unit includes:
a second selecting subunit, configured to select, from at least two first array cards collocated with two mechanical hard disks, a first array card with a lowest sum of capacities of the collocated mechanical hard disks;
and the second creation subunit is used for creating RAID1 according to the selected first array card and the two mechanical hard disks collocated with the selected first array card.
15. The apparatus of claim 11, wherein the second array card is a plurality of cards collocated with one disk in the server;
the second creation module includes:
The third detection unit is used for detecting whether a second array card matched with a solid state disk exists in the plurality of second array cards;
the third creating unit is used for creating RAID0 according to the second array card matched with the solid state disk and the solid state disk matched with the second array card matched with the solid state disk under the condition that the second array card matched with the solid state disk exists in the plurality of second array cards;
or,
the fourth detection unit is used for detecting whether a second array card matched with a mechanical hard disk exists in the plurality of second array cards under the condition that the second array card matched with the solid state hard disk does not exist in the plurality of second array cards;
and the fourth creating unit is used for creating RAID0 according to the second array card matched with one mechanical hard disk and the mechanical hard disk matched with the second array card matched with one mechanical hard disk under the condition that the second array card matched with one mechanical hard disk exists in the plurality of second array cards.
16. The device of claim 15, wherein there are at least two second array cards with one solid state disk;
the third creation unit includes:
the third selecting subunit is used for selecting a second array card with the lowest capacity of the matched solid state disk from at least two second array cards matched with one solid state disk;
And the third creating subunit is used for creating RAID0 according to the selected second array card and the selected solid state disk collocated with the second array card.
17. The apparatus of claim 15, wherein there are at least two second array cards with one mechanical hard disk;
the fourth creation unit includes:
a fourth selecting subunit, configured to select, from at least two second array cards collocated with one mechanical hard disk, a second array card with a lowest capacity of the collocated mechanical hard disk;
and the fourth creating subunit is used for creating RAID0 according to the selected second array card and one mechanical hard disk collocated with the selected second array card.
18. The apparatus of claim 11, wherein the server has a plurality of third array cards collocated with more than three disks;
the third creation module includes:
the fifth detection unit is used for detecting whether a matched magnetic disk exists in the plurality of third array cards or not, wherein the third array card comprises two solid state disks;
a fifth creating unit, configured to create RAID1 according to, when there are matched disks including two solid state disks in the plurality of third array cards, the matched disks including the two solid state disks and the two solid state disks matched by the matched disks including the two solid state disks;
Or,
the sixth detection unit is configured to detect whether a matched disk includes a third array card of two mechanical hard disks in the plurality of third array cards when the matched disk includes two third array cards of two solid state disks in the plurality of third array cards;
and a sixth creating unit, configured to create RAID1 according to the matched magnetic disk including the two mechanical hard disks of the third array card and the matched magnetic disk including the two mechanical hard disks of the third array card matched with the two mechanical hard disks of the third array card when there is a matched magnetic disk including the two mechanical hard disks of the third array card in the plurality of third array cards.
19. The apparatus of claim 18, wherein the collocated disk comprises at least two third array cards of two solid state disks;
the fifth creation unit includes:
a fifth selecting subunit, configured to select, from among the at least two matched magnetic disks that include the third array cards of the two solid state disks, a third array card that has a sum of capacities of the two matched solid state disks that is the lowest;
and the fifth creating subunit is used for creating RAID1 according to the selected third array card and the two solid state disks collocated by the selected third array card.
20. The apparatus of claim 18, wherein the collocated disk comprises at least two third array cards of two mechanical hard disks;
the sixth creation unit includes:
a sixth selecting subunit, configured to select, from among the at least two matched third array cards whose magnetic disks include two mechanical hard disks, a third array card whose sum of capacities of the two matched mechanical hard disks is the lowest;
and a sixth creating subunit, configured to create RAID1 according to the selected third array card and the two mechanical hard disks collocated with the selected third array card.
21. The electronic equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the method of any one of claims 1-10 when executing a program stored on a memory.
22. A readable storage medium, characterized in that instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the method of any one of claims 1-10.
CN202311041057.1A 2023-08-17 2023-08-17 Method, device, equipment and medium for creating RAID Pending CN117111844A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311041057.1A CN117111844A (en) 2023-08-17 2023-08-17 Method, device, equipment and medium for creating RAID

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311041057.1A CN117111844A (en) 2023-08-17 2023-08-17 Method, device, equipment and medium for creating RAID

Publications (1)

Publication Number Publication Date
CN117111844A true CN117111844A (en) 2023-11-24

Family

ID=88808467

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311041057.1A Pending CN117111844A (en) 2023-08-17 2023-08-17 Method, device, equipment and medium for creating RAID

Country Status (1)

Country Link
CN (1) CN117111844A (en)

Similar Documents

Publication Publication Date Title
RU2630580C1 (en) Information push method and device
EP2945058B1 (en) Processing method and device for application program
CN110086877B (en) Application program sharing and information sharing display method, device, equipment and medium
CN107291626B (en) Data storage method and device
KR20170086750A (en) Controlling function and electronic device supporting the same
US10001919B2 (en) Apparatus for providing integrated functions of dial and calculator and method thereof
KR20200015000A (en) Method for memory leak detection and electronic device thereof
CN111966410B (en) Start-up processing method and device, electronic equipment and storage medium
US20160286132A1 (en) Electronic device and method for photographing
CN111258952B (en) Data storage control method, device and storage medium
US20200201518A1 (en) Method for starting application and electronic device for implementing same
CN107153546A (en) A kind of video broadcasting method and mobile device
CN112308864A (en) Image processing method and device, electronic equipment and storage medium
CN113596175A (en) Scene synchronization method, terminal, server and system
CN105205153A (en) File storage method and device
EP3118729A1 (en) Method and device for presenting tasks
US9753933B2 (en) Electronic device and method for mounting file system using virtual block device
CN117111844A (en) Method, device, equipment and medium for creating RAID
CN106502809A (en) A kind of multi-platform application program adaptation method, device and terminal unit
CN108628883B (en) Data processing method and device and electronic equipment
CN113836069B (en) Chip, pin operation method, readable storage medium and electronic device
CN116361071B (en) Backup file generation method, device, equipment and storage medium
CN111241097B (en) Method for processing object, device for processing object and storage medium
CN111625251B (en) Method and device for processing application instance
CN112286609B (en) Method and device for managing shortcut setting items of intelligent terminal

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