CN109669923A - A kind of WORM state automatic judging method and system - Google Patents

A kind of WORM state automatic judging method and system Download PDF

Info

Publication number
CN109669923A
CN109669923A CN201811467077.4A CN201811467077A CN109669923A CN 109669923 A CN109669923 A CN 109669923A CN 201811467077 A CN201811467077 A CN 201811467077A CN 109669923 A CN109669923 A CN 109669923A
Authority
CN
China
Prior art keywords
worm
file
module
time
attribute
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.)
Withdrawn
Application number
CN201811467077.4A
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.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information 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 Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201811467077.4A priority Critical patent/CN109669923A/en
Publication of CN109669923A publication Critical patent/CN109669923A/en
Withdrawn legal-status Critical Current

Links

Abstract

The present invention provides a kind of WORM state automatic judging method and system, specifically comprises the following steps: to calculate this operating distance last time to the time interval of the write operation of this document;According to the WORM attribute of setting, current file state in which is judged.File is created under share directory, and sets the WORM attribute of created file, wherein setting WORM grace period and WORM timeout value.If this operating distance last time is greater than or equal to the time value of grace period to the time interval of the write operation of this document, file is in WORM guard mode, and attribute is read-only;If this operating distance last time is less than the time interval of the write operation of this document the time value of grace period, allow to carry out write operation to this document.It calculates current time and file enters the time difference of protection period, if time difference is greater than WORM timeout value, the failure of WORM guard mode.

Description

A kind of WORM state automatic judging method and system
Technical field
The present invention relates to technical field of memory, and in particular to a kind of WORM state automatic judging method and system.
Background technique
With ever-increasing data storage requirement so that enterprise more urgently need to guarantee they business information and Record is accurately and efficiently achieved.The data stored by WORM technology because of various unexpected loss or will not be modified, this Just meet demand of the enterprise to some important business datum long-term safety storages.WORM: i.e. write-once is repeatedly read (Write Once Read Many) technology, this functional characteristic can realize that grace period and protection period, the mesh is arranged to catalogue in user File under record enters the protection period, and the data in file is prevented to be modified or deleted.WORM function is intended to protect archive data.
In test job, need repeatedly to judge the WORM attribute of file, judge file be in the grace period, Protection period still exceeds the time limit state, and artificial pending file is needed to enter corresponding state, then carries out relevant operation.If It is to manually perform, it is not only cumbersome, but also it is easy to the case where test errors occur because of the misjudgment to the time.
Summary of the invention
In order to overcome the deficiencies in the prior art described above, the present invention provides a kind of WORM state automatic judging method and is System, to solve the above technical problems.
The technical scheme is that
A kind of WORM state automatic judging method includes the following: that creation script judges automatically WORM state, specifically Include the following steps:
This operating distance last time is calculated to the time interval of the write operation of this document;
According to the WORM attribute of setting, current file state in which is judged.
Further, before step calculates this operating distance last time to the time interval of the write operation of this document, comprising:
File is created under share directory, and sets the WORM attribute of created file, wherein the setting WORM grace period With WORM timeout value.
Further, setting WORM timeout value is 30 seconds.
Further, step judges current file state in which according to the WORM duration value of setting, comprising:
If this operating distance last time is greater than or equal to the time value of grace period to the time interval of the write operation of this document, File is in WORM guard mode, and attribute is read-only;
If this operating distance last time is less than the time value of grace period to the time interval of the write operation of this document, allow pair This document carries out write operation.
Further, this method further includes:
It calculates current time and file enters the time difference of protection period, if time difference is greater than WORM timeout value, The failure of WORM guard mode.
Further, file is created under step share directory, and sets the WORM attribute of created file, before also Include:
Define relevant parameter;Wherein, including parameter and input path;
Carry mnt/icfs;
Nfs shared service is opened, creation nfs is shared.
Technical solution of the present invention also provides a kind of WORM state and judges automatically system, including computing module and judgment module;
Computing module for carrying out timing to each file operation, and calculates this operating distance last time to this document Write operation time interval;
Judgment module, the time value for being exported according to the WORM attribute and computing module of setting, judges current file institute The state at place.
Further, which further includes file creation module and attribute setup module:
File creation module, the file creation module is for creating file under share directory;
Attribute setup module, for the WORM attribute of created file to be arranged, wherein WORM attribute includes the WORM tolerance Phase and WORM timeout value.
Further, system further include: parameter definition module, carry module and shared opening module
Parameter definition module, for defining relevant parameter;Wherein, including parameter and input path;
Carry module is used for carry mnt/icfs;
Shared opening module, for opening nfs shared service, creation nfs is shared.
Further, WORM timeout value is 30 seconds.
As can be seen from the above technical solutions, the invention has the following advantages that WORM (Write Once Read Many) attribute query, is in grace period, protection period to file or state of exceeding the time limit carries out automatization judgement, recycles circulation It waits algorithm that associated documents is made to enter protection period state, simply and easily completes the automatic test of WORM attribute.
In addition, design principle of the present invention is reliable, structure is simple, has very extensive application prospect.
It can be seen that compared with prior art, the present invention have substantive distinguishing features outstanding and it is significant ground it is progressive, implementation Beneficial effect be also obvious.
Detailed description of the invention
Fig. 1 is a kind of WORM state automatic judging method flow chart.
Specific embodiment
The present invention provides a kind of WORM state automatic judging method and system, to WORM (Write Once Read Many) Attribute query, is in grace period, protection period to file or state of exceeding the time limit carries out automatization judgement, recycles circulation to wait and calculates Method makes associated documents enter protection period state, simply and easily completes the automatic test of WORM attribute.
To keep the purposes, technical schemes and advantages of the embodiment of the present application clearer, below in conjunction with the embodiment of the present application In attached drawing, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described embodiment is Some embodiments of the present application, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art Every other embodiment obtained without making creative work, shall fall in the protection scope of this application.
Embodiment one
As shown in Figure 1, a kind of WORM state automatic judging method provided in this embodiment, includes the following: creation script pair WORM state is judged automatically, and is specifically comprised the following steps:
S1: creating file under share directory, and sets the WORM attribute of created file, wherein setting WORM wide Time limit and WORM timeout value.
S2: this operating distance last time is calculated to the time interval of the write operation of this document;
S3: if this operating distance last time is greater than or equal to the time of grace period to the time interval of the write operation of this document Value, file are in WORM guard mode, and attribute is read-only;
If this operating distance last time is less than the time value of grace period to the time interval of the write operation of this document, allow pair This document carries out write operation.
S4: calculating current time and file enters the time difference of protection period, if time difference is greater than WORM timeout value, The failure of WORM guard mode.
Embodiment two
A kind of WORM state automatic judging method provided in this embodiment, include the following: creation script to WORM state into Row judges automatically, and specifically comprises the following steps:
S1: creating file under share directory, and sets the WORM attribute of created file, wherein setting WORM wide Time limit and WORM timeout value.It also needs to be arranged as follows before this step:
Define relevant parameter;Wherein, including parameter and input path;
Carry mnt/icfs;
Nfs shared service is opened, creation nfs is shared.
S2: this operating distance last time is calculated to the time interval of the write operation of this document;
S3: if this operating distance last time is greater than or equal to the time of grace period to the time interval of the write operation of this document Value, file are in WORM guard mode, and attribute is read-only;
If this operating distance last time is less than the time value of grace period to the time interval of the write operation of this document, allow pair This document carries out write operation.
S4: calculating current time and file enters the time difference of protection period, if time difference is greater than WORM timeout value, The failure of WORM guard mode.
Realize that script is as follows:
Test.sh content for script:
By executing ./Test.sh, wherein the automatization judgement of the worm state of file and the calculation of circulation waiting is utilized Method carries out automatic operation after file enters the protection period, is not necessarily to manual intervention, greatly reduces cost of labor, improve The efficiency of test.
Embodiment three
Technical solution of the present invention also provides a kind of WORM state and judges automatically system, including computing module and judgment module;
The system further includes file creation module and attribute setup module:
File creation module, the file creation module is for creating file under share directory;
Attribute setup module, for the WORM attribute of created file to be arranged, wherein WORM attribute includes the WORM tolerance Phase and WORM timeout value;
The system further include: parameter definition module, carry module and shared opening module
Parameter definition module, for defining relevant parameter;Wherein, including parameter and input path;
Carry module is used for carry mnt/icfs;
Shared opening module, for opening nfs shared service, creation nfs is shared.
Computing module for carrying out timing to each file operation, and calculates this operating distance last time to this document Write operation time interval;The computing module is also used to calculate current time and enters the time difference of protection period;
Judgment module, the time value for being exported according to the WORM attribute and computing module of setting, judges current file institute The state at place.
The calculated value and count value that judgment module is exported according to computing module carry out judging current file state in which;
Wherein, if this operating distance last time to the time interval of the write operation of this document be greater than or equal to the grace period when Between be worth, file is in WORM guard mode, and attribute is read-only;If file is in WORM guard mode, any user can only Read operation is carried out, when user's request carries out write operation to file, the write operation of user can be considered as unauthorized operation, return to mistake Information.
If this operating distance last time is less than the time value of grace period to the time interval of the write operation of this document, allow pair This document carries out write operation.
If the time difference that current time and file enter the protection period is greater than WORM timeout value, WORM guard mode is lost Effect.If WORM timeout value is 30 seconds, then when the time difference that current time and file enter the protection period is greater than 30 seconds, WORM Guard mode failure, that is, the read-only status timeliness of file, at this time can permit user and read file and/or write behaviour Make.
Description and claims of this specification and term " first ", " second ", " third " " in above-mentioned attached drawing The (if present)s such as four " are to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should manage The data that solution uses in this way are interchangeable under appropriate circumstances, so as to the embodiment of the present invention described herein can in addition to Here the sequence other than those of diagram or description is implemented.In addition, term " includes " and " having " and their any deformation, It is intended to cover and non-exclusive includes.
The foregoing description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, as defined herein General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, of the invention It is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein phase one The widest scope of cause.

Claims (10)

1. a kind of WORM state automatic judging method, which is characterized in that include the following: that creation script carries out automatically WORM state Judgement, specifically comprises the following steps:
This operating distance last time is calculated to the time interval of the write operation of this document;
According to the WORM attribute of setting, current file state in which is judged.
2. a kind of WORM state automatic judging method according to claim 1, which is characterized in that step calculates this operation Before time interval of the last time to the write operation of this document, comprising:
Create file under share directory, and set the WORM attribute of created file, wherein setting the WORM grace period and WORM timeout value.
3. a kind of WORM state automatic judging method according to claim 2, which is characterized in that
It is 30 seconds that WORM timeout value, which is arranged,.
4. a kind of WORM state automatic judging method according to claim 2 or 3, which is characterized in that
Step judges current file state in which according to the WORM duration value of setting, comprising:
If this operating distance last time is greater than or equal to the time value of grace period, file to the time interval of the write operation of this document In WORM guard mode, attribute is read-only;
If this operating distance last time is less than the time value of grace period to the time interval of the write operation of this document, allow to this article Part carries out write operation.
5. a kind of WORM state automatic judging method according to claim 4, which is characterized in that
This method further include:
It calculates current time and file enters the time difference of protection period, if time difference is greater than WORM timeout value, WORM is protected The failure of shield state.
6. a kind of WORM state automatic judging method according to claim 4, which is characterized in that
File is created under step share directory, and sets the WORM attribute of created file, before further include:
Define relevant parameter;Wherein, including parameter and input path;
Carry mnt/icfs;
Nfs shared service is opened, creation nfs is shared.
7. a kind of WORM state judges automatically system, which is characterized in that including computing module and judgment module;
Computing module for carrying out timing to each file operation, and calculates this operating distance last time and writes to this document The time interval of operation;
Judgment module, the time value for being exported according to the WORM attribute and computing module of setting, judges locating for current file State.
8. a kind of WORM state according to claim 7 judges automatically system, which is characterized in that the system further includes file Press from both sides creation module and attribute setup module:
File creation module, the file creation module is for creating file under share directory;
Attribute setup module, for the WORM attribute of created file to be arranged, wherein WORM attribute include the WORM grace period and WORM timeout value.
9. a kind of WORM state according to claim 8 judges automatically system, which is characterized in that
The system further include: parameter definition module, carry module and shared opening module
Parameter definition module, for defining relevant parameter;Wherein, including parameter and input path;
Carry module is used for carry mnt/icfs;
Shared opening module, for opening nfs shared service, creation nfs is shared.
10. a kind of WORM state according to claim 9 judges automatically system, which is characterized in that
WORM timeout value is 30 seconds.
CN201811467077.4A 2018-12-03 2018-12-03 A kind of WORM state automatic judging method and system Withdrawn CN109669923A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811467077.4A CN109669923A (en) 2018-12-03 2018-12-03 A kind of WORM state automatic judging method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811467077.4A CN109669923A (en) 2018-12-03 2018-12-03 A kind of WORM state automatic judging method and system

Publications (1)

Publication Number Publication Date
CN109669923A true CN109669923A (en) 2019-04-23

Family

ID=66144992

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811467077.4A Withdrawn CN109669923A (en) 2018-12-03 2018-12-03 A kind of WORM state automatic judging method and system

Country Status (1)

Country Link
CN (1) CN109669923A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113407995A (en) * 2021-06-25 2021-09-17 济南浪潮数据技术有限公司 Method, system, equipment and medium for normal error reporting of overwriting and additional writing
WO2023077283A1 (en) * 2021-11-02 2023-05-11 华为技术有限公司 File management method and apparatus, and electronic device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113407995A (en) * 2021-06-25 2021-09-17 济南浪潮数据技术有限公司 Method, system, equipment and medium for normal error reporting of overwriting and additional writing
WO2023077283A1 (en) * 2021-11-02 2023-05-11 华为技术有限公司 File management method and apparatus, and electronic device

Similar Documents

Publication Publication Date Title
CN104933133B (en) Meta-data snap in distributed file system stores and accesses method
US7240054B2 (en) Techniques to preserve data constraints and referential integrity in asynchronous transactional replication of relational tables
CN103744628B (en) SSTable file storage method and device
EP2382543B1 (en) Granular application data lifecycle sourcing from a single backup
CN103034592B (en) Data processing method and device
CN105824572A (en) Disk storage space managing method, apparatus and storage device
CN102289526B (en) HFS+file system data recovery method and device
US7225206B2 (en) System and method for reorganizing stored data
CN100437504C (en) Hard disc data backup system and method
CN109669923A (en) A kind of WORM state automatic judging method and system
US10268776B1 (en) Graph store built on a distributed hash table
US20090164524A1 (en) Shadow-page deferred-update recovery technique integrating shadow page and deferred update techniques in a storage system
CN109684292A (en) A kind of method that flash memory database quickly carries out data recovery
CN109496292A (en) A kind of disk management method, disk management device and electronic equipment
US20170357659A1 (en) Systems and methods for managing snapshots of a file system volume
CN109783467A (en) A kind of nested directory file number quota setting method of distributed file system
CN107273449B (en) Breakpoint processing method and system based on memory database
CN112800019A (en) Data backup method and system based on Hadoop distributed file system
CN104268097B (en) A kind of metadata processing method and system
CN103176867A (en) Fast file differential backup method
CN103559224A (en) Method and device for hashing metadata objects
CN105302488A (en) Data writing method and system for storage system
CN102937923B (en) A kind of method of automatic preservation user interface state
US20030074376A1 (en) File manager for storing several versions of a file
CN105740098A (en) Determination method and system for stale data among backup data

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
WW01 Invention patent application withdrawn after publication

Application publication date: 20190423

WW01 Invention patent application withdrawn after publication