CN103491193A - Method and device for sharing file - Google Patents

Method and device for sharing file Download PDF

Info

Publication number
CN103491193A
CN103491193A CN201310464197.XA CN201310464197A CN103491193A CN 103491193 A CN103491193 A CN 103491193A CN 201310464197 A CN201310464197 A CN 201310464197A CN 103491193 A CN103491193 A CN 103491193A
Authority
CN
China
Prior art keywords
storage area
file
virtual machine
shared
shared file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201310464197.XA
Other languages
Chinese (zh)
Other versions
CN103491193B (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.)
XFusion Digital 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 CN201310464197.XA priority Critical patent/CN103491193B/en
Publication of CN103491193A publication Critical patent/CN103491193A/en
Application granted granted Critical
Publication of CN103491193B publication Critical patent/CN103491193B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The embodiment of the invention provides a method and device for sharing a file, and relates to the field of file sharing. By means of the method and device for sharing the file, a computing resource occupied by a shared file can be reduced, and the accessing speed of the shared file can be improved. The method comprises the steps that after confirming a shared file of a first virtual machine providing a sharing service, the file sharing device obtains the information of a storage area of the shared file and sends the information of the storage area to a storage resource manager so that the storage resource manager can confirm a target storage area according to the information of the storage area; the storage resource manager allocates the target storage area to a second virtual machine of the shared file so that the second virtual machine can have access to the shared file. The embodiment of the invention is used for sharing the file.

Description

A kind of method and apparatus of file-sharing
Technical field
The present invention relates to the file-sharing field, relate in particular to a kind of method and apparatus of file-sharing.
Background technology
Under virtual scene, existing file-sharing scheme comprises: provide the first virtual machine of share service to select the shared file of needs from corresponding disk, and the second virtual machine that the Share Permissions of this shared file is set and allows this shared file of access, accessed this shared file from corresponding disk by this first virtual machine, this second virtual machine is accessed this shared file from this first virtual machine by virtual switch again.
State in realization in the process of file-sharing, because this first virtual machine need to be accessed shared file from corresponding disk, thereby taken the larger computational resource of this first virtual machine in the file-sharing process, affected the normal use of this first virtual machine, in addition, when this shared file is excessive, due to the restriction of the network bandwidth, make this second virtual machine slower to the access speed of this shared file, thereby reduced user's experience.
Summary of the invention
Embodiments of the invention provide a kind of method and apparatus of file-sharing, the computational resource taken to reduce shared file, and improve the access speed to shared file.
For achieving the above object, embodiments of the invention adopt following technical scheme:
First aspect, provide a kind of method of file-sharing, comprising:
File-sharing equipment is determined the shared file in the first virtual machine that share service is provided;
Obtain the storage area information of described shared file;
Described storage area information is sent to the SRM device, so that described SRM device is determined the target storage area according to described storage area information, and described target storage area is distributed to the second virtual machine, wherein, described target storage area stores described shared file, and described the second virtual machine is for receiving the virtual machine of described shared file.
In first aspect the first, in possible implementation, the described storage area information of obtaining described shared file comprises:
Obtain directory entry and the index node information corresponding to described directory entry of described shared file;
Determine described storage area information according to described directory entry and index node information corresponding to described directory entry.
In conjunction with first aspect or the possible implementation of the first, at the second, in possible implementation, after described SRM device is determined the target storage area according to described storage area information, described method also comprises:
Obtain the identification information of described the second virtual machine, wherein, described identification information is used to indicate described the second virtual machine of cancellation and accesses described shared file;
Described identification information is sent to the SRM device, so that described SRM device is deleted the described target storage area of described the second virtual machine according to this identification information.
Second aspect, provide a kind of method of file-sharing, comprising:
The SRM device receives the storage area information of the shared file of file-sharing equipment transmission, and described shared file is provided by the first virtual machine;
Determine the target storage area according to described storage area information, and described target storage area is distributed to the second virtual machine, so that described the second virtual machine conducts interviews to described shared file; Wherein, described target storage area stores described shared file.
In second aspect the first, in possible implementation, described target storage area is LUN LUN; Wherein, described LUN stores described shared file.
In conjunction with second aspect, at the second in possible implementation, describedly according to described storage area information, determine that the target storage area comprises:
Determine LUN according to described storage area information, and determine described target storage area according to described LUN, wherein, described LUN stores described shared file and unshared file; Described target storage area is stored described shared file.
In conjunction with second aspect, to any the possible implementation in the possible implementation of the second, at the third, in possible implementation, after described target storage area is distributed to described the second virtual machine, described method also comprises:
Receive the identification information of described second virtual machine of described file-sharing equipment transmission, wherein, described identification information is used to indicate described the second virtual machine of cancellation and accesses described shared file;
Delete the described target storage area of described the second virtual machine according to described identification information.
The third aspect, provide a kind of file-sharing equipment, comprising:
Processing unit, for determining the shared file of the first virtual machine that share service is provided;
Acquiring unit, for obtaining the storage area information of the shared file definite at described processing unit;
Transmitting element, be sent to the SRM device for the storage area information that described acquiring unit is got, so that described SRM device is determined the target storage area according to described storage area information, and described target storage area is distributed to the second virtual machine, wherein, described target storage area stores described shared file, and described the second virtual machine is for receiving the virtual machine of described shared file.
In third aspect the first in possible implementation, described acquiring unit specifically for:
Obtain directory entry and the index node information corresponding to described directory entry of described shared file, and determine described storage area information according to described directory entry and index node information corresponding to described directory entry.
In conjunction with the third aspect or the possible implementation of the first, at the second in possible implementation, described transmitting element specifically for:
Described acquiring unit also for, obtain the identification information of described the second virtual machine, wherein, described identification information is used to indicate to be cancelled described the second virtual machine and accesses described shared file;
Described transmitting element also for, described identification information is sent to the SRM device, so that described SRM device is deleted the described target storage area of described the second virtual machine according to this identification information.
Fourth aspect, provide a kind of SRM device, comprising:
Receiving element, for receiving the storage area information of the shared file that file-sharing equipment sends, described shared file is provided by the first virtual machine;
Processing unit, determine the target storage area for the storage area information received according to described receiving element, and described target storage area is distributed to the second virtual machine, so that described the second virtual machine conducts interviews to described shared file; Wherein, described target storage area stores described shared file.
In fourth aspect the first in possible implementation, described processing unit specifically for:
Determine LUN according to described storage area information; Wherein, described LUN stores described shared file.
In conjunction with fourth aspect, at the second in possible implementation, described processing unit specifically for:
Determine LUN according to described storage area information, and determine described target storage area according to described LUN, wherein, described LUN stores described shared file and unshared file; Described target storage area is stored described shared file.
In conjunction with fourth aspect to any the possible implementation in the possible implementation of the second, at the third in possible implementation,
Described receiving element also for, receive the identification information of described the second virtual machine that described file-sharing equipment sends, wherein, described identification information is used to indicate to be cancelled described the second virtual machine and accesses described shared file;
Described processing unit also for, delete the described target storage area of described the second virtual machine according to described identification information.
By adopting such scheme, file-sharing equipment is sent to the SRM device by the storage area information of this shared file of getting in the storage area of this first virtual machine, this SRM device is determined the target storage area according to this storage area information, and this target storage area is dispensed to this second virtual machine, so that this second virtual machine is accessed this shared file in this target storage area, like this, because this target storage area is distributed to this second virtual machine by this SRM device, so this target storage area is equivalent to the storage area of this second virtual machine, this second virtual machine can directly be accessed the shared file in this target storage area, and need to from the first virtual machine, not access this shared file, thereby reduced taking this first virtual machine computational resource, and improved the access speed of this second virtual machine to shared file.
The accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme of the embodiment of the present invention, in below describing embodiment, the accompanying drawing of required use is briefly described, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain according to these accompanying drawings other accompanying drawing.
The schematic flow sheet of a kind of file sharing method that Fig. 1 provides for the embodiment of the present invention;
The schematic flow sheet of the another kind of file sharing method that Fig. 2 provides for the embodiment of the present invention;
The schematic flow sheet of the another kind of file sharing method that Fig. 3 provides for the embodiment of the present invention;
The structural representation of a kind of file-sharing equipment that Fig. 4 provides for the embodiment of the present invention;
The structural representation of a kind of SRM device that Fig. 5 provides for the embodiment of the present invention;
The structural representation of the another kind of file-sharing equipment that Fig. 6 provides for the embodiment of the present invention;
The structural representation of the another kind of SRM device that Fig. 7 provides for the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly described, obviously, described embodiment is only the present invention's part embodiment, rather than whole embodiment.Embodiment based in the present invention, those of ordinary skills, not making under the creative work prerequisite the every other embodiment obtained, belong to the scope of protection of the invention.
The embodiment of the present invention provides a kind of method of file-sharing, and as shown in Figure 1, the executive agent of the method is file-sharing equipment, comprising:
S101, file-sharing equipment are determined the shared file in the first virtual machine that share service is provided.
Particularly, after the user determines the shared file of needs by file-sharing equipment in the storage area of this first virtual machine, by this document shared device, the access rights of this shared file and the second virtual machine that allows to receive this shared file are set again, this second virtual machine can conduct interviews to this shared file according to access rights.While usually shared file being set, can take file as unit, the file in this document folder is shared file, and the shared file in the embodiment of the present invention also comprises the scene that Shared Folders is set.
S102, this document shared device obtain the storage area information of this shared file.
Particularly, this document shared device obtains directory entry and the index node information corresponding to this directory entry of this shared file, and determines this storage area information according to this directory entry and index node information corresponding to this directory entry.
Wherein, this storage area information is included in the identification information of the storage subregion of this shared file of storage in the storage area of this first virtual machine.
In a kind of possible implementation of the present invention, this first virtual machine is by sharing to realize file-sharing to file, to share a certain file, the file at this document place is made as to Shared Folders, wherein, comprise shared file in this Shared Folders, can also comprise at least one in shared Sub file and shared Sub file, after this document shared device is determined the shared file of needs in this first virtual machine, this document shared device obtains the directory entry (as the title of this shared Sub file and/or this shared Sub file) of this Shared Folders, determine corresponding index node information according to this directory entry, and determine in the storage area of the first virtual machine the storage subregion of this shared file of storage according to this index node information, for at least one the situation comprised in shared Sub file and shared Sub file, as comprise the shared Sub file, also comprise the storage subregion of determining the shared Sub file of storing according to index node information in the storage area of the first virtual machine.Wherein, the Shared Folders of take comprises that the situation of shared file is example, this index node information is included in the identification information of the storage subregion of this shared file of storage in the storage area of this first virtual machine, like this, this document shared device obtains the storage area information (as the identification information of the storage subregion of this shared file of storage in the storage area at the first virtual machine) of this Shared Folders.
Illustratively, this document shared device is determined the Shared Folders in this first virtual machine storage area, wherein, comprise shared file X in this Shared Folders, the directory entry of this Shared Folders is designated as directory entry A, the index node information of this shared file X is designated as index node information b, this document shared device obtains this this directory entry A by the file system of this first virtual machine, and determine this index node information b with this directory entry A, thereby determine the storage subregion of this shared file of storage X in the storage area of this first virtual machine according to the identification information in this index node information b, like this, this document shared device obtains the storage area information of this Shared Folders.
It should be noted that, the storage area of the first virtual machine is divided a plurality of storage subregions, the plurality of storage subregion is to there being identification information, the index node information that above-mentioned directory entry is corresponding is included in the identification information corresponding to storage subregion of the shared file that in the storage area of the first virtual machine, this directory entry of storage is corresponding, and this document shared device is determined the storage subregion of this shared file of storage in the storage area of the first virtual machine according to this identification information.
In the another kind of possible implementation of the present invention, this first virtual machine is shared file, this first virtual machine can be shared by the file to this document place, thereby realize sharing this document, its specific implementation can, with reference to the corresponding description that in upper a kind of implementation, this first virtual machine is shared file, repeat no more herein.
It should be noted that, if while in the file at this document place, also comprising unshared file, this unshared file of this document shared device is set to hidden state, and limit the access rights of this unshared file, like this, this unshared file is sightless to the user, thereby prevents from unshared file is shared, and has promoted user's experience.
In addition, this first virtual machine can also directly be shared file, after this document shared device is determined and need to be carried out shared file in the storage area of this first virtual machine, this document shared device obtains the index node information of this shared file, and determine that according to this index node information this shared file stores the storage subregion of this shared file in the storage area of this first virtual machine, like this, this document shared device gets the storage area information of this shared file.
S103, this document shared device are sent to the SRM device by this storage area information, so that this SRM device is determined the target storage area according to this storage area information, and this target storage area are distributed to the second virtual machine.
Wherein, this target storage area stores this shared file.
It should be noted that, this document shared device can also send the free storage domain information to the SRM device, wherein, this idle memory region information comprises the identification information of not storing the storage subregion of data in the storage area of this first virtual machine, that is to say, above-mentioned storage area information can also comprise this free storage domain information, this SRM device is determined the target storage area according to this storage area information, and this target storage area is distributed to this second virtual machine, like this, if the authority of file-sharing equipment setting allows this second virtual machine to carry out write operation to this shared file, the data that write this shared file can be stored in the idle memory region that this free storage domain information is corresponding, to improve the user, experience.
Particularly, above-mentioned steps S103 can comprise following two kinds of implementations:
Mode one, this document shared device is sent to the SRM device by this storage area information, so that this SRM device is determined the LUN(Logic Unite Number of this shared file of storage according to this storage area information, LUN), and this LUN is dispensed to this second virtual machine, so that this second virtual machine conducts interviews to this shared file in this LUN.
Wherein, this LUN stores this shared file.
When this LUN also stores unshared file, it should be noted that, this unshared file of this document shared device is set to hidden state, and limit the access rights (the second virtual machine carries out read operation and write operation to this unshared file as forbidden) of this unshared file, like this, this unshared file is sightless to the user, simultaneously, the second virtual machine can't be accessed this unshared file, thereby prevents from unshared file is shared, and has promoted user's experience.
Illustratively, this SRM device receives the storage area information that file-sharing equipment sends, and by the LUN of this storage area information definite this shared file of storage in the storage area of the first virtual machine, wherein, this LUN comprises storage area A and the idle memory region B that stores shared file, if this LUN comprises the storage area C of unshared file, this unshared file of this document shared device is set to hidden state, and limit the access limit of this unshared file, so that the second virtual machine can't be accessed this unshared file in the storage area C of the unshared file of storage, this SRM device is dispensed to this second virtual machine by this LUN, so that this second virtual machine conducts interviews to this shared file of storing in this LUN.
It should be noted that, because this LUN distributes to the second virtual machine by this SRM device, so this LUN is equivalent to the storage area of this second virtual machine, like this, after this first virtual machine shutdown, this second virtual machine still can conduct interviews to this shared file of storing in this LUN, thereby has improved user's experience.
Mode two, this document shared device is sent to the SRM device by this storage area information, so that this SRM device is determined the LUN of this shared file of storage according to this storage area information, and determine the target storage area according to this LUN, and this target storage area is distributed to this second virtual machine, so that this second virtual machine conducts interviews to this shared file.
Wherein, this LUN stores this shared file and unshared file; This target storage area is stored this shared file.
Particularly, this SRM device receives the storage area information that file-sharing equipment sends, and by the LUN of this storage area information definite this shared file of storage in the storage area of the first virtual machine, wherein, this LUN stores this shared file and unshared file, and this SRM device is determined the storage area of this shared file of storage in this LUN according to this storage area information, this SRM device is encapsulated as the target storage area by storage area, and this target storage area is dispensed to the second virtual machine, for example, this storage area can be the disk storage zone of this shared file of storage, this target storage area can be virtual volume, this SRM device is encapsulated as virtual volume by the disk storage zone of this shared file of storage in this LUN, and this virtual volume is distributed to the second virtual machine, like this, the second virtual machine is after powering on, can identify this virtual volume, and can this shared file of storing in this virtual volume be conducted interviews.
Illustratively, this SRM device receives the storage area information that file-sharing equipment sends, and by the LUN of this storage area information definite this shared file of storage in the storage area of the first virtual machine, wherein, this LUN comprises the storage area A that stores this shared file, store storage area B and the idle memory region C of unshared file, this SRM device is encapsulated as the target storage area according to this storage area information by this storage area A and idle memory region C, this target storage area comprises this storage area A and this idle memory region C, and this target storage area is dispensed to this second virtual machine, so that this second virtual machine conducts interviews to this shared file of storing in this target storage area, because this target storage area is to distribute to the second virtual machine by this SRM device, so this target storage area is equivalent to the storage area of this second virtual machine, like this, after this first virtual machine shutdown, this second virtual machine still can conduct interviews to this shared file of storing in this target storage area, thereby improved user's experience.
It should be noted that, in the idle memory region C that above-mentioned target storage area comprises, can be idle memory region all in this LUN, can be also part idle memory region in LUN, and the present invention does not do restriction to this.
In addition, aforesaid way one is with the difference of mode two: mode one, be directly will be definite in the storage area of the first virtual machine LUN be dispensed to the second virtual machine, because this LUN comprises the storage area of storing shared file and comprises the storage area of storing unshared file, therefore, also need unshared file to be set to hidden state, and limit the access rights of this unshared file; And mode two, the storage area that is the shared file that comprises of LUN that will be definite in the storage area of the first virtual machine is encapsulated as a new storage area, and new storage area is dispensed to the second virtual machine by this, the embodiment of the present invention is not construed as limiting above-mentioned two kinds of implementations.
Another kind of execution mode, this document shared device is sent to the SRM device by this storage area information, so that this SRM device is determined the storage area of this shared file of storage according to this storage area information, comprise the storage area using the storage area at this shared file place and one section idle memory region as this shared file of storage, be packaged into a LUN, this LUN is distributed to the second virtual machine, wherein, comprise the access rights that the second virtual machine is accessed this shared file in this LUN, or Share Permissions.Be that the target storage area is above-mentioned LUN.
Another kind of execution mode, this document shared device is sent to the SRM device by this storage area information, so that this SRM device is determined the storage area of this shared file of storage according to this storage area information, comprise the storage area using the storage area at this shared file place and one section idle memory region as this shared file of storage, be packaged into a virtual disk or a volume, this virtual disk or volume are distributed to the second virtual machine.The target storage area is above-mentioned virtual disk or volume.
Further, when the user cancels the file-sharing to the second virtual machine, this document shared device obtains the identification information of this second virtual machine, and this identification information is sent to the SRM device, so that this SRM device is deleted this target storage area of this second virtual machine according to this identification information.
Wherein, this identification information is used to indicate this second virtual machine of cancellation and accesses this shared file.
Particularly, when the user determine to need cancels the file-sharing to this second virtual machine, this document shared device obtains the identification information (as title or the IP address of the second virtual machine) of this second virtual machine, and this identification information is sent to the SRM device, this SRM device is deleted the target storage area of this second virtual machine according to this identification information, thereby cancels the file-sharing of this first virtual machine to this second virtual machine.
By the scheme that adopts above-mentioned executive agent to be file-sharing equipment, the storage area information of this shared file that this document shared device will get in the storage area of the first virtual machine is sent to the SRM device, this SRM device is determined the target storage area according to this storage area information, and this target storage area is dispensed to this second virtual machine, so that this second virtual machine conducts interviews to this shared file, like this, because this target storage area is to distribute to this second virtual machine by this SRM device, so this target storage area is equivalent to the storage area of this second virtual machine, this second virtual machine can directly be accessed the shared file in this target storage area, and do not need again this shared file of access from this first virtual machine, thereby reduced taking this first virtual machine computational resource, and improved the access speed of this second virtual machine to this shared file.
The embodiment of the present invention provides a kind of method of file-sharing, and as shown in Figure 2, the executive agent of the method is the SRM device, comprising:
S201, SRM device receive the storage area information of the shared file of file-sharing equipment transmission, and this shared file is provided by the first virtual machine.
Particularly, after the user determines the shared file of needs by file-sharing equipment in the storage area of this first virtual machine, by this document shared device, the access rights of this shared file and the second virtual machine that allows to receive this shared file are set again, this second virtual machine can conduct interviews to this shared file according to access rights.While usually shared file being set, can take file as unit, the file in this document folder is shared file, and the shared file in the embodiment of the present invention also comprises the scene that Shared Folders is set.
Further, this document shared device obtains directory entry and the index node information corresponding to this directory entry of this shared file in file system, and determine this storage area information according to this directory entry and index node information corresponding to this directory entry, and this storage area information is sent to the SRM device.
Wherein, this storage area information is included in the identification information of the storage subregion of this shared file of storage in the storage area of this first virtual machine.
In a kind of possible implementation of the present invention, this first virtual machine is by sharing to realize file-sharing to file, to share a certain file, the file at this document place is made as to Shared Folders, wherein, comprise shared file in this Shared Folders, can also comprise at least one in shared Sub file and shared Sub file, after this document shared device is determined the shared file of needs in this first virtual machine, this document shared device obtains the directory entry (as the title of this shared Sub file and/or this shared Sub file) of this Shared Folders, determine corresponding index node information according to this directory entry, and determine in the storage area of the first virtual machine the storage subregion of this shared file of storage according to this index node information, for at least one the situation comprised in shared Sub file and shared Sub file, as comprise the shared Sub file, also comprise the storage subregion of determining the shared Sub file of storing according to index node information in the storage area of the first virtual machine.Wherein, the Shared Folders of take comprises that the situation of shared file is example, this index node information is included in the identification information of the storage subregion of this shared file of storage in the storage area of this first virtual machine, like this, this document shared device obtains the storage area information (as the identification information of the storage subregion of this shared file of storage in the storage area at the first virtual machine) of this Shared Folders, and the storage area information of this Shared Folders is sent to the SRM device.
Illustratively, this document shared device is determined the Shared Folders in this first virtual machine storage area, wherein, comprise shared file X in this Shared Folders, the directory entry of this Shared Folders is designated as directory entry A, the index node information of this shared file X is designated as index node information b, this document shared device obtains this this directory entry A from the file system of this first virtual machine, and determine this index node information b with this directory entry A, thereby determine the storage subregion of this shared file of storage X in the storage area of this first virtual machine according to the identification information in this index node information b, like this, this document shared device obtains the storage area information of this Shared Folders, and this storage area information is sent to this SRM device.
It should be noted that, the storage area of the first virtual machine is divided a plurality of storage subregions, the plurality of storage subregion is to there being identification information, the index node information that above-mentioned directory entry is corresponding is included in the identification information corresponding to storage subregion of the shared file that in the storage area of the first virtual machine, this directory entry of storage is corresponding, and this document shared device is determined the storage subregion of this shared file of storage in the storage area of the first virtual machine according to this identification information.
In the another kind of possible implementation of the present invention, this first virtual machine is shared file, this first virtual machine can be shared by the file to this document place, thereby realize sharing this document, its specific implementation can, with reference to the corresponding description that in upper a kind of implementation, this first virtual machine is shared file, repeat no more herein.
It should be noted that, if while in the file at this shared file place, also comprising unshared file, this unshared file of this document shared device is set to hidden state, and limit the access rights of this unshared file, like this, this unshared file is sightless to the user, thereby prevents from unshared file is shared, and has promoted user's experience.
In addition, this first virtual machine can also directly be shared file, after this document shared device is determined and need to be carried out shared file in the storage area of this first virtual machine, this document shared device obtains the index node information of this shared file, and determine that according to this index node information this shared file stores the storage subregion of this shared file in the storage area of this first virtual machine, like this, this document shared device obtains the storage area information of this shared file, and the storage area information of this shared file is sent to this SRM device.
S202, this SRM device are determined the target storage area according to this storage area information, and this target storage area is distributed to the second virtual machine, so that this second virtual machine conducts interviews to this shared file.
Wherein, this target storage area stores this shared file.
It should be noted that, this document shared device can also send the free storage domain information to the SRM device, wherein, this idle memory region information comprises the identification information of not storing the storage subregion of data in the storage area of this first virtual machine, that is to say, above-mentioned storage area information can also comprise this free storage domain information, this SRM device is determined the target storage area according to this storage area information, and this target storage area is distributed to this second virtual machine, like this, if the authority of file-sharing equipment setting allows this second virtual machine to carry out write operation to this shared file, the data that write this shared file can be stored in the idle memory region that this free storage domain information is corresponding, to improve the user, experience.
Particularly, above-mentioned steps S202 can comprise following two kinds of implementations:
Mode one, this target storage area is LUN LUN.
Wherein, this LUN stores this shared file.
Particularly, this SRM device is determined the LUN of this shared file of storage according to this storage area information, and this LUN is dispensed to this second virtual machine, so that this second virtual machine conducts interviews to this shared file in this LUN.
When this LUN also stores unshared file, it should be noted that, this unshared file of this document shared device is set to hidden state, and limit the access rights (the second virtual machine carries out read operation and write operation to this unshared file as forbidden) of this unshared file, like this, this unshared file is sightless to the user, simultaneously, the second virtual machine can't be accessed this unshared file, thereby prevents from unshared file is shared, and has promoted user's experience.
Illustratively, this SRM device receives the storage area information that file-sharing equipment sends, and by the LUN of this storage area information definite this shared file of storage in the storage area of the first virtual machine, wherein, this LUN comprises storage area A and the idle memory region B that stores shared file, if this LUN comprises the storage area C that stores unshared file, this unshared file of this document shared device is set to hidden state, and limit the access rights of this unshared file, so that the second virtual machine can't be accessed this unshared file in the storage area C of this unshared file of storage, this SRM device is dispensed to this second virtual machine by this LUN, so that this second virtual machine is accessed the shared file in this LUN.
It should be noted that, because this LUN distributes to the second virtual machine by this SRM device, so this LUN is equivalent to the storage area of this second virtual machine, like this, after this first virtual machine shutdown, this second virtual machine still can conduct interviews to this shared file of storing in this LUN, thereby has improved user's experience.
Mode two, this SRM device is determined LUN according to this storage area information, and determines this target storage area according to this LUN.
Wherein, this LUN stores this shared file and unshared file; This target storage area is stored this shared file.
Particularly, this SRM device receives the storage area information that file-sharing equipment sends, and by the LUN of this storage area information definite this shared file of storage in the storage area of the first virtual machine, wherein, this LUN stores this shared file and unshared file, and this SRM device is determined the storage area of this shared file of storage in this LUN according to this storage area information, this SRM device is encapsulated as the target storage area by this storage area, and this target storage area is dispensed to the second virtual machine, for example, this storage area can be the disk storage zone of this shared file of storage, this target storage area can be virtual volume, this SRM device is encapsulated as virtual volume by the disk storage zone of this shared file of storage in this LUN, and this virtual volume is distributed to the second virtual machine, like this, the second virtual machine is after powering on, can identify this virtual volume, and can this shared file of storing in this virtual volume be conducted interviews.
Illustratively, this SRM device receives the storage area information that file-sharing equipment sends, and by the LUN of this storage area information definite this shared file of storage in the storage area of the first virtual machine, wherein, this LUN comprises the storage area A that stores shared file, store storage area B and the idle memory region C of unshared file, this SRM device is encapsulated as the target storage area according to this storage area information by this storage area A and idle memory region C, this target storage area comprises this storage area A and this idle memory region C, and this target storage area is dispensed to this second virtual machine, so that this second virtual machine is accessed this shared file in this target storage area, because this target storage area is to distribute to the second virtual machine by this SRM device, so this target storage area is equivalent to the storage area of this second virtual machine, like this, after this first virtual machine shutdown, this second virtual machine still can conduct interviews to this shared file of storing in this target storage area, thereby improved user's experience.
It should be noted that, in the idle memory region C that above-mentioned target storage area comprises, can be idle memory region all in this LUN, can be also part idle memory region in LUN, and the present invention does not do restriction to this.
In addition, aforesaid way one is with the difference of mode two: mode one, be directly will be definite in the storage area of the first virtual machine LUN be dispensed to the second virtual machine, because this LUN comprises the storage area of storing shared file and comprises the storage area of storing unshared file, therefore, also need unshared file to be set to hidden state, and limit the access rights of this unshared file; And mode two, the storage area that is the shared file that comprises of LUN that will be definite in the storage area of the first virtual machine is encapsulated as a new storage area, and new storage area is dispensed to the second virtual machine by this, the embodiment of the present invention is not construed as limiting above-mentioned two kinds of implementations.
Another kind of execution mode, this document shared device is sent to the SRM device by this storage area information, so that this SRM device is determined the storage area of this shared file of storage according to this storage area information, comprise the storage area using the storage area at this shared file place and one section idle memory region as this shared file of storage, be packaged into a LUN, this LUN is distributed to the second virtual machine, wherein, comprise the access rights that the second virtual machine is accessed this shared file in this LUN, or Share Permissions.Be that the target storage area is above-mentioned LUN.
Another kind of execution mode, this document shared device is sent to the SRM device by this storage area information, so that this SRM device is determined the storage area of this shared file of storage according to this storage area information, comprise the storage area using the storage area at this shared file place and one section idle memory region as this shared file of storage, be packaged into a virtual disk or a volume, this virtual disk or volume are distributed to the second virtual machine.The target storage area is above-mentioned virtual disk or volume.
Further, when the user cancels the file-sharing of the virtual machine to receiving this shared file, this SRM device receives the identification information of this second virtual machine of this document shared device transmission, and deletes this target storage area of this second virtual machine according to this identification information.
Wherein, this identification information is used to indicate this second virtual machine of cancellation and accesses this shared file.
Particularly, when the user determine to need cancels the file-sharing to this second virtual machine, this document shared device obtains the identification information (as title or the IP address of the second virtual machine) of this second virtual machine, and this identification information is sent to the SRM device, this SRM device is deleted the target storage area of this second virtual machine according to this identification information, thereby cancels the file-sharing of this first virtual machine to this second virtual machine.
By the scheme that adopts above-mentioned executive agent to be the SRM device, after file-sharing equipment is determined the shared file in this first virtual machine and is obtained the storage area information of this shared file, this SRM device receives this storage area information that this document shared device sends, and determine the target storage area according to this storage area information, this SRM device is distributed to this second virtual machine by this target storage area, so that this second virtual machine conducts interviews to this shared file in this target storage area, like this, because this target storage area is distributed to this second virtual machine by this SRM device, so this target storage area is equivalent to the storage area of this second virtual machine, this second virtual machine can directly be accessed this shared file in this target storage area, and need to from this first virtual machine, not access this shared file, thereby reduced taking this first virtual machine computational resource, and improved the access speed of this second virtual machine to shared file.
The embodiment of the present invention provides a kind of method of file-sharing, as shown in Figure 3, in the method embodiment, so that file is shared as to example, describes, and the method comprises:
S301, file-sharing equipment are determined the Shared Folders in the first virtual machine that share service is provided.
Particularly, after the user determines the shared file of needs by file-sharing equipment in the storage area of this first virtual machine, by this document shared device, the access rights of this shared file and the second virtual machine that allows to receive this shared file are set again, this second virtual machine can conduct interviews to this shared file according to access rights.While usually shared file being set, can take file as unit, the file in this document folder is shared file, and the shared file in the embodiment of the present invention also comprises the scene that Shared Folders is set.
S302, this document shared device obtain directory entry and the index node information corresponding to this directory entry of this Shared Folders, and determine this storage area information according to this directory entry and index node information corresponding to this directory entry.
Wherein, this storage area information is included in the identification information of the storage subregion of this Shared Folders of storage in the storage area of this first virtual machine.
In a kind of possible implementation of the present invention, this first virtual machine is by sharing to realize file-sharing to file, the file at this document place is made as to Shared Folders, wherein, comprise shared file in this Shared Folders, can also comprise at least one in shared Sub file and shared Sub file, after this document shared device is determined the shared file of needs in this first virtual machine, this document shared device obtains the directory entry (as the title of this shared Sub file and/or this shared Sub file) of this Shared Folders, determine corresponding index node information according to this directory entry, and determine according to this index node information the storage subregion that this shared literary composition of storage presss from both sides in the storage area of the first virtual machine, for at least one the situation comprised in shared Sub file and shared Sub file, as comprise the shared Sub file, also comprise the storage subregion of determining the shared Sub file of storing according to index node information in the storage area of the first virtual machine.Wherein, the Shared Folders of take comprises that the situation of shared file is example, this index node information is included in the identification information of the storage subregion of this shared file of storage in the storage area of this first virtual machine, like this, this document shared device obtains the storage area information (as the identification information of the storage subregion of this shared file of storage in the storage area at the first virtual machine) of this Shared Folders, and the storage area information of this Shared Folders is sent to the SRM device.
Illustratively, this document shared device is determined the Shared Folders in this first virtual machine, comprise shared Sub file and shared Sub file X in this Shared Folders, comprise shared Sub file Y in this shared Sub file, the directory entry of this Shared Folders is designated as directory entry A, the index node information of this shared Sub file is designated as index node information a, the index node information of this shared Sub file X is designated as index node information b, the directory entry of this shared Sub file is designated as directory entry B, the index node information of this shared Sub file Y is designated as index node information c, wherein, this index node information a is included in the identification information of the storage subregion of this shared Sub file of storage in the storage area of the first virtual machine, this document shared device is determined this index node information a and this index node information b according to this directory entry A, thereby determine the storage subregion of this shared Sub file of storage in the storage area of the first virtual machine according to the identification information in this index node information a, and determine this directory entry B according to this storage subregion, and determine this index node information c according to this directory entry B, thereby determine the storage subregion of this shared Sub file of storage Y in the storage area of the first virtual machine according to this index node information c, this document shared device is determined the storage subregion of this shared Sub file of storage X in the storage area of the first virtual machine according to this index node information b, like this, this document shared device obtains the storage area information (identification information of the storage subregion of storage area in the storage area of the first virtual machine that the shared Sub file Y in shared Sub file and shared Sub file X and shared Sub file is corresponding) of this Shared Folders.
It should be noted that, the storage area of the first virtual machine is divided a plurality of storage subregions, the plurality of storage subregion is to there being identification information, the index node information that above-mentioned directory entry is corresponding is included in shared Sub file (comprising the shared Sub file Y in this shared Sub file) that in the storage area of the first virtual machine, this directory entry of storage is corresponding and/or identification information corresponding to storage subregion of this shared Sub file X, this document shared device is determined and store the storage subregion in this shared Sub file (comprising the shared Sub file in this shared Sub file) and/or this shared Sub file in the storage area of the first virtual machine according to this identification information.
S303, this document shared device are sent to the SRM device by this storage area information.
It should be noted that, this document shared device can also send the free storage domain information to the SRM device, wherein, this idle memory region information comprises the identification information of not storing the storage subregion of data in the storage area of this first virtual machine, that is to say, above-mentioned storage area information can also comprise this free storage domain information, this SRM device is determined the target storage area according to this storage area information, and this target storage area is distributed to this second virtual machine, like this, if the authority of file-sharing equipment setting allows this second virtual machine to carry out write operation to this shared file, the data that write this shared file can be stored in the idle memory region that this free storage domain information is corresponding, to improve the user, experience.
S304, this SRM device are determined the LUN of this Shared Folders of storage according to this storage area information.
Wherein, this LUN stores this Shared Folders.
S305, this SRM device are determined the target storage area according to this LUN, and this target storage area is distributed to the second virtual machine that this receives this Shared Folders, so that this second virtual machine conducts interviews to this Shared Folders.
Wherein, this target storage area is stored this Shared Folders.
Particularly, this SRM device receives the storage area information that file-sharing equipment sends, and by the LUN of this storage area information definite this Shared Folders of storage in the storage area of the first virtual machine, wherein, this LUN stores this Shared Folders and unshared file, and this SRM device is determined the storage area of this Shared Folders of storage in this LUN according to this storage area information, this SRM device is encapsulated as the target storage area by this storage area, and this target storage area is dispensed to the second virtual machine, for example, this storage area can be the disk storage zone of this Shared Folders of storage, this target storage area can be virtual volume, this SRM device is encapsulated as virtual volume by the disk storage zone of this Shared Folders of storage in this LUN, and this virtual volume is distributed to the second virtual machine, like this, the second virtual machine is after powering on, can identify this virtual volume, and can this Shared Folders of storing in this virtual volume be conducted interviews.
Illustratively, this SRM device receives the storage area information that file-sharing equipment sends, and by the LUN of this storage area information definite this shared file of storage in the storage area of the first virtual machine, wherein, this LUN comprises the storage area A that stores shared file, store storage area B and the idle memory region C of unshared file, this SRM device is encapsulated as the target storage area according to this storage area information by this storage area A and idle memory region C, this target storage area comprises this storage area A and this idle memory region C, and this target storage area is dispensed to this second virtual machine, so that this second virtual machine is accessed this shared file in this target storage area, because this target storage area is to distribute to the second virtual machine by this SRM device, so this target storage area is equivalent to the storage area of this second virtual machine, like this, after this first virtual machine shutdown, this second virtual machine still can conduct interviews to this shared file of storing in this target storage area, thereby improved user's experience.
It should be noted that, in the idle memory region C that above-mentioned target storage area comprises, can be idle memory region all in this LUN, can be also part idle memory region in LUN, and the present invention does not do restriction to this.
Another kind of execution mode, this document shared device is sent to the SRM device by this storage area information, so that this SRM device is determined the storage area of this shared file of storage according to this storage area information, comprise the storage area using the storage area at this shared file place and one section idle memory region as this shared file of storage, be packaged into a LUN, this LUN is distributed to the second virtual machine, wherein, comprise the access rights that the second virtual machine is accessed this shared file in this LUN, or Share Permissions.Be that the target storage area is above-mentioned LUN.
Another kind of execution mode, this document shared device is sent to the SRM device by this storage area information, so that this SRM device is determined the storage area of this shared file of storage according to this storage area information, comprise the storage area using the storage area at this shared file place and one section idle memory region as this shared file of storage, be packaged into a virtual disk or a volume, this virtual disk or volume are distributed to the second virtual machine.The target storage area is above-mentioned virtual disk or volume.
Alternatively, this SRM device can also directly be distributed to this second virtual machine by the LUN of this Shared Folders of storage, so that this this second virtual machine conducts interviews to this Shared Folders in this LUN.
When this LUN also stores unshared file, it should be noted that, this unshared file of this document shared device is set to hidden state, and limit the access rights (the second virtual machine carries out read operation and write operation to this unshared file as forbidden) of this unshared file, like this, this unshared file is sightless to the user, simultaneously, the second virtual machine can't be accessed this unshared file, thereby prevents from unshared file is shared, and has promoted user's experience.
Illustratively, this SRM device receives the storage area information that file-sharing equipment sends, and by the LUN of this storage area information definite this shared file of storage in the storage area of the first virtual machine, wherein, this LUN comprises storage area A and the idle memory region B that stores shared file, if this LUN comprises the storage area C of unshared file, this unshared file of this document shared device is set to hidden state, and limit the access limit of this unshared file, so that the second virtual machine can't be accessed this unshared file in the storage area C of the unshared file of storage, this SRM device is dispensed to this second virtual machine by this LUN, so that this second virtual machine is accessed the shared file in this LUN.
It should be noted that, because this LUN distributes to the second virtual machine by this SRM device, so this LUN is equivalent to the storage area of this second virtual machine, like this, after this first virtual machine shutdown, this second virtual machine still can conduct interviews to this shared file of storing in this LUN, thereby has improved user's experience.
Further, when the user need to cancel the file-sharing to this second virtual machine, carry out following steps:
S306, this document shared device obtain the identification information of this second virtual machine, and this identification information is sent to the SRM device.
Wherein, this identification information is used to indicate this second virtual machine of cancellation and accesses this shared file.
S307, this SRM device are deleted the target storage area of this second virtual machine according to this identification information.
Particularly, when the user determine to need cancels the file-sharing to this second virtual machine, this document shared device obtains the identification information (as title or the IP address of the second virtual machine) of this second virtual machine, and this identification information is sent to the SRM device, this SRM device is deleted the target storage area of this second virtual machine according to this identification information, thereby cancels the file-sharing of this first virtual machine to this second virtual machine.
It should be noted that, this first virtual machine is shared file, and this first virtual machine can be shared by the file to this document place, thereby realizes sharing this document, specific implementation can refer step S301 to step S307, repeated no more herein.
It should be noted that, if while in the file at this shared file place, also comprising unshared file, this unshared file of this document shared device is set to hidden state, and limit the access rights of this unshared file, like this, this unshared file is sightless to the user, thereby prevents from unshared file is shared, and has promoted user's experience.
In addition, this first virtual machine can also directly be shared file, after this document shared device is determined and need to be carried out shared file in the storage area of this first virtual machine, this document shared device obtains the index node information of this shared file, and determine that according to this index node information this shared file stores the storage subregion of this shared file in the storage area of this first virtual machine, like this, this document shared device obtains the storage area information of this shared file, and the storage area information of this shared file is sent to this SRM device, so that this SRM device is determined the target storage area according to this storage area information, and this target storage area is sent to this second virtual machine.
By adopting above-mentioned implementation step, file-sharing equipment is sent to the SRM device by the storage area information of this shared file of getting in the storage area of this first virtual machine, this SRM device is determined the target storage area according to this storage area information, and this target storage area is dispensed to this second virtual machine, so that this second virtual machine is accessed this shared file in this target storage area, like this, because this target storage area is distributed to this second virtual machine by this SRM device, so this target storage area is equivalent to the storage area of this second virtual machine, this second virtual machine can directly be accessed the shared file in this target storage area, and need to from the first virtual machine, not access this shared file, thereby reduced taking this first virtual machine computational resource, and improved the access speed of this second virtual machine to shared file.
It should be noted that, for said method embodiment, for simple description, therefore it all is expressed as to a series of combination of actions, but those skilled in the art should know, the present invention is not subject to the restriction of described sequence of movement, secondly, those skilled in the art also should know, the embodiment described in specification all belongs to preferred embodiment, and related action and module might not be that the present invention is necessary.
The embodiment of the present invention provides a kind of file-sharing equipment 40, and as shown in Figure 4, this document shared device 40 comprises:
Processing unit 41, for determining the shared file of the first virtual machine that share service is provided.
Acquiring unit 42, for obtaining the storage area information of the shared file definite at this processing unit 41.
Transmitting element 43, be sent to the SRM device for the storage area information that this acquiring unit 42 is got, so that this SRM device is determined the target storage area according to this storage area information, and this target storage area is distributed to the second virtual machine.
Wherein, this target storage area stores this shared file, and this second virtual machine is for receiving the virtual machine of this shared file.
Particularly, after the user determines the shared file of needs by file-sharing equipment in the storage area of this first virtual machine, by this document shared device, the access rights of this shared file and the second virtual machine that allows to receive this shared file are set again, this second virtual machine can conduct interviews to this shared file according to access rights.While usually shared file being set, can take file as unit, the file in this document folder is shared file, and the shared file in the embodiment of the present invention also comprises the scene that Shared Folders is set.
Further, this acquiring unit 42 specifically for, obtain the directory entry of this shared file and index node information corresponding to this directory entry, and determine this storage area information according to this directory entry and index node information corresponding to this directory entry.
Wherein, this storage area information is included in the identification information of the storage subregion of this shared file of storage in the storage area of this first virtual machine.
In a kind of possible implementation of the present invention, this first virtual machine is by sharing to realize file-sharing to file, to share a certain file, the file at this document place is made as to Shared Folders, wherein, comprise shared file in this Shared Folders, can also comprise at least one in shared Sub file and shared Sub file, after this document shared device is determined the shared file of needs in this first virtual machine, this document shared device obtains the directory entry (as the title of this shared Sub file and/or this shared Sub file) of this Shared Folders, determine corresponding index node information according to this directory entry, and determine in the storage area of the first virtual machine the storage subregion of this shared file of storage according to this index node information, for at least one the situation comprised in shared Sub file and shared Sub file, as comprise the shared Sub file, also comprise the storage subregion of determining the shared Sub file of storing according to index node information in the storage area of the first virtual machine.Wherein, the Shared Folders of take comprises that the situation of shared file is example, this index node information is included in the identification information of the storage subregion of this shared file of storage in the storage area of this first virtual machine, like this, this document shared device obtains the storage area information (as the identification information of the storage subregion of this shared file of storage in the storage area at the first virtual machine) of this Shared Folders.
Illustratively, this document shared device is determined the Shared Folders in this first virtual machine, comprise shared Sub file and shared Sub file X in this Shared Folders, comprise shared Sub file Y in this shared Sub file, the directory entry of this Shared Folders is designated as directory entry A, the index node information of this shared Sub file is designated as index node information a, the index node information of this shared Sub file X is designated as index node information b, the directory entry of this shared Sub file is designated as directory entry B, the index node information of this shared Sub file Y is designated as index node information c, wherein, this index node information a is included in the identification information of the storage subregion of this shared Sub file of storage in the storage area of the first virtual machine, this document shared device is determined this index node information a and this index node information b according to this directory entry A, thereby determine the storage subregion of this shared Sub file of storage in the storage area of the first virtual machine according to the identification information in this index node information a, and determine this directory entry B according to this storage subregion, and determine this index node information c according to this directory entry B, thereby determine the storage subregion of this shared Sub file of storage Y in the storage area of the first virtual machine according to this index node information c, this document shared device is determined the storage subregion of this shared Sub file of storage X in the storage area of the first virtual machine according to this index node information b, like this, this document shared device obtains the storage area information (identification information of the storage subregion of storage area in the storage area of the first virtual machine that the shared Sub file Y in shared Sub file and shared Sub file X and shared Sub file is corresponding) of this Shared Folders.
It should be noted that, the storage area of the first virtual machine is divided a plurality of storage subregions, the plurality of storage subregion is to there being identification information, the index node information that above-mentioned directory entry is corresponding is included in shared Sub file (comprising the shared Sub file Y in this shared Sub file) that in the storage area of the first virtual machine, this directory entry of storage is corresponding and/or identification information corresponding to storage subregion of this shared Sub file X, this document shared device is determined and store the storage subregion in this shared Sub file (comprising the shared Sub file in this shared Sub file) and/or this shared Sub file in the storage area of the first virtual machine according to this identification information.
In the another kind of possible implementation of the present invention, this first virtual machine is shared file, this first virtual machine can be shared by the file to this document place, thereby realize sharing this document, specific implementation can, with reference to the corresponding description of in upper a kind of implementation, file being shared, repeat no more herein.
It should be noted that, if while in the file at this shared file place, also comprising unshared file, this unshared file of this document shared device is set to hidden state, and limit the access rights of this unshared file, like this, this unshared file is sightless to the user, thereby prevents from unshared file is shared, and has promoted user's experience.
In addition, this first virtual machine can also directly be shared file, after this document shared device is determined and need to be carried out shared file in the storage area of this first virtual machine, this document shared device obtains the index node information of this shared file, and determine that according to this index node information this shared file stores the storage subregion of this shared file in the storage area of this first virtual machine, like this, this document shared device obtains the storage area information of this shared file.
It should be noted that, this document shared device can also send the free storage domain information to the SRM device, wherein, this idle memory region information comprises the identification information of not storing the storage subregion of data in the storage area of this first virtual machine, that is to say, above-mentioned storage area information can also comprise this free storage domain information, this SRM device is determined the target storage area according to this storage area information, and this target storage area is distributed to this second virtual machine, like this, if the authority of file-sharing equipment setting allows this second virtual machine to carry out write operation to this shared file, the data that write this shared file can be stored in the idle memory region that this free storage domain information is corresponding, to improve the user, experience.
Particularly, above-mentioned SRM device determines that according to this storage area information this target storage area can comprise following two kinds of implementations:
Mode one, this document shared device is sent to the SRM device by this storage area information, so that this SRM device is determined the LUN of this shared file of storage according to this storage area information, and this LUN is dispensed to this second virtual machine, so that this second virtual machine conducts interviews to this shared file in this LUN.
Wherein, this LUN stores this shared file.
When this LUN also stores unshared file, it should be noted that, this unshared file of this document shared device is set to hidden state, and limit the access rights (the second virtual machine carries out read operation and write operation to this unshared file as forbidden) of this unshared file, like this, this unshared file is sightless to the user, simultaneously, the second virtual machine can't be accessed this unshared file, thereby prevents from unshared file is shared, and has promoted user's experience.
Illustratively, this SRM device receives the storage area information that file-sharing equipment sends, and by the LUN of this storage area information definite this shared file of storage in the storage area of the first virtual machine, wherein, this LUN comprises storage area A and the idle memory region B that stores shared file, if this LUN comprises the storage area C of unshared file, this unshared file of this document shared device is set to hidden state, and limit the access limit of this unshared file, so that the second virtual machine can't be accessed this unshared file in the storage area C of the unshared file of storage, this SRM device is dispensed to this second virtual machine by this LUN, so that this second virtual machine conducts interviews to this shared file of storing in this LUN.
It should be noted that, because this LUN distributes to the second virtual machine by this SRM device, so this LUN is equivalent to the storage area of this second virtual machine, like this, after this first virtual machine shutdown, this second virtual machine still can conduct interviews to this shared file of storing in this LUN, thereby has improved user's experience.
Mode two, this document shared device is sent to the SRM device by this storage area information, so that this SRM device is determined the LUN of this shared file of storage according to this storage area information, and determine the target storage area according to this LUN, and this target storage area is distributed to this second virtual machine, so that this second virtual machine conducts interviews to this shared file.
Wherein, this LUN stores this shared file and unshared file; This target storage area is stored this shared file.
Particularly, this SRM device receives the storage area information that file-sharing equipment sends, and by the LUN of this storage area information definite this shared file of storage in the storage area of the first virtual machine, wherein, this LUN stores this shared file and unshared file, and this SRM device is determined the storage area of this shared file of storage in this LUN according to this storage area information, this SRM device is encapsulated as the target storage area by this storage area, and this target storage area is dispensed to the second virtual machine, for example, this storage area can be the disk storage zone of this shared file of storage, this target storage area can be virtual volume, this SRM device is encapsulated as virtual volume by the disk storage zone of this shared file of storage in this LUN, and this virtual volume is distributed to the second virtual machine, like this, the second virtual machine is after powering on, can identify this virtual volume, and can this shared file of storing in this virtual volume be conducted interviews.
Illustratively, this SRM device receives the storage area information that file-sharing equipment sends, and by the LUN of this storage area information definite this shared file of storage in the storage area of the first virtual machine, wherein, this LUN comprises the storage area A that stores shared file, store storage area B and the idle memory region C of unshared file, this SRM device is encapsulated as the target storage area according to this storage area information by this storage area A and idle memory region C, this target storage area comprises this storage area A and this idle memory region C, and this target storage area is dispensed to this second virtual machine, so that this second virtual machine is accessed this shared file in this target storage area, because this target storage area is to distribute to the second virtual machine by this SRM device, so this target storage area is equivalent to the storage area of this second virtual machine, like this, after this first virtual machine shutdown, this second virtual machine still can conduct interviews to this shared file of storing in this target storage area, thereby improved user's experience.
It should be noted that, in the idle memory region C that above-mentioned target storage area comprises, can be idle memory region all in this LUN, can be also part idle memory region in LUN, and the present invention does not do restriction to this.
In addition, aforesaid way one is with the difference of mode two: mode one, be directly will be definite in the storage area of the first virtual machine LUN be dispensed to the second virtual machine, because this LUN comprises the storage area of storing shared file and comprises the storage area of storing unshared file, therefore, also need unshared file to be set to hidden state, and limit the access rights of this unshared file; And mode two, the storage area that is the shared file that comprises of LUN that will be definite in the storage area of the first virtual machine is encapsulated as a new storage area, and new storage area is dispensed to the second virtual machine by this, the embodiment of the present invention is not construed as limiting above-mentioned two kinds of implementations.
Another kind of execution mode, this document shared device is sent to the SRM device by this storage area information, so that this SRM device is determined the storage area of this shared file of storage according to this storage area information, comprise the storage area using the storage area at this shared file place and one section idle memory region as this shared file of storage, be packaged into a LUN, this LUN is distributed to the second virtual machine, wherein, comprise the access rights that the second virtual machine is accessed this shared file in this LUN, or Share Permissions.Be that the target storage area is above-mentioned LUN.
Another kind of execution mode, this document shared device is sent to the SRM device by this storage area information, so that this SRM device is determined the storage area of this shared file of storage according to this storage area information, comprise the storage area using the storage area at this shared file place and one section idle memory region as this shared file of storage, be packaged into a virtual disk or a volume, this virtual disk or volume are distributed to the second virtual machine.The target storage area is above-mentioned virtual disk or volume.
Further, this acquiring unit 42 also for, obtain the identification information of this second virtual machine, wherein, this identification information is used to indicate to be cancelled this second virtual machine and accesses this shared file.
This transmitting element 43 also for, this identification information is sent to the SRM device, so that this SRM device is deleted this target storage area of this second virtual machine according to this identification information.
Particularly, when the user determine to need cancels the file-sharing to this second virtual machine, this document shared device obtains the identification information (as title or the IP address of the second virtual machine) of this second virtual machine, and this identification information is sent to the SRM device, this SRM device is deleted the target storage area of this second virtual machine according to this identification information, thereby cancels the file-sharing of this first virtual machine to this second virtual machine.
Adopt above-mentioned file-sharing equipment, the storage area information of this shared file that this document shared device will get in the storage area of the first virtual machine is sent to the SRM device, this SRM device is determined the target storage area according to this storage area information, and this target storage area is dispensed to this second virtual machine, so that this second virtual machine conducts interviews to this shared file, like this, because this target storage area is to distribute to this second virtual machine by this SRM device, so this target storage area is equivalent to the storage area of this second virtual machine, this second virtual machine can directly be accessed the shared file in this target storage area, and do not need again this shared file of access from this first virtual machine, thereby reduced taking this first virtual machine computational resource, and improved the access speed of this virtual machine of second to this shared file.
Affiliated those skilled in the art can be well understood to, and for convenience and simplicity of description, specific works process and the description of the file-sharing equipment of foregoing description, can, with reference to the corresponding process in preceding method embodiment, not repeat them here.
Embodiments of the invention provide a kind of SRM device 50, and as shown in Figure 5, this SRM device 50 comprises:
Receiving element 51, for receiving the storage area information of the shared file that file-sharing equipment sends, this shared file is provided by the first virtual machine.
Processing unit 52, determine the target storage area for the storage area information received according to this receiving element 51, and this target storage area is distributed to the second virtual machine, so that this second virtual machine conducts interviews to this shared file.
Wherein, this target storage area stores this shared file.
Particularly, after the user determines the shared file of needs by file-sharing equipment in the storage area of this first virtual machine, by this document shared device, the access rights of this shared file and the second virtual machine that allows to receive this shared file are set again, this second virtual machine can conduct interviews to this shared file according to access rights.While usually shared file being set, can take file as unit, the file in this document folder is shared file, and the shared file in the embodiment of the present invention also comprises the scene that Shared Folders is set.
Further, this document shared device obtains directory entry and the index node information corresponding to this directory entry of this shared file, and determine this storage area information according to this directory entry and index node information corresponding to this directory entry, and this storage area information is sent to the SRM device.
Wherein, this storage area information is included in the identification information of the storage subregion of this shared file of storage in the storage area of this first virtual machine.
In a kind of possible implementation of the present invention, this first virtual machine is by sharing to realize file-sharing to file, to share a certain file, the file at this document place is made as to Shared Folders, wherein, comprise shared file in this Shared Folders, can also comprise at least one in shared Sub file and shared Sub file, after this document shared device is determined the shared file of needs in this first virtual machine, this document shared device obtains the directory entry (as the title of this shared Sub file and/or this shared Sub file) of this Shared Folders, determine corresponding index node information according to this directory entry, and determine in the storage area of the first virtual machine the storage subregion of this shared file of storage according to this index node information, for at least one the situation comprised in shared Sub file and shared Sub file, as comprise the shared Sub file, also comprise the storage subregion of determining the shared Sub file of storing according to index node information in the storage area of the first virtual machine.Wherein, the Shared Folders of take comprises that the situation of shared file is example, this index node information is included in the identification information of the storage subregion of this shared file of storage in the storage area of this first virtual machine, like this, this document shared device obtains the storage area information (as the identification information of the storage subregion of this shared file of storage in the storage area at the first virtual machine) of this Shared Folders.
Illustratively, this document shared device is determined the Shared Folders in this first virtual machine, comprise shared Sub file and shared Sub file X in this Shared Folders, comprise shared Sub file Y in this shared Sub file, the directory entry of this Shared Folders is designated as directory entry A, the index node information of this shared Sub file is designated as index node information a, the index node information of this shared Sub file X is designated as index node information b, the directory entry of this shared Sub file is designated as directory entry B, the index node information of this shared Sub file Y is designated as index node information c, wherein, this index node information a is included in the identification information of the storage subregion of this shared Sub file of storage in the storage area of the first virtual machine, this document shared device is determined this index node information a and this index node information b according to this directory entry A, thereby determine the storage subregion of this shared Sub file of storage in the storage area of the first virtual machine according to the identification information in this index node information a, and determine this directory entry B according to this storage subregion, and determine this index node information c according to this directory entry B, thereby determine the storage subregion of this shared Sub file of storage Y in the storage area of the first virtual machine according to this index node information c, this document shared device is determined the storage subregion of this shared Sub file of storage X in the storage area of the first virtual machine according to this index node information b, like this, this document shared device obtains the storage area information (identification information of the storage subregion of storage area in the storage area of the first virtual machine that the shared Sub file Y in shared Sub file and shared Sub file X and shared Sub file is corresponding) of this Shared Folders.
It should be noted that, the storage area of the first virtual machine is divided a plurality of storage subregions, the plurality of storage subregion is to there being identification information, the index node information that above-mentioned directory entry is corresponding is included in shared Sub file (comprising the shared Sub file Y in this shared Sub file) that in the storage area of the first virtual machine, this directory entry of storage is corresponding and/or identification information corresponding to storage subregion of this shared Sub file X, this document shared device is determined and store the storage subregion in this shared Sub file (comprising the shared Sub file in this shared Sub file) and/or this shared Sub file in the storage area of the first virtual machine according to this identification information.
In the another kind of possible implementation of the present invention, this first virtual machine is shared file, this first virtual machine can be shared by the file to this document place, thereby realize sharing this document, specific implementation can, with reference to the corresponding description of in upper a kind of implementation, file being shared, repeat no more herein.
It should be noted that, if while in the file at this shared file place, also comprising unshared file, this unshared file of this document shared device is set to hidden state, and limit the access rights of this unshared file, like this, this unshared file is sightless to the user, thereby prevents from unshared file is shared, and has promoted user's experience.
In addition, this first virtual machine can also directly be shared file, after this document shared device is determined and need to be carried out shared file in the storage area of this first virtual machine, this document shared device obtains the index node information of this shared file, and determine that according to this index node information this shared file stores the storage subregion of this shared file in the storage area of this first virtual machine, like this, this document shared device obtains the storage area information of this shared file.
It should be noted that, this document shared device can also send the free storage domain information to the SRM device, wherein, this idle memory region information comprises the identification information of not storing the storage subregion of data in the storage area of this first virtual machine, that is to say, above-mentioned storage area information can also comprise this free storage domain information, this SRM device is determined the target storage area according to this storage area information, and this target storage area is distributed to this second virtual machine, like this, if the authority of file-sharing equipment setting allows this second virtual machine to carry out write operation to this shared file, the data that write this shared file can be stored in the idle memory region that this free storage domain information is corresponding, to improve the user, experience.
Alternatively, this processing unit 52 also for, determine LUN according to this storage area information.
Wherein, this LUN stores this shared file.
Particularly, this SRM device is determined the LUN of this shared file of storage according to this storage area information, and this LUN is dispensed to this second virtual machine, so that this second virtual machine conducts interviews to this shared file in this LUN.
When this LUN also stores unshared file, it should be noted that, this unshared file of this document shared device is set to hidden state, and limit the access rights (the second virtual machine carries out read operation and write operation to this unshared file as forbidden) of this unshared file, like this, this unshared file is sightless to the user, simultaneously, the second virtual machine can't be accessed this unshared file, thereby prevents from unshared file is shared, and has promoted user's experience.
Illustratively, this SRM device receives the storage area information that file-sharing equipment sends, and by the LUN of this storage area information definite this shared file of storage in the storage area of the first virtual machine, wherein, this LUN comprises storage area A and the idle memory region B that stores shared file, if this LUN comprises the storage area C of unshared file, this unshared file of this document shared device is set to hidden state, and limit the access limit of this unshared file, so that the second virtual machine can't be accessed this unshared file in the storage area C of the unshared file of storage, this SRM device is dispensed to this second virtual machine by this LUN, so that this second virtual machine conducts interviews to this shared file of storing in this LUN.
It should be noted that, because this LUN distributes to the second virtual machine by this SRM device, so this LUN is equivalent to the storage area of this second virtual machine, like this, after this first virtual machine shutdown, this second virtual machine still can conduct interviews to this shared file of storing in this LUN, thereby has improved user's experience.
Alternatively, this processing unit 52 specifically for, determine LUN according to this storage area information, and determine this target storage area according to this LUN.
Wherein, this LUN stores this shared file and unshared file; This target storage area is stored this shared file.
Particularly, this SRM device receives the storage area information that file-sharing equipment sends, and by the LUN of this storage area information definite this shared file of storage in the storage area of the first virtual machine, wherein, this LUN stores this shared file and unshared file, and this SRM device is determined the storage area of this shared file of storage in this LUN according to this storage area information, this SRM device is encapsulated as the target storage area by storage area, and this target storage area is dispensed to the second virtual machine, for example, this storage area can be the disk storage zone of this shared file of storage, this target storage area can be virtual volume, this SRM device is encapsulated as virtual volume by the disk storage zone of this shared file of storage in this LUN, and this virtual volume is distributed to the second virtual machine, like this, the second virtual machine is after powering on, can identify this virtual volume, and can this shared file of storing in this virtual volume be conducted interviews.
Illustratively, this SRM device receives the storage area information that file-sharing equipment sends, and by the LUN of this storage area information definite this shared file of storage in the storage area of the first virtual machine, wherein, this LUN comprises the storage area A that stores this shared file, store storage area B and the idle memory region C of unshared file, this SRM device is encapsulated as the target storage area according to this storage area information by this storage area A and idle memory region C, this target storage area comprises this storage area A and this idle memory region C, and this target storage area is dispensed to this second virtual machine, so that this second virtual machine conducts interviews to this shared file of storing in this target storage area, because this target storage area is to distribute to the second virtual machine by this SRM device, so this target storage area is equivalent to the storage area of this second virtual machine, like this, after this first virtual machine shutdown, this second virtual machine still can conduct interviews to this shared file of storing in this target storage area, thereby improved user's experience.
It should be noted that, in the idle memory region C that above-mentioned target storage area comprises, can be idle memory region all in this LUN, can be also part idle memory region in LUN, and the present invention does not do restriction to this.
In addition, above-mentioned two kinds of optional processing unit differences are: the first processing unit, be directly will be definite in the storage area of the first virtual machine LUN be dispensed to the second virtual machine, because this LUN comprises the storage area of storing shared file and comprises the storage area of storing unshared file, therefore, also need unshared file to be set to hidden state, and limit the access rights of this unshared file; And the second processing unit, the storage area that is the shared file that comprises of LUN that will be definite in the storage area of the first virtual machine is encapsulated as a new storage area, and new storage area is dispensed to the second virtual machine by this, the embodiment of the present invention is not construed as limiting the implementation of above-mentioned two kinds of processing units.
Another kind of execution mode, this document shared device is sent to the SRM device by this storage area information, so that this SRM device is determined the storage area of this shared file of storage according to this storage area information, comprise the storage area using the storage area at this shared file place and one section idle memory region as this shared file of storage, be packaged into a LUN, this LUN is distributed to the second virtual machine, wherein, comprise the access rights that the second virtual machine is accessed this shared file in this LUN, or Share Permissions.Be that the target storage area is above-mentioned LUN.
Another kind of execution mode, this document shared device is sent to the SRM device by this storage area information, so that this SRM device is determined the storage area of this shared file of storage according to this storage area information, comprise the storage area using the storage area at this shared file place and one section idle memory region as this shared file of storage, be packaged into a virtual disk or a volume, this virtual disk or volume are distributed to the second virtual machine.The target storage area is above-mentioned virtual disk or volume.
Further, this receiving element 51 also for, receive the identification information of this second virtual machine that this document shared device sends.
Wherein, this identification information is used to indicate this second virtual machine of cancellation and accesses this shared file.
This processing unit 52 also for, delete this target storage area of this second virtual machine according to this identification information
Particularly, when the user determine to need cancels the file-sharing to this second virtual machine, this document shared device obtains the identification information (as title or the IP address of the second virtual machine) of this second virtual machine, and this identification information is sent to the SRM device, this SRM device is deleted the target storage area of this second virtual machine according to this identification information, thereby cancels the file-sharing of this first virtual machine to this second virtual machine.
Adopt above-mentioned SRM device, after file-sharing equipment is determined the shared file in this first virtual machine and is obtained the storage area information of this shared file, this SRM device receives this storage area information that this document shared device sends, and determine the target storage area according to this storage area information, this SRM device is distributed to this second virtual machine by this target storage area, so that this second virtual machine conducts interviews to this shared file in this target storage area, like this, because this target storage area is distributed to this second virtual machine by this SRM device, so this target storage area is equivalent to the storage area of this second virtual machine, this second virtual machine can directly be accessed this shared file in this target storage area, and need to from this first virtual machine, not access this shared file, thereby reduced taking this first virtual machine computational resource, and improved the access speed of this second virtual machine to shared file.
Affiliated those skilled in the art can be well understood to, and for convenience and simplicity of description, specific works process and the description of the SRM device of foregoing description, can, with reference to the corresponding process in preceding method embodiment, not repeat them here.
The invention provides a kind of file-sharing equipment 60, as shown in Figure 6, this document shared device 60 comprises:
Processor (processor) 61, communication interface (Communications Interface) 62, memory (memory) 63 and communication bus 64; Wherein, described processor 61, described communication interface 62 and described memory 63 complete mutual communicating by letter by described communication bus 64.
Processor 61 may be a multi-core central processing unit CPU, or specific integrated circuit ASIC(Application Specific Integrated Circuit), or be configured to implement one or more integrated circuits of the embodiment of the present invention.
Memory 63 is for depositing program code, and described program code comprises computer-managed instruction and network flow graph.Memory 63 may comprise the high-speed RAM memory, also may also comprise nonvolatile memory (non-volatile memory), for example at least one magnetic disc store.
Described communication interface 62, for realizing the connection communication between these devices.
These processor 61 executive program codes, for determining the shared file of the first virtual machine that share service is provided, obtain the storage area information of this shared file, and this storage area information is sent to the SRM device, so that this SRM device is determined the target storage area according to this storage area information, and this target storage area is distributed to the second virtual machine.
Wherein, this target storage area stores this shared file, and this second virtual machine is for receiving the virtual machine of this shared file.
Alternatively, this processor 61 also for, obtain the directory entry of this shared file and index node information corresponding to this directory entry, and determine this storage area information according to this directory entry and index node information corresponding to this directory entry.
Wherein, this storage area information is included in the identification information of the storage subregion of this shared file of storage in the storage area of this first virtual machine.
Alternatively, this processor 61 also for, obtain the identification information of this second virtual machine, and this identification information sent to the SRM device, so that this SRM device is deleted this target storage area of this second virtual machine according to this identification information.
Wherein, this identification information is used to indicate this second virtual machine of cancellation and accesses this shared file.
Embodiments of the invention provide a kind of SRM device 70, and as shown in Figure 7, this SRM device 70 comprises:
Processor (processor) 71, communication interface (Communications Interface) 72, memory (memory) 73 and communication bus 74; Wherein, described processor 71, described communication interface 72 and described memory 73 complete mutual communicating by letter by described communication bus 74.
Processor 71 may be a multi-core central processing unit CPU, or specific integrated circuit ASIC(Application Specific Integrated Circuit), or be configured to implement one or more integrated circuits of the embodiment of the present invention.
Memory 73 is for depositing program code, and this program code comprises computer-managed instruction and network flow graph.Memory 73 may comprise the high-speed RAM memory, also may also comprise nonvolatile memory (non-volatile memory), for example at least one magnetic disc store.
This communication interface 72, for realizing the connection communication between these devices.
These processor 71 executive program codes, for receiving the storage area information of the shared file that file-sharing equipment sends, this shared file is provided by the first virtual machine, determine the target storage area according to this storage area information, and this target storage area is distributed to the second virtual machine, so that this second virtual machine conducts interviews to this shared file.
Wherein, this target storage area stores this shared file; This storage area information is included in the identification information of the storage subregion of this shared file of storage in the storage area of this first virtual machine.
Alternatively, this processor 71 also for, determine LUN according to this storage area information.
Wherein, this LUN stores this shared file.
Alternatively, this processor 71 also for, determine LUN according to this storage area information, and determine this target storage area according to this LUN.
Wherein, this LUN stores this shared file and unshared file; This target storage area is stored this shared file.
Alternatively, this processor 71 also for, receive the identification information of this second virtual machine that this document shared device sends, and delete this target storage area of this second virtual machine according to this identification information.
Wherein, this identification information is used to indicate this second virtual machine of cancellation and accesses this shared file.
In the embodiment of the present invention virtual machine access shared file comprise read, revise, write, deletion etc., specifically can determine according to the shared file access rights of setting, the embodiment of the present invention is not construed as limiting this.After the virtual machine of reception shared file refers to that virtual machine A arranges shared file, the shared file access rights are arranged except virtual machine A, can access the virtual machine of described shared file.
The above; be only the specific embodiment of the present invention, but protection scope of the present invention is not limited to this, anyly is familiar with those skilled in the art in the technical scope that the present invention discloses; the variation that can expect easily or replacement, within all should being encompassed in protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection range of claim.

Claims (14)

1. the method for a file-sharing, is characterized in that, comprising:
File-sharing equipment is determined the shared file in the first virtual machine that share service is provided;
Obtain the storage area information of described shared file;
Described storage area information is sent to the SRM device, so that described SRM device is determined the target storage area according to described storage area information, and described target storage area is distributed to the second virtual machine, wherein, described target storage area stores described shared file, and described the second virtual machine is for receiving the virtual machine of described shared file.
2. method according to claim 1, is characterized in that, the described storage area information of obtaining described shared file comprises:
Obtain directory entry and the index node information corresponding to described directory entry of described shared file;
Determine described storage area information according to described directory entry and index node information corresponding to described directory entry.
3. method according to claim 1 and 2, is characterized in that, after described SRM device is determined the target storage area according to described storage area information, described method also comprises:
Obtain the identification information of described the second virtual machine, wherein, described identification information is used to indicate described the second virtual machine of cancellation and accesses described shared file;
Described identification information is sent to the SRM device, so that described SRM device is deleted the described target storage area of described the second virtual machine according to described identification information.
4. the method for a file-sharing, is characterized in that, comprising:
The SRM device receives the storage area information of the shared file of file-sharing equipment transmission, and described shared file is provided by the first virtual machine;
Determine the target storage area according to described storage area information, and described target storage area is distributed to the second virtual machine, so that described the second virtual machine conducts interviews to described shared file; Wherein, described target storage area stores described shared file.
5. method according to claim 4, is characterized in that, described target storage area is LUN LUN; Wherein, described LUN stores described shared file.
6. method according to claim 4, is characterized in that, describedly according to described storage area information, determines that the target storage area comprises:
Determine LUN according to described storage area information, and determine described target storage area according to described LUN, wherein, described LUN stores described shared file and unshared file; Described target storage area is stored described shared file.
7. according to the described method of claim 4 to 6 any one, it is characterized in that, after described target storage area is distributed to described the second virtual machine, described method also comprises:
Receive the identification information of described second virtual machine of described file-sharing equipment transmission, wherein, described identification information is used to indicate described the second virtual machine of cancellation and accesses described shared file;
Delete the described target storage area of described the second virtual machine according to described identification information.
8. a file-sharing equipment, is characterized in that, comprising:
Processing unit, for determining the shared file of the first virtual machine that share service is provided;
Acquiring unit, for obtaining the storage area information of the shared file definite at described processing unit;
Transmitting element, be sent to the SRM device for the storage area information that described acquiring unit is got, so that described SRM device is determined the target storage area according to described storage area information, and described target storage area is distributed to the second virtual machine, wherein, described target storage area stores described shared file, and described the second virtual machine is for receiving the virtual machine of described shared file.
9. equipment according to claim 8, is characterized in that, described acquiring unit specifically for:
Obtain directory entry and the index node information corresponding to described directory entry of described shared file, and determine described storage area information according to described directory entry and index node information corresponding to described directory entry.
10. equipment according to claim 8 or claim 9, is characterized in that,
Described acquiring unit also for, obtain the identification information of described the second virtual machine, wherein, described identification information is used to indicate to be cancelled described the second virtual machine and accesses described shared file;
Described transmitting element also for, described identification information is sent to the SRM device, so that described SRM device is deleted the described target storage area of described the second virtual machine according to described identification information.
11. a SRM device, is characterized in that, comprising:
Receiving element, for receiving the storage area information of the shared file that file-sharing equipment sends, described shared file is provided by the first virtual machine;
Processing unit, determine the target storage area for the storage area information received according to described receiving element, and described target storage area is distributed to the second virtual machine, so that described the second virtual machine conducts interviews to described shared file; Wherein, described target storage area stores described shared file.
12. SRM device according to claim 11, is characterized in that, described processing unit specifically for:
Determine LUN according to described storage area information; Wherein, described LUN stores described shared file.
13. SRM device according to claim 11, is characterized in that, described processing unit specifically for:
Determine LUN according to described storage area information, and determine described target storage area according to described LUN, wherein, described LUN stores described shared file and unshared file; Described target storage area is stored described shared file.
14. according to claim 11 to the described SRM device of 13 any one, it is characterized in that,
Described receiving element also for, receive the identification information of described the second virtual machine that described file-sharing equipment sends, wherein, described identification information is used to indicate to be cancelled described the second virtual machine and accesses described shared file;
Described processing unit also for, delete the described target storage area of described the second virtual machine according to described identification information.
CN201310464197.XA 2013-09-30 2013-09-30 A kind of method and apparatus of file-sharing Active CN103491193B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310464197.XA CN103491193B (en) 2013-09-30 2013-09-30 A kind of method and apparatus of file-sharing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310464197.XA CN103491193B (en) 2013-09-30 2013-09-30 A kind of method and apparatus of file-sharing

Publications (2)

Publication Number Publication Date
CN103491193A true CN103491193A (en) 2014-01-01
CN103491193B CN103491193B (en) 2018-06-05

Family

ID=49831146

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310464197.XA Active CN103491193B (en) 2013-09-30 2013-09-30 A kind of method and apparatus of file-sharing

Country Status (1)

Country Link
CN (1) CN103491193B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105550576A (en) * 2015-12-11 2016-05-04 华为技术服务有限公司 Communication method and device between containers
CN106156031A (en) * 2015-03-24 2016-11-23 联想(北京)有限公司 A kind of information processing method and electronic equipment
CN109189741A (en) * 2018-09-11 2019-01-11 郑州云海信息技术有限公司 The system and method for shared file between a kind of virtual machine
CN110688194A (en) * 2018-07-06 2020-01-14 中兴通讯股份有限公司 Disk management method based on cloud desktop, virtual machine and storage medium
CN113467941A (en) * 2021-06-25 2021-10-01 北京汇钧科技有限公司 Method and device for sharing information
CN114374690A (en) * 2022-01-21 2022-04-19 荣耀终端有限公司 File sharing method, communication system and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2216963A1 (en) * 2009-02-04 2010-08-11 Nec Corporation Method for transmitting virtualized data in cloud computing environment
CN102455943A (en) * 2010-10-19 2012-05-16 上海聚力传媒技术有限公司 Method for carrying out data sharing based on memory pool, and computer device
US20130238553A1 (en) * 2010-10-28 2013-09-12 Sk Telecom Co., Ltd. Cloud computing system and data synchronization method
CN103309743A (en) * 2012-03-07 2013-09-18 上海聚耘信息科技有限公司 Resource sharing management method of virtual server
CN103389884A (en) * 2013-07-29 2013-11-13 华为技术有限公司 Method for processing input/output request, host, server and virtual machine

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102289513A (en) * 2011-09-05 2011-12-21 盛乐信息技术(上海)有限公司 Method and system for obtaining internal files of virtual machine

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2216963A1 (en) * 2009-02-04 2010-08-11 Nec Corporation Method for transmitting virtualized data in cloud computing environment
CN102455943A (en) * 2010-10-19 2012-05-16 上海聚力传媒技术有限公司 Method for carrying out data sharing based on memory pool, and computer device
US20130238553A1 (en) * 2010-10-28 2013-09-12 Sk Telecom Co., Ltd. Cloud computing system and data synchronization method
CN103309743A (en) * 2012-03-07 2013-09-18 上海聚耘信息科技有限公司 Resource sharing management method of virtual server
CN103389884A (en) * 2013-07-29 2013-11-13 华为技术有限公司 Method for processing input/output request, host, server and virtual machine

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106156031A (en) * 2015-03-24 2016-11-23 联想(北京)有限公司 A kind of information processing method and electronic equipment
CN106156031B (en) * 2015-03-24 2019-10-29 联想(北京)有限公司 A kind of information processing method and electronic equipment
CN105550576A (en) * 2015-12-11 2016-05-04 华为技术服务有限公司 Communication method and device between containers
CN105550576B (en) * 2015-12-11 2018-09-11 华为技术服务有限公司 The method and apparatus communicated between container
CN110688194A (en) * 2018-07-06 2020-01-14 中兴通讯股份有限公司 Disk management method based on cloud desktop, virtual machine and storage medium
CN110688194B (en) * 2018-07-06 2023-03-17 中兴通讯股份有限公司 Disk management method based on cloud desktop, virtual machine and storage medium
CN109189741A (en) * 2018-09-11 2019-01-11 郑州云海信息技术有限公司 The system and method for shared file between a kind of virtual machine
CN113467941A (en) * 2021-06-25 2021-10-01 北京汇钧科技有限公司 Method and device for sharing information
CN114374690A (en) * 2022-01-21 2022-04-19 荣耀终端有限公司 File sharing method, communication system and electronic equipment
CN114374690B (en) * 2022-01-21 2023-10-31 荣耀终端有限公司 File sharing method, communication system and electronic equipment

Also Published As

Publication number Publication date
CN103491193B (en) 2018-06-05

Similar Documents

Publication Publication Date Title
CN103491193A (en) Method and device for sharing file
CN110516452A (en) RBAC access authorization for resource distribution method, device, electronic equipment and storage medium
CN103152390B (en) The node configuration method of distributed memory system, device, node and system
CN106446159B (en) A kind of method of storage file, the first virtual machine and name node
CN101662414B (en) Method, system and device for processing data access
CN103383660A (en) Method and device for realizing functions of cache partition of Android system as well as terminal equipment
US20160070475A1 (en) Memory Management Method, Apparatus, and System
CN105323237A (en) Authority delegation system, method and authentication server system
CN107835181B (en) Authority management method, device and medium of server cluster and electronic equipment
US20190324814A1 (en) Resource release method, resource allocation method, devices, and computer program products
CN111949605A (en) Method, apparatus and computer program product for implementing a file system
CN104125297A (en) Virtual resource sharing method, device and system
CN103973691A (en) Resource access method and resource access device
CN110809030B (en) Network flow control method and device, coder-decoder and storage device
CN103399875A (en) File managing method and device
US9317420B2 (en) Computer program installation across multiple memories
CN107644020B (en) Data storage and calling method and device
KR101532397B1 (en) Method for managing a memory of a computer system, memory management unit and computer system
CN103973690A (en) Resource access method and resource access device
CN103957210B (en) Smart card and its method of controlling security, device and system
US11429412B2 (en) Guest protection from application code execution in kernel mode
CN115794396A (en) Resource allocation method, system and electronic equipment
CN108933837A (en) A kind of transmission method and device of image file
CN108287793A (en) The way to play for time and server of response message
CN115878309A (en) Resource allocation method, device, processing core, equipment and computer readable medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20211221

Address after: 450046 Floor 9, building 1, Zhengshang Boya Plaza, Longzihu wisdom Island, Zhengdong New Area, Zhengzhou City, Henan Province

Patentee after: Super fusion Digital Technology Co.,Ltd.

Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Patentee before: HUAWEI TECHNOLOGIES Co.,Ltd.