CN113238712A - Disk space utilization method, device, terminal and storage medium - Google Patents

Disk space utilization method, device, terminal and storage medium Download PDF

Info

Publication number
CN113238712A
CN113238712A CN202110441544.1A CN202110441544A CN113238712A CN 113238712 A CN113238712 A CN 113238712A CN 202110441544 A CN202110441544 A CN 202110441544A CN 113238712 A CN113238712 A CN 113238712A
Authority
CN
China
Prior art keywords
disk
partitions
unfilled
space utilization
disk space
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
CN202110441544.1A
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.)
Shenzhen Zhiwei Intelligent Software Development Co ltd
Original Assignee
Shenzhen Zhiwei Intelligent Software Development 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 Shenzhen Zhiwei Intelligent Software Development Co ltd filed Critical Shenzhen Zhiwei Intelligent Software Development Co ltd
Priority to CN202110441544.1A priority Critical patent/CN113238712A/en
Publication of CN113238712A publication Critical patent/CN113238712A/en
Pending legal-status Critical Current

Links

Images

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
    • G06F3/0643Management of files
    • 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
    • G06F3/0607Improving or facilitating administration, e.g. storage management by facilitating the process of upgrading existing storage systems, e.g. for improving compatibility between host and storage device
    • 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
    • G06F3/064Management of blocks
    • 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
    • G06F3/0644Management of space entities, e.g. partitions, extents, pools
    • 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)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention is applicable to the technical field of computers, and provides a disk space utilization method, a device, a terminal and a storage medium, wherein the disk space utilization method comprises the following steps: the method comprises the following steps: respectively filling large files in unused disk spaces of a plurality of unfilled disk partitions of a Linux server so that the large files fill the unfilled disk partitions where the large files are located, wherein the unfilled disk partitions are disk partitions with unused disk spaces; step two: converting the large file into a sub-logical block device; step three: merging the plurality of sub-logical block devices to form a merged logical block device; step four: mounting a merging logic block device; therefore, the disk space utilization method provided by the invention is not only suitable for the condition that the existing disk partition cannot be formatted, and has strong adaptability, but also can utilize unused disk space which cannot be utilized before, and improve the utilization rate of the disk.

Description

Disk space utilization method, device, terminal and storage medium
Technical Field
The present invention relates to the field of storage technologies, and in particular, to a method, an apparatus, a terminal, and a storage medium for utilizing disk space.
Background
In order to solve the problem, the current method is to use LVM to merge disk partitions, but when the method is used, the existing disk partitions need to be formatted, and when the existing disk partitions cannot be formatted, for example, data stored in the existing disk partitions need to be reserved, the method cannot be used.
Disclosure of Invention
The present invention provides a method, an apparatus, a terminal and a computer readable storage medium for utilizing disk space, which aim to overcome the above-mentioned drawbacks of the prior art.
The technical scheme adopted by the invention for solving the technical problems is as follows:
in one aspect, a method for utilizing disk space is provided, wherein the method includes the following steps:
the method comprises the following steps: respectively filling large files in unused disk spaces of a plurality of unfilled disk partitions of a Linux server so that the large files fill the unfilled disk partitions where the large files are located, wherein the unfilled disk partitions are disk partitions with unused disk spaces;
step two: converting the large file into a sub-logical block device;
step three: merging a plurality of the sub-logical block devices to form a merged logical block device;
step four: and mounting the merging logic block device.
The method for utilizing the disk space, provided by the invention, comprises the step one, wherein the step one is realized by utilizing dd commands.
The method for utilizing the disk space, provided by the invention, is characterized in that the second step is realized by utilizing a mount-o loop mechanism.
The method for utilizing the disk space, provided by the invention, is characterized in that the third step is realized by using an LVM.
In another aspect, a disk space utilization apparatus is provided, which is based on the foregoing disk space utilization method, wherein the apparatus includes:
the filling unit is used for respectively filling large files in unused disk spaces of a plurality of unfilled disk partitions of the Linux server so as to enable the large files to fill the unfilled disk partitions where the large files are located, wherein the unfilled disk partitions are disk partitions with unused disk spaces;
the conversion unit is used for converting the large file into the sub logic block device;
a merging unit, configured to merge the plurality of sub logic block devices to form a merged logic block device;
and the mounting unit is used for mounting the merging logic block equipment.
In another aspect, a disk space utilization terminal is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the disk space utilization method when executing the computer program.
In still another aspect, a computer-readable storage medium is provided, which stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the aforementioned disk space utilization method.
The invention has the beneficial effects that: the method for utilizing the disk space provided by the invention has the advantages that the large file is respectively filled in the unused disk spaces of a plurality of unfilled disk partitions of the Linux server, so that the large file is filled in the unfilled disk partitions of the Linux server, the large file is converted into the sub-logic block device, and the sub-logic block devices are combined to form the combined logic block device and the mounted combined logic block device.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the present invention will be further described with reference to the accompanying drawings and embodiments, wherein the drawings in the following description are only part of the embodiments of the present invention, and for those skilled in the art, other drawings can be obtained without inventive efforts according to the accompanying drawings:
FIG. 1 is a flowchart of an implementation of a disk space utilization method according to an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of a disk space utilization apparatus according to a second embodiment of the present invention;
fig. 3 is a schematic diagram of a method for utilizing disk space according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present invention, and it is obvious that the described embodiments are some embodiments of the present invention, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without inventive step, are within the scope of the present invention.
The following detailed description of specific implementations of the present invention is provided in conjunction with specific embodiments:
the first embodiment is as follows:
fig. 1 shows an implementation flow of a disk space utilization method according to a first embodiment of the present invention, and fig. 3 is a schematic diagram illustrating a principle of the disk space utilization method according to the first embodiment of the present invention, and for convenience of description, only parts related to the first embodiment of the present invention are shown, and detailed descriptions are as follows:
step S101: respectively filling large files in unused disk spaces of a plurality of unfilled disk partitions of a Linux server so that the large files fill the unfilled disk partitions where the large files are located, wherein the unfilled disk partitions are disk partitions with unused disk spaces;
step S102: converting the large file into a sub-logical block device;
step S103: merging the plurality of sub-logical block devices to form a merged logical block device;
step S104: and mounting the merging logic block device.
The method for utilizing the disk space provided by the invention has the advantages that the large file is respectively filled in the unused disk spaces of a plurality of unfilled disk partitions of the Linux server, so that the large file is filled in the unfilled disk partitions of the Linux server, the large file is converted into the sub-logic block device, and the sub-logic block devices are combined to form the combined logic block device and the mounted combined logic block device.
Preferably, step S101 is implemented using dd commands.
Preferably, step S102 is implemented by using mount-o loop mechanism.
Preferably, step S103 is implemented using LVM.
Example two:
fig. 2 shows a structure of a disk space utilization apparatus according to a second embodiment of the present invention, and for convenience of description, only the portions related to the second embodiment of the present invention are shown, where the structure includes:
the filling unit 21 is configured to fill large files in unused disk spaces of a plurality of unfilled disk partitions of the Linux server, so that the large files fill the unfilled disk partitions where the large files are located, where the unfilled disk partitions are disk partitions in which the unused disk spaces exist;
a conversion unit 22 for converting the large file into a sub logical block device;
a merging unit 23, configured to merge multiple sub-logical block devices to form a merged logical block device;
and the mounting unit 24 is used for mounting the merging logic block device.
The disk space utilization device provided by the invention utilizes the filling unit 21 to respectively fill large files in the unused disk spaces of a plurality of unfilled disk partitions of a Linux server so that the large files fill the unfilled disk partitions where the large files are located, utilizes the conversion unit 22 to convert the large files into sub-logic block equipment, utilizes the merging unit 23 to merge a plurality of sub-logic block equipment to form merged logic block equipment, utilizes the mounting unit 24 to mount the merged logic block equipment, integrates a plurality of dispersed unused disk spaces (physical spaces) into one logic space for users to use, does not need to format the existing disk partitions, can enable the users to use the residual disk spaces, is not only suitable for the condition that the existing disk partitions cannot be formatted, has strong adaptability, but also can utilize the unused disk spaces which cannot be utilized before, the utilization rate of the magnetic disk is improved.
In the embodiment of the present invention, each unit of the disk space utilization apparatus may be implemented by a corresponding hardware or software unit, and each unit may be an independent software or hardware unit, or may be integrated into a software or hardware unit, which is not limited herein.
Example three:
a third embodiment of the present invention provides a disk space utilization terminal, which includes a memory, a processor, and a computer program that is stored in the memory and is executable on the processor, where the processor implements the steps in the above-mentioned various embodiments of the disk space utilization method when executing the computer program, for example, steps S101 to S104 shown in fig. 1. Alternatively, the processor, when executing the computer program, implements the functions of the units in the above-described device embodiments, such as the functions of the units 21 to 24 shown in fig. 2.
Example four:
in the fourth embodiment of the present invention, a computer-readable storage medium is provided, where a computer program is stored, and the computer program, when executed by a processor, implements the steps in the above-mentioned disk space utilization method embodiment, for example, steps S101 to S104 shown in fig. 1. Alternatively, the computer program may be adapted to perform the functions of the units of the above-described device embodiments, such as the functions of the units 21 to 24 shown in fig. 2, when executed by the processor.
The computer readable storage medium of the embodiments of the present invention may include any entity or device capable of carrying computer program code, a recording medium, such as a ROM/RAM, a magnetic disk, an optical disk, a flash memory, or the like.
It will be understood that modifications and variations can be made by persons skilled in the art in light of the above teachings and all such modifications and variations are intended to be included within the scope of the invention as defined in the appended claims.

Claims (7)

1. A method for utilizing disk space, comprising the steps of:
the method comprises the following steps: respectively filling large files in unused disk spaces of a plurality of unfilled disk partitions of a Linux server so that the large files fill the unfilled disk partitions where the large files are located, wherein the unfilled disk partitions are disk partitions with unused disk spaces;
step two: converting the large file into a sub-logical block device;
step three: merging a plurality of the sub-logical block devices to form a merged logical block device;
step four: and mounting the merging logic block device.
2. The method of disk space utilization according to claim 1, wherein said step one is implemented using dd commands.
3. The method of claim 1, wherein the second step is implemented by a mount-o loop mechanism.
4. The method of disk space utilization according to claim 1, wherein said step three is implemented using an LVM.
5. A disk space utilization apparatus, based on the disk space utilization method according to any one of claims 1 to 4, characterized in that the apparatus comprises:
the filling unit is used for respectively filling large files in unused disk spaces of a plurality of unfilled disk partitions of the Linux server so as to enable the large files to fill the unfilled disk partitions where the large files are located, wherein the unfilled disk partitions are disk partitions with unused disk spaces;
the conversion unit is used for converting the large file into the sub logic block device;
a merging unit, configured to merge the plurality of sub logic block devices to form a merged logic block device;
and the mounting unit is used for mounting the merging logic block equipment.
6. A disk space utilization terminal comprising a memory, a processor and a computer program stored in said memory and executable on said processor, characterized in that said processor implements the steps of the method according to any of claims 1 to 4 when executing said computer program.
7. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 4.
CN202110441544.1A 2021-04-23 2021-04-23 Disk space utilization method, device, terminal and storage medium Pending CN113238712A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110441544.1A CN113238712A (en) 2021-04-23 2021-04-23 Disk space utilization method, device, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110441544.1A CN113238712A (en) 2021-04-23 2021-04-23 Disk space utilization method, device, terminal and storage medium

Publications (1)

Publication Number Publication Date
CN113238712A true CN113238712A (en) 2021-08-10

Family

ID=77129068

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110441544.1A Pending CN113238712A (en) 2021-04-23 2021-04-23 Disk space utilization method, device, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN113238712A (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101556557A (en) * 2009-05-14 2009-10-14 浙江大学 Object file organization method based on object storage device
US20090300084A1 (en) * 2008-05-29 2009-12-03 Red Hat, Inc. Set partitioning for encoding file system allocation metadata
WO2009149416A1 (en) * 2008-06-05 2009-12-10 3Tera, Inc. Automated filer technique for use in virtualized appliances and applications
CN101727503A (en) * 2010-01-29 2010-06-09 宋振华 Method for establishing disk file system
CN101815095A (en) * 2010-03-26 2010-08-25 山东高效能服务器和存储研究院 SAN stored resource unified management and distribution method
CN102609214A (en) * 2011-01-21 2012-07-25 鸿富锦精密工业(深圳)有限公司 System and method for simulating BIOS (basic input/output system) ROM (read only memory) into disk
US20130232484A1 (en) * 2012-03-01 2013-09-05 International Business Machines Corporation Policy-based approach to provision and transform of virtual appliances
CN108037894A (en) * 2017-12-05 2018-05-15 浙江大华技术股份有限公司 A kind of disk space management method and device
CN111813673A (en) * 2020-07-06 2020-10-23 珠海西山居移动游戏科技有限公司 Hard disk filling test method and system
CN111881092A (en) * 2020-06-22 2020-11-03 武汉绿色网络信息服务有限责任公司 Method and device for merging files based on cassandra database

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090300084A1 (en) * 2008-05-29 2009-12-03 Red Hat, Inc. Set partitioning for encoding file system allocation metadata
WO2009149416A1 (en) * 2008-06-05 2009-12-10 3Tera, Inc. Automated filer technique for use in virtualized appliances and applications
CN101556557A (en) * 2009-05-14 2009-10-14 浙江大学 Object file organization method based on object storage device
CN101727503A (en) * 2010-01-29 2010-06-09 宋振华 Method for establishing disk file system
CN101815095A (en) * 2010-03-26 2010-08-25 山东高效能服务器和存储研究院 SAN stored resource unified management and distribution method
CN102609214A (en) * 2011-01-21 2012-07-25 鸿富锦精密工业(深圳)有限公司 System and method for simulating BIOS (basic input/output system) ROM (read only memory) into disk
US20130232484A1 (en) * 2012-03-01 2013-09-05 International Business Machines Corporation Policy-based approach to provision and transform of virtual appliances
CN108037894A (en) * 2017-12-05 2018-05-15 浙江大华技术股份有限公司 A kind of disk space management method and device
CN111881092A (en) * 2020-06-22 2020-11-03 武汉绿色网络信息服务有限责任公司 Method and device for merging files based on cassandra database
CN111813673A (en) * 2020-07-06 2020-10-23 珠海西山居移动游戏科技有限公司 Hard disk filling test method and system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
""Can I use free space of a used partiton as Volume Group?"", Retrieved from the Internet <URL:https://serverfault.com/questions/428830/can-i-use-free-space-of-a-used-partition-as-volume-group> *
王韶霞;曲广平;: "利用LVM逻辑卷在RHEL6系统中实现磁盘动态管理", 潍坊学院学报, no. 06, 15 December 2012 (2012-12-15), pages 1 - 2 *

Similar Documents

Publication Publication Date Title
US10545823B2 (en) Accelerating erasure code replication in distributed systems
US11729073B2 (en) Dynamic scaling of storage volumes for storage client file systems
US11093148B1 (en) Accelerated volumes
CN110677441B (en) Access method and device of object storage cluster
CN107451237B (en) Serialization and deserialization method, device and equipment
CN113835693B (en) Code generation method, device, electronic equipment and storage medium
US20220067981A1 (en) Attribute coding of duplicate points for point cloud coding
CN104144202A (en) Hadoop distributed file system access method, system and device
CN109683916A (en) A kind of method of cloud mirrored host computer of the autonomous creation comprising application software
CN113238712A (en) Disk space utilization method, device, terminal and storage medium
JP2023164875A (en) Quantizer design
US11575918B2 (en) Cross component intra prediction mode
US10803109B2 (en) Method and device for reading and writing video data in NAS device
CN110309191B (en) Method, device and system for storing business data
US20210409706A1 (en) Low latency cross component intra prediction mode
CN110688180B (en) Front-end system, front-end data flow control method, electronic device and storage medium
US11435912B2 (en) Method, electronic device, and computer program product for data storage
US20220141497A1 (en) Extended maximum coding unit size
US10417133B2 (en) Reference cache maintenance optimizer
CN117216427A (en) Method, device, equipment and medium for loading short links and acquiring short links
CN112367294A (en) Network communication method between multiple hosts adapting to edge computing architecture
CN117762989A (en) Database operation method, device, equipment and medium
CN114375571A (en) Improved quantizer

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