Hard RAID creation method under a kind of milky way kylin operating system
Technical field
The present invention relates to the creation method of hard RAID under milky way kylin operating system a kind of, belong to the technology of Computer Storage
Field.
Background technology
Disk array (RAID) its pattern has three kinds, one is circumscribed magnetic disk array cabinet, two is internal connecting type magnetic disc array card,
Three are emulated using software.Circumscribed magnetic disk array cabinet is most often used on large server, and tool can heat exchange (Hot
Swap characteristic), but the price of this kind of product is all expensive.Internal connecting type magnetic disc array card, because it is cheap, but need higher
Mounting technique, be adapted to technical staff using operation.Hardware array can provide on-line rapid estimation, dynamic modification array rank, from
The functions such as dynamic data recovery, driver roaming, ultrahigh speed buffering.It can provide performance, data protection, reliability, availability and
The solution of manageability.RAID card special processing unit is operated.Using the mode of software emulation, refer to pass through
Polylith hard disk on the common SCSI card of connection is configured to Logical Disk by the disk management function that network operating system itself is provided,
Constitute array.Software array can provide data redundancy function, but the performance of disk subsystem can decrease, some reductions
Amplitude is also than larger, up to 30% or so.Therefore the speed of machine can be tied down, is not suitable for the server of big data flow.
Milky way kylin operating system is by the National University of Defense technology, CS&S, Legend Company, Langchao Group and national fixed star
The open source operating system of company's cooperation research and development.Give tacit consent under milky way kylin operating system and software PLC is supported, pass through kernel
Multi-disk (MD) drives the RAID for being achieved independently of hardware.Software PLC performance depends on server cpu performance and load, and
Outside hard RAID performance but can be independently of systematic function.
Outside hard RAID management is independently of main frame, configured by the driving of hard RAID card, system host can not be direct
Bottom disk is obtained, each RAID is presented to main frame similar to a single disk.Hard RAID card is similar to scsi controller, uses
To operate and control the disk drive of reality.Hard RAID is outside RAID card, in addition it is also necessary to the support of corresponding kernel-driven, Yi Jiyong
In operative configuration RAID instrument.
Compared with Linux distribution edition systems, milky way kylin operating system belongs to domestic operating system, dedicated for supporting
The domestic Feiteng processor platform of ARM frameworks, the system safely controllable in order to be adapted to domestic CPU and equipment and safeguards system
The operating system nucleus technology such as Linux, FreeBSD has been used for reference, the advantage of grand kernel and microkernel designs, autonomous Design is taken into account
Hierarchy type inner core, modifies to XWindow cores in system, reinforces, and adds in operating system the kernel mould of oneself
Block.
The content of the invention
In view of the shortcomings of the prior art, the present invention provides the creation method of hard RAID under milky way kylin operating system a kind of.
Summary of the invention:
The present invention proposes a kind of method being supported under milky way kylin operating system to hard RAID functions, RAID card
Using LSI MegaRAID SAS 9260-8i, driven, successfully realized using MegaCli instruments by compiling and configuring RAID card
System is to RAID0, RAID1, RAID5 establishment, initialization and deletes, so that the safety of data storage and steady under guarantee system
It is fixed.
The technical scheme is that:
Hard RAID creation method under a kind of milky way kylin operating system, including step are as follows:
1) using kernel version used in uname-ar order acquisition milky way kylin operating systems, the version is further obtained
The linux kernel header file storehouse that this kernel is used when compiling, is carried out using the header file storehouse to the driving code of RAID card
Compiling, generates corresponding ko files;The realization of RAID card function needs the support of correspondence driving, is in the operation of domestic acceptance of the bid kylin
The lower acquiescence of system does not load respective drive;Thus need to generate ko files by aforesaid operations.The kernel version of kylin operating system
There is 3.14 editions kernel etc..
2) using the described ko files of drive load order insmod loadings, it is using lspci-k order detection RAID cards
Whether the driving code in no identified and ko files is successfully loaded;
3) the current runlevel N of milky way kylin operating system system is checked using runlevel orders, while modification pair
Answer /etc/rcN.d/rc.local files, by drive load order insmod write-in start self-triggered programs;Driving is added
Order write-in start process is carried so that system can the automatic loading correspondence driving in start;
4) using dpkg-i megacli.deb orders in milky way kylin operating system loading MegaCli instruments;MegaCli
Instrument realizes the management to hard RAID.
5) RAID X establishment is carried out using MegaCli-CfgLdAdd-rX orders;
6) using MegaCli-LdInit-start-full-L0-a0 order to step 5) the RAID X that create carry out it is initial
Change, wherein ,-a0 specifies RAID adapter, and-L0 specifies first RAID array created under the adapter;
7) ordered using MegaCli-CfgLdDel-L0-a0 and the RAID X created are deleted, wherein-a0 is specified
RAID adapter ,-l0 specifies first RAID array created under the adapter;
Preferred according to the present inventor, the RAID card is LSI MegaRAID SAS 9260-8i.
Preferred according to the present inventor, the step 5) in X be 0,1 or 5.
Preferred according to the present inventor, the step 2) in, using lspci-k order detection RAID cards it is whether identified and
The specific method whether the driving code in ko files is successfully loaded is, if having RAID in lspci-k order output contents
Controller corresponding model, and corresponding kernel in use entries show corresponding driving, then judge RAID card quilt
Driving code in identification and ko files is successfully loaded;Otherwise judge that RAID card is unrecognized, the driving code in ko files
It is not successfully loaded.
Beneficial effects of the present invention are:
1st, the scheme of hard Raid establishments is not carried out under milky way kylin operating system also in the prior art;It is of the present invention
Hard RAID creation method is specifically applied to the hard of milky way kylin operating system there is provided a kind of under milky way kylin operating system
RAID creation method, has filled up the deficiencies in the prior art;Traditional hard RAID establishment is typically the BIOS using RAID card
What instrument was carried out, need to initially enter the BIOS configuration interfaces of RAID card after machine startup, with postponing can be just by cumbersome
The lower normal identification RAID hard disks of system.The management that the configuration tool software provided by the present invention carries out hard RAID eliminates RAID card
The cumbersome configuration step of BIOS instruments, makes configuration process more flexibly easy-to-use, and in the case where there is configuration error, it is more sharp
Modified in configuration item, be greatly improved hard RAID allocative efficiency;
2nd, the present invention provides the creation method of hard RAID under milky way kylin operating system a kind of, and the establishment mode with regard to Raid is come
See, soft Raid establishment mode has larger dependence to server CPU performance and loading condition, and hard Raid performance is main
There is provided, can be decoupled with systematic function by Raid cards.
Brief description of the drawings
Fig. 1 is the flow chart of hard RAID creation method under milky way kylin operating system of the present invention.
Embodiment
With reference to embodiment and Figure of description, the present invention will be further described, but not limited to this.
Embodiment 1
As shown in Figure 1.
Hard RAID creation method under a kind of milky way kylin operating system, including step are as follows:
1) using kernel version used in uname-ar order acquisition milky way kylin operating systems, the version is further obtained
The linux kernel header file storehouse that this kernel is used when compiling, is carried out using the header file storehouse to the driving code of RAID card
Compiling, generates corresponding ko files;The realization of RAID card function needs the support of correspondence driving, is in the operation of domestic acceptance of the bid kylin
The lower acquiescence of system does not load respective drive;Thus need to generate ko files by aforesaid operations.The kernel version of kylin operating system
There is 3.14 editions kernel etc..
2) using the described ko files of drive load order insmod loadings, it is using lspci-k order detection RAID cards
Whether the driving code in no identified and ko files is successfully loaded;
3) the current runlevel N of milky way kylin operating system system is checked using runlevel orders, while modification pair
Answer /etc/rcN.d/rc.local files, by drive load order insmod write-in start self-triggered programs;Driving is added
Order write-in start process is carried so that system can the automatic loading correspondence driving in start;
4) using dpkg-i megacli.deb orders in milky way kylin operating system loading MegaCli instruments;MegaCli
Instrument realizes the management to hard RAID.
5) RAID X establishment is carried out using MegaCli-CfgLdAdd-rX orders;
6) using MegaCli-LdInit-start-full-L0-a0 order to step 5) the RAID X that create carry out it is initial
Change, wherein ,-a0 specifies RAID adapter, and-L0 specifies first RAID array created under the adapter;
7) ordered using MegaCli-CfgLdDel-L0-a0 and the RAID X created are deleted, wherein-a0 is specified
RAID adapter ,-l0 specifies first RAID array created under the adapter;
Embodiment 2
Hard RAID creation method under milky way kylin operating system as described in Example 1, except that, the RAID
Block for LSI MegaRAID SAS 9260-8i.
Embodiment 3
Hard RAID creation method under milky way kylin operating system as described in Example 1, except that, the step
5) X is 0 in.
Embodiment 4
Hard RAID creation method under milky way kylin operating system as described in Example 3, except that, the step
5) X is 1 in.
Embodiment 5
Hard RAID creation method under milky way kylin operating system as described in Example 3, except that, the step
5) X is 5 in.
Embodiment 6
Hard RAID creation method under milky way kylin operating system as described in Example 1, except that, the step
2) in, using lspci-k order the detection RAID card whether identified and ko files in driving code whether be successfully loaded
Specific method is, if there is RAID Controller corresponding model in lspci-k order output contents, and accordingly
Kernel in use entries show corresponding driving, then judge that RAID card is identified and the driving code in ko files by into
Work(is loaded;Otherwise judge that RAID card is unrecognized, the driving code in ko files is not successfully loaded.