CN102135860A - Method for automatically programming volume of hard disk - Google Patents

Method for automatically programming volume of hard disk Download PDF

Info

Publication number
CN102135860A
CN102135860A CN2010101036623A CN201010103662A CN102135860A CN 102135860 A CN102135860 A CN 102135860A CN 2010101036623 A CN2010101036623 A CN 2010101036623A CN 201010103662 A CN201010103662 A CN 201010103662A CN 102135860 A CN102135860 A CN 102135860A
Authority
CN
China
Prior art keywords
disk
hard disk
hard
operating system
capacity
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
CN2010101036623A
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.)
Inventec Corp
Original Assignee
Inventec Corp
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 Inventec Corp filed Critical Inventec Corp
Priority to CN2010101036623A priority Critical patent/CN102135860A/en
Publication of CN102135860A publication Critical patent/CN102135860A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method for automatically programming the volume of a hard disk. In the method, the volume of the hard disk of a disk device is programmed when an operating system is started by a computer device. The volume programming method comprises the following steps of: starting the operating system, and loading a monitor program of storage equipment; acquiring the hard disk of which the volume value is greater than the maximum manageable disk volume value of the operating system by using the monitor program of the storage equipment; judging whether the hard disk is detected for the first time or not; if the hard disk is detected for the first time, programming the hard disk to be at least more than two virtual hard disks according to the preset volume value of the disk, and creating a corresponding customization partitioning management table for each virtual hard disk; and establishing the original partitioning management table of the hard disk and an access image table of each customization partitioning management table.

Description

The automatic planing method of hard-disk capacity
Technical field
The present invention relates to a kind of method for planning capacity of storage facilities, particularly a kind of automatic planing method of Winchester disk drive capacity.
Background technology
Because the fast development of science and technology makes every periphery of computer installation also along with growth.The particularly capacity of storage device and volume.The capacity of past storage device is with megabyte (Kilobyte) metering, develops till now and measures with megabyte (Terabyte), and in other words, the volume change rate of storage device is above 10000000 times.For managing the storage area of storage device, thus manufacturer's cooperating definition of each storage facilities the standard of one main start record (Master Boot Master is called for short MBR).MBR is set at first sector of storage facilities usually, discerns the related data of this storage facilities so as to computer installation is provided.
When the start of computer installation, at first basic input/output (Basic Input/OutputSystem is called for short BIOS) can move electric self check (Power On Self Test is called for short POST).Whether BIOS is normal in order to confirm the every interfacing equipment that is connected by POST.Then, BIOS just can begin to confirm the data of the MBR of storage facilities.At the 0th of storage facilities, the MBR of the 0th rail, the 1st sector, it is between sector null for 512 bytes (Bytes) size.The stored information of MBR can be divided into three parts, and it is to be respectively program area (Boot Partition Loader; BPL, or Pre-Loader, Pre-Boot), data field (Partition Data) and checking district (Verify Data).Under the standard of MBR, computer installation only can carry out access to the storage device below 2 Terabyte.Except the congenital restriction of BIOS, 32 operating system still has restriction on the capacity for the addressing of hard disk.32 kernel operating systems of the many employings of operating systems such as Windows, OS/2, Unix, Linux.So in the addressing of data, be to do planning naturally with 32.It is described to please refer to following formula 1:
2^32 (sector) x2^9Bytes=2^41Bytes=
2x2^40Bytes=2TB (2.2TB) formula 1
But present many motherboard manufacturer has added the function of identification greater than the hard disk of 2 Terabyte in BIOS.But because the addressing of part operation system still can't be supported the hard disk of 2 Terabyte.Operating system only can identification 2 Terabyte with interior storage area.
Summary of the invention
In view of above problem, fundamental purpose of the present invention is to provide a kind of automatic planing method of hard-disk capacity, hard disk is carried out the capacity planning of disk set when computer installation starts the operating system.
For achieving the above object, the automatic planing method of the disclosed hard-disk capacity of the present invention may further comprise the steps: start the operating system, and load the storage facilities watchdog routine; Obtain hard disk by the storage facilities watchdog routine greater than the manageable maximum disk capacity value of operating system; Judge whether hard disk is to detect for the first time; If hard disk is for for the first time detected, then hard disk is planned to virtual hard disk more than at least two, and each virtual hard disk is created corresponding visitor's system partition management table (partition table) according to default disk size value; Set up the raw partition admin table of hard disk and the access mapping table of each visitor's system partition management table.
Effect of the present invention is, the method for planning capacity of hard disk provided by the invention, and the hard disk partition of the max cap. that can support operating system is a plurality of virtual hard disks, avoids operating system can't use for the disk space that exceeds max cap..
Describe the present invention below in conjunction with the drawings and specific embodiments, but not as a limitation of the invention.
Description of drawings
Fig. 1 is a configuration diagram of the present invention;
Fig. 2 is an operation workflow synoptic diagram of the present invention;
Fig. 3 A is a hard-disk capacity planning synoptic diagram of the present invention;
Fig. 3 B is a hard-disk capacity planning synoptic diagram of the present invention;
Fig. 3 C is a hard-disk capacity planning synoptic diagram of the present invention;
Fig. 4 is that visitor's system partition management table of the present invention and access mapping table store synoptic diagram.
Wherein, Reference numeral
110 computer installations
111 processing units
112 communication buses
120 hard disks
130 operating systems
131 capacity planning programs
132 storage facilities watchdog routines
133 access address identification programs
310 visitor's system partition management tables
311 first virtual hard disks
312 second virtual hard disks
Embodiment
Below in conjunction with accompanying drawing structural principle of the present invention and principle of work are done concrete description:
For solving the problem that operating system can't identification surpasses the hard disk of 2Terabyte, the invention provides a kind of method for planning capacity.Please refer to shown in Figure 1ly, it is to be system architecture synoptic diagram of the present invention.Comprise computer installation and at least one hard disk in the present invention.Have processing unit 111, at least one communication bus 112 and hard disk 120 at computer installation 110.Processing unit 111 is in order to handle operating system 130, and the kind of operating system 130 is not limited to the gathering hole port system that Microsoft releases, and also can be applicable to (SuSE) Linux OS.In operating system 130, move storage volume planning procedure 131, storage facilities watchdog routine 132 and access address identification program 133 respectively.Communication bus 112 is in order to connect hard disk 120, the kind of communication bus 112 is: Integrated Device Electronics (Integrated Device Electronics, be called for short IDE), serial hi-tech configuration (Serial Advanced Technology Attachment, abbreviate SAT A), small-size computer low profile interface (Small Computer Small Interface, be called for short SCSI), universal serial bus (Universal Serial Bus, be called for short USB), or international electronic motor society of engineers 1394 (Institute ofElectrical and Electronics Engineers, IEEE 1394).Hard disk 120 also can be made of the disk set of (Redundant Array of IndependentDisks is called for short RAID) redundant array of inexpensive disk except being the single hard disk 120.
Brought forward is stated institute and is sayed that the present invention can be applied to outside the single hard disk 120, also can realize in a plurality of hard disks 120.RAID particularly is because RAID is made up of at least one hard disk 120.Therefore the total volume of RAID can break through 2Terabyte easily.But,, be that can't to be operated system 130 employed so surpass the later storage area of 2Terabyte for fear of the addressing capability of 32-bit operating system 130.
At this is to explain orally with the operational process that single communication bus 112 and single hard disk 120 carry out capacity planning program 131, and those skilled in the art also can be applied to a plurality of hard disks 120.Please refer to shown in Figure 2ly, it is to be the operation workflow synoptic diagram of the present invention in single hard disk 120, may further comprise the steps:
Step S210: start the operating system, and load the storage facilities watchdog routine;
Step S220: judge that by the storage facilities watchdog routine whether hard disk is greater than the maximum disk capacity value;
Step S230: if hard disk less than the maximum disk capacity value, is then finished capacity planning;
Step S240: whether if hard disk, is then judged hard disk in addition greater than the maximum disk capacity value is to detect for the first time;
Step S250: if hard disk is that then operating system capacity planning program is cooked up a virtual hard disk according to default disk size value with hard disk for for the first time detected, and to the corresponding visitor's system of virtual hard disk establishment partition management table;
Step S260: set up the raw partition admin table of hard disk and the access mapping table of each visitor's system partition management table;
Step S270: judge that whether the remaining disk size of hard disk is greater than the maximum disk capacity value;
Step S280: if the remaining disk size of hard disk is then finished capacity planning less than the maximum disk capacity value;
Step S290: if the remaining disk size of hard disk greater than the maximum disk capacity value, repeating step S250~270; And
Step S300: if the detected and objective access mapping table of making the partition management table of foundation before the hard disk, then operating system is found the actual data that leave this hard disk in by the access address identification program.
For clearly demonstrating operation workflow of the present invention, please refer to Fig. 2 and cooperate simultaneously shown in Fig. 3 A~Fig. 3 C.At first, starting the operating system after 130, processing unit 111 can operation disk size watchdog routines.Be added into when operating system 130 detects new hard disk 120, whether the disk size watchdog routine can watch the whole volume of hard disk 120 greater than operating system 130 manageable maximum disk capacities (corresponding step S210 and Fig. 3 A).If newly-increased hard disk 120 capacity then can carry out the planning again (corresponding step S220~S260 and Fig. 3 B) of capacity to hard disk 120 greater than operating system 130 manageable maximum disk capacities.Operating system 130 manageable maximum disk capacity values are to be 2Terabytes in the present invention.Suppose in hard disk 120, to mark off at least more than one disk, will remain the definition space that is not divided for not cutting apart capacity at this.In other words, the capacity (Δ) of not cutting apart in the hard disk 120 is to refer to the total volume (Total_Size) of hard disk 120 is deducted difference (Δ=Total_Size-Disk_Size*n, wherein n is the quantity for disk) after the total volume (Disk_Size) of all disks in the present invention.
If the capacity of hard disk 120 is greater than maximum disk capacity and for being installed on for the first time computer installation 110, then operating system 130 is carried out capacity planning program 131 according to default disk size value to hard disk 120.At first, obtain the raw partition admin table of hard disk 120.Comprise disk size, magnetic post quantity, head numbers and number of sectors in the raw partition admin table, the detailed content of partition management table please refer to shown in the following table:
Skew Length (byte) Meaning
00H 1 00 → inactive partition; 80 → active partition;
01H 1 The initial head number of subregion (HEAD) is used whole 8
02H 2 Subregion start sector number (SECTOR), occupy 02H the position 0~5; The initial magnetic post number (CYLINDER) of this subregion occupies the position 6~7 of 02H and whole 8 of 03H
04H 1 The file system zone bit
05H 1 Divide end of extent head number (HEAD), use whole 8
06H 2 Divide end of extent sector number (SECTOR), occupy the position 0~5 of 06H; The initial magnetic post number (CYLINDER) of this subregion occupies the position 6~7 of 06H and whole 8 of 07H
08H 4 The initial absolute sector of subregion
0CH 4 The sector number that subregion is total
Table 1. raw partition admin table
The default disk size value of operating system 130 meeting bases is revised the parameters in the raw partition admin table, and is output into the objective partition management table 310 of making after revising.Wherein, default disk size value is less than (or equaling) maximum disk capacity.In other words, default disk size value can be set and be less than 2Terabytes.
But it should be noted that because operating system 130 when only carrying out the data access of hard disk 120 with reference to visitor system partition management table 310, can cause the problem that can't directly carry out access from the physical address of hard disk 120.This is because the reference position of virtual hard disk is not the reference position that is equal to hard disk 120.If, will cause data when carrying out access, to produce the mistake that overrides so the reference position of virtual hard disk is a benchmark with the reference position of hard disk 120 all.Therefore after finishing visitor's system partition management table 310, access address identification program 133 can be set up an access mapping table according to raw partition admin table and each visitor's system partition management table 310 of hard disk 120.The reference position of record virtual hard disk and end position are corresponding to positions such as the magnetic post in entity hard disk 120, sectors in the access mapping table.
After finishing first virtual hard disk 311, whether capacity planning program 131 can continue comparison does not cut apart capacity still greater than maximum disk capacity.If do not cut apart capacity greater than maximum disk capacity, then repeat the step of above-mentioned capacity planning, until do not cut apart capacity less than the maximum disk capacity value till.For instance, when not being cut with any disk as yet in the hard disk 120 of a capacity 5Terabytes, then the capacity of not cutting apart of this hard disk 120 is to be 5Terabytes.In the default disk size value of this hypothesis is to be 2Terabytes.At first, capacity planning program 131 can mark off a 2Terabytes first virtual hard disk 311, and creates corresponding visitor's system partition management table 310 and its access mapping table.Then, whether capacity planning program 131 can continue to inspect in the hard disk 120 remaining capacity still greater than the manageable maximum disk capacity value of operating system.Because remaining capacity is to be 3Terabytes, so the processing that 131 meetings of capacity planning program are planned the space of 3Terabytes.Therefore what capacity planning program 131 can mark off the virtual disk (being to be respectively first virtual hard disk 311 and second virtual hard disk 312) of two 2Terabytes and 1Terabytes does not cut apart capacity (with reference to figure 3C).The visitor of the virtual hard disk of at last, each being divided out 311,312 makes in the particular block that partition management table 310 and its access mapping table can be stored in hard disk (as shown in Figure 4).When the user assigned the order of access to first virtual disk 311, operating system 130 can be made partition management table 310 by the visitor and find address correct on the entity hard disk 120 with its access mapping table.
The invention provides a kind of method for planning capacity of hard disk, the hard disk partition of the max cap. that can be supported operating system 130 is a plurality of virtual hard disks, avoids operating system 130 can't use for the disk space that exceeds max cap..
Certainly; the present invention also can have other various embodiments; under the situation that does not deviate from spirit of the present invention and essence thereof; those of ordinary skill in the art work as can make various corresponding changes and distortion according to the present invention, but these corresponding changes and distortion all should belong to the protection domain of the appended claim of the present invention.

Claims (8)

1. the automatic planing method of a hard-disk capacity is planned the capacity of a hard disk device when a computer installation starts an operating system, it is characterized in that, this method for planning capacity comprises:
Start this operating system, and load a storage facilities watchdog routine;
Obtain this hard disk by this storage facilities watchdog routine greater than a maximum disk capacity value of this operating system management;
Judge whether this hard disk is to detect for the first time;
If this hard disk be for the first time detected, then this hard disk is planned to virtual hard disk more than at least two, and each this virtual hard disk is created a corresponding visitor make the partition management table according to a default disk size value; And
Set up a raw partition admin table of this hard disk and an access mapping table of those visitor's system partition management tables.
2. the automatic planing method of hard-disk capacity according to claim 1 is characterized in that, this maximum disk capacity value is 2 megabyte.
3. the automatic planing method of hard-disk capacity according to claim 1 is characterized in that, this default disk size value less than/equal 2 megabyte.
4. the automatic planing method of hard-disk capacity according to claim 1 is characterized in that, this operating system is carried out access by this access mapping table to those virtual hard disks.
5. the automatic planing method of hard-disk capacity according to claim 1 is characterized in that, this visitor makes the partition management table and this raw partition admin table comprises disk size, magnetic post quantity, head numbers and number of sectors.
6. the automatic planing method of hard-disk capacity according to claim 1 is characterized in that, also comprises after setting up this access mapping table:
Assign a disk number of those virtual hard disks by this operating system planning.
7. the automatic planing method of hard-disk capacity according to claim 6 is characterized in that, also comprises after setting up this access mapping table:
Repeat to choose other this hard disk, and set up this visitor and make partition management table and this access mapping table greater than this maximum disk capacity value.
8. the automatic planing method of hard-disk capacity according to claim 1, it is characterized in that, if this hard disk is detected, this operating system one access address identification program then, make this access address identification program by this access mapping table, instead from this virtual hard disk find the actual data that leave this hard disk in.
CN2010101036623A 2010-01-26 2010-01-26 Method for automatically programming volume of hard disk Pending CN102135860A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2010101036623A CN102135860A (en) 2010-01-26 2010-01-26 Method for automatically programming volume of hard disk

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010101036623A CN102135860A (en) 2010-01-26 2010-01-26 Method for automatically programming volume of hard disk

Publications (1)

Publication Number Publication Date
CN102135860A true CN102135860A (en) 2011-07-27

Family

ID=44295658

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010101036623A Pending CN102135860A (en) 2010-01-26 2010-01-26 Method for automatically programming volume of hard disk

Country Status (1)

Country Link
CN (1) CN102135860A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102214074A (en) * 2010-04-30 2011-10-12 华硕科技(苏州)有限公司 Storage device in computer system and control method of storage device
CN103617006A (en) * 2013-11-28 2014-03-05 曙光信息产业股份有限公司 Storage resource management method and device
CN109802976A (en) * 2017-11-16 2019-05-24 航天信息股份有限公司 Cloud hard disk dynamic dispatching method, device and the electronic system of Open Stack cloud platform
US20210247993A1 (en) * 2020-02-06 2021-08-12 EMC IP Holding Company LLC True zero rto eliminating os and app load times

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102214074A (en) * 2010-04-30 2011-10-12 华硕科技(苏州)有限公司 Storage device in computer system and control method of storage device
CN102214074B (en) * 2010-04-30 2014-09-10 华硕科技(苏州)有限公司 Storage device in computer system and control method of storage device
CN103617006A (en) * 2013-11-28 2014-03-05 曙光信息产业股份有限公司 Storage resource management method and device
CN109802976A (en) * 2017-11-16 2019-05-24 航天信息股份有限公司 Cloud hard disk dynamic dispatching method, device and the electronic system of Open Stack cloud platform
US20210247993A1 (en) * 2020-02-06 2021-08-12 EMC IP Holding Company LLC True zero rto eliminating os and app load times

Similar Documents

Publication Publication Date Title
US7293166B2 (en) Method of indicating a format of accessing an operating system contained on a USB memory device
US9329793B2 (en) Storage system with load balancing mechanism and method of operation thereof
US20120117429A1 (en) Baseboard management controller and memory error detection method of computing device utilized thereby
US20120117367A1 (en) Electronic apparatus and booting method thereof
CN103970557A (en) Storage device and system starting method thereof
US20060265581A1 (en) Method for switching booting devices of a computer
CN103853664A (en) Method and electronic device for achieving multiple operating systems
US8255656B2 (en) Storage device, memory controller, and data protection method
CN102135860A (en) Method for automatically programming volume of hard disk
CN110765032A (en) Method for reading and writing I2C memory based on system management bus interface
US6473655B1 (en) Data processing system and method for creating a virtual partition within an existing partition in a hard disk drive
US20090013167A1 (en) Computer device, method for booting the same, and booting module for the same
TWI452466B (en) Dynamical disk mapping method and server using the same
US20140164845A1 (en) Host computer and method for testing sas expanders
CN101779196B (en) Method for restraining requirements for i/o space of pci device
US10620867B2 (en) System and method for performing wear leveling at a non-volatile firmware memory
CN104951254B (en) A kind of method and device of management storage device
CN104133640A (en) Quick recovery from dormancy
CN101963941A (en) Capacity planning method of storage device and reading and storing correction method thereof
US20110047328A1 (en) Size planning method for storage device, and read and access correcting methods thereof
CN113950673A (en) Non-volatile storage partition identifier
EP2613254A2 (en) Apparatus and method for partitioning memory area for application preloading in a wireless terminal
KR20060095133A (en) Method for operating system program stored in non-volatile memory
CN109901795B (en) Circulating file system and file positioning method
JP5673197B2 (en) Test program and test method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20110727