CN107992267A - A kind of method and system of the serial automatically formatting of more hard disks - Google Patents

A kind of method and system of the serial automatically formatting of more hard disks Download PDF

Info

Publication number
CN107992267A
CN107992267A CN201711182137.3A CN201711182137A CN107992267A CN 107992267 A CN107992267 A CN 107992267A CN 201711182137 A CN201711182137 A CN 201711182137A CN 107992267 A CN107992267 A CN 107992267A
Authority
CN
China
Prior art keywords
eof
hard disk
formatting
automatically formatting
automatically
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
CN201711182137.3A
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.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201711182137.3A priority Critical patent/CN107992267A/en
Publication of CN107992267A publication Critical patent/CN107992267A/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/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • 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/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0674Disk device
    • G06F3/0676Magnetic disk device
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Human Computer Interaction (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A kind of method of the serial automatically formatting of more hard disks, specifically includes following steps:Automatically formatting is carried out to single hard disk;Realized by serial loop and automatically formatting is carried out to all hard disks.Further include a kind of system of the serial automatically formatting of more hard disks.The automatically formatting to single hard disk is realized first, and the automatically formatting to all hard disks is then realized by a serial loop.

Description

A kind of method and system of the serial automatically formatting of more hard disks
Technical field
The present invention relates to formatting hard disk technical field, specifically a kind of method of the serial automatically formatting of more hard disks And system.
Background technology
Hard disk is mass-memory unit basic in server, required letter when being mainly used for providing server operation Breath, and the program and data files that storage server system is all.Hard disk quantity differs in the server of different type of machines, few then several Block, at most more than ten pieces or tens of pieces.It is frequently necessary to carry out formatting hard disk in server use or hard disk performance test process Operation.Hard-disk capacity or internal fragmentation amount can influence formatted. times, and general monolithic formatting hard disk time from a few minutes are to several Ten minutes even a few hours were differed.
The mode for formatting hard disk now is generally:Input formatization instructs, and --- input Y confirms --- waits a timing Between after terminate automatically.This mode successively can only be formatted monolithic hard disk every time above, whenever one hard disk of completion After formatting, then it is manually entered the formatting that instruction carries out next piece of hard disk.If having tens pieces of hard disks, above mode can carry High human cost.
Therefore the problem of automatically formatting of polylith hard disk is one in the urgent need to address how is realized.
The content of the invention
It is an object of the invention to provide a kind of method and system of more serial automatically formattings of hard disk, for solving to more It can not automatically be carried out during block formatting hard disk, take the problem of more.
The technical scheme adopted by the invention to solve the technical problem is that:
A kind of method of the serial automatically formatting of more hard disks, specifically includes following steps:
Automatically formatting is carried out to single hard disk;
Realized by serial loop and automatically formatting is carried out to all hard disks.
Further, it is specially to the method for single hard disk progress automatically formatting:
It is formatted order;
Automatically entering for " Y " is realized by EOF interactive modes;
It is formatted.
Further, the EOF interactive modes are specially:
Will "<<" be used in combination with EOF composition order "<<EOF”;
To order "<<EOF " is applied in combination with EOF.
Further, realize that the method that all hard disks are carried out with automatically formatting is specially by serial loop:
Single hard disk automatically formatting is performed by recursion instruction.
Further, the recursion instruction includes for recursion instructions.
A kind of system of the serial automatically formatting of more hard disks, using the method, for by polylith hard disk into row format Change, further include EOF interactive systems, for carrying out automatically formatting to monolithic hard disk;With,
The circulatory system, for carrying out multiple cycle operation to EOF interactive systems, realizes polylith hard disk automatically formatting.
Further, the EOF interactive systems pass through formatting command and EOF to monolithic hard disk progress automatically formatting Order.
Further, the formatting command includes mkfs, and the EOF orders include<<EOF.
Further, the circulatory system realizes the automatically formatting of polylith hard disk using for loop commands.
What the above content of the invention provided is only the statement of the embodiment of the present invention, rather than invention is in itself.
The effect provided in the content of the invention is only the effect of embodiment, rather than whole effects that invention is all, above-mentioned A technical solution in technical solution has the following advantages that or beneficial effect:
A technical solution in technical solution of the present invention realizes the automatically formatting to single hard disk first, then passes through one A serial loop realizes the automatically formatting to all hard disks.The efficiency of formatting hard disk is improved, has saved human cost.
Brief description of the drawings
Attached drawing described herein is used for providing that the present invention is explained further, and forms the part of the application, this hair Bright schematic description and description is used to explain the present invention, does not form inappropriate limitation of the present invention.In the accompanying drawings:
Fig. 1 is the method flow schematic diagram of the embodiment of the present invention;
Fig. 2 is the system structure diagram of the embodiment of the present invention.
Embodiment
In order to the technical characterstic of clear explanation this programme, below by embodiment, and its attached drawing is combined, to this Invention is described in detail.Following disclosure provides many different embodiments or example is used for realizing the different knots of the present invention Structure.In order to simplify disclosure of the invention, hereinafter the component and setting of specific examples are described.In addition, the present invention can be with Repeat reference numerals and/or letter in different examples.This repetition is that for purposes of simplicity and clarity, itself is not indicated Relation between various embodiments are discussed and/or are set.It should be noted that illustrated component is not necessarily to scale in the accompanying drawings Draw.Present invention omits the description to known assemblies and treatment technology and process to avoid the present invention is unnecessarily limiting.
As shown in Figure 1, a kind of method of the serial automatically formatting of more hard disks, specifically includes following steps:
Step 1) carries out automatically formatting to single hard disk;
Step 2) is realized by serial loop carries out automatically formatting to all hard disks.
It is specially to the method for single hard disk progress automatically formatting in step 1) operation:
Step 11) is formatted order;
Step 12) realizes automatically entering for " Y " by EOF interactive modes;
Step 13) is formatted.
EOF interactive modes are specially:
Will "<<" be used in combination with EOF composition order "<<EOF”;
To order "<<EOF " is applied in combination with EOF.
, can EOF interactive modes as follows when carrying out single hard disk automatically formatting to certain model hard disk sdb:
./msecli407.dat–X–B–n/dev/sdb<<EOF
Y
EOF
“<<EOF " represents the follow-up input inputted as subcommand or sub- shell, until running into " EOF ", again returns to To homophony shell, delimiter can be understood as.
Realize that the method that all hard disks are carried out with automatically formatting is specially by serial loop:Performed by recursion instruction Single hard disk automatically formatting.
Recursion instruction includes for recursion instructions.Concrete mode is as follows:
for i in{b..f}
do
./msecli407.dat–X–B–n/dev/sd$i<<EOF
Y
EOF
done
As shown in Fig. 2, a kind of system of the serial automatically formatting of more hard disks, for polylith hard disk to be formatted, bag EOF interactive systems are included, for carrying out automatically formatting to monolithic hard disk;With the circulatory system, for being carried out to EOF interactive systems Multiple cycle operation, realizes polylith hard disk automatically formatting.
EOF interactive systems carry out automatically formatting to monolithic hard disk and pass through formatting command and EOF orders.
Formatting command includes mkfs, and the EOF orders include<<EOF.
The circulatory system realizes the automatically formatting of polylith hard disk using for loop commands.
The above is the preferred embodiment of the present invention, for those skilled in the art, Without departing from the principles of the invention, some improvements and modifications can also be made, these improvements and modifications are also regarded as this hair Bright protection domain.

Claims (9)

1. a kind of method of the serial automatically formatting of more hard disks, it is characterized in that, specifically include following steps:
Automatically formatting is carried out to single hard disk;
Realized by serial loop and automatically formatting is carried out to all hard disks.
2. according to the method described in claim 1, it is characterized in that, to single hard disk carry out automatically formatting method be specially:
It is formatted order;
Automatically entering for " Y " is realized by EOF interactive modes;
It is formatted.
3. according to the method described in claim 2, it is characterized in that, the EOF interactive modes are specially:
Will "<<" be used in combination with EOF composition order "<<EOF”;
To order "<<EOF " is applied in combination with EOF.
4. according to the method described in claim 1, it is characterized in that, by serial loop realize to all hard disks carry out automatic format The method of change is specially:
Single hard disk automatically formatting is performed by recursion instruction.
5. according to the method described in claim 4, it is characterized in that, the recursion instruction includes for recursion instructions.
6. a kind of system of the serial automatically formatting of more hard disks, using the method described in claim 1 to 5 any one, is used for Polylith hard disk is formatted, it is characterized in that, EOF interactive systems are further included, for carrying out automatically formatting to monolithic hard disk; With,
The circulatory system, for carrying out multiple cycle operation to EOF interactive systems, realizes polylith hard disk automatically formatting.
7. system according to claim 6, it is characterized in that, the EOF interactive systems carry out automatic lattice to monolithic hard disk Formula passes through formatting command and EOF orders.
8. system according to claim 7, it is characterized in that, the formatting command includes mkfs, the EOF orders Including<<EOF.
9. system according to claim 6, it is characterized in that, the circulatory system realizes polylith using for loop commands The automatically formatting of hard disk.
CN201711182137.3A 2017-11-23 2017-11-23 A kind of method and system of the serial automatically formatting of more hard disks Pending CN107992267A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711182137.3A CN107992267A (en) 2017-11-23 2017-11-23 A kind of method and system of the serial automatically formatting of more hard disks

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711182137.3A CN107992267A (en) 2017-11-23 2017-11-23 A kind of method and system of the serial automatically formatting of more hard disks

Publications (1)

Publication Number Publication Date
CN107992267A true CN107992267A (en) 2018-05-04

Family

ID=62032626

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711182137.3A Pending CN107992267A (en) 2017-11-23 2017-11-23 A kind of method and system of the serial automatically formatting of more hard disks

Country Status (1)

Country Link
CN (1) CN107992267A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109086007A (en) * 2018-07-25 2018-12-25 郑州云海信息技术有限公司 The method and system that a kind of pair of polymorphic type hard disk is formatted

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102736864A (en) * 2012-06-19 2012-10-17 杭州海康威视数字技术股份有限公司 Method and device for formatting hard disk
CN104238960A (en) * 2014-08-28 2014-12-24 华为技术有限公司 Hard disk formatting method, block data storage method based on hard disk and block data storage device based on hard disk
CN105022648A (en) * 2015-07-23 2015-11-04 浪潮电子信息产业股份有限公司 Test method for HCA card performance and pressure test based on expect command
CN105302681A (en) * 2015-11-04 2016-02-03 浪潮电子信息产业股份有限公司 Automatic test method for disk performance of rack whole cabinet
CN105471675A (en) * 2015-11-20 2016-04-06 浪潮电子信息产业股份有限公司 Method and system of testing nodes in batches

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102736864A (en) * 2012-06-19 2012-10-17 杭州海康威视数字技术股份有限公司 Method and device for formatting hard disk
CN104238960A (en) * 2014-08-28 2014-12-24 华为技术有限公司 Hard disk formatting method, block data storage method based on hard disk and block data storage device based on hard disk
CN105022648A (en) * 2015-07-23 2015-11-04 浪潮电子信息产业股份有限公司 Test method for HCA card performance and pressure test based on expect command
CN105302681A (en) * 2015-11-04 2016-02-03 浪潮电子信息产业股份有限公司 Automatic test method for disk performance of rack whole cabinet
CN105471675A (en) * 2015-11-20 2016-04-06 浪潮电子信息产业股份有限公司 Method and system of testing nodes in batches

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109086007A (en) * 2018-07-25 2018-12-25 郑州云海信息技术有限公司 The method and system that a kind of pair of polymorphic type hard disk is formatted

Similar Documents

Publication Publication Date Title
CN110147240B (en) Cloud storage-based application program installation method, system and storage medium
CN105487987B (en) A kind of concurrent sequence of processing reads the method and device of IO
CN103677976B (en) A kind of event-handling method and device based on time wheel timer
CN104123184A (en) Method and system for allocating resources for tasks in constructing process
WO2021012868A1 (en) Transaction rollback method and apparatus, database, system, and computer storage medium
CN105677465B (en) The data processing method and device of batch processing are run applied to bank
CN110910921A (en) Command read-write method and device and computer storage medium
CN104461743A (en) Device and method for automatically generating resources and configuration
CN110502523A (en) Business datum storage method, device, server and computer readable storage medium
CN104268291A (en) Data consistency processing method and system
US20140007058A1 (en) Determining snapshot placement
CN107818790A (en) A kind of Multi-channel audio sound mixing method and device
CN103678696A (en) Method and device for controlling data read-write separation
CN107992267A (en) A kind of method and system of the serial automatically formatting of more hard disks
CN104317634A (en) Information flow simulation system and method suitable for mode assignment
CN106445418A (en) Method and device for self-adaptingread-write services in solid state disk
CN107517223A (en) A kind of method and system of long-range renewal mellanox network card softwares
CN108334392B (en) Start method, storage medium, equipment and the system of the page in Android system
WO2019061667A1 (en) Electronic apparatus, data processing method and system, and computer-readable storage medium
CN109101229A (en) A kind of code automatic generation method of object-oriented, device and equipment
CN113031944B (en) Business opening device and method based on template
WO2023155695A1 (en) Processor, control method, device, and medium
CN106919483A (en) A kind of method and system of real-time display dd testing progress
CN107391708B (en) Method and device for storing performance statistics file in storage system
CN102541520B (en) Method and device for inversely writing table data association

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20180504

RJ01 Rejection of invention patent application after publication