CN111190878B - Method, device, equipment and storage medium for sharing access NAS snapshot - Google Patents

Method, device, equipment and storage medium for sharing access NAS snapshot Download PDF

Info

Publication number
CN111190878B
CN111190878B CN201911386533.7A CN201911386533A CN111190878B CN 111190878 B CN111190878 B CN 111190878B CN 201911386533 A CN201911386533 A CN 201911386533A CN 111190878 B CN111190878 B CN 111190878B
Authority
CN
China
Prior art keywords
snapshot
volume
directory
shared
virtual
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
CN201911386533.7A
Other languages
Chinese (zh)
Other versions
CN111190878A (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.)
Beijing Inspur Data Technology Co Ltd
Original Assignee
Beijing Inspur Data 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 Beijing Inspur Data Technology Co Ltd filed Critical Beijing Inspur Data Technology Co Ltd
Priority to CN201911386533.7A priority Critical patent/CN111190878B/en
Publication of CN111190878A publication Critical patent/CN111190878A/en
Application granted granted Critical
Publication of CN111190878B publication Critical patent/CN111190878B/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/18File system types
    • G06F16/182Distributed file systems
    • G06F16/1824Distributed file systems implemented using Network-attached Storage [NAS] architecture
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1435Saving, restoring, recovering or retrying at system level using file system or storage system metadata
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • 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/176Support for shared access to files; File sharing support
    • 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
    • G06F16/184Distributed file systems implemented as replicated file system
    • G06F16/1844Management specifically adapted to replicated file systems

Abstract

The application discloses a method, a device, equipment and a storage medium for sharing access NAS snapshot, wherein the method comprises the following steps: establishing a volume snapshot by taking a storage volume as granularity; after the volume snapshot is generated, the volume snapshot is mounted as a directory structure in a read-only mode; after the volume snapshot is mounted, a virtual directory structure is established; establishing a link to a virtual directory structure in a shared directory on the volume snapshot; the snapshot version of the shared directory is accessed through a virtual path in the established link. The snapshot is established by taking the storage volume as the granularity, the shared directory is taken as the granularity shared snapshot, so that the snapshot establishing speed is accelerated, the influence on the service is reduced, the exported shared directory is directly linked and accessed in the original share, a client can directly browse the snapshot by taking the shared directory or a single directory/file as a unit, historical version data is read, the current version and the historical version of the data are visually compared, the multidimensional management is convenient, a special client is not required to be used, and the method has good universality.

Description

Method, device, equipment and storage medium for sharing access NAS snapshot
Technical Field
The present invention relates to the field of NAS snapshot technologies, and in particular, to a method, an apparatus, a device, and a storage medium for sharing access to an NAS snapshot.
Background
In order to ensure data security and prevent data loss and damage, a snapshot mechanism is designed for the storage system, namely, consistent backup is generated for data in the storage system at a certain time point. The user can use the backup recovery of the latest snapshot point when data is lost, and the loss is reduced as much as possible.
The Network Attached Storage (NAS) system manages Storage volumes and derives a shared directory on a Storage system side, is easy to use and manage, and can simultaneously provide sharing for a plurality of clients. The storage system may export an entire volume or any portion of a volume as a shared directory. Existing NAS snapshot technology can generate snapshots for an entire volume, an entire shared directory, or a single subdirectory/file according to granularity, and restore data of the corresponding granularity when needed.
In some application scenarios, a user needs to compare current data with historical version data to determine whether he or she has rolled back the needed data to some historical version. That is, a mechanism is needed to export the snapshot version of the NAS shared directory to the shared directory for the user to access and browse. The existing technology mainly adopts a special protocol or a client, so that the client can request to call and browse a snapshot version of a certain directory or file, for example, a volume shadow copy technology. However, such technologies often require software support of a storage end and a client end, and are poor in universality.
Therefore, how to implement sharing of NAS snapshots and improve generality is a technical problem that needs to be solved urgently by those skilled in the art.
Disclosure of Invention
In view of this, an object of the present invention is to provide a method, an apparatus, a device, and a storage medium for shared access to NAS snapshots, which can directly link and access derived shared directory snapshots in an original share without using a special client, and have good universality. The specific scheme is as follows:
a method of shared access NAS snapshot, comprising:
establishing a volume snapshot by taking a storage volume as granularity;
after the volume snapshot is generated, mounting the volume snapshot into a directory structure in a read-only mode;
after the volume snapshot is mounted, a virtual directory structure is established;
establishing a link to the virtual directory structure in a shared directory on the volume snapshot;
accessing a snapshot version of the shared directory through the established virtual path in the link.
Preferably, in the method for sharing an access NAS snapshot provided in the embodiment of the present invention, establishing a volume snapshot with a storage volume as a granularity specifically includes:
at a certain time point, suspending the reading and writing operation of a shared directory on a storage volume to be snapshot established, and establishing a volume snapshot on the storage volume by a copy-on-write method;
and when the data in the storage volume is changed, backing up in the volume snapshot.
Preferably, in the method for sharing an access NAS snapshot provided in the embodiment of the present invention, establishing a virtual directory structure specifically includes:
scanning each historical version snapshot of the volume snapshot, and judging whether a snapshot of each shared directory on the volume snapshot exists or not;
if yes, directly establishing a virtual directory structure; if the virtual directory structure is established, the virtual directory structure is not reestablished;
if not, no operation is performed.
Preferably, in the method for sharing an access NAS snapshot provided in the embodiment of the present invention, after the establishing the virtual directory structure, the method further includes:
and scanning each historical version snapshot of the volume snapshots, and if a snapshot of the shared directory exists in one volume snapshot, establishing a link pointing to the shared directory in the corresponding volume snapshot in the virtual directory structure.
Preferably, in the method for sharing access to a NAS snapshot provided in the embodiment of the present invention, accessing the snapshot version of the shared directory through the established virtual path in the link specifically includes:
browsing the snapshot version of any file in the shared directory by linking into the virtual directory structure;
and comparing the snapshot version with the original file, and directly restoring a single file by using a certain snapshot version according to a comparison structure.
Preferably, in the method for sharing an access NAS snapshot provided in the embodiment of the present invention, the method further includes:
and after one volume snapshot is deleted, reestablishing the virtual directory structure.
An embodiment of the present invention further provides a device for sharing an access NAS snapshot, including:
the volume snapshot establishing module is used for establishing a volume snapshot by taking the storage volume as granularity;
the volume snapshot mounting module is used for mounting the volume snapshot into a directory structure in a read-only mode after the volume snapshot is generated;
the virtual directory building module is used for building a virtual directory structure after the volume snapshot is mounted;
a virtual path establishing module, configured to establish a link pointing to the virtual directory structure in a shared directory on the volume snapshot;
and the snapshot version access module is used for accessing the snapshot version of the shared directory through the established virtual path in the link.
Preferably, in the apparatus for sharing an access NAS snapshot provided in the embodiment of the present invention, the virtual path establishing module is further configured to scan historical version snapshots of the volume snapshots, and if a snapshot of the shared directory exists in a certain volume snapshot, establish a link pointing to a shared directory in the corresponding volume snapshot in the virtual directory structure.
The embodiment of the present invention further provides a device for sharing access to a NAS snapshot, which includes a processor and a memory, where when the processor executes a computer program stored in the memory, the method for sharing access to a NAS snapshot is implemented as provided in the embodiment of the present invention.
An embodiment of the present invention further provides a computer-readable storage medium, configured to store a computer program, where the computer program, when executed by a processor, implements the method for sharing access NAS snapshot as described above.
It can be seen from the foregoing technical solutions that, a method, an apparatus, a device, and a storage medium for sharing an access NAS snapshot provided by the present invention includes: establishing a volume snapshot by taking a storage volume as granularity; after the volume snapshot is generated, the volume snapshot is mounted as a directory structure in a read-only mode; after the volume snapshot is mounted, a virtual directory structure is established; establishing a link to a virtual directory structure in a shared directory on the volume snapshot; the snapshot version of the shared directory is accessed through a virtual path in the established link.
The invention establishes the snapshot by taking the storage volume as the granularity, takes the shared directory as the granularity shared snapshot, maintains the virtual directory structure in the operating system of the storage end, derives the link of the virtual directory structure in the shared directory, and the client can link the virtual directory structure after mounting the shared directory and browse according to the snapshot version, thus quickening the snapshot establishing speed and reducing the influence on the service, and directly links and accesses the derived NAS shared directory in the original sharing, so that the client can directly browse the snapshot by taking the shared directory or a single directory/file as a unit, read the historical version data and visually compare the current version and the historical version of the data, thereby being convenient for multi-dimensional management, needing no special client and having good universality.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a method for sharing access NAS snapshots according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a device for sharing an access NAS snapshot according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The invention provides a method for sharing access NAS snapshot, as shown in figure 1, comprising the following steps:
s101, establishing a volume snapshot by taking a storage volume as granularity;
s102, after the volume snapshot is generated, mounting the volume snapshot into a directory structure in a read-only mode;
in practical application, after a storage volume generates a snapshot, mounting the snapshot in a read-only mode in an operating system of a storage end to form a directory structure, wherein the mounting is the directory structure of an original file system snapshot point moment;
s103, after the volume snapshot is mounted, a virtual directory structure is established;
in practical application, after the volume snapshot is mounted, an operating system of a storage end needs to maintain a virtual directory structure of the shared snapshot, wherein the virtual directory structure is a virtual structure set for exporting the shared snapshot;
s104, establishing a link pointing to a virtual directory structure in the shared directory on the volume snapshot;
and S105, accessing the snapshot version of the shared directory through the virtual path in the established link.
In the method for sharing and accessing the NAS snapshot provided in the embodiment of the present invention, the snapshot is established with the storage volume as the granularity, the shared directory is used as the granularity shared snapshot, the virtual directory structure is maintained in the operating system of the storage end, the link of the virtual directory structure is derived in the shared directory, and the client can link into the virtual directory structure and browse according to the snapshot version after mounting the shared directory, so that the snapshot creation speed is increased, the influence on the service is reduced, and the derived NAS shared directory is directly linked and accessed in the original sharing, so that the client can directly browse the snapshot according to the shared directory or a single directory/file as a unit, read the historical version data, visually compare the current version and the historical version of the data, facilitate multidimensional management, do not need to use a special client, and have good universality.
In specific implementation, in the method for sharing an access NAS snapshot provided in the embodiment of the present invention, step S101 is to establish a volume snapshot with a storage volume as a granularity, which may specifically include: at a certain time point, suspending the reading and writing operation of a shared directory on a storage volume to be snapshot established, and establishing a volume snapshot on the storage volume by a copy-on-write method; and when the data in the storage volume is changed later, backing up the data in the volume snapshot.
In specific implementation, in the method for sharing an access NAS snapshot provided in the embodiment of the present invention, step S103 is to establish a virtual directory structure, which may specifically include: scanning each historical version snapshot of the volume snapshot, and judging whether a snapshot of each shared directory on the volume snapshot exists or not; if yes, directly establishing a virtual directory structure (if the virtual directory structure is established, not reestablishing); if not, no operation is performed. It should be noted that the virtual directory structure herein can be regarded as a first level directory structure established for the sharing of a certain directory.
Further, in specific implementation, in the method for sharing an access NAS snapshot provided in the embodiment of the present invention, after the step S103 is executed to establish the virtual directory structure, and before the step S104 is executed to establish a link pointing to the virtual directory structure in the shared directory on the volume snapshot, the method may further include: and scanning the historical version snapshots of the volume snapshots, and if the snapshot of the shared directory exists in a certain volume snapshot, establishing a link pointing to the shared directory in the corresponding volume snapshot in the virtual directory structure. It should be noted that the link to the shared directory in the corresponding volume snapshot established here can be regarded as a second-level directory structure for loading the data pointing to the snapshot under the first-level directory structure, that is, the dependency relationship between the volume snapshot and the shared directory is reversed, and the volume snapshot is taken as the next-level directory of the shared directory.
In specific implementation, in the method for sharing access to a NAS snapshot provided in the embodiment of the present invention, the step S105 of accessing the snapshot version of the shared directory through the virtual path in the established link specifically may include: browsing the snapshot version of any file in the shared directory by linking into the virtual directory structure; comparing the snapshot version with the original file, and directly restoring a single file by using a certain snapshot version according to the comparison structure. Therefore, the current version and the historical version of the data are visually compared, multi-dimensional management is facilitated, and when the data are restored, integral rollback by taking a volume as a unit and single restoration by taking a file as a unit can be used, so that the usability and flexibility of data backup and restoration of an NAS storage product are greatly improved.
Specifically, the following describes in detail the method for sharing access NAS snapshot according to an embodiment of the present invention with a specific embodiment:
suppose the storage volume to be operated vol1 is mounted at/mnt/vol 1; snap 1-snap N is mounted at present, and snap 1/snap 1-snap/vol 1/snap N is mounted; at present, N shared directories/mnt/vol 1/dir 1-/mnt/vol 1/dirN are derived; after establishing the snapshot by taking the storage volume as granularity, the operation flow of establishing the virtual directory structure of the snapshot for each shared directory is as follows:
for each shared directory/mnt/vol 1/dirX on the volume for creating the snapshot, scanning whether the snapshot of the directory exists in each historical version snapshot/snap/vol 1/snap 1/snap/vol 1/snap N; if so, i.e., there are one or more snapshot versions/snap/vol 1/snap/dirX, then establish the virtual directory structure/snap/dirX (if the virtual directory structure is already established, then do not re-establish); if not, the shared directory is established after all the snapshot versions, and the execution is quitted (if the virtual directory structure has residue, the shared directory is deleted);
scanning each historical version snapshot/snap/vol 1/snap 1/snap/vol 1/snap N of the storage volume, if the snapshot/snap/vol 1/snap Y/dirX of the shared directory exists in the snapshot Y, establishing a link/snap/dirX/snap Y pointing to/snap/vol 1/snap Y/dirX in the virtual directory structure (if the link is established, the link is not reestablished);
establishing a link/mnt/vol 1/dirX/snap in the shared directory/mnt/vol 1/dirX, pointing to the virtual directory structure/snap/dirX (if the link is established, it is not re-established); thus, the snapshot snap of each version of the shared directory can be accessed by using the path/mnt/vol 1/dirX/snap;
the user can access the snapshot version by using a virtual path/mnt/vol 1/dirX/snap/file A for any file/mnt/vol 1/dirX/file A in the shared directory, and compare the snapshot version with the original file, or directly restore a single file by using a certain snapshot version according to the requirement.
Further, in specific implementation, in the method for sharing an access NAS snapshot provided in the embodiment of the present invention, the method may further include: and after a certain volume snapshot is deleted, the virtual directory structure is reestablished. The step of establishing the virtual directory structure can be referred to as the implementation of step S103.
Based on the same inventive concept, embodiments of the present invention further provide a device for sharing an access NAS snapshot, and since the principle of solving the problem of the device for sharing an access NAS snapshot is similar to the foregoing method for sharing an access NAS snapshot, the implementation of the device for sharing an access NAS snapshot may refer to the implementation of the method for sharing an access NAS snapshot, and repeated details are omitted.
In specific implementation, the apparatus for sharing an access NAS snapshot provided in the embodiment of the present invention, as shown in fig. 2, specifically includes:
a volume snapshot establishing module 11, configured to establish a volume snapshot with a storage volume as a granularity;
the volume snapshot mounting module 12 is configured to mount a volume snapshot as a directory structure in a read-only manner after the volume snapshot is generated;
the virtual directory establishing module 13 is configured to establish a virtual directory structure after the volume snapshot is mounted;
a virtual path establishing module 14, configured to establish a link pointing to a virtual directory structure in the shared directory on the volume snapshot;
and a snapshot version access module 15, configured to access the snapshot version of the shared directory through the virtual path in the established link.
In the apparatus for sharing and accessing an NAS snapshot provided in the embodiment of the present invention, after the snapshot is established and mounted by taking the storage volume as the granularity through the interaction of the five modules, a virtual directory structure is established and the snapshot shared access is derived by taking the shared directory as the granularity, that is, the derived shared directory snapshot is directly linked and accessed in the original share, and a special client is not required, so that the apparatus has good universality.
Further, in a specific implementation, in the apparatus for sharing an access NAS snapshot provided in the embodiment of the present invention, the virtual path establishing module 14 may be further configured to scan snapshots of historical versions of the volume snapshots, and if a snapshot of the shared directory exists in a certain volume snapshot, establish a link pointing to the shared directory in the corresponding volume snapshot in the virtual directory structure.
For more specific working processes of the modules, reference may be made to corresponding contents disclosed in the foregoing embodiments, and details are not repeated here.
Correspondingly, the embodiment of the invention also discloses equipment for sharing the access NAS snapshot, which comprises a processor and a memory; the processor implements the method for sharing access NAS snapshot disclosed in the foregoing embodiments when executing the computer program stored in the memory.
For more specific processes of the above method, reference may be made to corresponding contents disclosed in the foregoing embodiments, and details are not repeated here.
Further, the present invention also discloses a computer readable storage medium for storing a computer program; the computer program when executed by a processor implements the method of shared access NAS snapshot as disclosed previously.
For more specific processes of the above method, reference may be made to corresponding contents disclosed in the foregoing embodiments, and details are not repeated here.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device, the equipment and the storage medium disclosed by the embodiment correspond to the method disclosed by the embodiment, so that the description is relatively simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The method, the device, the equipment and the storage medium for sharing the access NAS snapshot provided by the embodiment of the invention comprise the following steps: establishing a volume snapshot by taking a storage volume as granularity; after the volume snapshot is generated, the volume snapshot is mounted as a directory structure in a read-only mode; after the volume snapshot is mounted, a virtual directory structure is established; establishing a link to a virtual directory structure in a shared directory on the volume snapshot; the snapshot version of the shared directory is accessed through a virtual path in the established link. The client can link the virtual directory structure after mounting the shared directory and browse according to the snapshot version, thereby quickening the snapshot creation speed and reducing the influence on the service, and directly link and access the exported NAS shared directory in the original sharing, so that the client can directly browse the snapshot according to the shared directory or a single directory/file as a unit, read the historical version data and visually compare the current version and the historical version of the data, thereby facilitating the multi-dimensional management, needing no special client and having good universality.
Finally, it is further noted that, herein, relational terms are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The method, apparatus, device and storage medium for sharing access to NAS snapshot provided by the present invention are described in detail above, and a specific example is applied in the present disclosure to explain the principle and the implementation of the present invention, and the description of the above embodiment is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (9)

1. A method of sharing access NAS snapshots, comprising:
establishing a volume snapshot by taking a storage volume as granularity;
after the volume snapshot is generated, mounting the volume snapshot into a directory structure in a read-only mode;
after the volume snapshot is mounted, scanning various historical version snapshots of the volume snapshot, and judging whether the volume snapshot has a snapshot of each shared directory or not; if yes, directly establishing a virtual directory structure; if the virtual directory structure is established, the virtual directory structure is not reestablished; if not, not performing operation;
establishing a link in the shared directory to the virtual directory structure;
accessing a snapshot version of the shared directory through the established virtual path in the link.
2. The method of claim 1, wherein the establishing the volume snapshot with the storage volume as a granularity specifically comprises:
at a certain time point, suspending the reading and writing operation of a shared directory on a storage volume to be snapshot established, and establishing a volume snapshot on the storage volume by a copy-on-write method;
and when the data in the storage volume is changed, backing up in the volume snapshot.
3. The method for sharing access NAS snapshot of claim 2, further comprising, after establishing the virtual directory structure:
and scanning each historical version snapshot of the volume snapshot, and if a snapshot of the shared directory exists in one volume snapshot, establishing a link pointing to the corresponding shared directory in the virtual directory structure.
4. The method of claim 3, wherein accessing the snapshot version of the shared directory via the established virtual path in the link specifically comprises:
browsing the snapshot version of any file in the shared directory by linking into the virtual directory structure;
and comparing the snapshot version with the original file, and directly restoring a single file by using a certain snapshot version according to a comparison structure.
5. The method of shared access NAS snapshot of claim 4, further comprising:
and after one volume snapshot is deleted, reestablishing the virtual directory structure.
6. An apparatus for shared access to NAS snapshots, comprising:
the volume snapshot establishing module is used for establishing a volume snapshot by taking the storage volume as granularity;
the volume snapshot mounting module is used for mounting the volume snapshot into a directory structure in a read-only mode after the volume snapshot is generated;
the virtual directory establishing module is used for scanning the historical version snapshots of the volume snapshot after the volume snapshot is mounted, and judging whether the volume snapshot has the snapshot of each shared directory; if yes, directly establishing a virtual directory structure; if the virtual directory structure is established, the virtual directory structure is not reestablished; if not, not performing operation;
a virtual path establishing module, configured to establish a link pointing to the virtual directory structure in the shared directory;
and the snapshot version access module is used for accessing the snapshot version of the shared directory through the established virtual path in the link.
7. The apparatus of claim 6, wherein the virtual path establishing module is further configured to scan historical versions of the volume snapshots, and if a snapshot of the shared directory exists in a certain volume snapshot, establish a link pointing to the corresponding shared directory in the virtual directory structure.
8. An apparatus for sharing access NAS snapshot, comprising a processor and a memory, wherein the processor implements the method of sharing access NAS snapshot according to any one of claims 1 to 5 when executing the computer program stored in the memory.
9. A computer-readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the method of shared access NAS snapshot of any of claims 1 to 5.
CN201911386533.7A 2019-12-29 2019-12-29 Method, device, equipment and storage medium for sharing access NAS snapshot Active CN111190878B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911386533.7A CN111190878B (en) 2019-12-29 2019-12-29 Method, device, equipment and storage medium for sharing access NAS snapshot

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911386533.7A CN111190878B (en) 2019-12-29 2019-12-29 Method, device, equipment and storage medium for sharing access NAS snapshot

Publications (2)

Publication Number Publication Date
CN111190878A CN111190878A (en) 2020-05-22
CN111190878B true CN111190878B (en) 2022-04-22

Family

ID=70707805

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911386533.7A Active CN111190878B (en) 2019-12-29 2019-12-29 Method, device, equipment and storage medium for sharing access NAS snapshot

Country Status (1)

Country Link
CN (1) CN111190878B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111939562B (en) * 2020-07-15 2024-04-19 着迷科技(深圳)有限公司 Shared storage method, electronic device, and computer-readable storage medium
CN112650723A (en) * 2020-12-28 2021-04-13 北京浪潮数据技术有限公司 File sharing method, device, equipment and computer readable storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104714755B (en) * 2013-12-13 2020-01-03 华为技术有限公司 Snapshot management method and device
CN108255994A (en) * 2017-12-29 2018-07-06 上海上讯信息技术股份有限公司 A kind of database version management method based on database snapshot
US11042448B2 (en) * 2018-01-31 2021-06-22 EMC IP Holding Company LLC Archiving NAS servers to the cloud

Also Published As

Publication number Publication date
CN111190878A (en) 2020-05-22

Similar Documents

Publication Publication Date Title
US11481289B2 (en) Method and apparatus for reading and writing committed data
JP4570312B2 (en) Method and apparatus for providing volume snapshot dependency in a computer system
CN111095219B (en) File system point-in-time restoration using recycle bin and version history
US10831614B2 (en) Visualizing restoration operation granularity for a database
AU2011338485B2 (en) Providing transparent failover in a file system
CN105814544B (en) System and method for supporting persistent partition recovery in a distributed data grid
US20170371750A1 (en) Method and apparatus for restoring data from snapshots
US8069144B2 (en) System and methods for asynchronous synchronization
US8688645B2 (en) Incremental restore of data between storage systems having dissimilar storage operating systems associated therewith
US7529778B1 (en) System and method for providing access to consistent point-in-time file versions
US8024292B2 (en) Creation of a single snapshot using a server job request
WO2017133216A1 (en) Distributed storage method and device
CN111190878B (en) Method, device, equipment and storage medium for sharing access NAS snapshot
CN112181720A (en) Virtual data center backup method and device based on cloud management platform
US9075722B2 (en) Clustered and highly-available wide-area write-through file system cache
US7315959B2 (en) Real-time remote backup system and related method
CN112035062B (en) Migration method of local storage of cloud computing, computer equipment and storage medium
CN114401280B (en) Method and system for synchronizing operation data
CN115510016A (en) Client response method, device and medium based on directory fragmentation
CN111385334B (en) Data distribution method, device, equipment and storage medium
US11068352B2 (en) Automatic disaster recovery mechanism for file-based version control system using lightweight backups
CN116541365B (en) File storage method, device, storage medium and client
CN117370080B (en) Data backup and data recovery method, system, equipment and medium for Hive
US20240004712A1 (en) Fencing off cluster services based on shared storage access keys
CN112463879A (en) Data volume synchronization method and device

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