CN106649600A - Way, device and system of migrating file permissions - Google Patents

Way, device and system of migrating file permissions Download PDF

Info

Publication number
CN106649600A
CN106649600A CN201611055336.3A CN201611055336A CN106649600A CN 106649600 A CN106649600 A CN 106649600A CN 201611055336 A CN201611055336 A CN 201611055336A CN 106649600 A CN106649600 A CN 106649600A
Authority
CN
China
Prior art keywords
file
authority information
authority
target device
instruction
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
CN201611055336.3A
Other languages
Chinese (zh)
Other versions
CN106649600B (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 CN201611055336.3A priority Critical patent/CN106649600B/en
Priority to PCT/CN2017/081337 priority patent/WO2018094962A1/en
Publication of CN106649600A publication Critical patent/CN106649600A/en
Application granted granted Critical
Publication of CN106649600B publication Critical patent/CN106649600B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • G06F16/119Details of migration of file systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/26Special purpose or proprietary protocols or architectures

Abstract

The invention provides a way, a device and a system of migrating file permissions, which is used to solve the problem that the permission information after file migration is inconsistent with the permission information before the file migration. The way of migrating file permissions includes the following steps: a migration server reads a first permission information of files from a source device through a first protocol, and sends the first permission information to a target device, and the first permission information includes the file permissions supported by the first protocol; the migration sever sends an instruction of locking the permissions transforming to the target device; the migration sever reads a second permission information of the files from the source device through a second protocol, and sends the second permission information to the target device, and the second permission information includes the file permissions supported by the second protocol; after receiving the second permission information, the target keeps the first permission information unchanged according to the instruction of locking the permissions transforming.

Description

A kind of method of migrated file authority, device and system
Technical field
The present invention relates to field of computer technology, more particularly to a kind of method of migrated file authority, device and system.
Background technology
The authority information of file characterizes operating right of the different user to file in file system.Some file system are supported Two kinds or more of agreement, the type of the file permission that different agreement is supported is different, thus the file in file system can be with Authority with two or more type.
When file in file system is migrated to target device from source device, need in the lump to move the authority information of file Move to target device.The migration of authority information is needed by supporting that the agreement of the authority information is carried out, in file with the first power When limit information and the second authority information, need by supporting that the first agreement of the first authority information believes the first authority of file Breath is migrated to target device, and is set by supporting the second protocol of the second authority information the second authority information to be migrated to target It is standby.
The different types of authority information of file is successively migrated to target device, and target device is obtaining later migration to mesh After the authority information of marking device, can be migrated to the power of target device to relatively early according to later migration to the authority information of target device Limit information is updated.For example, target device is migrated to the second authority of target device according to transformational rule between authority to later Information is changed, the first authority information after being changed, with conversion after the first authority information replace relatively early migration to target First authority information of equipment.
But, the quantity of information that the different types of authority information of file is included may be different, and weigh between different vendor The rule of limit conversion is also different, causes to be migrated to target device to relatively early according to later migration to the authority information of target device When authority information is updated, the authority information after renewal migrates inconsistent to the authority information of target device with compared with early, causes Authority information after file migration is inconsistent with the authority information before file migration.
The content of the invention
The embodiment of the present invention provides a kind of method of migrated file authority, device and system, for solving file migration The inconsistent problem of authority information before rear authority information and file migration.
In a first aspect, the embodiment of the present invention provides a kind of method of migrated file authority, the method is used for migration server First authority information and the second authority information of file in source device are migrated to target device, the migration server can divide Do not communicated with source device and target device by the first agreement and second protocol, the first authority information includes described the The file permission that one agreement is supported, the second authority information includes the file permission that the second protocol is supported.The method include as Lower step:First, migration server reads the first authority information of file by the first agreement from source device, and by described the First authority information is sent to target device by one agreement;And, migration server sends to the target device and locks The instruction of permission transform, the instruction of the locked authority conversion is receiving the second of the file for indicating the target device During authority information, keep first authority information constant, second authority information includes the file power that second protocol is supported Limit;Then, the migration server reads second authority of the file by the second protocol from the source device Information, and second authority information is sent to by the target device by the second protocol;The target device is connecing After receiving second authority information, keep first authority information constant according to the instruction of locked authority conversion.Its In, migration server to the instruction that the target device sends locked authority conversion need to send the second authority earlier than to target device Information, can send the first authority information, it is also possible to be later than to target device and send the first authority information earlier than to target device.
In this implementation, migration server is respectively believed the first authority of file by the first agreement and second protocol Breath and the second authority information are migrated to target device from source device, and the second authority information of rear migration is being sent to target Before equipment, migration server sends the instruction of locked authority conversion to target device, and target device is moved upon receipt During the second authority information for moving, keep the first authority information for first migrating constant, it is to avoid target device according to rear migration second Authority information the first authority information for first migrating is updated caused by the authority information of file and source in target device 300 The inconsistent problem of the authority information of file in equipment, the authority information for realizing file before and after migration is consistent.
In a kind of optional implementation, the target device is received after second authority information, preserve this second Authority information, to the migration server sending permission success response is migrated;The migration server is moved in the reception authority After moving success response, the instruction for releasing permission transform locking is sent to the target device, the releasing permission transform locking Instruct for indicating that the target device, when second authority information of the file is received, is believed according to second authority Cease first authority information to the file to update.In this implementation, migration server is it is determined that the first power of file After limit information and the second authority information are from source device Successful migration to target device, send to target device and release permission transform The instruction of locking, so as in user to target device in file the second authority information be updated after, target device being capable of root First authority information of file of the second authority information after according to renewal to preserving carries out correspondence renewal, it is ensured that target device Chinese First authority information of part is synchronous with the user right holding that the second authority information is characterized.
In a kind of optional implementation, the migration server is believed first authority by first agreement When breath is sent to target device, the target device is given by the data of the file in the lump.This implementation can be realized simultaneously The authority information of the data of file and file is migrated the efficiency that file migration is improved to target device from source device.
In a kind of optional implementation, the migration server is read by first agreement from the source device During first authority information, the instruction of state locking is sent to the source device in the lump, the instruction of the state locking is used for Indicate that the source device is refused to the data of the file, first authority information of the file and the institute of the file State the renewal operation of the second authority information.This implementation can read the first authority of file in migration server from source device After information, the data of file, the first authority information of file and the second authority information are constant in holding source device, it is to avoid moving During shifting server migrates the authority information of the data of file or file to target device from source device, source device Chinese The authority information of the data of part or file occur caused by change institute after migration in source device and target device the data of file or The inconsistent situation of the authority information of file.
In a kind of optional implementation, the migration server by the second protocol by second authority Information is sent to after the target device, and to the source device instruction of releasing state locking, the releasing state locking are sent Instruction receive to the file, first authority information of the file and the file for indicating the source device Second authority information renewal operation.This implementation can migrate the authority information of file to target device Afterwards, the state locking of the authority information of file and file in source device is released so that user can be to the data of file or text The authority information of part is updated operation.
In a kind of optional implementation, the migration server is read by the second protocol from the source device During second authority information, the data of the file are read from the source device in the lump;The migration server is by described When second authority information is sent to target device by second protocol, the data of the file are set to the target in the lump It is standby;The target device receives the file, and judges whether to store the file, does not if so, then preserve the file, no Then, the file is preserved.In this implementation, migration server can be after the data of file in source device be modified, will more Change the Data Migration of rear file to target device, it is ensured that the data of file and the authority information of file set with source in target device It is consistent in standby.
In a kind of optional implementation, the first agreement can be SMB (Server Message Block, SMB) agreement, accesses control list that the first authority information is supported by SMB agreements (Access Control List, ACL) information;Second protocol can be NFS (Network File System, NFS) agreement, the second authority information It is pattern (Mode) information for control of authority.Or, the first agreement is NFS protocol, and the first authority information is for authority The Mode information of control, second protocol is SMB agreements, and the second authority information is ACL information.
Second aspect, the embodiment of the present invention provide migrated file authority device, the device be used for realize first aspect or The function of migration server in any possible realization of first aspect.Specifically, the device is included for performing above-mentioned first By the module of migration server execution step in method in any possible realization of aspect or first aspect.
The third aspect, the embodiment of the present invention provide migrated file authority device, the device be used for realize first aspect or The function of migration server in any possible realization of first aspect.Specifically, the device is included for performing above-mentioned first By the module of target device execution step in method in any possible realization of aspect or first aspect.
Fourth aspect, the embodiment of the present invention provides a kind of migration server, for realizing first aspect or first aspect The function of migration server arbitrarily in possible realization.Specifically, migration server includes that the first communication interface, the second communication connect Mouth and processor;First communication interface, for source device and target device with the first protocol communication;Described second leads to Letter interface, for being communicated with second protocol with source device and target device;The processor, is used for:Connect by the first communication Mouthful and the second communication interface perform in any possible realization of above-mentioned first aspect or first aspect method in by migrating Server execution step.
5th aspect, the embodiment of the present invention provides a kind of computing device, for realizing appointing for first aspect or first aspect Anticipate the function of target device in possible realization.Specifically, computing device connects including processor, memorizer and the third communication Mouth, fourth communication interface;The third communication interface, for migration server with the first protocol communication;The fourth communication Interface, for being communicated with second protocol with the migration server;The processor, is used for:By the third communication interface And the fourth communication interface perform in any possible realization of above-mentioned first aspect or first aspect method in by mesh Marking device execution step.
6th aspect, the embodiment of the present invention provides a kind of system of migrated file authority, the system include migration server, Source device and target device, wherein, source device is used for the second authority letter of the first authority information of storage file and file Breath;Migration server is used to perform in the method in any possible realization of above-mentioned first aspect or first aspect by migration clothes The step of business device is performed, target device is used to perform the method in any possible realization of above-mentioned first aspect or first aspect In the step of performed by target device, and then realize moving first authority information and the second authority information of file in source device Move to target device.
7th aspect, the embodiment of the present invention provides a kind of computer-readable medium, for storing computer program, the calculating Machine program is included for the instruction of the method in any possible realization for performing first aspect or first aspect.
The present invention can also be further combined to provide more realities on the basis of the realization that above-mentioned each side are provided It is existing.
Description of the drawings
Technical scheme in order to be illustrated more clearly that the embodiment of the present invention, below will be to making needed for embodiment description Accompanying drawing is briefly introduced.
Fig. 1 is the schematic diagram of file migratory system in the embodiment of the present invention;
Fig. 2 is the structural representation of migration server in the embodiment of the present invention;
Fig. 3 is the structural representation of target device in the embodiment of the present invention;
Fig. 4 is the schematic flow sheet of migrated file authority method in the embodiment of the present invention;
Fig. 5 is the further refinement schematic flow sheet of migrated file authority method in the embodiment of the present invention;
Fig. 6 is the structural representation of device 500 in the embodiment of the present invention;
Fig. 7 is the structural representation of device 600 in the embodiment of the present invention.
Specific embodiment
Generally, source device and target device are the equipment of different vendor, are difficult to directly enter style of writing between different vendor's equipment The migration of part and file permission information, the mark for needing third-party migration server to support by source device and target device The migration of file and file permission information between quasi- protocol realization source device and target device.Specifically, migration server from Source device reads the authority information of file and file, then sets the authority information write target of the file of reading and file It is standby.
In prior art, the migration of file permission information is generally carried out in the following way:
Mode 1, when file system supports different types of first authority information and the second authority information, migration service Device is by supporting that the first agreement of the first authority information migrates the first authority information to target device, then, source from source device The first authority information conversion that equipment is obtained to migration obtains the second authority information.
Mode 2, migration server is first passed through supports that the first agreement of the first authority information sets the first authority information from source It is standby to migrate to target device, then by supporting that the second protocol of the second authority information migrates the second authority information from source device To target device, but, after the second authority information that target device is migrated after acquisition, can be according to the second authority information to first moving The first authority information for moving is updated, this is because target device can give tacit consent to a type of authority according to the file for receiving Information is updated to the other kinds of authority information of file, so that the user operation that all kinds of authority informations of file are characterized Authority is consistent.Therefore, mode 2 is substantially identical with mode 1, is to realize that authority is migrated according to the authority information of rear migration.
However, the quantity of information that the different types of authority information of file is included may be different, and weigh between different vendor The rule of limit conversion is also different, the authority before authority information and migration in causing above two migration authority mode, after migration Information is inconsistent.
For example, the first authority information of file is A1, and the second authority information of file is B, the second authority information B by B1 with And B2 compositions, wherein, according to the transformational rule between the first authority information and the second authority information, A1 can be converted to B1, and B1 can To be converted to A1, therefore, the quantity of information of the first authority is less than the quantity of information of the second authority.Migration server is by the first authority information A1 is migrated to target device from source device, and target device is changed according to permission transform rule to the first authority information A1, raw Into the second authority information B1, the file permission information that the second authority information B1 for generating is preserved as in target device.Can See, the second authority information B1 that target device is preserved occurs information and loses compared to the second authority information B preserved in source device.
Again for example, the transformational rule in source device and target device between the first authority information and the second authority information is not Meanwhile, user is updated to the second authority information of file in source device, forms authority information B, and source device is according to the first power Transformational rule 1 between limit information and the second authority information is changed to authority information B, generates authority information A1, and this is weighed Limit information A1 is used as the first new authority information.Then, migration server migrates authority information B to target device, and target sets It is standby authority information B is changed according to the transformational rule 2 between the first authority information and the second authority information, generate authority letter Breath A2, using authority information A2 as the first new authority information.It can be seen that, in the authority information in target device and source device Authority information is inconsistent.
Believe with the authority before file migration to solve the authority information present in prior art after above-mentioned file migration The inconsistent problem of breath, the embodiment of the present invention provides a kind of method of file permission migration, device and system.Below by attached Figure and specific embodiment are described in detail to embodiment of the present invention technical scheme.
Fig. 1 is the schematic diagram of file migratory system in the embodiment of the present invention, and the system sets including migration server 100, source For 200 and target device 300, migration server 100, source device 200 and target device 300 can be various types of Computing device, such as computer, panel computer, smart mobile phone.Migration server 100, source device 200 and target device 300 It is common to support at least two communication protocols, for convenience of description, in the embodiment of the present invention with three support the first agreement jointly with And the method for migrated file authority is explained as a example by second protocol, wherein, the first agreement supports the first power of transmission file Limit information, second protocol supports the second authority information of transmission file.
Wherein, source device 200 is used for the first authority information of storage file and the second authority information of file, and this first Authority information includes the file permission that the first agreement is supported, second authority information includes the file permission that second protocol is supported;
Migration server 100 is used for:First authority information of file, Yi Jitong are read from source device by first agreement Cross first agreement and first authority information is sent to into target device;
Target device 300 is used for:First authority information that migration server 100 sends is received by first agreement, And preserve first authority information;
Migration server 100 is additionally operable to:The instruction of locked authority conversion is sent to target device 300, the locked authority turns The instruction changed, when second authority information of this document is received, keeps first authority information not for target device 300 Become;
Target device 300 is additionally operable to:Receive the instruction of the locked authority conversion;
Migration server 100 is additionally operable to:The second authority letter of this document is read from source device 200 by the second protocol Breath, and second authority information is sent to by target device 300 by the second protocol;
Target device 300 is additionally operable to:Second authority information is received, and keeps being somebody's turn to do according to the instruction of the locked authority conversion First authority information is constant.
In above-mentioned file migration system, migration server 100 passes through respectively the first agreement and second protocol by file First authority information and the second authority information are migrated to target device 300 from source device 200, and are weighed in second by rear migration Limit information is sent to before target device 300, and migration server 100 sends the instruction of locked authority conversion to target device 300, During the second authority information that target device 300 is migrated upon receipt, keep the first authority information for first migrating constant, keep away Exempt from first authority information of second authority information of the target device 300 according to rear migration to first migrating and be updated mesh caused by institute The authority information of the file problem inconsistent with the authority information of file in source device 200 in marking device 300, before realizing migration Afterwards the authority information of file is consistent.
Optionally, in file migration system, target device 300 is additionally operable to:Second authority information is preserved, and to migration The sending permission of server 100 migrates success response;
Migration server 100 is additionally operable to:The authority migration success response is received, is sent to target device 300 and is released authority The instruction of conversion locking, the instruction of releasing permission transform locking for target device 300 receive this document this During two authority informations, first authority information of this document is updated according to second authority information.
Because migration server is it is determined that first authority information and the second authority information of file are successfully moved from source device After moving to target device, the instruction for releasing permission transform locking is sent to target device, so as to Chinese to target device in user After second authority information of part is updated, target device can according to renewal after second authority information to the file that preserves First authority information carries out correspondence renewal, it is ensured that the first authority information of file is characterized with the second authority information in target device User right keep synchronous.
With reference to Fig. 1 and Fig. 2, migration server 100 include processor 110, memorizer 120, the first communication interface 130 with And second communication interface 140.
Wherein, the first communication interface 130 is used to be based on the first protocol communication with source device 200 and target device 300;The Two communication interfaces 140 are used to be communicated based on second protocol with source device and target device.Specifically, the first communication interface 130 With the fifth communication interface 230 in source device 200 be based on the first protocol communication, and with target device 300 in the third communication Interface 330 is based on the first protocol communication;Second communication interface 140 is based on second with the 6th communication interface 240 in source device 200 Protocol communication, and it is based on the first protocol communication with the fourth communication interface 340 in target device 300.
Memorizer 120 is used for data, file permission information and the instruction of storage file;Processor 110 is deposited for execution Instruction in reservoir 120, to perform following steps in the instruction for performing:
First authority information of file is read with the first agreement from source device 200 by the first communication interface 130, and, By the first communication interface 130 the first authority information of file is sent to target device 300 with the first agreement;And, pass through Second communication interface 140 reads the second authority information of file with second protocol from source device 200, and, by the second communication Interface 140 is sent the second authority information of file to target device 300 with second protocol;And, connect by the second communication Mouth 140 is sent the second authority information of file to before target device 300 with second protocol, by the first communication interface 130 Or second communication interface 140 instruction of locked authority conversion is sent to target device 300, the instruction of locked authority conversion is used for Target device 300 keeps the first authority information of file constant when the second authority information of file is received.
Optionally, the first communication interface 130 is arbitrary with the second communication interface 140 is additionally operable to:Receive target device 300 The authority migration success response sent, the authority migrates success response by the processor 310 of target device 300 in target device 300 Preserve and generated after second authority information;
Processor 110 is additionally operable to:The instruction for releasing permission transform locking is generated, releasing the instruction of permission transform locking is used for Target device when the second authority information of file is received, according to the second authority information to the first authority information of file more Newly;And the instruction of the releasing permission transform locking is sent to mesh by the first communication interface 130 or the second communication interface 140 Marking device 300.
Optionally, processor 110 is additionally operable to:The instruction of generation state locking, the instruction of state locking is used to indicate that source sets The renewal operation of standby the second authority information for refusing the data of absolute file, the first authority information of file and file;And pass through The instruction of the state locking is sent to source device 200 by the first communication interface 130 or the second communication interface 140.Wherein, migration clothes Business device 100 to the instruction that source device 200 sends the state locking can read the first authority information earlier than from source device 200, or Person sends in the lump the instruction of the state locking when the request for reading the first authority information is sent to source device 200.
Optionally, processor 110 is additionally operable to:In the second communication interface 140 the second authority information is sent out by second protocol After giving target device 300, the instruction of releasing state locking is generated, the instruction of releasing state locking is used to indicate that source device receives Renewal operation to the second authority information of file, the first authority information of file and file;And by the first communication interface 130 or second communication interface 140 instruction of releasing state locking is sent to source device 200.
Refer to Fig. 1 and Fig. 3, target device 300 include processor 310, memorizer 320, third communication interface 330 with And fourth communication interface 340.
Wherein, third communication interface 330 is used to be based on the first protocol communication with migration server 100;Fourth communication interface 340 are used to be communicated based on second protocol with migration server 100.
Memorizer 320 is used for data, file permission information and the instruction of storage file;Processor 310 is deposited for execution Instruction in reservoir 320, with the file for receiving third communication interface 330 from migration server 100 in the instruction for performing First authority information is stored among memorizer 320;And, the text that fourth communication interface 340 is received from migration server 100 Second authority information of part is stored among memorizer 320;And, respond third communication interface 330 or fourth communication interface 340 The instruction of the locked authority conversion received from migration server 100, by the second authority information of file memorizer 320 is being stored in Among when, keep the first authority information of file constant, the instruction of locked authority conversion by migration server 100 processor 110 generate and target device 300 received the instruction of locked authority conversion before the second authority information is received.
Optionally, processor 310 is additionally operable to:Second authority information of file is stored in after memorizer 320, authority is generated Migration success response;And by third communication interface 330 or fourth communication interface 340 by the authority migrate success response send to Migration server 100;
It is arbitrary in third communication interface 330 or fourth communication interface 340 to be additionally operable to:Receive from migration server 100 and release The instruction of permission transform locking, the instruction of the releasing permission transform locking is generated by the processor 110 of migration server 100, is used When indicating that processor 310 receives the second authority information of file in target device 300, according to the second authority information to file First authority information updates.
Fig. 1 is refer to, in embodiments of the invention, source device 200 includes processor 210, memorizer 220, fifth communication The communication interface 240 of interface 230 and the 6th.Those of ordinary skill in the art can be according to the realization side of above-mentioned target device 300 Formula determines the implementation of source device 200, and to avoid repeating, here is no longer described in detail to the implementation of source device 200.
It should be noted that above-mentioned processor 110, processor 210 and processor 310 can be a treatment element, It can also be the general designation of multiple treatment elements.Above-mentioned processor can be central processing unit (Central Processing Unit, CPU), or specific integrated circuit (Application Specific Intergrated Circuit, ASIC), or be arranged to implement the embodiment of the present invention one or more integrated circuits, for example:One or more micro- places Reason device (Digital Singnal Processor, DSP), or, one or more field programmable gate array (Field Programmable Gate Array, FPGA).
Memorizer 120, memorizer 220 and memorizer 320 can be a memory element, or multiple storages unit The general designation of part.Above-mentioned memorizer can include random access memory (Random-Access Memory, RAM), it is also possible to including non- Volatile memory (Non-Volatile Memory, NVM), such as disk memory, flash memory (Flash) etc..
First communication interface 130 and the second communication interface 140 can be integrated among same communication unit, it is also possible to point Do not belong to two independent communication units.In the same manner, fifth communication interface 230 can be integrated in same with the 6th communication interface 240 Among individual communication unit, it is also possible to be belonging respectively to two independent communication units.Third communication interface 330 and fourth communication interface 340 can be integrated among same communication unit, it is also possible to be belonging respectively to two independent communication units.
The embodiment of the present invention also provides a kind of migrated file authority method, in the present embodiment migration server, source device with And the realization of target device is referred to Fig. 1 to Fig. 3.Fig. 4 is the schematic flow sheet of the migrated file authority method, the method bag Include following steps:
Step 401:Migration server reads the first authority information of file, the first authority by the first agreement from source device Information includes the file permission that the first agreement is supported.
Step 402:First authority information is sent to target device by migration server by the first agreement.
Step 403:Target device preserves the first authority information.
Step 404:Migration server sends the instruction of locked authority conversion, the instruction of locked authority conversion to target device For target device when the second authority information of file is received, the first authority information of holding is constant, and the second authority includes The file permission that second protocol is supported.
Wherein, migration server can pass through the instruction that the first agreement sends locked authority conversion to target device, also may be used So that the instruction of locked authority conversion is sent to target device by second protocol, or, migration server by the first agreement, the Other agreements outside two agreements send the instruction of locked authority conversion to target device.
Step 405:Migration server reads the second authority information of file by second protocol from source device.
Step 406:Second authority information is sent to target device by migration server by second protocol.
Step 407:Target device preserves the second authority information, and keeps the first authority according to the instruction of locked authority conversion Information invariability.
It should be noted that step 404 was performed before step 406, but it is not limited with step 401, step 402, step Sequencing between rapid 403 and step 405, such as step 404 can be in step 401, step 402, step 403, steps 405 And perform before either step in step 406, it is also possible to arbitrary step in step 401, step 402, step 403, step 405 Perform after rapid and before step 406.In addition, the file in the embodiment of the present invention is not limited to a file, or Two or more files.
In the technical scheme of above-mentioned steps 401 to step 407, migration server first passes through the first agreement by the first of file Authority information is migrated to target device from source device, then is migrated the second authority information of file from source device by second protocol To target device.Because migration server is being migrated the second authority information of file to target by second protocol from source device Equipment, to target device the instruction of locked authority conversion is sent, therefore, target device, will not when the second authority information is received It is updated according to the first authority information of file of second authority information to having preserved, so, the file in target device First authority information is consistent with the first authority information of file in source device, the second authority information of file and source in target device The second authority information of file is consistent in equipment, and the authority information for realizing file before and after migration is consistent.
Optionally, in the embodiment of the present invention, the first agreement can be SMB (Server Message Block, SMB) agreement, accesses control list that the first authority information is supported by SMB agreements (Access Control List, ACL) information;Second protocol can be NFS (Network File System, NFS) agreement, the second authority information It is pattern (Mode) information for control of authority.Or, the first agreement is NFS protocol, and the first authority information is for authority The Mode information of control, second protocol is SMB agreements, and the second authority information is ACL information.
Migration server reads the side of the authority information of file and file by SMB agreements, NFS protocol from source device Formula, and the authority information of file and file is sent to the implementation of target device and asked by SMB agreements, NFS protocol With reference to various technological means in prior art, the embodiment of the present invention is not described in detail.
Optionally, in the embodiment of the present invention, Fig. 5 is refer to, after step 407, is also comprised the steps:
Step 408:Target device to migration server sending permission migrates success response.
Step 409:Migration server receives authority migration success response, sends to target device and releases permission transform locking Instruction, release permission transform locking instruction for target device receive file the second authority information when, according to Second authority information updates to the first authority information of file.
After the authority migration success response is received, the authority for determining file is migrated successfully migration server, is set to target Preparation send the instruction for releasing permission transform locking, so as in user to target device in the second authority information of file be updated Afterwards, target device can according to renewal after the second authority information to preserve file the first authority information carry out correspondence more Newly, it is ensured that the first authority information of file is synchronous with the user right holding that the second authority information is characterized in target device.
Optionally, in the embodiment of the present invention, the instruction of the locked authority conversion is additionally operable to target device and is receiving text During the first authority information of part, keep the second authority information of file constant;The instruction of the releasing permission transform locking is additionally operable to Target device when the first authority information of file is received, according to the first authority information to the second authority information of file more Newly.
Optionally, in the embodiment of the present invention, the first authority information is sent to target by migration server by the first agreement During equipment, by the data of file to target device.Wherein, migration server can read the by the first agreement from source device During one authority information, from source device the data of file are read.
Or, when the second authority information is sent to target device by migration server by second protocol, by the number of file According to target device.Wherein, migration server can be when the second authority information be read, from source by second protocol from source device Equipment reads the data of file.
This implementation can be realized while the authority information of the data of file and file is migrated to mesh from source device Marking device, improves the efficiency of file migration.
Optionally, in the embodiment of the present invention, Fig. 5 is continued referring to, migrated file authority method also comprises the steps:
Step 410:Migration server sends the instruction of state locking to source device, and the instruction of state locking is used to indicate source Equipment refuses the renewal operation of the second authority information of absolute file, the first authority information of file and file.
Step 410 can be performed before step 401, or, in execution step 401, migration server is by the first association When discussing the request of the first authority for sending acquisition file to source device, the instruction of state locking is sent to source device in the lump.
This implementation can keep file after the first authority information that migration server reads file from source device Data, the first authority information of file and the second authority information are constant, it is to avoid in migration server by the data or text of file During the authority information of part is migrated to target device from source device, the authority information of the data of file or file in source device There are caused by change institute after migration the inconsistent feelings of the data of file or the authority information of file in source device and target device Shape.
Optionally, in the embodiment of the present invention, with reference to the scheme of step 410, after step 405, also comprise the steps:
Step 411:Migration server sends the instruction of releasing state locking to source device, and the instruction for releasing state locking is used Receive the renewal operation of the second authority information to file, the first authority information of file and file in instruction source device.
It should be noted that step 411 is limited perform after step 405, but do not limit it and perform after step 405 Other steps between sequencing, such as step 411 can perform before step 406, it is also possible to hold after step 409 OK.
This implementation can the authority information of file is migrated to target device, release in source device file and The state locking of the authority information of file so that user can be updated behaviour to the authority information of the data of file or file Make.
In another optional implementation of the embodiment of the present invention, in step 401, migration server is by the first agreement from source Equipment is read after the first authority information of file, and user can be updated operation to the file in source device;
In step 405, migration server by second protocol from source device read the second authority information when, from source device read Take the data of file;
In step 406, when the second authority information is sent to target device by migration server by second protocol, by file Data to target device;
Target device judges whether to preserve the data of this document after the data for receiving file, if preserved, Give up the data of this document of reception, if do not preserved, preserve the data of this document.Wherein, target device is received to preserve This document data, including two kinds of situations:First, not preserving this document in target device;Although second, target device is The data of this document are preserved, but the data of the file for having preserved are inconsistent with the data of the file for receiving.
In this implementation, migration server can be after the data of file in source device be modified, by file after change Data Migration to target device, it is ensured that in target device one in the authority information of the data of file and file and source device Cause.
Fig. 6 is a kind of schematic diagram of the device 500 of migrated file authority provided in an embodiment of the present invention, and the device 500 is made For migration server, for first authority information and the second authority information of file in source device to be migrated to target device. Device 500 includes:
First read module 501, for reading the first authority information of file, the first power from source device by the first agreement Limit information includes the file permission that the first agreement is supported;
First sending module 502, for the first authority information to be sent to into target device by the first agreement;
Second sending module 503, for sending the instruction of locked authority conversion, the finger of locked authority conversion to target device Make for target device when the second authority information of file is received, keep the first authority information constant, the second authority letter Breath includes the file permission that second protocol is supported;
Second read module 504, for reading the second authority information of file from source device by second protocol;
3rd sending module 505, for the second authority information to be sent to into target device by second protocol.
Optionally, in the embodiment of the present invention, device 500 also includes:
First receiver module 506, for receiving the authority migration success response of target device transmission;
4th sending module 507, for sending the instruction for releasing permission transform locking to target device, releases permission transform The instruction of locking is used for target device when the second authority information of file is received, according to the second authority information to file First authority information updates.
Optionally, in the embodiment of the present invention, the first sending module 502 is additionally operable to:By the first agreement by the data of file To target device.
Optionally, in the embodiment of the present invention, device 500 also includes:
5th sending module 508, for reading the first authority letter from source device by the first agreement in the first read module During breath, to source device send state locking instruction, state locking instruction for indicate source device refuse absolute file data, The renewal operation of the first authority information of file and the second authority information of file.
Optionally, in the embodiment of the present invention, device 500 also includes:
6th sending module 509, for the second authority information to be sent to into mesh by second protocol in the 3rd sending module After marking device, the instruction of releasing state locking is sent to source device, the instruction of releasing state locking is used to indicate that source device receives Renewal operation to the second authority information of file, the first authority information of file and file.
The realization of each module in said apparatus 500 is referred in Fig. 4 and Fig. 5 each step by performed by migration server Rapid implementation.
Fig. 7 is the device 600 of migrated file authority provided in an embodiment of the present invention, and device 600 is used for as target device First authority information and the second authority information of the file from source device migration are received from migration server.Device 600 includes:
First receiver module 601, for the first authority information of file to be received from migration server by the first agreement, the One authority information includes the file permission that the first agreement is supported;
Second receiver module 602, for receiving the instruction of the locked authority conversion of migration server transmission, locked authority turns The instruction changed, when the second authority information of file is received, keeps the first authority information constant, the second authority for instruction device Information includes the file permission that second protocol is supported;
3rd receiver module 603, for receiving the second authority information of file from migration server by second protocol;
Instruction respond module 604, after receiving the second authority information in the 3rd receiver module, turns according to locked authority The instruction changed keeps the first authority information constant.
Optionally, in the embodiment of the present invention, device 600 also includes:
Sending module 605, for after the 3rd receiver module receives the second authority information, to migration server sending permission Migration success response;
4th receiver module 606, for receiving the instruction for releasing permission transform locking of migration server transmission, releases power The instruction of limit conversion locking is used for instruction device when the second authority information of file is received, according to the second authority information to file The first authority information update.
The realization of each module in said apparatus 600 is referred in Fig. 4 and Fig. 5 each step by performed by target device Implementation.
The embodiment of the present invention also provides a kind of computer-readable medium, for storing computer program, the computer program Including for performing the instruction of the corresponding file permission moving methods of Fig. 4 and Fig. 5.
Those skilled in the art are it should be appreciated that the embodiment of the embodiment of the present invention can be provided as method, system or calculate Machine program product.Therefore, the embodiment of the present invention can using complete hardware embodiment, complete software embodiment or with reference to software and The form of the embodiment of hardware aspect.And, the embodiment of the present invention can using wherein include computer at one or more can With in the computer-usable storage medium (including but not limited to disk memory, CD-ROM, optical memory etc.) of program code The form of the computer program of enforcement.
The embodiment of the present invention is with reference to method according to embodiments of the present invention, equipment (system) and computer program Flow chart and/or block diagram describing.It should be understood that can be by the instruction flowchart of computer program and/or block diagram Each flow process and/or square frame and flow chart and/or the flow process in block diagram and/or square frame combination.These meters can be provided The instruction of calculation machine program is to general purpose computer, special-purpose computer, Embedded Processor or other programmable data processing devices Processor is producing a machine so that by the instruction of computer or the computing device of other programmable data processing devices Produce the work(for realizing being specified in one flow process of flow chart or one square frame of multiple flow processs and/or block diagram or multiple square frames The device of energy.
Obviously, those skilled in the art can carry out various changes and modification without deviating from this to the embodiment of the present invention The spirit and scope of bright embodiment.So, if these modifications of the embodiment of the present invention and modification belong to embodiment of the present invention power Within the scope of profit requirement and its equivalent technologies, then the embodiment of the present invention is also intended to comprising these changes and modification.

Claims (15)

1. a kind of method of migrated file authority, it is characterised in that methods described includes:
Migration server reads the first authority information of file by the first agreement from source device, and the first authority information includes described The file permission that first agreement is supported;
First authority information is sent to target device by the migration server by first agreement;
The migration server sends the instruction of locked authority conversion, the instruction of the locked authority conversion to the target device For indicating the target device when the second authority information of the file is received, keep first authority information constant, Second authority information includes the file permission that second protocol is supported;
The migration server reads second authority information of the file by the second protocol from the source device, And second authority information is sent to by the target device by the second protocol;
The target device after second authority information is received, according to the instruction of locked authority conversion keeps First authority information is constant.
2. method according to claim 1, it is characterised in that also include:
The target device preserves second authority information, and to the migration server sending permission success response is migrated;
The migration server receives the authority and migrates success response, sends to the target device and releases permission transform locking Instruction, the instruction of releasing permission transform locking receiving described the second of the file for indicating the target device During authority information, first authority information of the file is updated according to second authority information.
3. method according to claim 1 and 2, it is characterised in that also include:
When first authority information is sent to target device by the migration server by first agreement, by the text The data of part give the target device.
4. method according to claim 3, it is characterised in that also include:
The migration server by first agreement from the source device read first authority information when, to the source Equipment sends the instruction of state locking, and the instruction of the state locking refuses the number to the file for indicating the source device According to the renewal operation of, first authority information of the file and second authority information of the file.
5. method according to claim 4, it is characterised in that also include:
The migration server after second authority information is sent to into the target device by the second protocol, to The source device sends the instruction of releasing state locking, and the instruction of the releasing state locking is used to indicate that the source device receives Renewal behaviour to second authority information of the file, first authority information of the file and the file Make.
6. method as requested any one of 1 to 5, it is characterised in that first agreement is SMB SMB One in agreement, NFS NFS protocol, the second protocol is another;It is SMB associations in first agreement View, the second protocol be NFS protocol when, first authority information be access control list ACL information, second authority Information is the pattern Mode information for control of authority;First agreement be NFS protocol, the second protocol be SMB association During view, first authority information is the Mode information for control of authority, and second authority information is ACL information.
7. a kind of device of migrated file authority, it is characterised in that include:
First read module, for reading the first authority information of file, the first authority information from source device by the first agreement Including the file permission that first agreement is supported;
First sending module, for first authority information to be sent to into target device by first agreement;
Second sending module, for sending the instruction of locked authority conversion to the target device, the locked authority conversion Instruct for indicating that the target device, when the second authority information of the file is received, keeps first authority information not Become, second authority information includes the file permission that second protocol is supported;
Second read module, for reading second authority letter of the file from the source device by the second protocol Breath;
3rd sending module, for second authority information to be sent to into the target device by the second protocol.
8. device according to claim 7, it is characterised in that also include:
First receiver module, for receiving the authority migration success response that the target device sends;
4th sending module, for sending the instruction for releasing permission transform locking to the target device, the releasing authority turns The instruction of locking is changed for indicating the target device when second authority information of the file is received, according to described the Two authority informations update to first authority information of the file.
9. the device according to claim 7 or 8, it is characterised in that
First sending module is additionally operable to:The target device is given by first agreement by the data of the file.
10. device according to claim 9, it is characterised in that also include:
5th sending module, for reading described the from the source device by first agreement in first read module During one authority information, the instruction of state locking is sent to the source device, the instruction of the state locking is used to indicate the source Equipment refuses second authority to the data of the file, first authority information of the file and the file The renewal operation of information.
11. devices according to claim 10, it is characterised in that also include:
6th sending module, for being sent second authority information by the second protocol in the 3rd sending module After to the target device, the instruction of releasing state locking is sent to the source device, the instruction of the releasing state locking is used In indicating that the source device receives to the file, first authority information of the file and the file described the The renewal operation of two authority informations.
12. a kind of devices of migrated file authority, it is characterised in that include:
First receiver module, for by the first agreement from migration server receive file the first authority information, described first Authority information includes the file permission that first agreement is supported;
Second receiver module, for receiving the instruction of the locked authority conversion that the migration server sends, the locked authority The instruction of conversion keeps first authority information for indicating described device when the second authority information of the file is received Constant, second authority information includes the file permission that second protocol is supported;
3rd receiver module, for receiving second power of the file from the migration server by the second protocol Limit information;
Instruction respond module, after receiving second authority information in the 3rd receiver module, according to the locking The instruction of permission transform keeps first authority information constant.
13. devices according to claim 12, it is characterised in that also include:
Sending module, for after the 3rd receiver module receives second authority information, sending out to the migration server Authority is sent to migrate success response;
4th receiver module, for receiving the instruction for releasing permission transform locking that the migration server sends, the releasing The instruction of permission transform locking is used to indicate described device when second authority information of the file is received, according to described Second authority information updates to first authority information of the file.
14. a kind of systems of migrated file authority, it is characterised in that including migration server, source device and target device;
Wherein, the source device be used for storage file the first authority information and file the second authority information, described first Authority information includes the file permission that the first agreement is supported, second authority information includes the file power that second protocol is supported Limit;
The migration server is used for:First authority information of file, Yi Jitong are read from source device by first agreement Cross first agreement and first authority information is sent to into target device;
The target device is used for:First authority letter that the migration server sends is received by first agreement Breath, and preserve first authority information;
The migration server is additionally operable to:The instruction of locked authority conversion is sent to the target device, the locked authority turns The instruction changed keeps the first authority letter for indicating the target device when the second authority information of the file is received Breath is constant;
The target device is additionally operable to:Receive the instruction of the locked authority conversion;
The migration server is additionally operable to:Second power of the file is read from the source device by the second protocol Limit information, and second authority information is sent to by the target device by the second protocol;
The target device is additionally operable to:Second authority information is received, and is kept according to the instruction of locked authority conversion First authority information is constant.
15. systems according to claim 14, it is characterised in that also include:
The target device is additionally operable to:Second authority information is preserved, and is migrated into the migration server sending permission Work(is responded;
The migration server is additionally operable to:The authority migration success response is received, is sent to the target device and is released authority The instruction of conversion locking, the instruction of the releasing permission transform locking is receiving the file for indicating the target device During second authority information, first authority information of the file is updated according to second authority information.
CN201611055336.3A 2016-11-25 2016-11-25 A kind of method, apparatus and system of migrated file permission Active CN106649600B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201611055336.3A CN106649600B (en) 2016-11-25 2016-11-25 A kind of method, apparatus and system of migrated file permission
PCT/CN2017/081337 WO2018094962A1 (en) 2016-11-25 2017-04-21 Method, apparatus and system for migrating file permission

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611055336.3A CN106649600B (en) 2016-11-25 2016-11-25 A kind of method, apparatus and system of migrated file permission

Publications (2)

Publication Number Publication Date
CN106649600A true CN106649600A (en) 2017-05-10
CN106649600B CN106649600B (en) 2019-07-09

Family

ID=58812082

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611055336.3A Active CN106649600B (en) 2016-11-25 2016-11-25 A kind of method, apparatus and system of migrated file permission

Country Status (2)

Country Link
CN (1) CN106649600B (en)
WO (1) WO2018094962A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108446337A (en) * 2018-02-28 2018-08-24 新华三云计算技术有限公司 A kind of lock resources control permission moving method and device
CN109446825A (en) * 2018-10-22 2019-03-08 郑州云海信息技术有限公司 A kind of extended method and device of access control right
CN110086836A (en) * 2018-01-25 2019-08-02 华为技术有限公司 The method and apparatus for obtaining metadata
CN110941599A (en) * 2019-11-12 2020-03-31 浪潮电子信息产业股份有限公司 Authority control method and device, electronic equipment and storage medium
US10997132B2 (en) 2017-02-07 2021-05-04 Oracle International Corporation Systems and methods for live data migration with automatic redirection

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101626378A (en) * 2009-08-14 2010-01-13 成都市华为赛门铁克科技有限公司 Method, device and system for managing authority information
CN102281141A (en) * 2011-07-26 2011-12-14 成都市华为赛门铁克科技有限公司 Document permission management method, apparatus and system
CN102369713A (en) * 2011-08-29 2012-03-07 华为技术有限公司 Automatic removing method and device of system configuration items
CN103037008A (en) * 2012-12-24 2013-04-10 珠海金山办公软件有限公司 Authority management method and system of synchronous network disk
US20150135331A1 (en) * 2013-11-14 2015-05-14 Futurewei Technologies, Inc. Multiprotocol access control list with guaranteed protocol compliance

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5151488B2 (en) * 2008-01-09 2013-02-27 富士ゼロックス株式会社 Authority information management apparatus, information processing system, and program
JP5614073B2 (en) * 2010-03-29 2014-10-29 ヤマハ株式会社 Relay device
CN102170440B (en) * 2011-03-24 2013-12-04 北京大学 Method suitable for safely migrating data between storage clouds
EP2807584A2 (en) * 2012-04-25 2014-12-03 Hitachi, Ltd. File storage system and file cloning method
CN105843554B (en) * 2016-03-11 2019-03-01 中国联合网络通信集团有限公司 The method and its system of Data Migration based on object storage

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101626378A (en) * 2009-08-14 2010-01-13 成都市华为赛门铁克科技有限公司 Method, device and system for managing authority information
CN102281141A (en) * 2011-07-26 2011-12-14 成都市华为赛门铁克科技有限公司 Document permission management method, apparatus and system
CN102369713A (en) * 2011-08-29 2012-03-07 华为技术有限公司 Automatic removing method and device of system configuration items
CN103037008A (en) * 2012-12-24 2013-04-10 珠海金山办公软件有限公司 Authority management method and system of synchronous network disk
US20150135331A1 (en) * 2013-11-14 2015-05-14 Futurewei Technologies, Inc. Multiprotocol access control list with guaranteed protocol compliance

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10997132B2 (en) 2017-02-07 2021-05-04 Oracle International Corporation Systems and methods for live data migration with automatic redirection
CN110086836A (en) * 2018-01-25 2019-08-02 华为技术有限公司 The method and apparatus for obtaining metadata
CN110086836B (en) * 2018-01-25 2020-12-15 华为技术有限公司 Method and device for acquiring metadata
CN112511627A (en) * 2018-01-25 2021-03-16 华为技术有限公司 Method and device for migrating metadata
CN112511627B (en) * 2018-01-25 2022-09-23 华为技术有限公司 Method and device for migrating metadata
CN108446337A (en) * 2018-02-28 2018-08-24 新华三云计算技术有限公司 A kind of lock resources control permission moving method and device
CN108446337B (en) * 2018-02-28 2019-09-13 新华三云计算技术有限公司 A kind of lock resources control permission moving method and device
CN109446825A (en) * 2018-10-22 2019-03-08 郑州云海信息技术有限公司 A kind of extended method and device of access control right
CN109446825B (en) * 2018-10-22 2021-08-31 郑州云海信息技术有限公司 Method and device for expanding access control authority
CN110941599A (en) * 2019-11-12 2020-03-31 浪潮电子信息产业股份有限公司 Authority control method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN106649600B (en) 2019-07-09
WO2018094962A1 (en) 2018-05-31

Similar Documents

Publication Publication Date Title
CN106649600A (en) Way, device and system of migrating file permissions
CN104461744B (en) A kind of resource allocation methods and device
CN103475682B (en) File transfer method and file transfer equipment
CN104601680B (en) A kind of method for managing resource and device
CN106843745A (en) Capacity expansion method and device
CN106843755A (en) For the data balancing method and device of server cluster
CN106325998A (en) Method and device for deploying application based on cloud computing
CN106817388B (en) Method and device for acquiring data by virtual machine and host machine and system for accessing data
CN103180842A (en) Cloud computing system and data synchronization method therefor
CN105472045A (en) Database migration method and database migration device
CN108509157A (en) A kind of data balancing method and device applied to distributed file system
CN111274252A (en) Block chain data chaining method, device, storage medium and server
CN110830580B (en) Storage data synchronization method and device
CN104424225B (en) Document handling method based on document transmission process and device
CN110008019B (en) Method, device and system for sharing server resources
CN106878370A (en) The update method and equipment of a kind of local cache
CN106254561A (en) The real-time offline download method of a kind of Internet resources file and system
CN111209090A (en) Method and assembly for creating virtual machine in cloud platform and server
CN106021512A (en) Page refresh method and apparatus
CN105786399B (en) A kind of data conversion storage method, apparatus and system
CN109831518A (en) A kind of map datum method for down loading and device calculate equipment and storage medium
CN105224541B (en) Uniqueness control method, information storage means and the device of data
CN106850724A (en) Data push method and device
CN102256211A (en) Group-based method and system for application realization of M2M terminal
CN106534227A (en) Method and device of expanding distributed consistency service

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