CN109753229A - Data migration method, device, network attached storage equipment and storage medium - Google Patents

Data migration method, device, network attached storage equipment and storage medium Download PDF

Info

Publication number
CN109753229A
CN109753229A CN201711093304.7A CN201711093304A CN109753229A CN 109753229 A CN109753229 A CN 109753229A CN 201711093304 A CN201711093304 A CN 201711093304A CN 109753229 A CN109753229 A CN 109753229A
Authority
CN
China
Prior art keywords
attached storage
file
network attached
storage device
visited
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.)
Granted
Application number
CN201711093304.7A
Other languages
Chinese (zh)
Other versions
CN109753229B (en
Inventor
张明谦
罗先强
何益
刘遵一
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201711093304.7A priority Critical patent/CN109753229B/en
Publication of CN109753229A publication Critical patent/CN109753229A/en
Application granted granted Critical
Publication of CN109753229B publication Critical patent/CN109753229B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The present invention provides a kind of data migration method, device, network attached storage equipment and storage mediums, are related to field of communication technology.The data migration method includes: during source network attached storage device is by Data Migration to target network attached storage device, and target network attached storage device receives the data access request that client is sent;Target network attached storage device determines file root to be visited according to file path to be visited;Determine that file to be visited is stored in source network attached storage device according to file root to be visited, target network attached storage device has root and source network attached storage device corresponding relationship;Data access request is transmitted to source network attached storage device by target network attached storage device, receives the file to be visited that source network attached storage device is sent, and file to be visited is sent to client.Using technical solution of the present invention online data migration can be realized under the conditions of data access business is unbroken.

Description

Data migration method, device, network attached storage equipment and storage medium
Technical field
The present invention relates to field of communication technology more particularly to a kind of data migration method, device, network attached storage equipment And storage medium.
Background technique
Network attached storage (Network Attached Storage) equipment is a kind of exclusive data storage server, packet Include memory device and embedded systems software.Since network attached storage equipment can manage data concentratedly, bandwidth can be discharged, is improved Network performance, network attached storage equipment in a network using more and more extensive.
In network attached storage isomery running environment, data sometimes in different network attached storage equipment into Row migration.At this stage, need to dispose third party's migration server, in third party's migration server using robocopy or The Migration tools such as rsync by the Data Migration in a certain network attached storage equipment into third party's migration server, then will count It migrates according to by third party's migration server into another network attached storage equipment.But in data migration process, client It can not access to data.Therefore, it needs to interrupt data access business when data are migrated, cannot achieve online data Migration.
Summary of the invention
This application provides a kind of data migration method, device, network attached storage equipment and storage mediums, can be in number According to access business it is unbroken under the conditions of, realize online data migration.
In a first aspect, this application provides a kind of data migration methods, comprising: in source network attached storage device by data During migrating to target network attached storage device, the target network attached storage device receives the number that client is sent According to access request, the data access request includes the filename of file to be visited and the path of the file to be visited;Institute State the root that target network attached storage device determines the file to be visited according to the path of the file to be visited;According to The root of the file to be visited determines that the file to be visited is stored in the source network attached storage device, the mesh The corresponding relationship between the root and the source network attached storage device is preserved in mark network attached storage equipment;Institute It states target network attached storage device and the data access request is transmitted to the source network attached storage device;The target Network attached storage equipment receives the file to be visited that the source network attached storage device is sent, and will be described to be visited File is sent to the client.
It can be during source network attached storage device be by Data Migration to target network attached storage device, according to visitor The path for the file to be visited in data access request that family end is sent, determines the root of file to be visited, so that it is determined that Access the place network attached storage equipment of file.If file to be visited is stored in source network attached storage device, will count It is sent to source network attached storage device according to access request, the lookup of file to be visited is carried out by source network attached storage device. The file to be visited that source network attached storage device is found and sent by target network attached storage device returns to client End.To realize data access in data migration process, the lasting progress of data access business is kept, data is avoided to visit Ask service disconnection.Under the premise of data access business is unbroken, online data migration is realized.
With reference to first aspect, in the first possibility of first aspect, above-mentioned data migration method further include: by the source The file directory of network attached storage equipment maps in the target network attached storage device, so that the target network Attached storage device is stored with the file directory and the source network attached storage device of the target network attached storage device File directory, the file directory includes the root.
In the way of mapping, so that target network attached storage device is stored with the text of target network attached storage device The file directory of part catalogue and the source network attached storage device, so as to search the root of file to be visited.To keep away Exempt from file to be visited in source network attached storage device, it is attached the file where file to be visited need to be copied to target network The case where file to be visited is accessed and is handled again after storage equipment.If the file where file to be visited is copied to Carry out the access and processing to file to be visited after target network attached storage device again, and the size of file to be visited compared with Greatly, that file to be visited is copied to target network attached storage device the time it takes is longer.And initiate data access request The client of business be not received by response in a longer period of time, then it is assumed that business time-out, thus interrupting service.Using this Data migration method in inventive embodiments, directly to text to be visited in the network attached storage equipment where file to be visited Part is accessed and is handled, and saves access time, and can effectively avoid meaningless business timeout case, reduces service disconnection A possibility that
With reference to first aspect or in a first aspect, second of first aspect may in, deposit the target network is attached Storage equipment receives the file to be visited that the source network attached storage device is sent, and the file to be visited is sent to After the client, further includes: the target network attached storage device saves the source network attached storage device and sends The file to be visited.
The interviewed data that source network attached storage device is returned are stored in target network attached storage device, avoid possibility The data updated the not more news in target network attached storage device guarantees the standard of data in data migration process True property.
With reference to first aspect, in the third possibility of first aspect, the data access request is asked for data write operation It asks;The target network attached storage device receives the file to be visited that the source network attached storage device is sent, and The file to be visited is sent to the client, comprising:, will be according to the number if the file to be visited is migrating The file record to be visited updated according to write operation requests is in log;It waits the file migration to be visited to finish, utilizes The file to be visited that the log finishes migration plays back.
When file to be visited is migrating, in order to avoid occurring migrating mistake, will request to update according to data write operation File record to be visited in log, after the file migration to be visited, play back file to be visited using log, thus Guarantee to carry out the accuracy of file to be visited after business processing in data migration process.
Second aspect, this application provides a kind of data migration devices, comprising: request receiving module, in source network Attached storage device during Data Migration to target network attached storage device, will receive the data access that client is sent Request, the data access request includes the filename of file to be visited and the path of the file to be visited;Root is true Cover half block, for determining the root of the file to be visited according to the path of the file to be visited;Position determination module is used In determining that the file to be visited is stored in the source network attached storage device according to the root of the file to be visited, It is preserved in the target network attached storage device corresponding between the root and the source network attached storage device Relationship;Proxy module is forwarded, the data access request is transmitted to the source for the target network attached storage device Network attached storage equipment;Module is replied, receives the attached storage of source network for the target network attached storage device The file to be visited that equipment is sent, and the file to be visited is sent to the client.
In conjunction with second aspect, in the first possibility of second aspect, above-mentioned data migration device further include: mapping mould Block, for the file directory of the source network attached storage device to be mapped in the target network attached storage device, with So that the target network attached storage device be stored with the target network attached storage device file directory and the source The file directory of network attached storage equipment, the file directory include the root.
In conjunction with second aspect, in second of possibility of second aspect, above-mentioned data migration device further include: unloading mould Block, the file to be visited sent for saving the source network attached storage device.
In conjunction with second aspect, in the third possibility of second aspect, the data access request is asked for data write operation It asks;The reply module is specifically used for: if the file to be visited is migrating, will be requested more according to the data write operation The new file record to be visited is in log;The file migration to be visited is waited to finish, using the log to migration The file to be visited finished is played back.
The third aspect this application provides a kind of network attached storage equipment, including memory, processor and is stored in institute The program that can be run on memory and on the processor is stated, the processor realizes above-mentioned technical side when executing described program Data migration method in case.
Fourth aspect is stored with program, described program quilt this application provides a kind of storage medium on the storage medium The data migration method in above-mentioned technical proposal is realized when processor executes.
This application provides a kind of data migration method, device, network attached storage equipment and storage mediums, are applied to number According to the target network attached storage device in transition process.It can be in source network attached storage device by Data Migration to target network During attached storage device, according to client send data access request in file to be visited path, determine to The root for accessing file, so that it is determined that the place network attached storage equipment of file to be visited.If file to be visited is stored in In source network attached storage device, then data access request is sent to source network attached storage device, is deposited by source network is attached Storage equipment carries out the lookup of file to be visited.Target network attached storage device finds source network attached storage device concurrently The file to be visited sent returns to client.To realize data access in data migration process, data is kept to visit The lasting progress for asking business, avoids data access service disconnection.Under the premise of data access business is unbroken, realize in line number According to migration.
Detailed description of the invention
Fig. 1 is the application scenarios schematic diagram of Data Migration in the embodiment of the present invention;
Fig. 2 is a kind of flow chart of data migration method in the embodiment of the present invention;
Fig. 3 illustrates figure for the system of Data Migration a kind of in the embodiment of the present invention
Fig. 4 is a kind of flow chart of data migration method in another embodiment of the present invention;
Fig. 5 is a kind of structural schematic diagram of data migration device in one embodiment of the invention;
Fig. 6 is a kind of structural schematic diagram of data migration device in another embodiment of the present invention;
Fig. 7 is the hardware structural diagram of one of one embodiment of the invention network attached storage equipment.
Specific embodiment
The embodiment of the invention provides a kind of data migration method, device, network attached storage equipment and storage mediums, can Applied in the scene for carrying out Data Migration between network attached storage equipment.Multiple network attached storage equipment can isomery each other Equipment, that is to say, that multiple network attached storage equipment can deposit for the different structure of different vendor, the network attached of various criterion Store up equipment.Fig. 1 is the application scenarios schematic diagram of Data Migration in the embodiment of the present invention.Data can be in the form of a file multiple It is migrated in network attached storage equipment.As shown in Figure 1, file can be in network attached storage equipment A, network attached storage equipment B It is migrated between network attached storage equipment C.In embodiments of the present invention, in data migration process, client is still Accessible file.That is, client still can continue task in data migration process.Data are moved Shifting not will lead to service disconnection, to realize that online data migrates.Wherein, client can be the control such as computer, console, mobile phone Terminal processed.In data migration process, client can carry in target network attached storage device.The attached storage of target network is set Standby is the destination network attached storage device of Data Migration, and source network attached storage device is that the Origination network of Data Migration is attached Belong to storage equipment.It can be led to by standard agreement between target network attached storage device and source network attached storage device Letter, for example utilize Network File System (Network File System, NFS) standard agreement or universal network file system (Common Internet File System, CIFS) standard agreement etc. is communicated.I.e. data are in a manner of file by source net Network attached storage device is migrated to target network attached storage device.For example, data are attached by network attached storage equipment B and network Belonging to storage equipment C to migrate to network attached storage equipment A, then network attached storage equipment A is target network attached storage device, Network attached storage equipment B and network attached storage equipment C is source network attached storage device.Carry is attached to target network The client of storage equipment can obtain the text of all data in target network attached storage device and source network attached storage device File directory (total) in part catalogue, that is, Fig. 1, and can be shown in client.
Fig. 2 is a kind of flow chart of data migration method in the embodiment of the present invention.Data migration method can be by target network Attached storage device executes.As shown in Fig. 2, data migration method may include step S101 to step S105.
In step s101, in source network attached storage device by Data Migration to the mistake of target network attached storage device Cheng Zhong, target network attached storage device receive the data access request that client is sent.
Target network attached storage device initiates migration request, request data migration to source network attached storage device.Source Network attached storage equipment receives migration request, responds the migration request, and data are moved to target network attached storage device It moves.Target network attached storage device receive by source network auxiliary device migrate Lai data.In one example, it is moved in data During shifting, data can be locked, avoid the data access request of multi-user it is parallel caused by loss of data or inconsistent The problem of, to guarantee the consistency of data.In data migration process, client can carry to target network it is attached storage set Standby, client can send data access request to target attached storage device.Target network attached storage device can receive and locate Manage the data access request that client is sent.
Data access request includes the filename of file to be visited and the path of file to be visited, so as to using to The filename of file and the path of file to be visited are accessed, file to be visited is accessed.For example, the file of file to be visited is entitled " exam results ", the path of file to be visited are " ServerC FolderC_1 exam results ", then can determine to The position that access file specifically stores.
Data access request may include that data reading operation asks summed data write operation requests.Data reading operation request is requested Read file to be visited.Data write operation request i.e. request carries out write operation to file to be visited, for example increases, modifies, deletes Deng.
In step s 102, target network attached storage device determines file to be visited according to the path of file to be visited Root.
Root learns root it can be learnt that file to be visited is stored in tool to the most upper level catalogue of logical drive In which network attached storage equipment of body, also it can be seen that file to be visited is stored in target network attached storage device or source net Network attached storage device.For example, the path of file to be visited is " ServerC FolderC_1 exam results ", then wait visit The root for asking file is " ServerC ".
In step s 103, determine that file to be visited is stored in the attached storage of source network according to the root of file to be visited In equipment.
The corresponding pass between root and source network attached storage device is being preserved in target network attached storage device System.The data for participating in the source network attached storage device of data migration process can be one, can also be multiple.Target network is attached Storing equipment can be according to the root of file to be visited, in the corresponding relationship between root and source network attached storage device Lookup obtains source network attached storage device corresponding with the root of file to be visited, so that it is determined that storing file to be visited Source network attached storage device.It should be noted that the time with data migration process elapses, the path of file to be visited can Real-time update, the root of file to be visited also with path update and update.Similarly, in target network attached storage device Root and the corresponding relationship of source network attached storage device can also be with real-time updates.
For example, the corresponding relationship between root and source network attached storage device includes: " ServerA " attached with network It is corresponding to belong to storage equipment A, " ServerB " is corresponding with network attached storage equipment B, and " ServerC " is set with network attached storage Standby C is corresponding.If the root of file to be visited is " ServerB ", the corresponding source net of the root of file to be visited can determine Network attached storage device is network attached storage equipment B.
For another example, if the access path of file to be visited be E: ServerB FolderB_3, can determine text to be visited Part is located in target network attached storage device, that is, network attached storage equipment B.If the access path of file to be visited be G: ServerC FolderC_1, then can determine that file to be visited is located at source network attached storage device i.e. network attached storage equipment C In.
In step S104, data access request is transmitted to the attached storage of source network and set by target network attached storage device It is standby.
File to be visited is stored in source network attached storage device, then target network attached storage device is by data access Request is transmitted to source network attached storage device.File to be visited is searched by source network attached storage device, source network is attached to be deposited Storage equipment can be handled file to be visited, and the file to be visited found is returned to target network attached storage device. Target network attached storage device receives the file to be visited that source network attached storage device returns, by the attached storage of target network The file to be visited that equipment returns to source network attached storage device returns to client.
In step s105, target network attached storage device receives the text to be visited that source network attached storage device is sent Part, and file to be visited is sent to client.
Data access request may include that data reading operation asks summed data write operation requests.If data access request is data Read operation request, then data reading operation request is transmitted to source network attached storage device by target network attached storage device, by Source network attached storage device is requested according to data reading operation, searches file to be visited, and file to be visited is returned to target network Network attached storage device, target network attached storage device return again to file to be visited to client.
If data access request is data write operation request, target network attached storage device requests data write operation It is transmitted to source network attached storage device.Source network attached storage device searches file to be visited according to data write operation request, And write operation is carried out to the data in file to be visited, and the file to be visited updated according to data write operation request is returned to Target network attached storage device, the file to be visited that target network attached storage device will be updated according to data write operation request Return to client.
In one example, if the root of file to be visited is not belonging to source network attached storage device, can determine to The root of access file belongs to target network attached storage device.Target network attached storage device is according to file to be visited Root determines that file to be visited is stored in target network attached storage device, then can be accessed and be stored according to data access request File to be visited in target network attached storage device, and file to be visited is returned into client.It is moved completing data It, can be offline by source network attached storage device after shifting.Business is completed in target network attached storage device.
In embodiments of the present invention, in source network attached storage device by Data Migration to target network attached storage device During, the path of the file to be visited in data access request sent according to client determines the root of file to be visited Catalogue, so that it is determined that the place network attached storage equipment of file to be visited.If file to be visited is stored in, source network is attached to be deposited Store up equipment in, then data access request is sent to source network attached storage device, by source network attached storage device carry out to Access the lookup of file.Source network attached storage device is found and is sent to be visited by target network attached storage device File returns to client.To realize data access in data migration process, continuing for data access business is kept It carries out, avoids data access service disconnection.Under the premise of data access business is unbroken, online data migration is realized.
In the above two embodiments, available, the access and processing to file to be visited are in file to be visited It is carried out in the network attached storage equipment at place.To avoiding file to be visited in source network attached storage device, needing will be to File where access file, which copies to after target network attached storage device, to access and handles to file to be visited again The case where.It is carried out again if the file where file to be visited is copied to after target network attached storage device to file to be visited Access and processing, and the size of file to be visited is larger, and file to be visited is copied to target network attached storage device The time it takes is longer.And the client for initiating the business of data access request is not received by back in a longer period of time It answers, then it is assumed that business time-out, thus interrupting service.Using the data migration method in the embodiment of the present invention, directly to be visited File to be visited is accessed and handled in network attached storage equipment where file, saves access time, and can have A possibility that effect avoids meaningless business timeout case, reduces service disconnection.
Fig. 3 illustrates figure for the system of Data Migration a kind of in the embodiment of the present invention.As shown in figure 3, Data Migration System may include client, target network attached storage device and source network attached storage device.ISILON/ in Fig. 3 NETAPP/VNX, 9000FS and TFS are the network attached storage equipment of different vendor, while being also used as the attached storage of source network Equipment.Client carry is connect in target network attached storage device with target network attached storage device.Target network is attached Storage equipment includes input/output control module (abbreviation I/O control module), network attached storage Virtual File System (abbreviation NAS_VFS), backstage transferring module, universal network file system/Network File System and customer's representative (Client Agent, CA)/portable operating system Application of Interface adaptation layer (Portable Operating System Interface of UNIX, PAL)。
Wherein, input/output control module can locating file catalogue, thus the position of location data.It is network attached to deposit Storage Virtual File System may include third party's Virtual File System (abbreviation Third_VFS) and private virtual file system (abbreviation Private_VFS).Third party's Virtual File System and privately owned file system are directed to the business of different range.Universal network file System/network file system and customer's representative/portable operating system Application of Interface adaptation layer are to be suitable for different business System and equipment.Backstage transferring module can call the interface of customer's representative and portable operating system Application of Interface adaptation layer read-write text Data in part also can control universal network file system/carry out between Network File System and source network attached storage device The migration of data.
Fig. 4 is a kind of flow chart of data migration method in another embodiment of the present invention.Data migration method shown in Fig. 4 For a kind of specific implementation of data migration method shown in Fig. 2.Step S105 in Fig. 2 can be refined as the step in Fig. 4 S1051 and step S1052;Data migration method in Fig. 4 may also include step S106 and step 107.
It is to be visited by being updated according to data write operation request if file to be visited is migrating in step S1051 File record is in log.
In embodiments of the present invention, data access request is data write operation request, that is, needs to carry out file to be visited Write operation.If file to be visited is migrating, a part of Data Migration to the attached storage of target network of file to be visited is set Standby, another part data of file to be visited do not migrate also to target network attached storage device.In order to avoid loss of data or Mistake occurs, can request the file record to be visited updated in log, that is, log data write operation.
In step S1052, file migration to be visited is waited to finish, using log to the file to be visited that finishes of migration into Row playback.
It is played back using the file to be visited that log finishes migration, that is, file migration to be visited is waited to finish, utilized The migration in file to be visited replacement target network attached storage device updated in log according to data write operation request finishes File to be visited.
In another example, if file to be visited does not have started migration or migrated success, and file to be visited is worked as Preceding position is source network attached storage device, then can store the file to be visited updated according to data write operation request In target network attached storage device, it can also store in source network attached storage device according to data write operation request update File to be visited.
In step s 106, the file directory of source network attached storage device is mapped into target network attached storage device In so that target network attached storage device be stored with target network attached storage device file directory and source network it is attached Store the file directory of equipment.
Client can carry to target network attached storage device, i.e., client by with target network attached storage device Between data interaction realize business.In one example, target network attached storage device can construct all network attached Store the global name space (global namespace, GNS) of equipment.Wherein, all network attached storage equipment includes Target network attached storage device and source network attached storage device.Target network attached storage device constructs global name space When, the file directory of target network attached storage device is put into global name space.It include target network in global name space On the basis of network attached storage device, the file directory of source network attached storage device is mapped in global name space, is made Obtaining global name space includes the file directory of source network attached storage device and the file mesh of target network attached storage device Record.It include root in file directory.File directory can regard storage array as, and each record in file directory, which can be regarded as, to be deposited Store up an element in array.
For example, as shown in Figure 1, target network attached storage device is network attached storage equipment A, the attached storage of source network Equipment includes network attached storage equipment B and network attached storage equipment C.File directory A packet in network attached storage equipment A " ServerA FolderA_1 ", " ServerA FolderA_2 " and " ServerA FolderA_3 " is included, root is "ServerA\";File directory B in network attached storage equipment B include " ServerB FolderB_1 ", " ServerB FolderB_2 " and " ServerB FolderB_3 ", root are " ServerB ";File in network attached storage equipment C Catalogue C includes " ServerC FolderC_1 ", " ServerC FolderC_2 " and " ServerC FolderC_3 ", root For " ServerC ".By mapping after, the file directory (total) in global name space include file directory A, file directory B and File directory C, file directory (total) include root " ServerA " " ServerB " and " ServerC ".
It should be noted that the file directory of source network attached storage device is only mapped to global life by mapping here The name space does not also migrate the data in source network attached storage device into target attached storage device all.
In one example, in building global name space, and the file directory of former network attached storage equipment is also reflected After being incident upon global name space, client can also show total file directory, but total file directory and mesh that client is shown The file directory marked in the global name space in network attached storage equipment after mapping is different, what client was shown Total file directory can not record data and be currently present in target network attached storage device or source network attached storage device, but The file directory obtained after mapping in global name space has recorded between root and each network attached storage equipment Corresponding relationship, the corresponding relationship between root and each network attached storage equipment include that root is set with the attached storage of source network Corresponding relationship between standby.File directory has recorded the storage location i.e. access path of file, and file includes data.Global naming File directory in space real-time update or can periodically update, similarly, between root and each network attached storage equipment Corresponding relationship is also with real-time update or periodically updates.Therefore in data migration process, the attached storage of target network is set The standby transition state that file can be perceived by passing through the file directory that mapping obtains in global name space, the migration shape of file State is the current position of file.
In data migration process, client carry to target network attached storage device, client can be attached to target It stores equipment and sends data access request.Data access request includes the access path of file to be visited.Target network is attached to be deposited Storage equipment receives data access request, can be according to the access path of file to be visited in data access request, in global naming It is searched in file directory in space, so that it is determined that the position of the file to be visited of data access request instruction.It is to be visited The position of file includes target network attached storage device or source network attached storage device.If the place of file to be visited Position is source network attached storage device, and the number of source network attached storage device is two or more, then file to be visited It position can be specifically to one of source network attached storage device.
In step s 107, target network attached storage device saves the text to be visited that source network attached storage device is sent Part.
If file to be visited is stored in source network attached storage device, source network attached storage device needs will be wait visit Ask that file first returns to target network attached storage device, file to be visited is returned to visitor again by target network attached storage device Family end.When source network attached storage device needs file to be visited first returning to target network attached storage device, target File to be visited can be stored in target network attached storage device by network attached storage equipment.
Fig. 5 is a kind of structural schematic diagram of data migration device 200 in one embodiment of the invention.As shown in figure 5, data are moved Moving device 200 may include request receiving module 201, root determining module 202, position determination module 203, forwarding proxy module 204 and reply module 205.
Request receiving module 201, in source network attached storage device by Data Migration to the attached storage of target network During equipment, the data access request that client is sent is received, the data access request includes the text of file to be visited The path of part name and the file to be visited.
The related description of request receiving module 201 can be found in the related description part of step S101 in above-described embodiment.Tool Body, request receiving module 201 can be integrated in the processor of network attached storage equipment.
Root determining module 202, for determining the root of the file to be visited according to the path of the file to be visited Catalogue.
The related description of root determining module 202 can be found in the related description part of step S102 in above-described embodiment. Specifically, root determining module 202 can be integrated in the processor of network attached storage equipment.
Position determination module 203, for determining that the file to be visited stores according to the root of the file to be visited In the source network attached storage device, the root and the source are preserved in the target network attached storage device Corresponding relationship between network attached storage equipment.
The related description of position determination module 203 can be found in the related description part of step S103 in above-described embodiment.Tool Body, position determination module 203 can be integrated in the processor of network attached storage equipment.
Proxy module 204 is forwarded, is transmitted to the data access request for the target network attached storage device The source network attached storage device.
The related description of forwarding proxy module 204 can be found in the related description part of step S104 in above-described embodiment.Tool Body, forwarding proxy module 204 can be integrated in the processor of network attached storage equipment.
Module 205 is replied, receives the source network attached storage device hair for the target network attached storage device The file to be visited sent, and the file to be visited is sent to the client.
The related description for replying module 205 can be found in the related description part of step S105 in above-described embodiment.Specifically, Replying module 205 can be integrated in the processor of network attached storage equipment.
In embodiments of the present invention, Data Migration to the attached storage of target network can be set in source network attached storage device In standby process, the path of the file to be visited in data access request sent according to client determines file to be visited Root, so that it is determined that the place network attached storage equipment of file to be visited.If it is attached that file to be visited is stored in source network It stores in equipment, then data access request is sent to source network attached storage device, is carried out by source network attached storage device The lookup of file to be visited.Target network attached storage device source network attached storage device is found and is sent wait visit Ask that file returns to client.To realize data access in data migration process, holding for data access business is kept It is continuous to carry out, avoid data access service disconnection.Under the premise of data access business is unbroken, online data migration is realized.
And access to file to be visited and processing are in the network attached storage equipment where file to be visited It carries out, to avoid file to be visited in source network attached storage device, it is attached file to be visited need to be copied to target network Belong to the case where file to be visited is accessed and handled again after storing equipment.It is directly attached in the network where file to be visited Belong to and file to be visited is accessed and handled in storage equipment, saves access time, and can effectively avoid meaningless industry A possibility that business timeout case, reduction service disconnection.
In another embodiment of the invention, data access request is data write operation request, returning in above-described embodiment Multiple module 205 is specifically used for:, will be according to the institute of data write operation request update if the file to be visited is migrating File record to be visited is stated in log;It waits the file migration to be visited to finish, migration is finished using the log The file to be visited is played back.It is related to step S1052's to illustrate the step S1051 that can be found in above-described embodiment Declaratives.
When interviewed data are migrating, in order to avoid occurring migrating mistake, by what is updated according to data write operation request Interviewed data are recorded in log, after this is interviewed Data Migration, using log playback of data, to guarantee Data Migration In the process carry out business processing after data accuracy.
If the position of interviewed data is target network attached storage device, access agent module 204 can be in target File to be visited is searched in network attached storage equipment, and the file to be visited found is returned into client.In interviewed number According to carrying out searching in the network attached storage equipment at place and the operation such as relevant treatment so that in transition process, to data into Row processing is more intuitive quick.
Fig. 6 is a kind of structural schematic diagram of data migration device 200 in another embodiment of the present invention.The difference of Fig. 6 and Fig. 5 Place is that data migration device 200 shown in fig. 6 may also include mapping block 206 and unloading module 207.
Mapping block 206, for the file directory of the source network attached storage device to be mapped to the target network In attached storage device, so that the target network attached storage device is stored with the target network attached storage device The file directory of file directory and the source network attached storage device, the file directory include the root.
The related description of mapping block 206 can be found in the related description part of step S106 in above-described embodiment.Map mould Block 206 can be integrated in the processor of network attached storage equipment.
Unloading module 207, the file to be visited sent for saving the source network attached storage device.
The related description of unloading module 207 can be found in the related description part of step S107 in above-described embodiment.Unloading mould Block 205 can be integrated in the processor of network attached storage equipment.
The interviewed data that source network attached storage device is returned are stored in target network attached storage device, avoid possibility The data updated the not more news in target network attached storage device guarantees the standard of data in data migration process True property.
It can be by network attached storage in conjunction with the data migration method and device of Fig. 1 to Fig. 6 embodiment of the present invention described Equipment 300 is realized.Fig. 7 is the hardware structural diagram of one of one embodiment of the invention network attached storage equipment 300.
Network attached storage equipment 300 includes memory 301, processor 302 and is stored on memory 301 and can locate The computer program run on reason device 302.
In one example, above-mentioned processor 302 may include central processing unit (CPU) or specific integrated circuit (ASIC), or may be configured to implement the embodiment of the present invention one or more integrated circuits.
Memory 301 may include the mass storage for data or instruction.For example it rather than limits, memory 301 may include hard disk drive (i.e. HDD), floppy disk drive, flash memory, CD, magneto-optic disk, tape or universal serial bus (i.e. USB) the combination of driver or two or more the above.In a suitable case, memory 301 may include that can be removed Non-removable or fixed medium.In a suitable case, memory 301 can be in the inside of network attached storage equipment 300 Or it is external.In a particular embodiment, memory 301 is non-volatile solid state memory.In a particular embodiment, memory 301 Including read-only memory (i.e. ROM).In a suitable case, which can be the ROM of masked edit program, programming ROM (i.e. PROM), erasable PROM (i.e. EPROM), electric erasable PROM (i.e. EEPROM), electrically-alterable ROM (i.e. EAROM) or flash memory or The combination of two or more the above of person.
Processor 302 is run and executable program generation by reading the executable program code stored in memory 301 The corresponding program of code, for executing the data migration method in above-described embodiment.
In one example, network attached storage equipment 300 may also include communication interface 303 and bus 304.Wherein, such as Shown in Fig. 7, memory 301, processor 302, communication interface 303 connect by bus 304 and complete mutual communication.
Communication interface 303 is mainly used for realizing in the embodiment of the present invention between each module, device, unit and/or equipment Communication.It can also the access input equipment of communication interface 303 and/or output equipment.
Bus 304 includes hardware, software or both, and the component of sample frequency recommendation apparatus 300 is coupled to each other together. For example it rather than limits, bus 304 may include accelerated graphics port (i.e. AGP) or other graphics bus, enhancing industrial standard Framework (i.e. EISA) bus, front side bus (i.e. FSB), super transmission (i.e. HT) interconnection, Industry Standard Architecture (i.e. ISA) bus, nothing Limit bandwidth interconnection, low pin count (i.e. LPC) bus, memory bus, micro- channel architecture (i.e. MCA) bus, peripheral component interconnection (i.e. PCI) bus, PCI-Express (i.e. PCI-X) bus, Serial Advanced Technology Attachment (i.e. SATA) bus, video electronic mark The combination of VESA Video Electronics Standard Association's part (i.e. VLB) bus or other suitable buses or two or more the above.Suitable In the case of, bus 304 may include one or more buses.Although specific bus has been described and illustrated in the embodiment of the present invention, The present invention considers any suitable bus or interconnection.
One embodiment of the invention also provides a kind of storage medium, is stored with program on the storage medium, and the program is processed Device realizes the data migration method in above-described embodiment when executing.

Claims (10)

1. a kind of data migration method characterized by comprising
During source network attached storage device is by Data Migration to target network attached storage device, the target network Attached storage device receives the data access request that client is sent, and the data access request includes the file of file to be visited The path of name and the file to be visited;
The target network attached storage device determines the root mesh of the file to be visited according to the path of the file to be visited Record;
Determine that the file to be visited is stored in the source network attached storage device according to the root of the file to be visited In, pair between the root and the source network attached storage device is preserved in the target network attached storage device It should be related to;
The data access request is transmitted to the source network attached storage device by the target network attached storage device;
The target network attached storage device receives the file to be visited that the source network attached storage device is sent, and The file to be visited is sent to the client.
2. the method according to claim 1, wherein further include:
The file directory of the source network attached storage device is mapped in the target network attached storage device, so that The target network attached storage device be stored with the target network attached storage device file directory and the source network The file directory of attached storage device, the file directory include the root.
3. the method according to claim 1, wherein receiving the source in the target network attached storage device The file to be visited that network attached storage equipment is sent, and after the file to be visited is sent to the client, Further include:
The target network attached storage device saves the file to be visited that the source network attached storage device is sent.
4. the method according to claim 1, wherein the data access request is data write operation request;
The target network attached storage device receives the file to be visited that the source network attached storage device is sent, and The file to be visited is sent to the client, comprising:
If the file to be visited is migrating, the file to be visited updated according to data write operation request is remembered Record is in log;
It waits the file migration to be visited to finish, is returned using the file to be visited that the log finishes migration It puts.
5. a kind of data migration device characterized by comprising
Request receiving module, in source network attached storage device by Data Migration to the mistake of target network attached storage device Cheng Zhong, receive client send data access request, the data access request include file to be visited filename and The path of the file to be visited;
Root determining module, for determining the root of the file to be visited according to the path of the file to be visited;
Position determination module, for determining that the file to be visited is stored in the source according to the root of the file to be visited In network attached storage equipment, the root is preserved in the target network attached storage device and the source network is attached Store the corresponding relationship between equipment;
Proxy module is forwarded, the data access request is transmitted to the source net for the target network attached storage device Network attached storage device;
Module is replied, is received described in the source network attached storage device transmission for the target network attached storage device File to be visited, and the file to be visited is sent to the client.
6. device according to claim 5, which is characterized in that further include:
Mapping block, for the file directory of the source network attached storage device to be mapped to the attached storage of the target network In equipment, so that the target network attached storage device is stored with the file directory of the target network attached storage device With the file directory of the source network attached storage device, the file directory includes the root.
7. device according to claim 5, which is characterized in that further include:
Unloading module, the file to be visited sent for saving the source network attached storage device.
8. device according to claim 5, which is characterized in that the data access request is data write operation request;
The reply module is specifically used for:
If the file to be visited is migrating, the file to be visited updated according to data write operation request is remembered Record is in log;
It waits the file migration to be visited to finish, is returned using the file to be visited that the log finishes migration It puts.
9. a kind of network attached storage equipment, which is characterized in that including memory, processor and be stored on the memory simultaneously The program that can be run on the processor, the processor are realized when executing described program as any one in Claims 1-4 Data migration method described in.
10. a kind of storage medium, which is characterized in that be stored with program on the storage medium, described program is executed by processor Data migration method of the Shi Shixian as described in any one of Claims 1-4.
CN201711093304.7A 2017-11-08 2017-11-08 Data migration method and device, network attached storage equipment and storage medium Active CN109753229B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711093304.7A CN109753229B (en) 2017-11-08 2017-11-08 Data migration method and device, network attached storage equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711093304.7A CN109753229B (en) 2017-11-08 2017-11-08 Data migration method and device, network attached storage equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109753229A true CN109753229A (en) 2019-05-14
CN109753229B CN109753229B (en) 2020-09-18

Family

ID=66401575

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711093304.7A Active CN109753229B (en) 2017-11-08 2017-11-08 Data migration method and device, network attached storage equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109753229B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110427350A (en) * 2019-07-11 2019-11-08 北京梧桐车联科技有限责任公司 Data processing method and device, storage equipment and medium in Data Migration
CN113050890A (en) * 2021-03-26 2021-06-29 北京沃东天骏信息技术有限公司 Data migration method and device
CN115277840A (en) * 2022-03-18 2022-11-01 中国建设银行股份有限公司 Data migration method and device, electronic equipment and computer readable medium
CN115277840B (en) * 2022-03-18 2024-04-23 中国建设银行股份有限公司 Data migration method, device, electronic equipment and computer readable medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102073462A (en) * 2010-11-29 2011-05-25 华为技术有限公司 Virtual storage migration method and system and virtual machine monitor
CN102611745A (en) * 2011-12-31 2012-07-25 成都市华为赛门铁克科技有限公司 On-line file moving method, device and system
CN102955845A (en) * 2012-10-23 2013-03-06 北京亿赞普网络技术有限公司 Data access method and device as well as distributed database system
US20160371770A1 (en) * 2002-08-14 2016-12-22 Larry Porter System for online lending services via an application service provider network

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160371770A1 (en) * 2002-08-14 2016-12-22 Larry Porter System for online lending services via an application service provider network
CN102073462A (en) * 2010-11-29 2011-05-25 华为技术有限公司 Virtual storage migration method and system and virtual machine monitor
CN102611745A (en) * 2011-12-31 2012-07-25 成都市华为赛门铁克科技有限公司 On-line file moving method, device and system
CN102955845A (en) * 2012-10-23 2013-03-06 北京亿赞普网络技术有限公司 Data access method and device as well as distributed database system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110427350A (en) * 2019-07-11 2019-11-08 北京梧桐车联科技有限责任公司 Data processing method and device, storage equipment and medium in Data Migration
CN113050890A (en) * 2021-03-26 2021-06-29 北京沃东天骏信息技术有限公司 Data migration method and device
CN115277840A (en) * 2022-03-18 2022-11-01 中国建设银行股份有限公司 Data migration method and device, electronic equipment and computer readable medium
CN115277840B (en) * 2022-03-18 2024-04-23 中国建设银行股份有限公司 Data migration method, device, electronic equipment and computer readable medium

Also Published As

Publication number Publication date
CN109753229B (en) 2020-09-18

Similar Documents

Publication Publication Date Title
US7783737B2 (en) System and method for managing supply of digital content
JP7221975B2 (en) Transaction processing in a multi-master distributed data management system
US9986033B2 (en) Facilitating access to remote cloud services
US7392261B2 (en) Method, system, and program for maintaining a namespace of filesets accessible to clients over a network
CN106331153B (en) A kind of filter method of service request, apparatus and system
US20200310859A1 (en) System and method for an object layer
WO2015067074A1 (en) Data reading method and apparatus
US20080177948A1 (en) Method and apparatus for managing placement of data in a tiered storage system
CN115269184A (en) Function As A Service (FAAS) execution dispatcher
US20150236974A1 (en) Computer system and load balancing method
CN110019004A (en) A kind of data processing method, apparatus and system
CN101814084A (en) API (Application Programming Interface) management method and system
US20080294748A1 (en) Proxy between network file system version three and network file system version four protocol
JP5911448B2 (en) Migration support apparatus, migration support method, and program
US20200344112A1 (en) On-premise and off-premise debugging
CN110413590A (en) Data migration method, device, equipment and medium
WO2017148382A1 (en) Method and apparatus for accessing storage device by virtual machine in cloud computing management platform
WO2016101662A1 (en) Data processing method and relevant server
US8380806B2 (en) System and method for absolute path discovery by a storage virtualization system
US10834173B2 (en) On-premises and off-premises communication
CN109753229A (en) Data migration method, device, network attached storage equipment and storage medium
WO2018053838A1 (en) Load balancing method and related device
CN111767169B (en) Data processing method, device, electronic equipment and storage medium
JP2000076152A (en) Distributed file system, file sharing method in the system and storage medium for programming and recording the method
CN110708375A (en) Data processing method, device and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant