CN111459880B - Method and system for modifying total space of self-simplified pre-allocation space compatible system - Google Patents

Method and system for modifying total space of self-simplified pre-allocation space compatible system Download PDF

Info

Publication number
CN111459880B
CN111459880B CN202010231308.2A CN202010231308A CN111459880B CN 111459880 B CN111459880 B CN 111459880B CN 202010231308 A CN202010231308 A CN 202010231308A CN 111459880 B CN111459880 B CN 111459880B
Authority
CN
China
Prior art keywords
space
self
allocation
directory
modifying
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.)
Active
Application number
CN202010231308.2A
Other languages
Chinese (zh)
Other versions
CN111459880A (en
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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202010231308.2A priority Critical patent/CN111459880B/en
Publication of CN111459880A publication Critical patent/CN111459880A/en
Application granted granted Critical
Publication of CN111459880B publication Critical patent/CN111459880B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • G06F16/122File system administration, e.g. details of archiving or snapshots using management policies
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • G06F16/128Details of file system snapshots on the file-level, e.g. snapshot creation, administration, deletion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/1727Details of free space management performed by the file system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a method and a system for modifying the total space of a self-simplified pre-allocation space compatible system, which are characterized in that a file snapshot service flag bit parameter and a directory quota service flag bit parameter are newly added, the parameter values are set to be OFF, the self-simplified pre-allocation is started, a client is subjected to cluster mounting according to the configured client address parameters, the pre-allocation space size is set for a created folder, and the successful pre-allocation setting is ensured through pre-allocation verification, so that the self-simplified pre-allocation space modification of a distributed file storage system is realized, the self-simplified pre-allocation can be modified according to the use requirements of a client, the capacity of a hard disk system is dynamically adapted and compatible, the robustness, the usability and the function richness of the storage system are improved, and the competitiveness of a distributed file storage product is improved.

Description

Method and system for modifying total space of self-simplified pre-allocation space compatible system
Technical Field
The invention relates to the technical field of distributed storage, in particular to a method and a system for modifying the total space of a self-simplified pre-allocation space compatible system.
Background
The distributed file storage system is widely applied to the fields of IT enterprises, cloud computing, big data, virtualization and the like. Meanwhile, the requirement of the fields on the directory self-simplification function of the storage system is higher and higher, the directory self-simplification function is only provided for users, but the capacity of the hard disk system is not compatible, the use of the storage system cannot be met, and the directory self-simplification function is required to be capable of modifying self-simplification distribution, dynamically adapting and being compatible with the capacity of the hard disk system according to the use requirement of the users. Because the current distributed file system directory self-compaction can not modify the pre-allocation and can not be dynamically compatible with the capacity of the hard disk system, the robustness, the usability and the function richness of the storage system are reduced, and the competitiveness of a distributed file storage product is seriously influenced.
Disclosure of Invention
The invention aims to provide a method and a system for modifying the total space of a self-simplified pre-allocation space compatible system, aiming at solving the problems that the capacity of a hard disk system cannot be modified in the prior art, the capacity of the hard disk system cannot be dynamically compatible, the self-simplified pre-allocation is modified according to the self use requirement, the capacity of the hard disk system is dynamically adapted and compatible, and the robustness, the usability and the function richness of a storage system are improved.
To achieve the above technical object, the present invention provides a method for modifying a total space of a self-compaction pre-allocation space compatible system, the method comprising the following operations:
closing file snapshot and directory quota service;
newly adding a file snapshot service flag bit parameter and a directory quota service flag bit parameter, and setting the parameters to be OFF;
starting self-simplification pre-allocation, and carrying out cluster mounting on the client according to the configured client address parameters;
acquiring cluster system time, recording a timestamp, and creating a folder in a mounting directory;
and setting the size of a pre-allocated space for the created folder, inquiring the total space of the hard disk system through a mount directory, comparing the sizes of the pre-allocated space and the total space of the system, and selecting whether to set the self-simplification.
Preferably, the folder name is constituted by a directory and a time stamp.
Preferably, after the self-compaction pre-allocation is started, whether the fs _ run result in the result is YES is checked to determine whether the self-compaction pre-allocation is started.
The invention also provides a system for modifying the total space of the self-simplified pre-allocation space compatible system, which comprises:
the service closing module is used for closing the file snapshot and the directory quota service;
the flag bit parameter adding module is used for adding a file snapshot service flag bit parameter and a directory quota service flag bit parameter, and setting the flag bit parameters to be OFF;
the mounting client module is used for starting self-simplification pre-allocation and carrying out cluster mounting on the client according to the configured client address parameters;
the directory creation module is used for acquiring cluster system time, recording a timestamp and creating a folder in the mounted directory;
and the pre-allocation module is used for setting the size of a pre-allocation space for the created file folder, inquiring the total space of the hard disk system through the mounting directory, comparing the sizes of the pre-allocation space and the total space of the system, and selecting whether to set self-simplification.
Preferably, the folder name is constituted by a directory and a time stamp.
Preferably, after the self-compaction pre-allocation is started, whether the fs _ run result in the result is YES is checked to detect whether the self-compaction pre-allocation is started.
The invention also provides a device for modifying the total space of the self-simplified pre-allocation space compatible system, which comprises the following steps:
a memory for storing a computer program;
a processor for executing the computer program to implement the method for modifying the total space of the self-compacting pre-allocated space-compatible system.
The invention also provides a readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the method for modifying the total space of the self-compacting pre-allocated space compatible system.
The effect provided in the summary of the invention is only the effect of the embodiment, not all the effects of the invention, and one of the above technical solutions has the following advantages or beneficial effects:
compared with the prior art, the method and the device start self-simplification pre-allocation by adding the file snapshot service flag bit parameter and the directory quota service flag bit parameter and setting the parameter values as OFF, mount the client in a cluster according to the configured client address parameter, set the size of the pre-allocation space for the created file folder, and ensure the successful pre-allocation setting through pre-allocation verification, thereby realizing the modification of the self-simplification pre-allocation space by the distributed file storage system, meeting the requirements of the client on self use, modifying the self-simplification pre-allocation, dynamically adapting and being compatible with the capacity of a hard disk system, improving the robustness, the usability and the functional richness of the storage system, and improving the competitiveness of the distributed file storage product.
Drawings
FIG. 1 is a flow chart of a method for modifying the total space of a self-compacting pre-allocated space compatible system according to an embodiment of the present invention;
FIG. 2 is a block diagram of a system for modifying the total space of a self-compacting pre-allocated space compatible system according to an embodiment of the present invention.
Detailed Description
In order to clearly explain the technical features of the present invention, the present invention is explained in detail by the following embodiments and the accompanying drawings. The following disclosure provides many different embodiments, or examples, for implementing different features of the invention. To simplify the disclosure of the present invention, specific example components and arrangements are described below. Furthermore, the present invention may repeat reference numerals and/or letters in the various examples. This repetition is for the purpose of simplicity and clarity and does not in itself dictate a relationship between the various embodiments and/or configurations discussed. It should be noted that the components illustrated in the figures are not necessarily drawn to scale. Descriptions of well-known components and processing techniques and procedures are omitted so as to not unnecessarily limit the invention.
The following describes a method and a system for modifying the total space of a self-compaction pre-allocation space compatible system according to embodiments of the present invention in detail with reference to the accompanying drawings.
As shown in FIG. 1, the present invention discloses a method for modifying the total space of a self-compacting pre-allocated space compatible system, which comprises the following operations:
closing file snapshot and directory quota service;
newly adding a file snapshot service flag bit parameter and a directory quota service flag bit parameter, and setting the parameters to be OFF;
starting self-simplification pre-allocation, and carrying out cluster mounting on the client according to the configured client address parameters;
acquiring cluster system time, recording a timestamp, and creating a folder in a mount directory;
setting the size of a pre-allocation space for the created folder, inquiring the total space of the hard disk system through the mounting directory, comparing the sizes of the pre-allocation space and the total space of the system, and selecting whether to set the self-simplification.
And closing the file snapShot service through the icfs-fs-snap-OFF, newly adding a snap shot _ status file snapShot service flag bit parameter in a snap _ conf configuration file under a home/snap directory of the main node of the storage system, and setting the snap shot _ status parameter value to be OFF.
And closing the directory quota service through the icfs-admin-quota-stop-dir, then adding a dirQuota _ status directory quota service flag bit parameter in a dirQuota _ conf configuration file under the/home/quota directory, and setting dirQuota _ status to be OFF.
After querying and ensuring that the snapShot _ status parameter and the dirQuota _ status parameter are both successfully modified to OFF, the self-compaction function is started through the icfs-fs-thin-start.
Adding a client _ ip parameter in a configuration file of a/user/client directory and configuring, and using the $ client _ ip parameter to introduce icfs-fuse $ client _ ip:/mnt/icfs-id sysmgt to mount the cluster according to the configured fuse client address, wherein the default path of mounting is/mnt/icfs.
And querying the self-simplification state of the directory, and ensuring the normal starting of the self-simplification function by querying that the fs _ run result in the result is YES. And acquiring cluster system TIME, recording a TIME stamp TIME, and creating a folder/mnt/icfs/dir 01_ $ TIME formed by dir + TIME stamp in a mounting directory.
The method comprises the steps of inquiring TOTAL SPACE TOTAL _ SPACE of a client hard disk system through a df-h | grid 'icfs-fuse' mounted directory, setting the size of a pre-allocation SPACE, storing the pre-allocation SPACE in FSTHIN _ NUM, and modifying the directory self-simplification pre-allocation SPACE by using dir01_ $ TIME and $ FSTHIN _ NUM and transmitting the icfs-fs-thin-set-p/mnt/icfs/dir01_ $ TIME-size $ FSTHIN _ NUM. When the $ FSTHIN _ NUM is smaller than or equal to the $ TOTAL _ SPACE, the setting is direct, when the $ FSTHIN _ NUM is larger than the $ TOTAL _ SPACE, the user is prompted to 'the current self-compaction limit is larger than the TOTAL system capacity, whether the adaptive system TOTAL capacity is compatible or not is required to be confirmed', when the user selects 'yes', the difference value between the $ FSTHIN _ NUM and the $ TOTAL _ SPACE is judged, the $ FSTHIN _ NUM is set to be equal to the $ TOTAL _ SPACE, the self-compaction limit is further modified to be equal to the TOTAL system SPACE, the self-compaction of the directory is set, and if the user selects 'no', the self-compaction is not set.
And querying the self-simplification pre-allocation space of the directory through the icfs-fs-thin-query-p/mnt/icfs/dir01_ $ TIME, ensuring that the setting is successful when the modified pre-allocation space is smaller than, equal to or larger than the total space of the system, and returning the program to 1 after the setting is successful and returning to 0 after the setting is failed.
The embodiment of the invention starts self-simplification pre-allocation by newly adding the file snapshot service flag bit parameter and the directory quota service flag bit parameter and setting the parameter values to OFF, carries out cluster mounting on the client according to the configured client address parameter, sets the size of the pre-allocation space for the created file holder, and ensures the success of the pre-allocation setting through pre-allocation verification, thereby realizing the modification of the self-simplification pre-allocation space of the distributed file storage system, meeting the requirement of the client on self use, modifying the self-simplification pre-allocation, dynamically adapting and being compatible with the capacity of a hard disk system, improving the robustness, the usability and the function richness of the storage system, and improving the competitiveness of the distributed file storage product.
As shown in fig. 2, an embodiment of the present invention further discloses a system for modifying a total space of a self-compaction pre-allocation space compatible system, where the system includes:
the service closing module is used for closing the file snapshot and the directory quota service;
the flag bit parameter adding module is used for adding a file snapshot service flag bit parameter and a directory quota service flag bit parameter, and setting the flag bit parameters to be OFF;
the mounting client module is used for starting self-simplification pre-allocation and carrying out cluster mounting on the client according to the configured client address parameters;
the directory creation module is used for acquiring cluster system time, recording a timestamp and creating a folder in the mounted directory;
and the pre-allocation module is used for setting the size of a pre-allocation space for the created file folder, inquiring the total space of the hard disk system through the mounting directory, comparing the sizes of the pre-allocation space and the total space of the system, and selecting whether to set self-simplification.
And closing the file snapShot service through the icfs-fs-snap-OFF, newly adding a snap shot _ status file snapShot service flag bit parameter in a snap _ conf configuration file under a home/snap directory of the main node of the storage system, and setting the snap shot _ status parameter value to be OFF.
And closing the directory quota service through the icfs-admin-quota-stop-dir, then adding a dirQuota _ status directory quota service flag bit parameter in a dirQuota _ conf configuration file under the/home/quota directory, and setting dirQuota _ status to be OFF.
After querying and ensuring that the snapShot _ status parameter and the dirQuota _ status parameter are both successfully modified to OFF, the self-compaction function is started through the icfs-fs-thin-start.
Adding a client _ ip parameter in a configuration file of a/user/client directory and configuring, and using the $ client _ ip parameter to introduce icfs-fuse $ client _ ip:/mnt/icfs-id sysmgt to mount the cluster according to the configured fuse client address, wherein the default path of mounting is/mnt/icfs.
And querying the self-simplification state of the directory, and ensuring the normal starting of the self-simplification function by querying that the fs _ run result in the result is YES. Acquiring cluster system TIME, recording a TIME stamp TIME, and creating a folder/mnt/icfs/dir 01_ $ TIME formed by dir + TIME stamp in a mounting directory.
The method comprises the steps of inquiring TOTAL SPACE TOTAL _ SPACE of a client hard disk system through a df-h | grid 'icfs-fuse' mounted directory, setting the size of a pre-allocation SPACE, storing the pre-allocation SPACE in FSTHIN _ NUM, and modifying the directory self-simplification pre-allocation SPACE by using dir01_ $ TIME and $ FSTHIN _ NUM and transmitting the icfs-fs-thin-set-p/mnt/icfs/dir01_ $ TIME-size $ FSTHIN _ NUM. When the $ FSTHIN _ NUM is smaller than or equal to the $ TOTAL _ SPACE, the setting is direct, when the $ FSTHIN _ NUM is larger than the $ TOTAL _ SPACE, the user is prompted to 'the current self-compaction limit is larger than the TOTAL system capacity, whether the adaptive system TOTAL capacity is compatible or not is required to be confirmed', when the user selects 'yes', the difference value between the $ FSTHIN _ NUM and the $ TOTAL _ SPACE is judged, the $ FSTHIN _ NUM is set to be equal to the $ TOTAL _ SPACE, the self-compaction limit is further modified to be equal to the TOTAL system SPACE, the self-compaction of the directory is set, and if the user selects 'no', the self-compaction is not set.
And querying the self-simplification pre-allocation space of the directory through the icfs-fs-thin-query-p/mnt/icfs/dir01_ $ TIME, ensuring that the setting is successful when the modified pre-allocation space is smaller than, equal to or larger than the total space of the system, and returning the program to 1 after the setting is successful and returning to 0 after the setting is failed.
The embodiment of the invention also discloses equipment for modifying the total space of the self-simplified pre-allocation space compatible system, which comprises the following steps:
a memory for storing a computer program;
a processor for executing the computer program to implement the method for modifying the total space of the self-compacting pre-allocated space-compatible system.
The embodiment of the invention also discloses a readable storage medium for storing a computer program, wherein the computer program realizes the method for modifying the total space of the self-compaction pre-allocation space compatible system when being executed by a processor.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.

Claims (6)

1. A method of modifying a self-compacting pre-allocated space-compatible system total space, the method comprising the acts of:
closing file snapshot and directory quota service;
newly adding a file snapshot service flag bit parameter and a directory quota service flag bit parameter, and setting the parameters to be OFF;
starting self-simplification pre-allocation, and carrying out cluster mounting on the client according to the configured client address parameters;
acquiring cluster system time, recording a timestamp, and creating a folder in a mounting directory;
setting the size of a pre-allocation space for the created folder, inquiring the total space of the hard disk system through the mounting directory, comparing the sizes of the pre-allocation space and the total space of the system, and selecting whether to set the self-simplification.
2. The method for modifying the total space of the self-compacting pre-allocated space-compatible system according to claim 1, wherein the name of the folder is composed of a directory and a timestamp.
3. A system for modifying a self-compacting pre-allocated space-compatible system total space, the system comprising:
the service closing module is used for closing the file snapshot and the directory quota service;
the flag bit parameter adding module is used for adding a file snapshot service flag bit parameter and a directory quota service flag bit parameter, and setting the flag bit parameters to be OFF;
the mounting client module is used for starting self-simplification pre-allocation and carrying out cluster mounting on the client according to the configured client address parameters;
the directory creation module is used for acquiring cluster system time, recording a timestamp and creating a folder in the mounted directory;
the pre-allocation module is used for setting the size of a pre-allocation space for the created folder, inquiring the total space of the hard disk system through the mounting directory, comparing the sizes of the pre-allocation space and the total space of the system, and selecting whether to set the self-simplification.
4. The system for modifying the self-compacting pre-allocated space-compatible system total space of claim 3, wherein the folder name is comprised of a directory and a timestamp.
5. An apparatus for modifying a self-compacting pre-allocated space-compatible system total space, comprising:
a memory for storing a computer program;
a processor for executing said computer program to implement the method for modifying the total space of a self-compacting pre-allocated space-compatible system according to claim 1 or 2.
6. A readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the method for modifying the total space of a self-compacting pre-allocated space-compatible system according to claim 1 or 2.
CN202010231308.2A 2020-03-27 2020-03-27 Method and system for modifying total space of self-simplified pre-allocation space compatible system Active CN111459880B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010231308.2A CN111459880B (en) 2020-03-27 2020-03-27 Method and system for modifying total space of self-simplified pre-allocation space compatible system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010231308.2A CN111459880B (en) 2020-03-27 2020-03-27 Method and system for modifying total space of self-simplified pre-allocation space compatible system

Publications (2)

Publication Number Publication Date
CN111459880A CN111459880A (en) 2020-07-28
CN111459880B true CN111459880B (en) 2023-01-06

Family

ID=71678356

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010231308.2A Active CN111459880B (en) 2020-03-27 2020-03-27 Method and system for modifying total space of self-simplified pre-allocation space compatible system

Country Status (1)

Country Link
CN (1) CN111459880B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102968279A (en) * 2012-11-13 2013-03-13 浪潮电子信息产业股份有限公司 Thin provisioning method for storage system
CN106202350A (en) * 2016-07-05 2016-12-07 浪潮(北京)电子信息产业有限公司 A kind of distributed file system simplifies the method and system of configuration automatically
CN108073723A (en) * 2018-01-03 2018-05-25 郑州云海信息技术有限公司 A kind of file in distributed type assemblies storage is from compressing method and equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102968279A (en) * 2012-11-13 2013-03-13 浪潮电子信息产业股份有限公司 Thin provisioning method for storage system
CN106202350A (en) * 2016-07-05 2016-12-07 浪潮(北京)电子信息产业有限公司 A kind of distributed file system simplifies the method and system of configuration automatically
CN108073723A (en) * 2018-01-03 2018-05-25 郑州云海信息技术有限公司 A kind of file in distributed type assemblies storage is from compressing method and equipment

Also Published As

Publication number Publication date
CN111459880A (en) 2020-07-28

Similar Documents

Publication Publication Date Title
CN107678835B (en) Data transmission method and system
EP3657358A1 (en) Method, device and system for persistent data processing, and readable storage medium
CN107193673B (en) Message processing method and device
US20160191652A1 (en) Data storage method and apparatus
WO2021139264A1 (en) Object storage control method and apparatus, computer device and storage medium
CN101763433B (en) Data storage system and method
CN109508254A (en) A kind of data reconstruction method and device
CN114020406A (en) Method, device and system for accelerating I/O of virtual machine by cloud platform
CN110399329B (en) RDMA data processing method and related device
CN115426374A (en) Service quality control method, device, equipment and storage medium
CN111459880B (en) Method and system for modifying total space of self-simplified pre-allocation space compatible system
CN108595574B (en) Database cluster connection method, device, equipment and storage medium
CN106776131B (en) Data backup method and server
CN112000971B (en) File permission recording method, system and related device
CN110798358B (en) Distributed service identification method and device, computer readable medium and electronic equipment
CN112118327A (en) Method and system for conveniently and quickly modifying IP (Internet protocol) of elastic network card under public cloud
CN114911421B (en) Data storage method, system, device and storage medium based on CSI plug-in
CN110309365B (en) Openstack data query method and device based on Mybatis
CN112506574A (en) Method for modifying BIOS configuration options in ARM server based on CentOS in-band
CN113835625A (en) Data storage method, device, equipment and storage medium based on sub-path
CN113010263A (en) Method, system, equipment and storage medium for creating virtual machine in cloud platform
CN107332679B (en) Centerless information synchronization method and device
CN112416245A (en) Storage volume management method based on multi-architecture container cloud platform and related components
CN111459881A (en) Directory file quota setting method and system for distributed file storage system
CN105072047A (en) Message transmitting and processing method

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
GR01 Patent grant
GR01 Patent grant