Archive implementation method and device and file access method and device
Technical field
The present embodiments relate to technical field of information management, more particularly to a kind of archive implementation method and device with
And file access method and device.
Background technology
Under cloud storage and big data background, explosive growth trend is presented in unstructured data.For mass file, except
Meet outside memory capacity, performance and autgmentability, also need to consider the periodic access and file distribution rule of file, effectively realize
File migration or archive, to optimize primary storage framework, reduce occupancy of the inactive file to valuable main memory resource.
In field of information management, file migration and archive are that a kind of common data structure optimization and data are long-term
The method of preservation, has been continued to use for many years.Existing archive method, generally by migration Archive Software or it is integrated in backup
The migration profiling module scanning file structure and access frequency of software, temporally tactful, visiting frequency strategy etc. realizes file
Dynamic circulates, so as to reach the purpose of archive.
The defects of above-mentioned archive method, is:Mainly for less document environment, such as several TB, tens TB, not
Mass file storage environment is applied to, two aspects is primarily present and restricts:
Firstth, mass file storage environment data volume is huge, data volume expansion to hundreds of TB even a few PB when, existing text
Part archiving method needs to scan and the quantity of documents of generation index is excessively huge, and performance cost is too big, and operation system does not have in addition
Time enough window tolerates this generic operation, therefore does not possess exploitativeness and operability;
Secondth, existing archive is typically all to be directed to independent hosted environment, is realized based on local file system, its
Closure be present in structure.
The existing archive method based on distributed file storage system, generally by by the storage of multiple disks
Layer distinguishes high low performance, monitors the access frequency and file service life of file, and the depositing from disk by inactive file
Reservoir is moved in setting disk, so as to reach the purpose of archive.
The defects of above-mentioned archive method based on distributed file storage system, is:Disk can not be crossed over, is realized
Leap from disk to tape library equipment, therefore can not realize that file preserves offline and for a long time.
The content of the invention
The embodiment of the present invention provides a kind of archive implementation method and device and file access method and device, with reality
The filing from disk to tape library equipment of existing mass file.
In a first aspect, the embodiments of the invention provide a kind of archive implementation method, including:
Migration file control node is based on migration strategy, by the file migration to be migrated in primary storage service node to tape
In the LTFS (linear tape file system) of library facilities, wherein, it is stored with file to be migrated in the primary storage service node
Description information, it is described migration file control node and the primary storage service node composition distributed file storage system;
The migration file control node receives the file directory of the LTFS generations, wherein the file directory is completed
Generated during file migration;
The LTFS is configured to NFS (Network File System, network file by the migration file control node
System), and overlapping trees corresponding to the file that the LTFS is included are added in the file directory, as shared file
Catalogue;
The shared file catalogue is mapped to the primary storage service node by the migration file control node.
Second aspect, the embodiments of the invention provide a kind of archive realization device, including:
Transferring module, for based on migration strategy, by the file migration to be migrated in primary storage service node to tape library
In the LTFS of equipment, wherein, the description information of file to be migrated is stored with the primary storage service node;
Receiving module, for receiving the file directory of the LTFS generations, wherein the file directory is moved in completion file
Generated during shifting;
Configuration module, for the LTFS to be configured into NFS, and road is shared corresponding to the file that the LTFS is included
Footpath is added in the file directory, as shared file catalogue;
Mapping block, for the shared file catalogue to be mapped into the primary storage service node.
The third aspect, the embodiments of the invention provide a kind of file access method, including:
Primary storage service node receives the file access request that client is initiated;
The primary storage service node searches file corresponding with the file access request in shared file catalogue;
If searched successfully, the primary storage service node is by the shared road of file corresponding with the file access request
Footpath returns to client, so that the client accesses the tape being connected with migration file control node according to the overlapping trees
File in the LTFS of library facilities;
Wherein, the archive implementation method that the shared file catalogue is provided using any embodiment of the present invention is formed.
Fourth aspect, the embodiments of the invention provide a kind of file access device, including:
File access request receiving module, for receiving the file access request of client initiation;
First searching modul, for searching file corresponding with the file access request in shared file catalogue;
File access module, if for searching successfully, by the shared road of file corresponding with the file access request
Footpath returns to client, so that the client accesses the tape being connected with migration file control node according to the overlapping trees
File in the LTFS of library facilities;
Wherein, the archive realization device that the shared file catalogue is provided using any embodiment of the present invention is formed.
Archive implementation method provided in an embodiment of the present invention and device, can based on distributed file storage system
The storage of mass file is realized, and the migration file control node in by distributed file storage system determines the distribution
After the file to be migrated in primary storage service node in formula document storage system, by the file for migrating file control node
Migration operation, it is real in the LTFS that file to be migrated can be moved into tape library equipment from the disk of primary storage service node
Existing file across media migration and filing, so as to reduce the occupancy of the disk space to primary storage service node, and realize
The long-term offline of mass file preserves;And the configuration sharing by migrating file control node operates so that pass through primary storage industry
Shared file catalogue in business node can obtain corresponding overlapping trees.
File access method and device provided in an embodiment of the present invention, the migration in by distributed file storage system
File control node is by the file migration to be migrated in the primary storage service node in the distributed file storage system to tape
The LTFS of library facilities, and configuration sharing operation is being performed by migrating file control node, make to deposit in primary storage service node
After the share directory for containing the file migrated into LTFS, searched by primary storage service node in shared file catalogue with
File corresponding to the file access request that client is initiated, and when searching successfully, overlapping trees corresponding to this document are returned
Client is returned, so that client is the addressable file being stored in tape library equipment according to the overlapping trees, without visitor
Family end perform file scan and index housekeeping, realize file across medium access.
Brief description of the drawings
In order to illustrate more clearly of the present invention, one will be done to the required accompanying drawing used in the present invention below and be simply situated between
Continue, it should be apparent that, drawings in the following description are some embodiments of the present invention, are come for those of ordinary skill in the art
Say, without having to pay creative labor, other accompanying drawings can also be obtained according to these accompanying drawings.
Fig. 1 a are a kind of flow chart for archive implementation method that the embodiment of the present invention one provides;
The structural representation for the filing system that the archive implementation method that Fig. 1 b are provided by Fig. 1 a is applicable;
Fig. 1 c are that a kind of migration file control node in the archive implementation method that the embodiment of the present invention one provides will
File migration to be migrated in primary storage service node to the LTFS of tape library equipment method flow diagram;
Fig. 2 is a kind of structural representation for archive realization device that the embodiment of the present invention two provides;
Fig. 3 is a kind of flow chart for file access method that the embodiment of the present invention three provides;
Fig. 4 is a kind of flow chart for file access method that the embodiment of the present invention four provides;
Fig. 5 is a kind of structural representation for file access device that the embodiment of the present invention five provides.
Embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing to the embodiment of the present invention
In technical scheme be described in further detail, it is clear that described embodiment is part of the embodiment of the present invention, rather than entirely
The embodiment in portion.It is understood that specific embodiment described herein is only used for explaining the present invention, rather than to the present invention's
Limit, based on the embodiment in the present invention, those of ordinary skill in the art are obtained under the premise of creative work is not made
Every other embodiment, belong to the scope of protection of the invention.It also should be noted that for the ease of description, accompanying drawing
In illustrate only part related to the present invention rather than full content.
Embodiment one
Fig. 1 a are the flow chart for the archive implementation method that the embodiment of the present invention one provides, and this is introduced with reference to Fig. 1 b
The archive implementation method that inventive embodiments are provided, this method can be performed by archive realization device, the device
It is configured in the distributed file storage system shown in Fig. 1 b, the typical migration such as the distributed file storage system is filed
In control node.
For clarity, the network element involved by archive implementation method that provides the present embodiment with reference to Fig. 1 b and
File system is simply introduced.
The network element device involved by archive implementation method that the present embodiment provides includes:Migration file control node,
Primary storage service node and tape library equipment.
Said network element equipment is logical concept, wherein migration file control node and primary storage service node can be physically
Be independently arranged, can also integrate with a physical host.Tape library equipment is independently of migration file control node and primary storage
Service node is set.
Wherein, by migration file control node binding tape library equipment, usually tied up by a migration file control node
A fixed tape library equipment.
The file system involved by archive implementation method that the present embodiment provides, including:Distributed document storage system
System, the LTFS (linear tape file system) and NFS (NFS) of tape library equipment.
Wherein, file control node and primary storage service node composition distributed file storage system are migrated, wherein, host
The file stored in storage service node is typically stored in the disk of the primary storage service node.
Distributed file storage system refers to that the physical memory resources of file system management are not necessarily connected directly between local
On node, but it is connected by computer network with node.In other words, storage file resource in primary storage service node, and lead
Storage service node is not necessarily integrated in a physical host with migration file control node, but is hosted by real-time performance
Service node is stored up with migrating the connection of file control node.
Multiple primary storage service nodes and at least one migration filing can be included in one distributed file storage system
Control node, for example, in the distributed file storage system of a N node, N-1 primary storage service node can be included,
Using n-th node as migration file control node.For large-scale tape library equipment, according to performance needs, can configure more
Individual migration file control node, binds different tape library equipments, so as to realize the file migration of parallelization and filing.
LTFS mechanism built in tape library equipment forms LTFS in the tape library equipment.LTFS is acknowledged as one
The technology that tape application can be allowed to recover, by file directory, allow user to may search for the file on tape library equipment, search for tape
For the flow of library facilities as disk storage, LTFS makes it possible the long term archival of file.
NFS allow a system on network with other people share directories and file.By using NFS, client can picture
Access local file equally accesses the file on far end system.
The archive implementation method realized based on said network element equipment and above-mentioned file system, including:
Step 110, migration file control node are based on migration strategy, and the file to be migrated in primary storage service node is moved
Move in the LTFS of tape library equipment, wherein, the description information of file to be migrated is stored with the primary storage service node,
The migration file control node and primary storage service node composition distributed file storage system;
This step is specifically to be based on migration strategy by migration file control node, determines to wait to move in primary storage service node
Text move part, and across media migration operation is performed, file to be migrated is also moved into magnetic from the disk of primary storage service node
In band library facilities.
Generally, migration strategy can typically select occupancy of some specific files to the disk resource of primary storage service node,
The specific file can be inactive file.
Wherein, file control node connection tape library equipment is migrated, the migration file control node logically shows
For mechanical arm and driver.
Wherein, before file migration, the description information and file of file to be migrated are all stored in primary storage business in itself
In node, after file migration, file to be migrated is deleted in primary storage service node, remain the description letter of this document
Breath, and this document is then stored in tape library equipment in itself.The description information of the file is the metadata of file, can be included
The information such as file size and file attribute.
It should be noted that client can the description information based on the file, initiate file access request.
Step 120, the migration file control node receive the file directory of the LTFS generations, wherein the file mesh
Record generates when completing file migration;
This step is specifically the LTFS generation file directorys when completing file migration, by the migration file control node
Receive the file directory that the LTFS is sent.
The LTFS is configured to NFS NFS by step 130, the migration file control node, and by described in
Overlapping trees corresponding to the file that LTFS is included are added in the file directory, as shared file catalogue;
This step is specifically to perform configuration sharing by the migration file control node, think tape library equipment LTFS and
File-sharing between primary storage service node is prepared.
The shared file catalogue is stored in the migration file control node, the text both included including the LTFS
The catalogue that part is formed, include overlapping trees corresponding to the file that the LTFS is included again.Described in wherein overlapping trees point to
LTFS, that is, client after the overlapping trees are got, based on the overlapping trees, can access and be stored in tape
File in library facilities.
The shared file catalogue is mapped to the primary storage business section by step 140, the migration file control node
Point.
This step performs the map operation of shared file catalogue particular by migration file control node so that the master
Storage service node can view the file directory in the LTFS and LTFS, and due to the shared file mesh
Record includes overlapping trees corresponding to the file that the LTFS is included so that client obtains by primary storage service node
To after the overlapping trees, based on the overlapping trees, the file being stored in tape library equipment can be accessed.
The technical scheme of the present embodiment, based on distributed file storage system, the storage of mass file can be realized, and
Main memory in the migration file control node in by distributed file storage system determines the distributed file storage system
After storing up the file to be migrated in service node, operated by the file migration for migrating file control node, can will be to be migrated
In the LTFS that file moves to tape library equipment from the disk of primary storage service node, realize file across media migration and return
Shelves, so as to reduce the occupancy of the disk space to primary storage service node, and realize that the long-term offline of mass file preserves;
And the configuration sharing by migrating file control node operates so that be by the shared file catalogue in primary storage service node
It can obtain corresponding overlapping trees.
Fig. 1 c are referred to, as migration file control node by the file migration to be migrated in primary storage service node to magnetic
A kind of specific embodiment of LTFS with library facilities, can include:
Step 111, the migration file control node establish FC (Fibre Channel, optical-fibre channel) with the LTFS
Connection or SAS (Serial Attached SCSI, serial connecting small computer system interface) connections;
Wherein, SCSI (Small Computer System Interface, small computer system interface) is a kind of intelligence
The universal interface standard of energy.
Step 112, based on the FC connections or SAS connections, the migration file control node is by the primary storage business
File migration to be migrated in node is into the LTFS.
In the present embodiment, the migration strategy includes at least one of following:
If the size of the file in primary storage service node is more than the first threshold value, using the file as to be migrated
File;
If the usage frequency of the file in primary storage service node is more than the second threshold value, using the file as treating
Migrated file.
Generally, the disk space of primary storage service node is limited.The migration strategy, it is sized by the way that file is more than
File be defined as file to be migrated, occupancy of the larger file to the disk space of primary storage service node can be reduced;It is logical
Cross and the relatively low file of usage frequency is defined as file to be migrated, magnetic of the inactive file to primary storage service node can be reduced
The occupancy of disk space.
Embodiment two
Referring to Fig. 2, a kind of structural representation of the archive realization device provided for the embodiment of the present invention two, the dress
Putting can be configured in the migration file control node of distributed file storage system as shown in Figure 1 b.
The device includes:Transferring module 210, receiving module 220, configuration module 230 and mapping block 240.
Wherein, transferring module 210 is used to be based on migration strategy, by the file migration to be migrated in primary storage service node extremely
In the linear tape file system LTFS of tape library equipment, wherein, it is stored with text to be migrated in the primary storage service node
The description information of part;Receiving module 220 is used for the file directory for receiving the LTFS generations, wherein the file directory is completed
Generated during file migration;Configuration module 230 is used to the LTFS being configured to NFS NFS, and by the LTFS institutes
Comprising file corresponding to overlapping trees be added in the file directory, as shared file catalogue;Mapping block 240 is used for
The shared file catalogue is mapped into the primary storage service node.
The technical scheme of the present embodiment, based on distributed file storage system, the storage of mass file can be realized, and
Main memory in the migration file control node in by distributed file storage system determines the distributed file storage system
After storing up the file to be migrated in service node, operated by the file migration for migrating file control node, can will be to be migrated
In the LTFS that file moves to tape library equipment from the disk of primary storage service node, realize file across media migration and return
Shelves, so as to reduce the occupancy of the disk space to primary storage service node, and realize that the long-term offline of mass file preserves;
And the configuration sharing by migrating file control node operates so that be by the shared file catalogue in primary storage service node
It can obtain corresponding overlapping trees.
In such scheme, transferring module 210 can include:Connection unit and migration units.
Wherein, connection unit, which is used to establishing Fibre Channel with the LTFS, is connected or serial connecting small computer system
Interface SAS connections;Migration units, for based on the FC connections or SAS connections, will wait to move in the primary storage service node
File migration is moved into the LTFS.
In such scheme, the migration strategy includes at least one of following:
If the size of the file in primary storage service node is more than the first threshold value, using the file as to be migrated
File;
If the usage frequency of the file in primary storage service node is more than the second threshold value, using the file as treating
Migrated file.
Archive realization device provided in an embodiment of the present invention can perform the file that any embodiment of the present invention is provided
File implementation method, possess the corresponding functional module of execution method and beneficial effect.
Embodiment three
A kind of referring to Fig. 3, flow chart of the file access method provided for the embodiment of the present invention three.The embodiment of the present invention
Method can be performed by the file access device that hardware and/or software are realized, the realization device is typically configured at energy
In the server that distributed document storage service is enough provided.This method includes:
Step 310, primary storage service node receive the file access request that client is initiated;
This step specifically can be by establishing LAN (Local Area between client and primary storage service node
Network, LAN), client is based on the LAN and initiates file access request, and primary storage service node is connect based on the LAN
Receive the file access request.
Step 320, the primary storage service node are searched corresponding with the file access request in shared file catalogue
File;
If step 330, searched successfully, the primary storage service node will file corresponding with the file access request
Overlapping trees return to client connect so that the client according to the overlapping trees, accesses with migration file control node
File in the LTFS of the tape library equipment connect;
Wherein, the archive implementation method that the shared file catalogue is provided using any embodiment of the present invention is formed.
If it should be noted that searching failure, show that file corresponding with the file access request does not store
In the LTFS of tape library equipment.
The technical scheme of the present embodiment, migration file control node in by distributed file storage system is by this point
The file migration to be migrated in primary storage service node in cloth document storage system to tape library equipment LTFS, and
Configuration sharing operation is performed by migrating file control node, makes to be stored with the text migrated into LTFS in primary storage service node
After the share directory of part, the file access initiated with client is searched in shared file catalogue by primary storage service node
File corresponding to request, and when searching successfully, overlapping trees corresponding to this document are returned into client, so that client
It is the addressable file being stored in tape library equipment according to the overlapping trees, without client executing file scan and index
Housekeeping, realize file across medium access.
Example IV
A kind of referring to Fig. 4, flow chart of the file access method provided for the embodiment of the present invention four.This method includes:
Step 410, primary storage service node receive the file access request that client is initiated;
Step 411, the primary storage service node are searched corresponding with the file access request in local file directory
File;
It should be noted that the primary storage service node manages two file system, one is tape library equipment
LTFS, another is the node file system of itself, namely the local file system in this step.Wherein, the primary storage
Management of the service node to the LTFS is embodied in:On the one hand, file to be migrated moves from the primary storage service node
After going out, although document body is deleted from the primary storage service node, the description information of deleted original retains
In the primary storage service node;On the other hand, it is stored with the file that the LTFS is included in the primary storage service node
Corresponding shared file catalogue, wherein, the archive that the shared file catalogue is provided using any embodiment of the present invention is real
Existing method is formed.
If step 412, searching failure in local file directory, the primary storage service node is triggered in shared text
The operation of file corresponding with the file access request is searched in part catalogue.
If searching failure in local file directory, show that file corresponding with the file access request is not deposited
Storage files machine in local file system, due to being configured with the file migration based on migration strategy in distributed file storage system
System, now, searched by triggering the primary storage service node in shared file catalogue corresponding with the file access request
File, the success rate of file access can be improved.
If it should be noted that searching successfully, the primary storage service node will be corresponding with the file access request
Local file path return client so that the client is stored in the main memory according to the local file path access
Store up the file in service node.
Step 420, the primary storage service node are searched corresponding with the file access request in shared file catalogue
File;
If step 430, searched successfully, the primary storage service node will file corresponding with the file access request
Overlapping trees return to client connect so that the client according to the overlapping trees, accesses with migration file control node
File in the LTFS of the tape library equipment connect;
The technical scheme of the present embodiment, migration file control node in by distributed file storage system is by this point
The file migration to be migrated in primary storage service node in cloth document storage system to tape library equipment LTFS, and
Configuration sharing operation is performed by migrating file control node, makes to be stored with the text migrated into LTFS in primary storage service node
After the share directory of part, when getting the file access request of client initiation, the sheet in primary storage service node first
File corresponding with the file access request is searched in ground file directory, and in local file directory during lookup failure,
The operation that the primary storage service node searches file corresponding with the file access request in shared file catalogue is triggered,
And when being searched successfully in shared file catalogue, overlapping trees corresponding to this document are returned into client, so that client
End is the addressable file being stored in tape library equipment according to the overlapping trees, without client executing file scan and rope
Draw housekeeping, realize file across medium access, while improve the success rate of file access.
It should be noted that the present embodiment is with lookup in the local file system of present primary storage service node and the text
File corresponding to part access request, when searching failure, further being searched in shared file catalogue please with the file access
Illustrated exemplified by file corresponding to asking.Further, it is also possible to searched first in shared file catalogue, if searching failure,
Further inquired about in the local file directory of primary storage service node, can also be in shared file catalogue and the local file
Parallel query in catalogue, the present embodiment are not limited to looked-up sequence.
Embodiment five
Referring to Fig. 5, a kind of structural representation of the file access device provided for the embodiment of the present invention five, the device bag
Include:File access request receiving module 510, the first searching modul 520 and file access module 530.
Wherein, file access request receiving module 510 is used for the file access request for receiving client initiation;First searches
Module 520 is used to search file corresponding with the file access request in shared file catalogue;File access module 530 is used
If in searching successfully, the overlapping trees of file corresponding with the file access request are returned into client, so that the visitor
The linear tape file system for the tape library equipment that family end is connected according to the overlapping trees, access with migration file control node
File in LTFS;
Wherein, the archive realization device that the shared file catalogue is provided using any embodiment of the present invention is formed.
The technical scheme of the present embodiment, migration file control node in by distributed file storage system is by this point
The file migration to be migrated in primary storage service node in cloth document storage system to tape library equipment LTFS, and
Configuration sharing operation is performed by migrating file control node, makes to be stored with the text migrated into LTFS in primary storage service node
After the share directory of part, the file access initiated with client is searched in shared file catalogue by primary storage service node
File corresponding to request, and when searching successfully, overlapping trees corresponding to this document are returned into client, so that client
It is the addressable file being stored in tape library equipment according to the overlapping trees, without client executing file scan and index
Housekeeping, realize file across medium access.
In such scheme, described device can also include:Second searching modul and trigger module.
Wherein, the second searching modul is used for after the file access request that client is initiated is received, in local file mesh
File corresponding with the file access request is searched in record;Lost if trigger module is used to search in local file directory
Lose, then the operation of file corresponding with the file access request is searched in triggering in shared file catalogue.
File access device provided in an embodiment of the present invention can perform the file access that any embodiment of the present invention is provided
Method, possess the corresponding functional module of execution method and beneficial effect.
Finally it should be noted that:Various embodiments above is merely to illustrate technical scheme, rather than it is limited
System;Preferred embodiment in embodiment, is not limited, and to those skilled in the art, the present invention can be with
There are various changes and change.All any modification, equivalent substitution and improvements made within spirit and principles of the present invention etc.,
It should be included within protection scope of the present invention.