CN106569741A - Disk space expansion method and apparatus - Google Patents

Disk space expansion method and apparatus Download PDF

Info

Publication number
CN106569741A
CN106569741A CN201610911604.0A CN201610911604A CN106569741A CN 106569741 A CN106569741 A CN 106569741A CN 201610911604 A CN201610911604 A CN 201610911604A CN 106569741 A CN106569741 A CN 106569741A
Authority
CN
China
Prior art keywords
space
disk
dilatation
value
spatial
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
CN201610911604.0A
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.)
Opzoon Technology Co Ltd
Original Assignee
Opzoon 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 Opzoon Technology Co Ltd filed Critical Opzoon Technology Co Ltd
Priority to CN201610911604.0A priority Critical patent/CN106569741A/en
Publication of CN106569741A publication Critical patent/CN106569741A/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/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0662Virtualisation aspects
    • G06F3/0665Virtualisation aspects at area level, e.g. provisioning of virtual or logical volumes
    • 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

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)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides a disk space expansion method and apparatus. The disk space expansion method includes the steps: acquiring confirmation information that the space of a disk is not expanded, and acquiring the space residual value of the disk; determining that the space residual value is smaller than or equal to a preset alarm value, sending an expansion request of expanding the disk space to a first space value; and acquiring confirmation information that the space of the disk does not complete expansion in a preset time quantum, sending an expansion request of expanding the disk space to a second space value. The disk space expansion method can effectively reduce the system resource, can relatively more accurately calculate the expansion size of the resent expansion request, and can preferably monitor the disk requirement of the system, by sending the expansion request of expanding the disk space to the first space value when the disk space is not expanded and the space residual value is smaller than or equal to the preset alarm value, and by sending the expansion request of expanding the disk space to the second space value when the space of the disk does not complete expansion in the preset time quantum.

Description

Disk space expansion method and device
Technical field
The present invention relates to field of computer, more particularly to a kind of disk space expansion method and device.
Background technology
Simplify configuration is a kind of Intel Virtualization Technology, in being frequently used for the disk management of virtual machine.Such as creating virtual machine When be disk that the virtual machine is assigned with 100G, (such as only distributed using just simply a part of disk is distributed during simplify configuration 10G, but the operating system in virtual machine thinks or has 100G disks), when disk uses full 10G soon, simplify configuration program Can automatically apply expanding disk space (also crying dilatation) for virtual machine, thus can be with piecemeal increase disk space, most It is eventually virtual machine distribution 100G spaces.
Due to there is no the complete disk space of primary distribution when virtual machine is created, and when virtual machine runs, need dynamic State is virtual machine application disk space, it is therefore desirable to a kind of method regularly monitoring virtual machine, when magnetic disk of virtual machine insufficient space When just at once for its application disk space.
In prior art, it will usually whether need dilatation for regular check virtual machine using special supervision timer. If necessary to dilatation, then dilatation request is sent, then the supervision timer is just no longer actually operated, unless it is complete to receive dilatation Into.
But in view of the unreliability of network, a retransmission timer is generally also needed to, please for resending dilatation Ask.When at a certain time interval, if do not receive the confirmation message to dilatation all the time, resending dilatation please Ask.
And the operation that dilatation is asked is completed using two intervalometers, compare the resource of consumption system.Virtual machine is being used During, disk space can be ceaselessly used, when Insufficient disk space, need (to assume to apply for virtual machine application space 1G), due to network problem, for a long time could may really apply to disk space, and in the middle of the process of whole request dilatation, Virtual machine may also ceaselessly consuming disk space, and virtual machine may be it is desirable that 2G rather than 1G spaces, and existing skill Art is only to resend dilatation message, also just says dilatation size or the 1G for sending, and this just cannot meet virtual machine at all Actual demand.
The content of the invention
The present invention provides a kind of disk space expansion method and device, for solving prior art in complete disk space expansion Hold request and consume the excessive problem of system resource.
In a first aspect, the present invention provides a kind of disk space expansion method, including:
The confirmation of the non-dilatation in space of disk is obtained, the Spatial Residual value of the disk is obtained;
Determine that the Spatial Residual value is not more than preset alert value, send the disk space dilatation to the first spatial value Dilatation request;
The confirmation that the space of the disk in preset time period does not complete expansion is obtained, is sent the disk is empty Between dilatation to second space value dilatation request.
Alternatively, the confirmation of the non-dilatation in space of disk is obtained, including:
In program operation process, the dilatation mark bit variable of the disk space is obtained;
If dilatation mark bit variable is the first variable, it is determined that the non-dilatation in space of the disk.
Alternatively, also include:The disk space is reached after the dilatation request of the first spatial value after dilatation is sent, and is arranged The dilatation mark bit variable of the disk space is the second variable.
Alternatively, first spatial value is obtained using the first formula, and the first formula is:A=a+m, wherein, A is first Spatial value, a is the current spatial value of the disk, and m is default dilatation value.
Alternatively, before the confirmation that the space for obtaining the disk in preset time period does not complete expansion, obtain The dilatation mark bit variable for taking the disk space is the second variable.
Alternatively, the second space value is obtained using the second formula, and the second formula is:B=A+n × [d/n], wherein, B For second space value, A is the first spatial value, and n is preset reference correction value, and d is Spatial Residual value, and [d/n] is to round.
Second aspect, the present invention provides a kind of disk space flash chamber, including:
Acquisition module, the confirmation of the non-dilatation in the space for obtaining disk obtains the Spatial Residual value of the disk;
First sending module, determines that the Spatial Residual value is not more than preset alert value, sends and expands the disk space Hold to the dilatation of the first spatial value and ask;
Second sending module, obtains the confirmation that the space of the disk in preset time period does not complete expansion, sends out Go out and ask the dilatation of the disk space dilatation to second space value.
Alternatively, the acquisition module specifically for:
In program operation process, the dilatation mark bit variable of the disk space is obtained;
If dilatation mark bit variable is the first variable, it is determined that the non-dilatation in space of the disk.
Alternatively, first sending module is additionally operable to:The disk space reaches the first spatial value after dilatation is sent Dilatation request after, the dilatation mark bit variable for arranging the disk space is the second variable.
Alternatively, second sending module is additionally operable to:Obtaining, the space of the disk in preset time period is not complete Into before the confirmation for expanding, the dilatation mark bit variable for obtaining the disk space is the second variable.
As shown from the above technical solution, the present invention is provided disk space expansion method and device, by disk space Non- dilatation and when Spatial Residual value is not more than preset alert value, sends the disk space after dilatation and reaches the first spatial value Dilatation is asked, and when the space of the disk does not complete expansion in preset time period, is sent the disk space after dilatation and reached Dilatation to second space value is asked, and so as to effectively reduce system resource, is more accurately calculated and is resend dilatation request Dilatation size, realizes the disk demand of more preferable monitoring system.
Description of the drawings
Fig. 1 is the schematic flow sheet of the disk space expansion method that the embodiment of the present invention 1 is provided;
Fig. 2 is the structural representation of the disk space flash chamber that the embodiment of the present invention 2 is provided.
Specific embodiment
With reference to the accompanying drawings and examples, the specific embodiment of the present invention is described in further detail.Hereinafter implement Example is not limited to the scope of the present invention for illustrating the present invention.
Fig. 1 shows that the embodiment of the present invention 1 provides a kind of disk space expansion method, including:
S11, the confirmation of the non-dilatation in space of acquisition disk, obtain the Spatial Residual value of the disk.
In this step, it should be noted that in embodiments of the present invention, for obtain the space of disk whether dilatation or Whether having sent the concrete steps of dilatation includes:
S111, in program operation process, obtain the dilatation mark bit variable of the disk space.In this step, when During system runs program, each program information can be read.In program information, the use information in meeting storage disk space. One dilatation flag bit can be set in the information, and the dilatation flag bit can be made a distinction with the first variable and the second variable as mark. Generally, can be identified by False and True in the flag bit.
If S112, dilatation mark bit variable are False, it is determined that the non-dilatation in space of the disk.
In this step, when it is False to read dilatation mark bit variable, illustrate that disk space does not also carry out dilatation. Now, system can obtain the current spatial value and space use value of disk, so as to obtain Spatial Residual value.
In addition, when it is True to read dilatation mark bit variable, illustrating to have have sent dilatation request.
S12, determine that the Spatial Residual value is not more than preset alert value, send that the disk space dilatation is empty to first Between be worth dilatation request.
In this step, it should be noted that in embodiments of the present invention, when Spatial Residual value is less than or equal to default police Announcement value, then illustrate insufficient space, needs dilatation.Now calculate the first spatial value after dilatation.
First spatial value is obtained using the first formula, and the first formula is:A=a+m, wherein, A be the first spatial value, a For the current spatial value of the disk, m is default dilatation value.
For example, the current spatial value of the disk is 20G, and the default dilatation value of each dilatation is 30G, then the first spatial value For 20+30=50G.
Now send the dilatation request that the disk space after dilatation reaches the first spatial value.
In addition, after dilatation request is sent, the dilatation mark bit variable for arranging the disk space is True, shows the magnetic Disk has been sent from dilatation request.
S13, acquisition space of the disk in preset time period do not complete the confirmation of expansion, send the magnetic The dilatation request of disk space dilatation to second space value.
In this step, it should be noted that in embodiments of the present invention, during by timer, in preset time period Interior, the size for detecting disk space is not up to the first spatial value, then illustrate that disk space does not complete dilatation.
Now, the dilatation mark bit variable of the disk space is reacquired, determines that dilatation mark bit variable is True, said The bright disk has been transmitted across dilatation request, need to again send dilatation request.
Because in preset time period, system can also use substantial amounts of memory space, i.e. space use value to send change.Cause This, needs recalculate this for disk space dilatation how many spatial values.
After recalculating, disk space need to reach second space value.The second space value is obtained using the second formula, the Two formula are:B=A+n × [d/n], wherein, B is second space value, and A is the first spatial value, and n is preset reference correction value, and d is Spatial Residual value, [d/n] is to round.For example:[190/200]=0, [421/200]=2.
If the first spatial value is 20G, preset reference correction value is 2G, and Spatial Residual value is current spatial value 10G- space Use value 6.5G=3.5G, [3.5/2]=1.Therefore, second space value is 20G+2 × 1=22G.
The disk space expansion method that the embodiment of the present invention 1 is provided, by the non-dilatation of disk space and in Spatial Residual When value is not more than preset alert value, sends and ask the dilatation of the disk space dilatation to the first spatial value, and when default Between in section the space of the disk do not complete when expanding, sending please by the dilatation of the disk space dilatation to second space value Ask, so as to effectively reduce system resource, more accurately calculate the dilatation size for resending dilatation request, realize more preferably monitoring The disk demand of system.
Fig. 2 shows that the embodiment of the present invention 2 provides a kind of disk space flash chamber, including acquisition module 21, first The sending module 23 of module 22 and second is sent, wherein:
Acquisition module 21, the confirmation of the non-dilatation in the space for obtaining disk obtains the Spatial Residual of the disk Value;
First sending module 22, determines that the Spatial Residual value is not more than preset alert value, sends the disk space The dilatation request of dilatation to the first spatial value;
Second sending module 23, obtains the confirmation that the space of the disk in preset time period does not complete expansion, Send and ask the dilatation of the disk space dilatation to second space value.
In disk space dilation process, when program is run, acquisition module 21 obtains the confirmation of the non-dilatation in space of disk Information, obtains the Spatial Residual value of the disk, and Spatial Residual value is sent to into the first sending module.First sending module 22 Determine that Spatial Residual value is not more than preset alert value, send the dilatation request that disk space after dilatation reaches the first spatial value.Expand After the Preset Time of appearance request terminates, the second sending module 2 obtains the space of the disk in preset time period and does not complete and expands The confirmation filled, sends the dilatation request that disk space after dilatation reaches second space value.
A kind of specific work process of disk space flash chamber, may be referred to above-mentioned magnetic in the embodiment of the present invention 2 Content described by disk space expansion method, this is no longer going to repeat them.
It should be noted that can be by hardware processor (hardware processor) come real in the embodiment of the present invention Existing related function module.
The disk space flash chamber that the embodiment of the present invention 2 is provided, by the non-dilatation of disk space and in Spatial Residual When value is not more than preset alert value, sends and ask the dilatation of the disk space dilatation to the first spatial value, and when default Between in section the space of the disk do not complete when expanding, sending please by the dilatation of the disk space dilatation to second space value Ask, so as to effectively reduce system resource, more accurately calculate the dilatation size for resending dilatation request, realize more preferably monitoring The disk demand of system.
Although additionally, it will be appreciated by those of skill in the art that some embodiments described herein include other embodiments In included some features rather than further feature, but the combination of the feature of different embodiments means in of the invention Within the scope of and form different embodiments.For example, in the following claims, embodiment required for protection appoint One of meaning can in any combination mode using.
It should be noted that above-described embodiment the present invention will be described rather than limits the invention, and ability Field technique personnel can design without departing from the scope of the appended claims alternative embodiment.In the claims, Any reference markss between bracket should not be configured to limitations on claims.Word "comprising" is not excluded the presence of not Element listed in the claims or step.Word "a" or "an" before element does not exclude the presence of multiple such Element.The present invention can come real by means of the hardware for including some different elements and by means of properly programmed computer It is existing.If in the unit claim for listing equipment for drying, several in these devices can be by same hardware branch To embody.The use of word first, second, and third does not indicate that any order.These words can be explained and be run after fame Claim.
One of ordinary skill in the art will appreciate that:Various embodiments above only to illustrate technical scheme, and It is non-that it is limited;Although being described in detail to the present invention with reference to foregoing embodiments, one of ordinary skill in the art It should be understood that:It still can modify to the technical scheme described in foregoing embodiments, either to which part or All technical characteristic carries out equivalent;And these are changed or are replaced, the essence for not making appropriate technical solution departs from this Bright claim limited range.

Claims (10)

1. a kind of disk space expansion method, it is characterised in that include:
The confirmation of the non-dilatation in space of disk is obtained, the Spatial Residual value of the disk is obtained;
Determine that the Spatial Residual value is not more than preset alert value, send the expansion of the disk space dilatation to the first spatial value Hold request;
The confirmation that the space of the disk in preset time period does not complete expansion is obtained, is sent and is expanded the disk space Hold to the dilatation of second space value and ask.
2. method according to claim 1, it is characterised in that obtain the confirmation of the non-dilatation in space of disk, including:
In program operation process, the dilatation mark bit variable of the disk space is obtained;
If dilatation mark bit variable is the first variable, it is determined that the non-dilatation in space of the disk.
3. method according to claim 2, it is characterised in that also include:The disk space reaches after dilatation is sent After the dilatation request of the first spatial value, the dilatation mark bit variable for arranging the disk space is the second variable.
4. the method according to claim 1 or 3, it is characterised in that first spatial value is obtained using the first formula, the One formula is:A=a+m, wherein, A is the first spatial value, and a is the current spatial value of the disk, and m is default dilatation value.
5. method according to claim 4, it is characterised in that in the space for obtaining the disk in preset time period not Before completing the confirmation for expanding, the dilatation mark bit variable for obtaining the disk space is the second variable.
6. method according to claim 5, it is characterised in that the second space value is obtained using the second formula, second Formula is:B=A+n × [d/n], wherein, B is second space value, and A is the first spatial value, and n is preset reference correction value, and d is sky Between surplus value, [d/n] is to round.
7. a kind of disk space flash chamber, it is characterised in that include:
Acquisition module, the confirmation of the non-dilatation in the space for obtaining disk obtains the Spatial Residual value of the disk;
First sending module, determines that the Spatial Residual value is not more than preset alert value, sends the disk space dilatation extremely The dilatation request of the first spatial value;
Second sending module, obtains the space of the disk in preset time period and does not complete the confirmation of expansion, send by The dilatation request of the disk space dilatation to second space value.
8. device according to claim 7, it is characterised in that the acquisition module specifically for:
In program operation process, the dilatation mark bit variable of the disk space is obtained;
If dilatation mark bit variable is the first variable, it is determined that the non-dilatation in space of the disk.
9. device according to claim 8, it is characterised in that first sending module is additionally operable to:After dilatation is sent The disk space is reached after the dilatation request of the first spatial value, and the dilatation mark bit variable for arranging the disk space is second Variable.
10. device according to claim 9, it is characterised in that second sending module is additionally operable to:Obtaining default The space of the disk is not completed before the confirmation of expansion in time period, and the dilatation flag bit for obtaining the disk space becomes Measure as the second variable.
CN201610911604.0A 2016-10-18 2016-10-18 Disk space expansion method and apparatus Pending CN106569741A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610911604.0A CN106569741A (en) 2016-10-18 2016-10-18 Disk space expansion method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610911604.0A CN106569741A (en) 2016-10-18 2016-10-18 Disk space expansion method and apparatus

Publications (1)

Publication Number Publication Date
CN106569741A true CN106569741A (en) 2017-04-19

Family

ID=58533280

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610911604.0A Pending CN106569741A (en) 2016-10-18 2016-10-18 Disk space expansion method and apparatus

Country Status (1)

Country Link
CN (1) CN106569741A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107391045A (en) * 2017-08-01 2017-11-24 郑州云海信息技术有限公司 A kind of directory space quota method and system
CN113568714A (en) * 2021-09-27 2021-10-29 武汉四通信息服务有限公司 Disk management method, device, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107391045A (en) * 2017-08-01 2017-11-24 郑州云海信息技术有限公司 A kind of directory space quota method and system
CN113568714A (en) * 2021-09-27 2021-10-29 武汉四通信息服务有限公司 Disk management method, device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN104765678B (en) The method and device tested the application on mobile terminal device
CN106371974A (en) Monitoring method of application program in Docker container and publishing platform
EP3269211B1 (en) Control and monitoring of battery-backed emergency lighting systems
US9916331B2 (en) Method and device for automatically processing static test data of rail transit vehicle
RU2017113717A (en) BUILDING A HIERARCHY OF DEVICES FOR A REMOTE TERMINAL BLOCK
CN110930131A (en) Vehicle maintenance method, device, equipment and medium
CN106980647B (en) Data distribution method and device for distributed file system
CN106569741A (en) Disk space expansion method and apparatus
CN107992386A (en) A kind of router memory method for testing pressure and system
CN114758715B (en) Method, device and equipment for lighting hard disk fault lamp and readable storage medium
CN106372160A (en) Distributive database and management method
CN104503724B (en) Combination ring connects the method and system of configuration
ES2658755T3 (en) Monitoring and control system of an energy system
CN104281587B (en) A kind of method and device for establishing connection
CN111090553B (en) Test system, test method and test device
CN105512091B (en) A kind of memory allocation method and device
CN105191227B (en) A kind of flow table item management method and equipment
KR101429738B1 (en) Apparatus for monitoring and controlling environment foundational facilities
CN106301708A (en) Processing method and processing device when a kind of information sends unsuccessfully
CN112804115B (en) Method, device and equipment for detecting abnormity of virtual network function
CN110247833B (en) Communication control method, device, sub-equipment and communication system
CN109302307B (en) Network host and method for rapidly deploying block chain nodes based on network host
CN109039770B (en) Server CMC refreshing method and device and related equipment
US10242553B2 (en) Systems and methods for downloading configuration data to fire alarm control panel devices and peripheral devices in a fire alarm system
CN115134209B (en) Pipe network area determining method and device, electronic equipment and storage medium

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