CN117111848A - Data access method, device, medium and electronic equipment - Google Patents

Data access method, device, medium and electronic equipment Download PDF

Info

Publication number
CN117111848A
CN117111848A CN202311093887.9A CN202311093887A CN117111848A CN 117111848 A CN117111848 A CN 117111848A CN 202311093887 A CN202311093887 A CN 202311093887A CN 117111848 A CN117111848 A CN 117111848A
Authority
CN
China
Prior art keywords
data
nas
bucket
access
file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311093887.9A
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.)
Macrosan Technologies Co Ltd
Original Assignee
Macrosan Technologies 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 Macrosan Technologies Co Ltd filed Critical Macrosan Technologies Co Ltd
Priority to CN202311093887.9A priority Critical patent/CN117111848A/en
Publication of CN117111848A publication Critical patent/CN117111848A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0647Migration mechanisms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]

Landscapes

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

Abstract

The embodiment of the specification provides a data access method, a device, a medium and electronic equipment, wherein the method is applied to an object storage system, the object storage system is used for managing a plurality of NAS systems, the object storage system comprises at least one storage bucket, and the at least one storage bucket is respectively associated with different NAS systems; the method comprises the following steps: for one of the NAS systems, storing a plurality of objects in a target bucket associated with the NAS system, the target bucket being one of the at least one bucket, each object mapping to one of the data in the NAS system; processing data access service of a client to the NAS system according to the object in the target storage bucket and the data mapped to the object; and starting to migrate the data in the NAS system to the target storage bucket.

Description

Data access method, device, medium and electronic equipment
Technical Field
The embodiment of the specification relates to the technical field of NAS (network attached storage), in particular to a data access method, a device, a medium and electronic equipment.
Background
In the early stage of Internet development, the business data volume of enterprises is smaller, and the NAS (Network Attached Storage ) storage system can well meet the storage requirements of the enterprises. However, with the development of services, unstructured data has exploded, and the existing storage architecture cannot meet the management and use requirements of massive unstructured data, and object storage is generated. NAS systems have become a necessary way to evolve toward object storage.
In the prior art, the NAS system is required to be handed to an object storage for management, mapping between the NAS system and a storage bucket in the object storage is established, the NAS system is mounted to all object storage nodes, the object storage is ensured to normally access data in the NAS system, then NAS system directory files are traversed, each NAS file is converted into metadata information and recorded in the object storage, and then the data in the NAS system can be checked and accessed by accessing the object bucket through an S3 interface.
According to the scheme, access to the NAS system service needs to be stopped before the NAS system catalog is traversed, if the data volume in the NAS system is large, the time for reading all file information in the NAS system and writing the file information into the object storage is long, and the service cannot be used for a long time. The access to the NAS system service is not stopped, but metadata migration is performed under the condition, so that when the scanning history data is converted into metadata, new data is continuously generated due to the access to the NAS system, after one full-data migration is completed, the service can not be smoothly switched because incremental data migration is required for numerous times.
Disclosure of Invention
In view of this, one or more embodiments of the present specification provide a data access method, apparatus, medium, and electronic device.
In order to achieve the above object, one or more embodiments of the present disclosure provide the following technical solutions:
according to a first aspect of one or more embodiments of the present specification, a data access method is provided, where the method is applied to an object storage system, where the object storage system hosts a plurality of NAS systems, and the object storage system includes at least one bucket therein, where the at least one bucket is respectively associated with different NAS systems;
the method comprises the following steps:
for one of the NAS systems, storing a plurality of objects in a target bucket associated with the NAS system, the target bucket being one of the at least one bucket, each object mapping to one of the data in the NAS system;
processing data access service of a client to the NAS system according to the object in the target storage bucket and the data mapped to the object;
and starting to migrate the data in the NAS system to the target storage bucket.
According to a second aspect of one or more embodiments of the present specification, there is provided a data access apparatus equipped with an object storage system hosting a plurality of NAS systems, the object storage system including therein at least one bucket, the at least one bucket being respectively associated to different NAS systems;
the device comprises:
a data mapping module for one of the NAS systems storing a plurality of objects in a target bucket associated with the NAS system, the target bucket being one of the at least one bucket for mapping each object to one of the data in the NAS system;
the service processing module is used for processing the data access service of the client to the NAS system according to the object in the target storage bucket and the data mapped to the object;
and the data migration module is used for starting to migrate the data in the NAS system to the target storage bucket.
According to a third aspect of one or more embodiments of the present specification, there is provided an electronic device comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor implements the method of any of the embodiments of the present specification by executing the executable instructions.
According to a fourth aspect of one or more embodiments of the present description, there is provided a computer readable storage medium having stored thereon computer instructions which, when executed by a processor, implement a method of any of the embodiments of the present description.
According to the data access method, the device, the medium and the electronic equipment, one storage bucket in the object storage system is associated with one NAS system, so that single objects of the storage bucket are mapped to single data in the NAS system, access to the NAS system can be achieved according to the objects in the storage bucket and the data processing mapped by the objects, after that, the access to the NAS system is processed through the object storage system, and then data migration is started. Therefore, before data migration, the service is quickly switched to the object storage, so that new data generated later is directly stored in the object storage, the problem that incremental data migration is required to be carried out on the NAS system is avoided, the time is saved, and the operation is simplified; and the data mapping process is less in time consumption, and the access to the NAS system is not required to be stopped, so that the stable switching of the service is realized.
Drawings
In order to more clearly illustrate the technical solutions of one or more embodiments of the present disclosure or related technologies, the following description will briefly describe the drawings that are required to be used in the embodiments or related technology descriptions, and it is apparent that the drawings in the following description are only some embodiments described in one or more embodiments of the present disclosure, and other drawings may be obtained according to these drawings without inventive effort to those of ordinary skill in the art.
FIG. 1 is a flow chart of a method of data access shown in an exemplary embodiment of the present description;
FIG. 2 is a schematic diagram of an object storage cluster accessing a NAS file storage cluster through IO as shown in an exemplary embodiment of the present disclosure;
FIG. 3 is a schematic diagram of an object storage nano-tube NAS system as shown in an exemplary embodiment of the present description;
FIG. 4 is a schematic diagram of a NAS system mapping to an object storage system as illustrated in an exemplary embodiment of the present description;
FIG. 5 is a flow chart of a method of data access shown in an exemplary embodiment of the present disclosure;
FIG. 6 is a flow chart of a method of data access shown in an exemplary embodiment of the present description;
FIG. 7 is a schematic diagram of migration of NAS data to an object storage system as illustrated in an exemplary embodiment of the present disclosure;
FIG. 8 is a flow chart of a method of data access shown in an exemplary embodiment of the present disclosure;
FIG. 9 is a flow chart of a method of data access shown in an exemplary embodiment of the present disclosure;
FIG. 10 is a schematic diagram of migration of NAS data to an object storage system as illustrated in an exemplary embodiment of the present disclosure;
FIG. 11 is a schematic diagram illustrating migration of object data to NAS storage according to an exemplary embodiment of the present disclosure;
FIG. 12 is a flow chart of a method of data access shown in an exemplary embodiment of the present disclosure;
FIG. 13 is a flow chart of a method of data access shown in an exemplary embodiment of the present disclosure;
FIG. 14 is a flow chart of a method of data access shown in an exemplary embodiment of the present disclosure;
fig. 15 is a schematic structural view of a page control apparatus shown in an exemplary embodiment of the present specification;
fig. 16 is a hardware schematic of an apparatus shown in an exemplary embodiment of the present specification.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the embodiments of the present specification. Rather, they are merely examples of apparatus and methods consistent with aspects of the embodiments of the present description as detailed in the accompanying claims.
The terminology used in the embodiments of the description presented herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the embodiments of the description presented herein. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used in the embodiments of the present specification to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, the first information may also be referred to as second information, and similarly, the second information may also be referred to as first information, without departing from the scope of the embodiments of the present description. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "responsive to a determination", depending on the context.
For ease of understanding, some concepts related to the embodiments of the present description are explained:
and (3) a storage barrel: a base entity in the object store for holding containers of objects.
The object is: the basic entity stored in the object storage system is an aggregate of data of a file and related attribute information thereof, and an object is composed of object data, object metadata and an object key.
Object data: typically unstructured data such as pictures, time-frequency, audio, documents, etc.
Object metadata: is a set of key-value pairs that can be colloquially understood as attributes of an object, such as modification time, storage type, size, owner, etc. of the object.
Object key: the unique identifier of the object in the bucket is used to distinguish the object.
In order to solve the problem that in the background art, when the NAS system is handed to the object storage for management, access to NAS service needs to be stopped to perform transition migration on data in the NAS, so that service cannot be used for a long time, and the problem that although access to NAS service may not be stopped, incremental migration is caused. The embodiment of the specification provides a data access method, a data access device, a medium and electronic equipment.
FIG. 1 is a flow chart illustrating a method of data access in accordance with an exemplary embodiment.
As shown in fig. 1, the method may include the following processes. It should be noted that, in the embodiment of the present disclosure, the execution sequence of each step is not limited, and the sequence numbers of the steps in the following description are not limiting the sequence of the steps:
in step 101, a storage nanotube is deployed on an object storage system.
The storage nano tube is used for providing a consistent access entrance to the outside so as to realize unified access to the data in the old storage, and the storage nano tube is arranged in the step, mainly by giving the NAS to the object storage for management, so that the object storage can normally access the data in the NAS.
Illustratively, the object storage system and the NAS system are clustered. In this example, in order to deploy storage nanotubes, it is necessary to install NAS clients on nodes of each object storage system, and configure access rights of the NAS clients, so that after the configuration is completed, the object storage may be connected to the file storage through a network to manage NAS data. Each NAS proxy point in the object storage cluster shown in fig. 2 may access the NAS file storage cluster through an IO link.
In step 102, a mapping relationship between the object storage system and the NAS system is established.
An object storage system hosts a plurality of NAS systems, wherein the object storage system at least comprises one storage bucket, and the at least one storage bucket is respectively associated with different NAS systems.
Exemplary, the object storage nano-tube NAS system is shown in FIG. 3. In the figure, one NAS system is named NAS_Poo1, and when a mapping relation between an object storage system and the NAS system is established, the NAS system is mapped into one storage bucket in the object storage system, and the bucket is named NAS_Poo1; likewise, the NAS system name NAS_Poo2 will be mapped to a bucket with a bucket name NAS_Poo2; NAS system name nas_pool3 will be mapped to a bucket with bucket name nas_pool 3.
For one of the NAS systems, the NAS system may be associated with one of at least one bucket included in the object storage system, which may be referred to as a "target bucket". A plurality of objects are stored in a target bucket associated with the NAS system, each object mapped to one piece of data in the NAS system. For example, the NAS system is a file system in which an object in the target bucket may be associated with a MP3 formatted file.
In one example, for example, each object in a bucket may have an object name, which may include: a data access path of the data mapped by the object, and a data identification of the data, the data access path being an access path of the data in the NAS system.
It should be noted that the data identifier of the data refers to an identifier capable of uniquely identifying the data, and may be, for example, a file name.
Illustratively, one NAS system as shown in FIG. 4 maps to one bucket in the object storage system, and the data in each NAS will map to one object in the target bucket of the object storage system. In the NAS system, files are stored in a tree structure, as shown in 401 in fig. 4, a standard NAS system storage structure is shown, and when mapping this NAS system named nas_pool1 to be named nas_pool1 storage bucket in the target storage system, the full path name of the data in 401 will be mapped to be the corresponding object name in the corresponding storage bucket 402 of the target storage system, where the full path name is the data access path of the data in the NAS system. Taking 1.Txt as an example, its data access path in the NAS system is/dira/dirb/1. Txt, will be mapped to an object in the bucket name NAS_Poo1, object name/dira/dirb/1. Txt.
In step 103, processing data access service of the client to the NAS system according to the object in the target bucket and the data mapped to the object.
In this step, the object storage system may process, according to the object in the target storage bucket and the data mapped to by the object, a data access service of the client to the NAS system associated with the target storage bucket. That is, the data access traffic has begun to be undertaken by the object storage system.
How the data access traffic of the client is handled by the object storage system will be exemplarily described below by means of fig. 5, and fig. 5 is a flowchart of a data access method shown in an exemplary embodiment, and as shown in fig. 5, the following processing may be included in the flowchart:
in step 501, the client sends a data access request, where the data access request carries: object names corresponding to the data to be accessed and storage bucket identifiers where the data to be accessed are located.
The data access request adopts an http request, the request carries a bucket name NAS_Poo1, the bucket name NAS_Poo1 is a storage bucket identifier where data to be accessed is located, and the object name corresponding to the data to be accessed is/dira/dirb/1. Txt.
In step 502, the object storage system obtains a corresponding target bucket according to the bucket identifier.
For example, the object storage system receives a data access request, analyzes the bucket name as nas_pool1 from the data access request, and finds a bucket with the bucket name as nas_pool1 in the object storage system, where the bucket is the target bucket where the data to be accessed is located.
In step 503, the object storage system obtains, in the target bucket, the data to be accessed in the NAS system according to the data access path and the data identifier included in the object name.
Illustratively, the object storage system looks for an object with an object name of/dira/dirb/1. Txt parsed from the data access request in a target bucket with bucket name nas_pool 1. For a storage bucket of the nano-tube NAS system, if the object is not found in the storage bucket, extracting the data access path as per dira/dirb/, the data identifier as 1.Txt, and sending the data access path and the data identifier to the NAS system, wherein the NAS system searches for the data with the path name as per dira/dirb/, and the file name as 1.Txt.
It should be noted that for a bucket without a managed NAS system, if no corresponding object is found in the bucket, no data will be read from the NAS system and the object storage system will return an error code to the client NoSuchObject.
In step 504, the NAS system returns the data to be accessed to the object storage system.
Illustratively, the NAS system returns the 1.Txt file to the object storage system.
In step 505, the object storage system returns the data to be accessed to the client.
Illustratively, the object storage system returns a 1.Txt file to the client.
As with the flow of fig. 5, a flow of a client accessing a NAS system through an object storage system is illustrated. According to the flow, the object storage system can finally acquire the data to be accessed by the client from the NAS system based on the information such as the storage bucket identification, the object name and the like carried in the data access request of the client. Namely, the object storage system can well finish the processing of the data access service through the mapping relation between the storage bucket stored in the object storage system and the NAS system.
And receiving a data access request sent by the client, and analyzing an object name and a bucket identifier corresponding to the data to be accessed from the data access request, so that the data to be accessed in the NAS system can be obtained from a target bucket searched by the bucket identifier. Therefore, the data to be accessed in the NAS system can be obtained through the object names in the target storage bucket without converting the data in the NAS system into metadata and migrating the metadata into the target storage bucket, so that the time is saved, and meanwhile, the space of the object storage system is also saved.
In step 104, migration of data in the NAS system to the target bucket is initiated.
As described above, after the data access traffic is cut to the target storage system in step 103, in this step, data migration may begin, migrating data in the NAS system to the target storage bucket associated with the NAS system.
A flow of data migration is illustrated below by way of fig. 6, which is a flow chart of data migration shown in an exemplary embodiment. As shown in fig. 6, the flow may include the following processes:
in step 601, file metadata in data of the NAS system is migrated to the target bucket.
Illustratively, the user may flexibly match metadata migration according to its own needs, for example, the NAS file storage system stores the following files (the full path name is the data access path of the above data in the NAS system):
(1) Full path name: dira/dirc/eee.jpg modification date: 2023, 7, 19, 10:08:42
(2) Full path name: dira/dirc/fff.txt modification date: 2023, 5, 10, 09:26:56
(3) Full path name: dira/ggg. Jpg date of modification: 2023, 6, 15, 12:05:45
(4) Full path name: dirb/hhh. Pdf modification date: 2022 12, 15:32:25
(5) Full path name: dirb/iii. Pdf modification date: 2022, 12, 19, 14:22:35
(6) Full path name: dirb/jjj. Jpg modification date: 2023, 3, 25, 16:12:42
In one example, the metadata migration policy may be set to match by filename prefix.
For example, matching is performed according to/dira/dirc/as a file name prefix, after the metadata migration task starts to be executed, only all files in the NAS/dira/dirc/under the folder are traversed, and if the file (1) and the file (2) in the NAS system meet the condition, the metadata of the file is migrated to the object storage system.
In another example, the metadata migration policy may be set to match by filename suffix.
For example, according to the step of matching the file name suffix, after the metadata migration task starts to be executed, traversing all folders in the NAS, and judging whether the file name ends with the step of jpg after the file name is read, if the file (3) and the file (6) in the NAS system meet the condition, and then migrating the metadata of the file to the object storage system.
In yet another example, the metadata migration policy may also be set to match by filename modification date.
For example, matching is performed according to the modification date 2023 after 5 months and 1 days, after the metadata migration task starts to be executed, all folders in the NAS are traversed, file information is read to obtain the modification date, and if the file (1), the file (2) and the file (3) in the NAS system meet the condition, metadata of the file is migrated to the object storage system.
As described above, the metadata migration policy is flexibly configured by the user, so that only the required metadata can be migrated to the object storage system, for example, for the user, the files under the/dira/dirc/data access path are more commonly used, and the/dira/dirc/data access path can be selected to be matched as a file name prefix for metadata migration. The metadata migration strategy is flexibly configured, so that the waste of metadata space is reduced, and the cost is saved.
Further, in the metadata migration process, two steps can be divided: the steps of scanning files in the NAS and writing object metadata in the object storage system can be executed asynchronously and concurrently by adopting multitasking, so that the metadata migration efficiency is improved.
FIG. 7 is a schematic diagram illustrating migration of NAS data to an object storage system according to an exemplary embodiment.
After traversing the target files in the NAS, each piece of NAS file information for preparing migration, such as modification time of the file, file size, MD5 value (Message-digest algorithm), for example modifytime, size, mtime, ctime, type in the NAS system in fig. 7, is scanned, and then the above information is converted into object metadata to be written into metadata of the object storage system. The object metadata should contain a data path that when accessed enables access to the files in the path to which the object corresponds, the data path being recorded to determine whether the particular location of the data is in the object storage system or in the NAS system. The object metadata is stored in a key-value database whose keys are ordered in a dictionary order, the keys of the object metadata consisting of bucket names/object names/time stamps, which are object metadata write times, such as "nas_pool1/dira/dirb/1.Txt/1689647972083" in fig. 7, so that the metadata is ordered in the database by time stamp.
It should be noted that, during metadata migration, special processing needs to be performed on a blank folder in the NAS system, for example, 401 in fig. 4 is taken as an example, the data access path is a directory of/dira/dird, no file exists under the directory, and during the process of writing the directory information into metadata of the object storage system, the directory information is processed into an object, the object name is/dira/dird, and the data size is 0.
After the metadata is migrated to the object storage, the object list can be obtained only by inputting the bucket name through the S3 (Simple Storage Service ) interface to access the object storage, wherein the object list refers to all objects with the metadata migrated in the object storage. If the metadata is not migrated, the object list acquired through the S3 interface is data without NAS system, and if such data is to be acquired, the data can only be acquired through the bucket name and the object name. And the metadata is migrated to the object storage, so that the convenience of data reading is improved, and the data reading speed is also increased.
In step 602, file data of the NAS system is migrated to the target bucket based on the file metadata.
After the metadata is migrated, the metadata is stored in the object storage, and the file data is stored in the NAS system, so that the metadata can be migrated to the object storage according to the condition, or all metadata corresponding data can be selectively migrated to the object storage.
When the migration of all metadata corresponding data into the object storage is selected, after the migration starts, the object metadata in the target storage bucket needs to be traversed, whether the data is stored in the object storage is judged according to the data path recorded in the object metadata, and if the data is not stored in the object storage, the data is read from the NAS according to the data path in the object metadata and written into the object storage.
If data whose migration portion satisfies the condition is selected, the operation as described in the flowchart of fig. 8 is performed.
In step 801, access data corresponding to the data access request is determined according to the data access request of the client.
Illustratively, the client makes a request to the object store to access an object with an object name of/dira/dirb/1. Txt.
In step 802, file data in the NAS system corresponding to the access data is migrated to a target bucket in the object storage system.
The object storage system searches the access data in the system, if the access data is not found in the system, the access data is analyzed to be a data access path and a file name in the NAS system, the data is obtained in the NAS system and returned to the client, and a background starting task is performed to transfer the data to the object storage system, as shown in fig. 10, the transfer task is automatically executed for the background, and service operation is not affected.
As described above, in step 802, file data in the NAS system corresponding to the access data may be migrated to a target bucket in the target storage system. Further, a flow of data migration is illustrated below by way of fig. 9, and fig. 9 is a flow chart of a data migration shown in an exemplary embodiment. As shown in fig. 9, the flow may include the following processes:
in step 901, data access information corresponding to the access data is recorded.
The data access information may be, for example, an access frequency, an access number, a file name, and the like.
In step 902, if the data access information reaches a preset access condition, the file data corresponding to the access data is migrated to the target storage bucket.
The access conditions are as follows: for example, the file name may be a designated file or the like with a high frequency.
For example, the access frequency of the object name of/dira/dirb/1. Txt in the object storage system may be recorded, for example, the number of accesses exceeds 15 times in 30 days, and after the number of accesses reaches 15 times, the file data of the NAS system mapped by the object name is migrated into the target storage bucket of the object storage system.
By recording the data access information, the data can be migrated to the object storage system according to the conditions of access frequency, time and the like. It is thus possible to place information of relatively great importance, which is often required to be accessed, in the object storage system, and to obtain the corresponding data more quickly at each acquisition.
In step 104, the data in the NAS system includes: file data and file metadata.
Following step 104, a flow as described in fig. 12 may also be included.
In step 1201, the latest access time of the file data is recorded.
In one example, with respect to the data of an object named/dira/dirb/1. Txt stored in the object storage system, where the data corresponds to the file data described above, the latest access time of the object is recorded in the metadata of the object each time it is accessed by the client, as follows: 2023-07-04.
In step 1202, based on the latest access time, if it is determined that the duration of the non-access of the file data reaches a preset duration threshold, the file data is migrated to the NAS system, and the file metadata is retained in the target bucket.
For example, the last access time of the object is recorded in the object metadata, where the last access time is the last access time, when the object is accessed each time, the last access time of the object is updated, if a certain object is not accessed for a long time, for example, thirty days, the file data of the object is copied into the NAS system, the object data in the object storage is deleted, the file metadata of the object is retained in the object storage system, and the corresponding data path in the file metadata is updated, as shown in fig. 11.
In the above example, the object storage system finds the object whose object name is/dira/dirb/1. Txt and its latest access time is: 2023-07-04, at which time the time is 2023-08-05, the preset duration threshold is 30 days. And if the object storage system judges that the non-access time of the object exceeds 30 days, migrating the file data of the object to the NAS system, reserving the file metadata, and updating the corresponding data path in the file metadata.
By recording the last time the object was accessed, it is possible to determine whether or not certain data recorded in the object storage system has become unusual data. Therefore, after the data is judged to be the unusual data, the unusual data is migrated back to the NAS storage, and the waste of the space of the object storage system is avoided.
Following step 102, a flow as described in fig. 13 may also be included.
In step 1301, an object uploaded by the client is received.
The object includes: file data and file metadata;
in step 1302, the object is stored in the object storage system.
As shown in fig. 14, for a newly uploaded object, the data and metadata of the object are directly written into a target storage bucket, and after the object is stored successfully, a response result is returned to the client.
After the mapping relation between the object storage system and the NAS system is established, the service is switched to the object storage system in advance, and then the object uploaded by the client is directly stored in the object storage system. Therefore, the incremental migration of the metadata caused by newly adding data to the NAS system in the subsequent batch migration process can be avoided, the time is saved, the operation is simplified, the time consumption in the data mapping process is less, the access to the NAS system is not required to be stopped, and the stable switching of the service is realized.
Fig. 15 is a data access apparatus provided in an exemplary embodiment, where the apparatus may be applied to a client and may be applied to implement a method of any embodiment of the present specification, as shown in fig. 15, and the apparatus may include: a data mapping module 1501, a traffic processing module 1502 and a data migration module 1503.
A data mapping module 1501 stores, for one of the NAS systems, a plurality of objects in a target bucket associated with the NAS system, the target bucket being one of the at least one bucket for mapping each object to one of the data in the NAS system.
The service processing module 1502 is configured to process a data access service of a client to the NAS system according to an object in the target bucket and data mapped to by the object.
A data migration module 1503, configured to initiate migration of data in the NAS system to the target bucket.
The embodiment of the present disclosure further provides an electronic device, please refer to fig. 16, where the device includes a memory, and a processor, where the memory is configured to store computer instructions executable on the processor, and the processor is configured to perform data access based on any one of the above methods when executing the computer instructions.
The present description also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements any of the methods described above.
Embodiments of the subject matter and the functional operations described in this specification can be implemented in: digital electronic circuitry, tangibly embodied computer software or firmware, computer hardware including the structures disclosed in this specification and structural equivalents thereof, or a combination of one or more of them. Embodiments of the subject matter described in this specification can be implemented as one or more computer programs, i.e., one or more modules of computer program instructions encoded on a tangible, non-transitory program carrier for execution by, or to control the operation of, data processing apparatus. Alternatively or additionally, the program instructions may be encoded on a manually-generated propagated signal, e.g., a machine-generated electrical, optical, or electromagnetic signal, that is generated to encode and transmit information to suitable receiver apparatus for execution by data processing apparatus. The computer storage medium may be a machine-readable storage device, a machine-readable storage substrate, a random or serial access memory device, or a combination of one or more of them.
The processes and logic flows described in this specification can be performed by one or more programmable computers executing one or more computer programs to perform corresponding functions by operating on input data and generating output. The processes and logic flows can also be performed by, and apparatus can also be implemented as, special purpose logic circuitry, e.g., an FPGA (field programmable gate array) or an ASIC (application-specific integrated circuit).
Computers suitable for executing computer programs include, for example, general purpose and/or special purpose microprocessors, or any other type of central processing unit. Typically, the central processing unit will receive instructions and data from a read only memory and/or a random access memory. The essential elements of a computer include a central processing unit for carrying out or executing instructions and one or more memory devices for storing instructions and data. Typically, a computer will also include, or be operatively coupled to receive data from or transfer data to, or both, one or more mass storage devices for storing data, e.g., magnetic, magneto-optical disks, or optical disks, etc. However, a computer does not have to have such a device. Furthermore, the computer may be embedded in another device, such as a mobile phone, a Personal Digital Assistant (PDA), a mobile audio or video player, a game console, a Global Positioning System (GPS) receiver, or a portable storage device such as a Universal Serial Bus (USB) flash drive, to name a few.
Computer readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media and memory devices including, for example, semiconductor memory devices (e.g., EPROM, EEPROM, and flash memory devices), magnetic disks (e.g., internal hard disk or removable disks), magneto-optical disks, and CD-ROM and DVD-ROM disks. The processor and the memory can be supplemented by, or incorporated in, special purpose logic circuitry.
While this specification contains many specific implementation details, these should not be construed as limitations on the scope of any invention or of what may be claimed, but rather as descriptions of features of specific embodiments of particular inventions. Certain features that are described in this specification in the context of separate embodiments can also be implemented in combination in a single embodiment. On the other hand, the various features described in the individual embodiments may also be implemented separately in the various embodiments or in any suitable subcombination. Furthermore, although features may be acting in certain combinations and even initially claimed as such, one or more features from a claimed combination can in some cases be excised from the combination, and the claimed combination may be directed to a subcombination or variation of a subcombination.
Similarly, although operations are depicted in the drawings in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, to achieve desirable results. In some cases, multitasking and parallel processing may be advantageous. Moreover, the separation of various system modules and components in the embodiments described above should not be understood as requiring such separation in all embodiments, and it should be understood that the described program components and systems can generally be integrated together in a single software product or packaged into multiple software products.
Thus, particular embodiments of the subject matter have been described. Other embodiments are within the scope of the following claims. In some cases, the actions recited in the claims can be performed in a different order and still achieve desirable results. Furthermore, the processes depicted in the accompanying drawings are not necessarily required to be in the particular order shown, or sequential order, to achieve desirable results. In some implementations, multitasking and parallel processing may be advantageous.
The foregoing description of the preferred embodiments is merely illustrative of the present invention and is not intended to limit the embodiments to the specific embodiments shown, but any modifications, equivalents, improvements, etc. within the spirit and principles of the embodiments are intended to be included within the scope of the embodiments shown.

Claims (11)

1. A data access method, wherein the method is applied to an object storage system, the object storage system accommodates a plurality of NAS systems, the object storage system comprises at least one storage bucket, and the at least one storage bucket is respectively associated with different NAS systems;
the method comprises the following steps:
for one of the NAS systems, storing a plurality of objects in a target bucket associated with the NAS system, the target bucket being one of the at least one bucket, each object mapping to one of the data in the NAS system;
processing data access service of a client to the NAS system according to the object in the target storage bucket and the data mapped to the object;
and starting to migrate the data in the NAS system to the target storage bucket.
2. The method of claim 1, wherein the step of determining the position of the substrate comprises,
object names of the plurality of objects, comprising: a data access path of the data mapped by the object, and a data identification of the data, the data access path being an access path of the data in the NAS system.
3. The method of claim 2, wherein the processing data access traffic of the client to the NAS system based on the objects in the target bucket and the data to which the objects map comprises:
receiving a data access request sent by a client, wherein the data access request carries: object names corresponding to the data to be accessed and storage bucket identifiers where the data to be accessed are located;
obtaining a corresponding target storage bucket according to the storage bucket identification;
acquiring the data to be accessed in the NAS system according to the data access path and the data identifier included in the object name in the target storage bucket;
and returning the data to be accessed to the client.
4. The method according to claim 1, wherein the method further comprises:
receiving an object uploaded by the client, wherein the object comprises: file data and file metadata;
the object is stored in the object storage system.
5. The method of claim 1, wherein the data in the NAS system comprises: file data and file metadata;
the initiating migration of data in the NAS system to the target bucket includes:
migrating file metadata in the data of the NAS system to the target storage bucket;
and based on the file metadata, migrating the file data of the NAS system to the target storage bucket.
6. The method of claim 5, wherein the migrating file data of the NAS system to the target bucket based on the file metadata comprises:
according to the data access request of the client, determining access data corresponding to the data access request;
and migrating the file data in the NAS system corresponding to the access data to a target storage bucket in the object storage system.
7. The method of claim 6, wherein the migrating the file data in the NAS system corresponding to the access data to the target bucket in the object storage system comprises:
recording data access information corresponding to the access data;
and if the data access information reaches a preset access condition, migrating the file data corresponding to the access data to the target storage bucket.
8. The method of claim 1, wherein the data in the NAS system comprises: file data and file metadata;
after migrating the file data and file metadata to the target bucket, the method further comprises:
recording the latest access time of the file data;
and based on the latest access time, under the condition that the non-access time length of the file data reaches a preset time length threshold value, migrating the file data to the NAS system, and reserving the file metadata in the target storage bucket.
9. A data access apparatus, wherein the data access apparatus is equipped with an object storage system that hosts a plurality of NAS systems, the object storage system including at least one bucket therein, the at least one bucket being associated with different NAS systems, respectively;
the device comprises:
a data mapping module for one of the NAS systems storing a plurality of objects in a target bucket associated with the NAS system, the target bucket being one of the at least one bucket for mapping each object to one of the data in the NAS system;
the service processing module is used for processing the data access service of the client to the NAS system according to the object in the target storage bucket and the data mapped to the object;
and the data migration module is used for starting to migrate the data in the NAS system to the target storage bucket.
10. An electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to implement the method of any of claims 1-8 by executing the executable instructions.
11. A computer readable storage medium having stored thereon computer instructions which, when executed by a processor, implement the steps of the method according to any of claims 1-8.
CN202311093887.9A 2023-08-28 2023-08-28 Data access method, device, medium and electronic equipment Pending CN117111848A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311093887.9A CN117111848A (en) 2023-08-28 2023-08-28 Data access method, device, medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311093887.9A CN117111848A (en) 2023-08-28 2023-08-28 Data access method, device, medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN117111848A true CN117111848A (en) 2023-11-24

Family

ID=88807206

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311093887.9A Pending CN117111848A (en) 2023-08-28 2023-08-28 Data access method, device, medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN117111848A (en)

Similar Documents

Publication Publication Date Title
KR102007070B1 (en) Reference block aggregating into a reference set for deduplication in memory management
US9792306B1 (en) Data transfer between dissimilar deduplication systems
US10430443B2 (en) Method for data maintenance
US10210191B2 (en) Accelerated access to objects in an object store implemented utilizing a file storage system
US8176061B2 (en) Tracking digital assets on a distributed network
US9396290B2 (en) Hybrid data management system and method for managing large, varying datasets
US9354976B2 (en) Locating previous versions of an object in a storage cluster
US11580061B2 (en) System and method for file archiving using machine learning
US9195666B2 (en) Location independent files
CN109033360B (en) Data query method, device, server and storage medium
JP2022500727A (en) Systems and methods for early removal of tombstone records in databases
US20090198704A1 (en) Method for automated network file and directory virtualization
EP3844937B1 (en) Synchronizing in-use source data and an unmodified migrated copy thereof
EP3343395B1 (en) Data storage method and apparatus for mobile terminal
CN110352410A (en) Track the access module and preextraction index node of index node
US9626378B2 (en) Method for handling requests in a storage system and a storage node for a storage system
EP3436973A1 (en) File system support for file-level ghosting
US12056102B2 (en) Identifying renames and deletions in a storage system
US10860212B1 (en) Method or an apparatus to move perfect de-duplicated unique data from a source to destination storage tier
CN117111848A (en) Data access method, device, medium and electronic equipment
CN111104787A (en) Method, apparatus and computer program product for comparing files
EP4195068A1 (en) Storing and retrieving media recordings in an object store
US11379147B2 (en) Method, device, and computer program product for managing storage system
CN117171109A (en) Data storage management method, device, system and storage medium
CN111562936A (en) Object history version management method and device based on Openstack-Swift

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