Summary of the invention
The embodiment of the present invention provides a kind of archive implementation method and device and file access method and device, to realize the filing from disk to tape library equipment of mass file.
First aspect, the embodiment of the present invention provides a kind of archive implementation method, comprising:
Migration file control node is based on migration strategy, by the file migration to be migrated in primary storage service node to the LTFS (linear tape file system) of tape library equipment, wherein, in described primary storage service node, store the descriptor of file to be migrated, described migration file control node and described primary storage service node composition distributed file storage system;
Described migration file control node receives the file directory that described LTFS generates, and wherein said file directory generates in the time completing file migration;
Described LTFS is configured to NFS (Network File System by described migration file control node, network file system(NFS)), and shared path corresponding to the file that described LTFS is comprised add in described file directory, as shared file catalogue;
Described shared file catalogue is mapped to described primary storage service node by described migration file control node.
Second aspect, the embodiment of the present invention provides a kind of archive implement device, comprising:
Transferring module, for based on migration strategy, to the LTFS of tape library equipment, wherein, stores the descriptor of file to be migrated by the file migration to be migrated in primary storage service node in described primary storage service node;
Receiver module, the file directory generating for receiving described LTFS, wherein said file directory generates in the time completing file migration;
Configuration module, for described LTFS is configured to NFS, and shared path corresponding to the file that described LTFS is comprised add in described file directory, as shared file catalogue;
Mapping block, for mapping to described primary storage service node by described shared file catalogue.
The third aspect, the embodiment of the present invention provides a kind of file access method, comprising:
Primary storage service node receives the file access request that client is initiated;
Described primary storage service node is searched the file corresponding with described file access request in shared file catalogue;
If searched successfully, client is returned in the shared path of the file corresponding with described file access request by described primary storage service node, so that described client is according to described shared path, access and the file moving in the LTFS of the tape library equipment that file control node is connected;
Wherein, described shared file catalogue adopts the archive implementation method that any embodiment of the present invention provides to form.
Fourth aspect, the embodiment of the present invention provides a kind of file access device, comprising:
File access request receiving module, the file access request of initiating for receiving client;
First searches module, for search the file corresponding with described file access request in shared file catalogue;
File access module, if for searching successfully, client is returned to in the shared path of the file corresponding with described file access request, so that described client is according to described shared path, access and the file moving in the LTFS of the tape library equipment that file control node is connected;
Wherein, described shared file catalogue adopts the archive implement device that any embodiment of the present invention provides to form.
Archive implementation method and device that the embodiment of the present invention provides, based on distributed file storage system, can realize the storage of mass file, and after the file to be migrated in the primary storage service node in this distributed file storage system of migration file control node determination by distributed file storage system, by the file migration operation of migration file control node, file to be migrated can be moved in the LTFS of tape library equipment from the disk of primary storage service node, realize file across media migration and filing, thereby can reduce taking of disk space to primary storage service node, and the long-term off-line of realizing mass file is preserved, and by the configuration sharing operation of migration file control node, make can obtain corresponding shared path by the shared file catalogue in primary storage service node.
The file access method that the embodiment of the present invention provides and device, the migration file control node by distributed file storage system by the file migration to be migrated in the primary storage service node in this distributed file storage system the LTFS to tape library equipment, and carrying out configuration sharing operation by migration file control node, after making to store the share directory that migrates to the file in LTFS in primary storage service node, in shared file catalogue, search the file corresponding to file access request of initiating with client by primary storage service node, and in the time searching successfully, client is returned to in shared path corresponding this file, thereby making client is the addressable file being stored in tape library equipment according to described shared path, without the scanning of client executing file and index housekeeping, realized file across medium access.
Embodiment
For making the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing, the technical scheme in the embodiment of the present invention is described in further detail, obviously, described embodiment is the present invention's part embodiment, instead of whole embodiment.Be understandable that; specific embodiment described herein is only for explaining the present invention; but not limitation of the invention; based on the embodiment in the present invention; those of ordinary skill in the art, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.It also should be noted that, for convenience of description, in accompanying drawing, only show part related to the present invention but not full content.
Embodiment mono-
The process flow diagram of the archive implementation method that Fig. 1 a provides for the embodiment of the present invention one, introduce below in conjunction with Fig. 1 b the archive implementation method that the embodiment of the present invention provides, the method can be carried out by archive implement device, this device is configurable in the distributed file storage system shown in Fig. 1 b, typical in the migration file control node of this distributed file storage system.
For clarity sake, related network element and the file system of archive implementation method below in conjunction with Fig. 1 b, the present embodiment being provided simply introduced.
The related network element device of archive implementation method that the present embodiment provides comprises: migration file control node, primary storage service node and tape library equipment.
Said network element equipment is logical concept, wherein moves file control node and primary storage service node can physically independently arrange, also can be integrated with a physical host in.Tape library equipment is independent of migration file control node and the setting of primary storage service node.
Wherein, by migration file control node binding tape library equipment, be generally by tape library equipment of a migration file control node binding.
The related file system of archive implementation method that the present embodiment provides, comprising: LTFS (linear tape file system) and the NFS (network file system(NFS)) of distributed file storage system, tape library equipment.
Wherein, migration file control node and primary storage service node composition distributed file storage system, wherein, the file of storing in primary storage service node is to be generally stored in the disk of described primary storage service node.
Distributed file storage system refers to that the physical store resource of file system management is not necessarily directly connected on local node, but is connected with node by computer network.In other words, storage file resource in primary storage service node, and primary storage service node is not necessarily integrated in a physical host with migration file control node, but realize primary storage service node and move being connected of file control node by network.
In a distributed file storage system, can comprise multiple primary storage service nodes and at least one migration file control node, for example, in the distributed file storage system of a N node, can comprise N-1 primary storage service node, using N node as migration file control node.For large-scale tape library equipment, according to performance need, can configure multiple migration file control nodes, bind different tape library equipments, thereby can realize file migration and the filing of parallelization.
The built-in LTFS mechanism of tape library equipment forms LTFS in described tape library equipment.LTFS is acknowledged as the technology that a meeting allows tape application recover, and by file directory, allows user can search for the file on tape library equipment, and the flow process of search tape library equipment is the same with disk storage, and LTFS makes the long term archival of file become possibility.
NFS allow system on network with other people share directory and file.By using NFS, client can be accessed the file on far end system as access local file.
Based on the archive implementation method of said network element equipment and the realization of above-mentioned file system, comprising:
Step 110, migration file control node are based on migration strategy, by the file migration to be migrated in primary storage service node to the LTFS of tape library equipment, wherein, in described primary storage service node, store the descriptor of file to be migrated, described migration file control node and described primary storage service node composition distributed file storage system;
This step specifically, by moving file control node based on migration strategy, is determined the file to be migrated in primary storage service node, and carries out across media migration operation, also moves in tape library equipment from the disk of primary storage service node by file to be migrated.
Conventionally, migration strategy generally can be selected taking of the disk resource of some specific file to primary storage service node, and described specific file can be inactive file.
Wherein, migration file control node connects tape library equipment, and described migration file control node logically shows as mechanical arm and driver.
Wherein, before file migration, the descriptor of file to be migrated and file itself is all stored in primary storage service node, after file migration, in primary storage service node, delete file to be migrated, retained the descriptor of this file, itself is stored in this file in tape library equipment.The descriptor of described file is the metadata of file, can comprise the information such as file size and file attribute.
It should be noted that the descriptor that client can be based on described file is initiated file access request.
Step 120, described migration file control node receive the file directory that described LTFS generates, and wherein said file directory generates in the time completing file migration;
This step is specifically in the time completing file migration, and LTFS spanned file catalogue, receives by described migration file control node the file directory that described LTFS sends.
Described LTFS is configured to network file system(NFS) NFS by step 130, described migration file control node, and shared path corresponding to the file that described LTFS is comprised add in described file directory, as shared file catalogue;
This step is specifically carried out configuration sharing by described migration file control node, thinks that the file-sharing between LTFS and the primary storage service node of tape library equipment is prepared.
Described shared file directory stores, in described migration file control node, had both comprised the catalogue that file that described LTFS comprises forms, and comprised again shared path corresponding to file that described LTFS comprises.Wherein LTFS described in shared path point, also, client, after getting described shared path, based on described shared path, can be accessed the file being stored in tape library equipment.
Described shared file catalogue is mapped to described primary storage service node by step 140, described migration file control node.
This step is specifically carried out the map operation of shared file catalogue by migration file control node, make described primary storage service node can view the file directory in described LTFS and described LTFS, and because described shared file catalogue comprises shared path corresponding to file that described LTFS comprises, make client after getting described shared path by primary storage service node, based on described shared path, can access the file being stored in tape library equipment.
The technical scheme of the present embodiment, based on distributed file storage system, can realize the storage of mass file, and after the file to be migrated in the primary storage service node in this distributed file storage system of migration file control node determination by distributed file storage system, by the file migration operation of migration file control node, file to be migrated can be moved in the LTFS of tape library equipment from the disk of primary storage service node, realize file across media migration and filing, thereby can reduce taking of disk space to primary storage service node, and the long-term off-line of realizing mass file is preserved, and by the configuration sharing operation of migration file control node, make can obtain corresponding shared path by the shared file catalogue in primary storage service node.
Refer to Fig. 1 c, as migration file control node by the file migration to be migrated in primary storage service node a kind of concrete embodiment to the LTFS of tape library equipment, can comprise:
Step 111, described migration file control node and described LTFS set up FC (Fibre Channel, optical-fibre channel) connection or SAS (Serial Attached SCSI, serial connecting small computer system interface) connects;
Wherein, SCSI (Small Computer System Interface, small computer system interface) is a kind of universal interface standard of intelligence.
Step 112, connect or SAS connects based on described FC, described migration file control node by the file migration to be migrated in described primary storage service node to described LTFS.
In the present embodiment, described migration strategy comprises following at least one:
If the size of the file in primary storage service node is greater than the first threshold value, using described file as file to be migrated;
If the usage frequency of the file in primary storage service node is greater than the second threshold value, using described file as file to be migrated.
Conventionally, the disk space of primary storage service node is limited.Described migration strategy, is defined as file to be migrated by file being greater than to the big or small file of setting, can reduce taking of the disk space of larger file to primary storage service node; By file lower usage frequency is defined as to file to be migrated, can reduce non-the taking of the disk space of file to primary storage service node of enlivening.
Embodiment bis-
Refer to Fig. 2, the structural representation of a kind of archive implement device providing for the embodiment of the present invention two, this device can be disposed in the migration file control node of distributed file storage system as shown in Figure 1 b.
This device comprises: transferring module 210, receiver module 220, configuration module 230 and mapping block 240.
Wherein, transferring module 210, for based on migration strategy, to the linear tape file system LTFS of tape library equipment, wherein, stores the descriptor of file to be migrated by the file migration to be migrated in primary storage service node in described primary storage service node; The file directory that receiver module 220 generates for receiving described LTFS, wherein said file directory generates in the time completing file migration; Configuration module 230 is for described LTFS is configured to network file system(NFS) NFS, and shared path corresponding to the file that described LTFS is comprised add in described file directory, as shared file catalogue; Mapping block 240 is for mapping to described primary storage service node by described shared file catalogue.
The technical scheme of the present embodiment, based on distributed file storage system, can realize the storage of mass file, and after the file to be migrated in the primary storage service node in this distributed file storage system of migration file control node determination by distributed file storage system, by the file migration operation of migration file control node, file to be migrated can be moved in the LTFS of tape library equipment from the disk of primary storage service node, realize file across media migration and filing, thereby can reduce taking of disk space to primary storage service node, and the long-term off-line of realizing mass file is preserved, and by the configuration sharing operation of migration file control node, make can obtain corresponding shared path by the shared file catalogue in primary storage service node.
In such scheme, transferring module 210 can comprise: linkage unit and migration units.
Wherein, for setting up with described LTFS, Fibre Channel is connected linkage unit or serial connecting small computer system interface SAS connects; Migration units, for connecting based on described FC or SAS connects, by the file migration to be migrated in described primary storage service node to described LTFS.
In such scheme, described migration strategy comprises following at least one:
If the size of the file in primary storage service node is greater than the first threshold value, using described file as file to be migrated;
If the usage frequency of the file in primary storage service node is greater than the second threshold value, using described file as file to be migrated.
The archive implement device that the embodiment of the present invention provides can be carried out the archive implementation method that any embodiment of the present invention provides, and possesses the corresponding functional module of manner of execution and beneficial effect.
Embodiment tri-
Refer to Fig. 3, the process flow diagram of a kind of file access method providing for the embodiment of the present invention three.The file access device that the method for the embodiment of the present invention can be realized by hardware and/or software is carried out, and this implement device is typically and is disposed in the server that distributed document stores service can be provided.The method comprises:
Step 310, primary storage service node receive the file access request that client is initiated;
This step specifically can be by setting up LAN (Local Area Network between client and primary storage service node, LAN (Local Area Network)), client is initiated file access request based on described LAN, and primary storage service node receives described file access request based on described LAN.
Step 320, described primary storage service node are searched the file corresponding with described file access request in shared file catalogue;
If step 330 is searched successfully, client is returned in the shared path of the file corresponding with described file access request by described primary storage service node, so that described client is according to described shared path, access and the file moving in the LTFS of the tape library equipment that file control node is connected;
Wherein, described shared file catalogue adopts the archive implementation method that any embodiment of the present invention provides to form.
It should be noted that, if searched unsuccessfully, show that the file corresponding with described file access request is not stored in the LTFS of tape library equipment.
The technical scheme of the present embodiment, the migration file control node by distributed file storage system by the file migration to be migrated in the primary storage service node in this distributed file storage system the LTFS to tape library equipment, and carrying out configuration sharing operation by migration file control node, after making to store the share directory that migrates to the file in LTFS in primary storage service node, in shared file catalogue, search the file corresponding to file access request of initiating with client by primary storage service node, and in the time searching successfully, client is returned to in shared path corresponding this file, thereby making client is the addressable file being stored in tape library equipment according to described shared path, without the scanning of client executing file and index housekeeping, realized file across medium access.
Embodiment tetra-
Refer to Fig. 4, the process flow diagram of a kind of file access method providing for the embodiment of the present invention four.The method comprises:
Step 410, primary storage service node receive the file access request that client is initiated;
Step 411, described primary storage service node are searched the file corresponding with described file access request in local file catalogue;
It should be noted that, two file system of described primary storage service node management, the LTFS that is tape library equipment, another is the file system of this node self, is also the local file system in this step.Wherein, described primary storage service node is embodied in the management of described LTFS: on the one hand, after file to be migrated is moved out from described primary storage service node, although document body is deleted from described primary storage service node, the descriptor of deleted original is retained in described primary storage service node; On the other hand, store shared file catalogue corresponding to file that described LTFS comprises in described primary storage service node, wherein, described shared file catalogue adopts the archive implementation method that any embodiment of the present invention provides to form.
If step 412 is searched unsuccessfully in local file catalogue, the operation that triggers described primary storage service node search the file corresponding with described file access request in shared file catalogue.
If searched unsuccessfully in local file catalogue, show that the file corresponding with described file access request is not stored in local file system, due to the file migration filing mechanism disposing in distributed file storage system based on migration strategy, now, in shared file catalogue, search the file corresponding with described file access request by triggering described primary storage service node, can improve the success ratio of file access.
It should be noted that, if searched successfully, client is returned in the local file path corresponding with described file access request by described primary storage service node, so that described client is stored in the file in described primary storage service node according to described local file path access.
Step 420, described primary storage service node are searched the file corresponding with described file access request in shared file catalogue;
If step 430 is searched successfully, client is returned in the shared path of the file corresponding with described file access request by described primary storage service node, so that described client is according to described shared path, access and the file moving in the LTFS of the tape library equipment that file control node is connected;
The technical scheme of the present embodiment, the migration file control node by distributed file storage system by the file migration to be migrated in the primary storage service node in this distributed file storage system the LTFS to tape library equipment, and carrying out configuration sharing operation by migration file control node, after making to store the share directory that migrates to the file in LTFS in primary storage service node, in the time getting the file access request of client initiation, first in the local file catalogue of primary storage service node, search the file corresponding with described file access request, and while searching unsuccessfully in local file catalogue, trigger described primary storage service node and in shared file catalogue, search the operation of the file corresponding with described file access request, and in the time searching successfully in shared file catalogue, client is returned to in shared path corresponding this file, thereby making client is the addressable file being stored in tape library equipment according to described shared path, without the scanning of client executing file and index housekeeping, realized file across medium access, improved the success ratio of file access simultaneously.
It should be noted that, in the local file system of the present embodiment with present primary storage service node, search the file corresponding with described file access request, in the time searching unsuccessfully, further in shared file catalogue, searching the file corresponding with described file access request is that example describes.In addition, can also first in shared file catalogue, search, if searched unsuccessfully, further in the local file catalogue of primary storage service node, inquire about, also can be in shared file catalogue and described local file catalogue parallel query, the present embodiment does not limit looked-up sequence.
Embodiment five
Refer to Fig. 5, the structural representation of a kind of file access device providing for the embodiment of the present invention five, this device comprises: file access request receiving module 510, first is searched module 520 and file access module 530.
Wherein, the file access request that file access request receiving module 510 is initiated for receiving client; First searches module 520 for search the file corresponding with described file access request in shared file catalogue; If file access module 530 is for searching successfully, client is returned to in the shared path of the file corresponding with described file access request, so that described client is according to described shared path, access and the file moving in the linear tape file system LTFS of the tape library equipment that file control node is connected;
Wherein, described shared file catalogue adopts the archive implement device that any embodiment of the present invention provides to form.
The technical scheme of the present embodiment, the migration file control node by distributed file storage system by the file migration to be migrated in the primary storage service node in this distributed file storage system the LTFS to tape library equipment, and carrying out configuration sharing operation by migration file control node, after making to store the share directory that migrates to the file in LTFS in primary storage service node, in shared file catalogue, search the file corresponding to file access request of initiating with client by primary storage service node, and in the time searching successfully, client is returned to in shared path corresponding this file, thereby making client is the addressable file being stored in tape library equipment according to described shared path, without the scanning of client executing file and index housekeeping, realized file across medium access.
In such scheme, described device can also comprise: second searches module and trigger module.
Wherein, second searches module for after receiving the file access request of client initiation, searches the file corresponding with described file access request in local file catalogue; If trigger module, for searching unsuccessfully in local file catalogue, triggers the operation of searching the file corresponding with described file access request in shared file catalogue.
The file access device that the embodiment of the present invention provides can be carried out the file access method that any embodiment of the present invention provides, and possesses the corresponding functional module of manner of execution and beneficial effect.
Finally it should be noted that: above each embodiment is only for technical scheme of the present invention is described, but not be limited; In embodiment, preferred embodiment, be not limited, to those skilled in the art, the present invention can have various changes and variation.All any amendments of doing, be equal to replacement, improvement etc., within protection scope of the present invention all should be included within spirit of the present invention and principle.