CN109086007A - The method and system that a kind of pair of polymorphic type hard disk is formatted - Google Patents
The method and system that a kind of pair of polymorphic type hard disk is formatted Download PDFInfo
- Publication number
- CN109086007A CN109086007A CN201810827137.2A CN201810827137A CN109086007A CN 109086007 A CN109086007 A CN 109086007A CN 201810827137 A CN201810827137 A CN 201810827137A CN 109086007 A CN109086007 A CN 109086007A
- Authority
- CN
- China
- Prior art keywords
- hard disk
- formatted
- formatting
- type
- facility
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0604—Improving or facilitating administration, e.g. storage management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0629—Configuration or reconfiguration of storage systems
- G06F3/0632—Configuration or reconfiguration of storage systems by initialisation or re-initialisation of storage systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0673—Single storage device
- G06F3/0674—Disk device
- G06F3/0676—Magnetic disk device
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0638—Organizing or formatting or addressing of data
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Signal Processing For Digital Recording And Reproducing (AREA)
Abstract
The present invention provides the method and system that a kind of pair of polymorphic type hard disk is formatted, and includes the following steps: that step S1. establishes Formatting Facility library according to hard disk type;Step S2. scanning server hard disk obtains hard disk and hard disk type corresponding relationship;Step S3. obtains the type of hard disk to be formatted according to hard disk and hard disk type corresponding relationship;Step S4. selects Formatting Facility from Formatting Facility library according to the type of hard disk to be formatted;Step S5. treats formatting hard disk using the formative implement of selection and is formatted.System includes: that module, hard disk and hard disk type corresponding relationship acquisition module, hard disk type to be formatted acquisition module, Formatting Facility selecting module and formatting hard disk module are established in Formatting Facility library.All types hard disk in server is carried out automatically formatting automatically by the present invention, easy to operate without manually checking hard disk type in server, high-efficient, saves human cost.
Description
Technical field
The invention belongs to formatting hard disk fields, and in particular to the method and be that a kind of pair of polymorphic type hard disk is formatted
System.
Background technique
Hard disk is the basic mass-memory unit of server, information needed when being mainly used for providing server operation,
And the program and data files that storage server system is all.In server test process, an important aspect is to hard disk
It is tested for the property.It is frequently necessary to for hard disk to be formatted operation during test and server O&M.But same
Hard disk type might have a variety of in server, and hard disk type is different, and formatting method is generally different.
Formatting hard disk operation is generally performed manually by present, first checks the type of each hard disk in server, then
Tool needed for selecting corresponding types respectively, then carries out manual format manipulation.It is not carried out automation, efficiency is lower.Cause
How this, realize that the automatically formatting of polymorphic type hard disk in server is a urgent problem.
This is the deficiencies in the prior art, therefore, in view of the above-mentioned drawbacks in the prior art, provides a kind of pair of polymorphic type hard disk
The method and system being formatted, are necessary.
Summary of the invention
It is an object of the present invention to different for above-mentioned current hard disk type, formatting method is different, to different type hand
The low defect of dynamic formatting hard disk operating efficiency, provides the method and system that a kind of pair of polymorphic type hard disk is formatted, with solution
Certainly above-mentioned technical problem.
To achieve the above object, the present invention provides following technical scheme:
The method that a kind of pair of polymorphic type hard disk is formatted, includes the following steps:
Step S1. establishes Formatting Facility library according to hard disk type;
Step S2. scanning server hard disk obtains hard disk and hard disk type corresponding relationship;
Step S3. obtains the type of hard disk to be formatted according to hard disk and hard disk type corresponding relationship;
Step S4. selects Formatting Facility from Formatting Facility library according to the type of hard disk to be formatted;
Step S5. treats formatting hard disk using the formative implement of selection and is formatted.
Further, pass through all hard disks in hard disk scanning tools smartctl successively scanning server in step S2.Clothes
The drive that each hard disk in business device has oneself to fix, passes through all hard disks in smartctl tool successively scanning server
Type just generates disk identifier of hard disk with the table of comparisons of hard disk type after whole hard disks are scanned.
Further, further include following steps before step S4:
Step SA4 judges whether the hard disk type of hard disk to be formatted has corresponding Formatting Facility in Formatting Facility library;
If nothing, will be added in Formatting Facility library to the corresponding Formatting Facility of the hard disk type of format hard disk, into step
Rapid S4;
If so, being then directly entered step S4.Formatting Facility library is that classification foundation, Formatting Facility library are carried out according to hard disk type
In tool can recognize the various hard disks of most of mainstream producer and respective handling can be carried out to it, it is hard for later period new type
The introducing of disk need to only be added again in Formatting Facility library.
Further, the quantity of hard disk to be formatted is several.The quantity of hard disk is multiple in server, is had to more
The demand that a hard disk is formatted.
Further, in step S4, according to the type of each hard disk to be formatted be from Formatting Facility library it is each to
It formats hard disk and selects Formatting Facility;
In step S5, serially each hard disk to be formatted is formatted using the Formatting Facility of selection.Serial mode is
Successively each hard disk to be formatted is formatted.
Further, in step S4, according to the type of each hard disk to be formatted be from Formatting Facility library it is each to
It formats hard disk and selects Formatting Facility;
In step S5, each hard disk to be formatted is formatted parallel using the Formatting Facility of selection.Parallel mode is
Each hard disk to be formatted is formatted simultaneously.
The present invention gives following technical solution:
The system that a kind of pair of polymorphic type hard disk is formatted, including
Module is established in Formatting Facility library, for establishing Formatting Facility library according to hard disk type;
Hard disk and hard disk type corresponding relationship obtain module, are used for scanning server hard disk, and it is corresponding with hard disk type to obtain hard disk
Relationship;
Hard disk type to be formatted obtains module, for obtaining hard disk to be formatted according to hard disk and hard disk type corresponding relationship
Type;
Formatting Facility selecting module, for selecting format chemical industry from Formatting Facility library according to the type of hard disk to be formatted
Tool;
Formatting hard disk module is treated formatting hard disk for the Formatting Facility using selection and is formatted.
Further, hard disk obtains primary by hard disk scanning tools smartctl in module with hard disk type corresponding relationship
All hard disks in scanning server.Each hard disk in server have oneself fix drive, by smartctl tool according to
The type of all hard disks in secondary scanning server just generates disk identifier of hard disk with hard disk class after whole hard disks are scanned
The table of comparisons of type.
Further, further includes:
Formatting hard disk tool to be formatted judges mould, for judging the hard disk type of hard disk to be formatted in Formatting Facility library
In whether have corresponding Formatting Facility;
Formatting Facility adding module, it is not corresponding in Formatting Facility library for the hard disk type when hard disk to be formatted
When Formatting Facility, it will be added in Formatting Facility library to the corresponding Formatting Facility of the hard disk type of format hard disk.Format
Changing tool storage room is that classification foundation is carried out according to hard disk type, and the tool in Formatting Facility library can recognize most of mainstream producer
Various hard disks and respective handling can be carried out to it, the introducing for later period new type hard disk, only need to be in Formatting Facility library
It adds again.
Further, the quantity of hard disk to be formatted is several;
Formatting Facility selecting module is each from Formatting Facility library to format according to the type of each hard disk to be formatted
Change hard disk and selects Formatting Facility;
Formatting hard disk module is formatted each hard disk to be formatted using the Formatting Facility serial or parallel of selection.
Serial mode be successively each hard disk to be formatted is formatted, parallel mode be simultaneously to each hard disk to be formatted into
Formatting lines.
The beneficial effects of the present invention are:
All types hard disk in server is carried out automatically formatting automatically by the present invention, without manually checking hard disk class in server
Type, it is easy to operate, it is high-efficient, save human cost.
In addition, design principle of the present invention is reliable, structure is simple, has very extensive application prospect.
It can be seen that compared with prior art, the present invention implementing with substantive distinguishing features outstanding and significant progress
Beneficial effect be also obvious.
Detailed description of the invention
Fig. 1 is flow chart of the method for the present invention;
Fig. 2 is system schematic of the invention;
Wherein, module is established in 1- Formatting Facility library;2- hard disk and hard disk type corresponding relationship obtain module;3- waits formatting hard
Disc-type obtains module;4- Formatting Facility selecting module;5- formatting hard disk module;6- formatting hard disk tool to be formatted
Judgment module;7- Formatting Facility adding module.
Specific embodiment:
To enable the purpose of the present invention, feature, advantage more obvious and understandable, it is embodied below in conjunction with the present invention
Attached drawing in example, is clearly and completely described the technical solution in the present invention.
Embodiment 1:
As shown in Figure 1, the present invention provides the method that a kind of pair of polymorphic type hard disk is formatted, which is characterized in that including as follows
Step:
Step S1. establishes Formatting Facility library according to hard disk type;
Step S2. scanning server hard disk obtains hard disk and hard disk type corresponding relationship;Pass through hard disk scanning tools smartctl
Successively all hard disks in scanning server;
Step S3. obtains the type of hard disk to be formatted according to hard disk and hard disk type corresponding relationship;
Step SA4. judges whether the hard disk type of hard disk to be formatted has corresponding Formatting Facility in Formatting Facility library;
If nothing, will be added in Formatting Facility library to the corresponding Formatting Facility of the hard disk type of format hard disk, into step
Rapid S4;
If so, being then directly entered step S4;
Step S4. selects Formatting Facility from Formatting Facility library according to the type of hard disk to be formatted;
Step S5. treats formatting hard disk using the formative implement of selection and is formatted.
The quantity of hard disk to be formatted is several in above-described embodiment 1;
It is that each hard disk to be formatted is selected from Formatting Facility library according to the type of each hard disk to be formatted in step S4
Formatting Facility;
In step S5, each hard disk to be formatted is formatted using the Formatting Facility serializable of selection.
The quantity of hard disk to be formatted is several in above-described embodiment 1;
It is that each hard disk to be formatted is selected from Formatting Facility library according to the type of each hard disk to be formatted in step S4
Formatting Facility;
In step S5, each hard disk to be formatted can be formatted parallel using the Formatting Facility of selection.
Embodiment 2:
As shown in Fig. 2, the system that a kind of pair of polymorphic type hard disk is formatted, including
Module 1 is established in Formatting Facility library, for establishing Formatting Facility library according to hard disk type;
Hard disk and hard disk type corresponding relationship obtain module 2, are used for scanning server hard disk, and it is corresponding with hard disk type to obtain hard disk
Relationship;Pass through all hard disks in hard disk scanning tools smartctl single pass server;
Hard disk type to be formatted obtains module 3, for obtaining hard disk to be formatted according to hard disk and hard disk type corresponding relationship
Type;
Formatting Facility selecting module 4 selects to format from Formatting Facility library for the type according to hard disk to be formatted
Tool;
Formatting hard disk module 5 is treated formatting hard disk for the Formatting Facility using selection and is formatted;
Formatting hard disk tool judgment module 6 to be formatted, for judging the hard disk type of hard disk to be formatted in format chemical industry
Whether tool has corresponding Formatting Facility in library;
Formatting Facility adding module 7 does not correspond in Formatting Facility library for the hard disk type when hard disk to be formatted
Formatting Facility when, will be added in Formatting Facility library to the corresponding Formatting Facility of the hard disk type of format hard disk.
The quantity of hard disk to be formatted is several in above-described embodiment 2;
Formatting Facility selecting module 4 is each from Formatting Facility library to format according to the type of each hard disk to be formatted
Change hard disk and selects Formatting Facility;
For formatting hard disk module 5 using the Formatting Facility of selection, serializable can also be parallel, carries out to each hard disk to be formatted
It formats.
The embodiment of the present invention be it is illustrative and not restrictive, above-described embodiment be only to aid in understanding the present invention, because
The present invention is not limited to the embodiments described in specific embodiment for this, all by those skilled in the art's technology according to the present invention
Other specific embodiments that scheme obtains, also belong to the scope of protection of the invention.
Claims (10)
1. the method that a kind of pair of polymorphic type hard disk is formatted, which comprises the steps of:
Step S1. establishes Formatting Facility library according to hard disk type;
Step S2. scanning server hard disk obtains hard disk and hard disk type corresponding relationship;
Step S3. obtains the type of hard disk to be formatted according to hard disk and hard disk type corresponding relationship;
Step S4. selects Formatting Facility from Formatting Facility library according to the type of hard disk to be formatted;
Step S5. treats formatting hard disk using the formative implement of selection and is formatted.
2. the method that a kind of pair of polymorphic type hard disk as described in claim 1 is formatted, which is characterized in that
Pass through all hard disks in hard disk scanning tools smartctl successively scanning server in step S2.
3. the method that a kind of pair of polymorphic type hard disk as described in claim 1 is formatted, which is characterized in that before step S4
Further include following steps:
Step SA4. judges whether the hard disk type of hard disk to be formatted has corresponding Formatting Facility in Formatting Facility library;
If nothing, will be added in Formatting Facility library to the corresponding Formatting Facility of the hard disk type of format hard disk, into step
Rapid S4;
If so, being then directly entered step S4.
4. the method that a kind of pair of polymorphic type hard disk as described in claim 1 is formatted, which is characterized in that hard wait format
The quantity of disk is several.
5. the method that a kind of pair of polymorphic type hard disk as claimed in claim 4 is formatted, which is characterized in that
It is that each hard disk to be formatted is selected from Formatting Facility library according to the type of each hard disk to be formatted in step S4
Formatting Facility;
In step S5, serially each hard disk to be formatted is formatted using the Formatting Facility of selection.
6. the method that a kind of pair of polymorphic type hard disk as claimed in claim 4 is formatted, which is characterized in that
It is that each hard disk to be formatted is selected from Formatting Facility library according to the type of each hard disk to be formatted in step S4
Formatting Facility;
In step S5, each hard disk to be formatted is formatted parallel using the Formatting Facility of selection.
7. the system that a kind of pair of polymorphic type hard disk is formatted, which is characterized in that including
Module (1) is established in Formatting Facility library, for establishing Formatting Facility library according to hard disk type;
Hard disk and hard disk type corresponding relationship obtain module (2), are used for scanning server hard disk, obtain hard disk and hard disk type pair
It should be related to;
Hard disk type to be formatted obtains module (3), hard wait format for being obtained according to hard disk and hard disk type corresponding relationship
The type of disk;
Formatting Facility selecting module (4), for selecting format from Formatting Facility library according to the type of hard disk to be formatted
Chemical industry tool;
Formatting hard disk module (5) is treated formatting hard disk for the Formatting Facility using selection and is formatted.
8. the system that a kind of pair of polymorphic type hard disk as claimed in claim 7 is formatted, which is characterized in that hard disk and hard disk
Type corresponding relationship obtains in module (2) through all hard disks in hard disk scanning tools smartctl single pass server.
9. the system that a kind of pair of polymorphic type hard disk as claimed in claim 7 is formatted, which is characterized in that further include:
Formatting hard disk tool judgment module (6) to be formatted, for judging that the hard disk type of hard disk to be formatted is formatting
Whether corresponding Formatting Facility is had in tool storage room;
Formatting Facility adding module (7), for the hard disk type when hard disk to be formatted no pair in Formatting Facility library
When the Formatting Facility answered, it will be added in Formatting Facility library to the corresponding Formatting Facility of the hard disk type of format hard disk.
10. the system that a kind of pair of polymorphic type hard disk as claimed in claim 7 is formatted, which is characterized in that wait format
The quantity of hard disk is several;
Formatting Facility selecting module (4) is each from Formatting Facility library to lattice according to the type of each hard disk to be formatted
Formula hard disk selects Formatting Facility;
Formatting hard disk module (5) carries out format to each hard disk to be formatted using the Formatting Facility serial or parallel of selection
Change.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810827137.2A CN109086007A (en) | 2018-07-25 | 2018-07-25 | The method and system that a kind of pair of polymorphic type hard disk is formatted |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810827137.2A CN109086007A (en) | 2018-07-25 | 2018-07-25 | The method and system that a kind of pair of polymorphic type hard disk is formatted |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109086007A true CN109086007A (en) | 2018-12-25 |
Family
ID=64838572
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810827137.2A Pending CN109086007A (en) | 2018-07-25 | 2018-07-25 | The method and system that a kind of pair of polymorphic type hard disk is formatted |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109086007A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114510275A (en) * | 2021-12-30 | 2022-05-17 | 中电科技(北京)股份有限公司 | Method and device for formatting hard disk under BIOS configuration interface |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1997056A (en) * | 2006-09-04 | 2007-07-11 | 中国移动通信集团江苏有限公司 | Method and system for reuse and the reformatting of the old card of the mobile communication smart card |
US20120084626A1 (en) * | 2008-06-18 | 2012-04-05 | Manu Pandey | System and Method for Adding a Storage Device to a Cluster as a Shared Resource |
CN107463342A (en) * | 2017-08-28 | 2017-12-12 | 北京奇艺世纪科技有限公司 | A kind of storage method and device of CDN fringe nodes file |
CN107844277A (en) * | 2017-11-29 | 2018-03-27 | 郑州云海信息技术有限公司 | A kind of method that NVME SSD formattings are carried out under linux |
CN107992267A (en) * | 2017-11-23 | 2018-05-04 | 郑州云海信息技术有限公司 | A kind of method and system of the serial automatically formatting of more hard disks |
-
2018
- 2018-07-25 CN CN201810827137.2A patent/CN109086007A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1997056A (en) * | 2006-09-04 | 2007-07-11 | 中国移动通信集团江苏有限公司 | Method and system for reuse and the reformatting of the old card of the mobile communication smart card |
US20120084626A1 (en) * | 2008-06-18 | 2012-04-05 | Manu Pandey | System and Method for Adding a Storage Device to a Cluster as a Shared Resource |
CN107463342A (en) * | 2017-08-28 | 2017-12-12 | 北京奇艺世纪科技有限公司 | A kind of storage method and device of CDN fringe nodes file |
CN107992267A (en) * | 2017-11-23 | 2018-05-04 | 郑州云海信息技术有限公司 | A kind of method and system of the serial automatically formatting of more hard disks |
CN107844277A (en) * | 2017-11-29 | 2018-03-27 | 郑州云海信息技术有限公司 | A kind of method that NVME SSD formattings are carried out under linux |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114510275A (en) * | 2021-12-30 | 2022-05-17 | 中电科技(北京)股份有限公司 | Method and device for formatting hard disk under BIOS configuration interface |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108376376B (en) | BIM model-based construction engineering quality management standardization method | |
CN101221530B (en) | Method for automatically leading in test cases | |
CN103218402B (en) | General database data structure and data mover system and method thereof | |
CN103714180A (en) | Bioinformatics database system and data processing method | |
CN106646315A (en) | Automatic testing system and automatic testing method for digital measuring instruments | |
CN103544185A (en) | Well-logging data file storage method | |
CN102486748B (en) | Method and device for performance test | |
CN109740159A (en) | For naming the processing method and processing device of Entity recognition | |
CN109086007A (en) | The method and system that a kind of pair of polymorphic type hard disk is formatted | |
CN112615428A (en) | Line loss analysis and treatment system and method | |
CN111309791A (en) | Automatic data acquisition method for detection instrument | |
CN104572730B (en) | Digital resource importing, deriving method and device | |
CN107656869A (en) | A kind of method that exclusive automatic test report is built based on JAVA | |
Ramey | Pressure transient testing | |
CN110889018A (en) | Based on GLP laboratory information management integration platform system | |
CN107979174B (en) | Workflow operation method based on power grid operation management system | |
CN103699482A (en) | Method and device for testing reasonableness of controls | |
CN104660428B (en) | A kind of management method and device of performance data | |
CN107506398B (en) | Method for adding label attribute to book | |
CN110059236A (en) | A kind of application network crawler technology carries out the data sampling and processing method of power planning receipts money | |
CN111401022A (en) | Management standard template rapid generation system and method | |
CN106970941B (en) | Sales data comparison method and system | |
CN109065468A (en) | Defect filtration system and filter method and computer storage medium | |
CN104484351B (en) | Big data quantity number filtering device and method | |
CN110189196A (en) | A method of entrance figure sales field is built based on picture quality point |
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: 20181225 |
|
RJ01 | Rejection of invention patent application after publication |