A secondary shared file method, device, electronic equipment and program product
Through the collaborative work of storage control, scheduling and management components, the automatic creation and direct mounting of the secondary shared file system are realized, which solves the problem that the secondary directory needs to be created manually in the existing technology, improves the utilization of storage resources and access convenience, and reduces the risk of accidental data deletion.
Patent Information
- Application Number
- CN202511374700.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-25
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2045-09-25
AI Technical Summary
In existing technologies, OpenStack's Manila component can only implement a first-level shared file system. Second-level directories need to be manually created after mounting the first-level shared file system, and cannot be directly mounted. This makes it difficult to meet users' needs for data layering and isolation, and there is a risk of data being accidentally deleted.
Through the collaborative work of storage control components, scheduling components, and management components, the system enables the automated creation of secondary shared file systems. It employs global locks, capacity filtering, and weighting mechanisms to select the optimal file storage backend, supports operations such as creation, deletion, and expansion of secondary shared file systems, and enables direct mounting through preset mounting protocols.
It enables the automated creation of a two-level shared file system, meets the requirements for data layering and isolation, reduces the risk of accidental data deletion, improves storage resource utilization and access convenience, and ensures the stability of resource allocation and system reliability.
Smart Images

Figure CN120849368B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of cloud computing technology, and in particular to a two-level file sharing method, apparatus, electronic device, and program product. Background Technology
[0002] With the continuous development of cloud computing, file storage, as a crucial component of cloud computing, is experiencing a growing demand for sharing and management. Among existing technologies, OpenStack, as a mainstream open-source cloud computing management platform, utilizes its Manila component to achieve full lifecycle management of file storage resources. This component interacts with the storage cluster through relevant modules and drivers, providing users with a primary shared file system based on protocols such as NFS and CIFS, supporting operations such as creation, authorization, and deletion. However, current solutions have significant limitations: they can only implement a primary shared file system; secondary directories must first be mounted on the primary shared file system and then manually created, and direct mounting is not possible. This makes it difficult to meet users' needs for hierarchical data isolation and also poses a risk of accidental data deletion.
[0003] Therefore, there is an urgent need for a method that can realize two-level file sharing functionality to overcome the shortcomings of existing technologies. Summary of the Invention
[0004] This application provides a method, apparatus, electronic device, and program product for secondary file sharing.
[0005] Firstly, this application provides a two-level shared file method, comprising the following steps:
[0006] The storage control component based on the cloud computing platform receives the first-level shared file system creation request and forwards the request to the storage scheduling component. The storage scheduling component acquires a global lock on the data in the shared cache based on the request, reads the capacity information data of each file storage backend from it, filters the file storage backends that do not meet the preset requirements, selects the preferred file storage backend, and completes the creation of the first-level shared file system.
[0007] Upon receiving a request to create a secondary shared file system, the system verifies the requested capacity of the secondary shared file system against the remaining available capacity of the primary shared file system based on the resource capacity of the primary shared file system. If the verification passes, the system generates the secondary shared file system based on the preset configuration logic.
[0008] The storage management component of the cloud computing platform performs management operations for the secondary shared file system;
[0009] By establishing a connection between the secondary shared file system and the target access node through a preset mounting protocol, the corresponding file resources of the secondary shared file system can be shared and accessed based on this connection.
[0010] In some embodiments, the parameters in the primary shared file system creation request include at least one of the following: sharing protocol, sharing type, and capacity size; the parameters in the secondary shared file system creation request include at least one of the following: sharing protocol, sharing type, capacity size, and unique identifier of the primary shared file system.
[0011] In some embodiments, the storage control component encapsulates the parameters in the primary shared file system creation request and the secondary shared file system creation request into a request message packet using a remote procedure call protocol, and pushes the request message packet to the message queue corresponding to the storage scheduling component.
[0012] In some embodiments, the steps for the storage scheduling component to acquire a global lock are as follows:
[0013] The storage scheduling component generates a globally unique lock identifier, reads the capacity information data of each file storage backend from the shared cache, and releases the global lock after the file storage backend has been selected.
[0014] In some embodiments, a capacity filtering method is also included, specifically comprising:
[0015] Based on the allocated capacity, first-level request capacity, and total capacity of the file storage backend, calculate the over-splitting ratio of the file storage backend. If the over-splitting ratio is greater than the preset maximum over-splitting ratio, mark the file storage backend as non-compliant and filter it.
[0016] If the sharing protocol supported by the file storage backend does not match the sharing protocol in the first-level shared file system creation request, the file storage backend will be marked as non-compliant and filtered.
[0017] In some embodiments, a capacity weighing method is also included, specifically comprising:
[0018] The storage scheduling component extracts the capacity parameters of the file storage backends that are retained after being filtered by the capacity filtering method. The capacity parameters include at least one of the following: total backend storage capacity, maximum super-division ratio pre-configured by the backend, capacity already allocated to the shared file system by the backend, and pre-set capacity reservation percentage by the backend.
[0019] Based on the capacity parameter, the available resource weight value of the file storage backend is calculated. The storage scheduling component compares the available resource weight values of all eligible file storage backends and selects the file storage backend with the largest available resource weight value as the preferred file storage backend for creating a first-level shared file system. If multiple file storage backends have the same available resource weight value, any one of them is randomly selected as the preferred file storage backend.
[0020] In some embodiments, a secondary shared file system is generated based on the resource capacity of the primary shared file system through the preset configuration logic of the storage management component of the cloud computing platform, specifically including:
[0021] The configuration parameters of the secondary shared file system are obtained through the parameter interaction interface of the storage control component of the cloud computing platform, including at least one of the following: target capacity, unique identifier, and associated primary shared file system identifier.
[0022] Based on the configuration parameters, after the requested capacity of the secondary shared file system and the remaining available capacity of the primary shared file system pass the verification, an independent sub-file directory is allocated under the file directory of the preferred file storage backend corresponding to the primary shared file system as the storage carrier of the secondary shared file system.
[0023] In some embodiments, management operations for a secondary shared file system include at least one of creation, deletion, expansion, reduction, and authorization.
[0024] In some embodiments, the expansion operation specifically includes:
[0025] The storage control component receives expansion requests from the secondary shared file system, encapsulates them into request message packets via the remote procedure call protocol, and pushes them to the message queue corresponding to the storage scheduling component.
[0026] The storage scheduling component reads the remaining backend capacity of the primary shared file system associated with the secondary shared file system and verifies whether it meets the target expansion capacity.
[0027] If the target expansion capacity is met, the corresponding resource capacity is allocated from the file storage backend to the secondary shared file system, and the capacity information of the file storage backend and the configuration information of the secondary shared file system in the shared cache are updated.
[0028] In some embodiments, the preset mounting protocol includes at least one of the Network File System Protocol and the Universal Internet File System Protocol.
[0029] In some embodiments, when the target access node is mounted, the association between the target access node and the corresponding secondary shared file system is established through the valid mount address returned by the storage control component.
[0030] In some embodiments, the information on the remaining available capacity of the primary shared file system is updated once every predetermined time interval; during the update cycle, the capacity quota of the secondary shared file system can be requested multiple times, and the total capacity quota requested multiple times shall not exceed the remaining available capacity of the primary shared file system before the update; after the update cycle, the requested capacity quota shall not exceed the remaining available capacity after the update.
[0031] Secondly, this application provides a two-level shared file device, deployed based on a cloud computing platform, including a storage control component, a storage scheduling component, and a storage management component, wherein:
[0032] The storage control component is configured to receive requests for creating a primary shared file system and a secondary shared file system, extract the request parameters, push the request message packet to the storage scheduling component through the remote procedure call protocol and message queue, and receive the mount address and the status of the primary and secondary shared file systems.
[0033] When the storage scheduling component is configured to handle a first-level shared file system creation request, it first adds a global lock, reads the capacity information of each file storage backend from the shared cache, and selects the file storage backend with the largest available resource weight value through capacity filtering and capacity weighing methods; when handling a second-level shared file system creation request, it locates the file storage backend where the first-level shared file system is located, sends the location result to the storage management component, and then releases the global lock.
[0034] The storage management component is configured to perform the creation operation of the first-level shared file system and update the status of the first-level shared file system; before creating the second-level shared file system, a capacity verification is performed. If the verification passes, an independent space is allocated in the first-level shared file system to generate the second-level shared file system; management operations are performed on the second-level shared file system, and data isolation is achieved through mounting.
[0035] In some embodiments, the storage control component includes a primary creation request processing unit and a secondary creation request processing unit;
[0036] The first-level creation request processing unit is configured to receive the first-level shared file system creation request, extract the request parameters, encapsulate them into a request message packet through the remote procedure call protocol, and push the request message packet to the message queue corresponding to the storage scheduling component;
[0037] The secondary creation request processing unit is configured to receive secondary shared file system creation requests, extract request parameters, encapsulate them into request message packets via remote procedure call protocol, and push the request message packets to the message queue corresponding to the storage scheduling component.
[0038] In some embodiments, the storage scheduling component includes a primary backend filtering unit and a secondary backend positioning unit;
[0039] The first-level backend filtering unit is configured to generate a globally unique lock identifier, read the capacity information of each file storage backend from the shared cache, first remove file storage backends that do not meet the preset requirements through the capacity filtering method, and then select the file storage backend with the largest available resource weight value through the capacity weighing method as the preferred file storage backend. The preferred file storage backend information and the first-level shared file creation instruction are sent to the storage management component through the remote procedure call protocol.
[0040] The secondary backend positioning unit is configured to query the information of the file storage backend where the primary shared file system is located from the shared cache based on the secondary shared file system creation request, and schedule the storage management component corresponding to the file storage backend to perform the secondary shared file system creation operation.
[0041] In some embodiments, the storage management component includes a primary system control unit, a secondary system generation unit, and a secondary system management unit;
[0042] The primary system control unit is configured to respond to the storage scheduling component by sending control commands for the primary shared file system to the selected storage cluster and updating the status of the primary shared file system based on the results returned by the storage cluster.
[0043] The secondary system generation unit is configured to perform capacity verification based on the resource capacity of the primary shared file system. If the capacity verification passes, an independent storage logical space is allocated under the file directory of the primary shared file system to generate the secondary shared file system.
[0044] The secondary system management unit is configured to perform management operations on the secondary shared file system. The expansion operation requires verifying the remaining available capacity of the file storage backend corresponding to the primary shared file system. If the capacity is sufficient, resource capacity is allocated and the information of the shared cache is updated.
[0045] In some embodiments, the storage management component further includes a shared association unit, configured to be integrated into the storage management component, for performing a mount operation, returning the mount address of the secondary shared file system to the target access node through a preset file system protocol, and establishing an association between the target access node and the corresponding secondary shared file system.
[0046] Thirdly, this application provides an electronic device, including a processor and a memory, wherein the memory stores a computer program, and the processor executes the computer program to implement the secondary shared file method of any of the foregoing.
[0047] Fourthly, this application provides a computer program product, including a computer-readable storage medium on which a computer program is stored, wherein the computer program, when executed by a processor, implements the secondary shared file method of any of the preceding claims.
[0048] The at least one technical solution adopted in this application embodiment can achieve the following beneficial effects: By constructing a hierarchical architecture of a first-level shared file system and a second-level shared file system, the limitations of the prior art, which can only achieve first-level sharing and requires manual creation of second-level directories and cannot be directly mounted, are effectively solved. Specifically, through the collaborative work of the storage control component, scheduling component, and management component, the automatic creation of the second-level shared file system is realized without manual operation by the user. This not only meets the user's need for data layering and isolation but also reduces the risk of accidental data deletion through the independent subdirectory design. The introduction of global locks, combined with capacity filtering and weighing mechanisms, ensures the rationality of file storage backend selection and the efficiency of resource allocation, improving the overall utilization rate of storage resources. It supports full lifecycle management operations such as creation, deletion, and expansion of the second-level shared file system and achieves direct mounting through preset mounting protocols, simplifying the user operation process and improving access convenience. At the same time, the capacity verification and periodic update mechanism ensures the stability of resource allocation, avoids over-allocation problems, enhances the reliability of the system, and has strong practicality and application value.
[0049] It should be understood that both the foregoing general description and the following detailed description are exemplary and intended to provide further illustration of the claimed technology. Attached Figure Description
[0050] The above and other objects, features, and advantages of this application will become more apparent from the more detailed description of the embodiments of this application in conjunction with the accompanying drawings. The accompanying drawings are used to provide a further understanding of the embodiments of this application and form part of the specification. They are used together with the embodiments of this application to explain this application and do not constitute a limitation thereof. In the accompanying drawings, the same reference numerals generally represent the same components or steps.
[0051] Figure 1 This illustration schematically shows an overall flow diagram of a two-level file sharing method according to an embodiment of this application;
[0052] Figure 2 This illustration schematically shows a flowchart of the creation of a primary shared file system according to an embodiment of the present application for a secondary shared file method;
[0053] Figure 3 This illustration schematically shows a capacity filtering process of a two-level shared file method according to an embodiment of this application;
[0054] Figure 4 This illustration schematically shows a capacity weighing process of a two-level shared file method according to an embodiment of this application;
[0055] Figure 5This illustration schematically shows a two-level shared file system creation process according to an embodiment of the present application;
[0056] Figure 6 This illustration schematically shows a request processing flow diagram of a two-level shared file method according to an embodiment of this application;
[0057] Figure 7 This illustration schematically shows a two-level shared file system expansion process according to an embodiment of the present application.
[0058] Figure 8 This illustration schematically shows a two-level shared file system and a target access node mounting association in a two-level shared file method according to an embodiment of this application;
[0059] Figure 9 This illustration schematically shows a process for updating the remaining capacity of a primary shared file system according to an embodiment of the present application for a secondary shared file method.
[0060] Figure 10 This illustration schematically shows a two-level shared file system capacity quota application mechanism according to an embodiment of the present application;
[0061] Figure 11 This illustration schematically shows an overall architecture diagram of a two-level shared file device according to an embodiment of this application;
[0062] Figure 12 This illustration schematically shows a storage control component structure of a secondary shared file device according to an embodiment of the present application;
[0063] Figure 13 This illustration schematically shows a storage scheduling component structure of a secondary shared file device according to an embodiment of the present application;
[0064] Figure 14 This illustration schematically shows a storage management component structure of a secondary shared file device according to an embodiment of the present application;
[0065] Figure 15 An exemplary block diagram of a computer program product of a two-level file sharing method according to an embodiment of this application is shown schematically.
[0066] In the diagram: 1101, Storage Control Component; 1102, Storage Scheduling Component; 1103, Storage Management Component; 1104, First-Level Creation Request Processing Unit; 1105, Second-Level Creation Request Processing Unit; 1106, First-Level Backend Filtering Unit; 1107, Second-Level Backend Positioning Unit; 1108, First-Level System Control Unit; 1109, Second-Level System Generation Unit; 1110, Second-Level System Management Unit; 1111, Shared Association Unit; 1501, Computer Program. Detailed Implementation
[0067] To make the objectives, technical solutions, and advantages of this application more apparent, exemplary embodiments according to this application will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this application, and not all embodiments of this application. It should be understood that this application is not limited to the exemplary embodiments described herein.
[0068] Figure 1 The illustration shows an overall flowchart of a two-level file sharing method according to an embodiment of this application.
[0069] like Figure 1 As shown, the steps include:
[0070] S101, the storage control component 1101 receives a first-level shared file system creation request. The storage control component 1101 extracts key parameters from the request, including but not limited to the sharing protocol, sharing type, and capacity. After parameter extraction, it encapsulates the parameters into a request message packet using a remote procedure call protocol and pushes it to the message queue corresponding to the storage scheduling component 1102 for processing.
[0071] S102, the storage scheduling component 1102 selects the preferred file storage backends and completes the creation of the primary shared file system. The storage scheduling component 1102 first acquires a global lock, reads the capacity information of each file storage backend from the shared cache, and releases the lock after selection; it then selects the preferred file storage backends through capacity filtering and capacity weighing. Next, the storage management component 1103 creates a primary shared file system on the preferred file storage backends and sends commands to the storage cluster via SSH to create the primary directory.
[0072] S103, Storage Control Component 1101 receives a secondary shared file system creation request. Storage Control Component 1101 receives a secondary shared file system creation request initiated by a user based on an existing primary shared file system, extracts the request parameters, including the sharing protocol, capacity, and unique identifier of the associated primary shared file system, and encapsulates them into a message packet via a remote procedure call protocol and pushes it to the message queue of Storage Scheduling Component 1102.
[0073] S104, the storage management component 1103 verifies the requested capacity of the secondary shared file system against the remaining available capacity of the primary shared file system. The storage scheduling component 1102 locates the file storage backend of the primary shared file system based on its unique identifier and sends the information to the storage management component 1103. The storage management component 1103 reads the total capacity of the primary shared file system and the total capacity already allocated to the existing secondary shared file systems from the shared cache, and verifies whether the requested capacity is met.
[0074] S105, when the capacity verification passes, the storage management component 1103 generates a secondary shared file system based on the preset configuration logic. An independent subdirectory is created under the primary shared file system directory to serve as the carrier of the secondary shared file system. Simultaneously, the association between the secondary shared file system and the primary shared file system is recorded, and the remaining available capacity of the primary shared file system in the shared cache, as well as the configuration information of the secondary shared file system, such as unique identifier, capacity, and mount address, are updated.
[0075] S106, Storage management component 1103 performs management operations on the secondary shared file system. Management operations include creation, deletion, expansion, shrinking, and authorization.
[0076] For example, when the storage control component 1101 receives an expansion request from the secondary shared file system, it encapsulates it into a request message packet via a remote procedure call protocol and pushes it to the message queue of the storage scheduling component 1102. The storage scheduling component 1102 reads the remaining capacity of the backend corresponding to the primary shared file system associated with the secondary shared file system, verifies whether it meets the target expansion capacity, and if it does, the storage management component 1103 allocates the corresponding resource capacity from the file storage backend to the secondary shared file system, and updates the file storage backend capacity information and the configuration information of the secondary shared file system in the shared cache.
[0077] S107: A pre-defined mount protocol is used to establish an association between the secondary shared file system and the target access node. The storage management component 1103 generates an independent mount address for the secondary shared file system and allows the target access node to mount the secondary shared file system via a pre-defined protocol such as NFS or CIFS. After mounting, users can only access data under this secondary directory and cannot access other directories of the primary shared file system or unmounted secondary shared file systems, thus achieving data isolation.
[0078] Figure 2 The illustration shows a schematic diagram of the creation process of a primary shared file system according to an embodiment of the present application for a secondary shared file method.
[0079] like Figure 2 As shown, the steps include:
[0080] S201, Storage Control Component 1101 receives a primary shared file system creation request and extracts parameters. Storage Control Component 1101 receives a primary shared file system creation request from a user, and the parameters in the request include key information such as the sharing protocol, sharing type, and capacity.
[0081] In step S202, the storage control component 1101 encapsulates the extracted parameters into a request message packet via the Remote Procedure Call (RPC) protocol and pushes it to the message queue corresponding to the storage scheduling component 1102. The storage control component 1101 encapsulates the request parameters using the RPC protocol, forming a standardized request message packet to facilitate information transfer between components. The request message packet is then pushed to the message queue of the storage scheduling component 1102, avoiding direct coupling between the storage control component 1101 and the storage scheduling component 1102, thus improving the system's concurrent processing capability and stability.
[0082] S203, the storage scheduling component 1102 acquires a global lock and reads the capacity information data of each file storage backend from the shared cache. The global lock acquired by the storage scheduling component 1102 is to prevent multiple concurrent requests from simultaneously accessing the capacity information of the file storage backends, ensuring the consistency of the capacity data. The capacity information read by the storage scheduling component 1102 from the shared cache includes the total capacity of each file storage backend, the allocated capacity, supported sharing protocols, and the preset maximum super-resolution ratio, etc.
[0083] S204, the storage scheduling component 1102 performs capacity filtering on the file storage backends, filtering out file storage backends with mismatched over-division ratios or sharing protocols. The storage scheduling component 1102 calculates the over-division ratio for each file storage backend based on its allocated capacity, the size of the first-level shared file system creation request, and the total backend capacity. When the over-division ratio of a file storage backend exceeds a preset maximum over-division ratio, it is marked as non-compliant and filtered. Simultaneously, the storage scheduling component 1102 verifies whether the sharing protocol supported by each file storage backend matches the sharing protocol specified in the first-level shared file system creation request, marking file storage backends with mismatched sharing protocols as non-compliant and filtering them. All file storage backends with compliant over-division ratios and matching sharing protocols are retained.
[0084] S205, the storage scheduling component 1102 performs capacity weighing on the filtered file storage backends and selects the file storage backend with the largest available resource weight value as the preferred file storage backend. For each file storage backend retained after capacity filtering, the storage scheduling component 1102 extracts its capacity parameters, including the total backend storage capacity, the preset maximum super-resolution ratio, the capacity already allocated to the shared file system, and the preset capacity reservation percentage. Based on these capacity parameters, it calculates the available resource weight value for each file storage backend. After obtaining the available resource weight value, the storage scheduling component 1102 compares the available resource weight values of all eligible file storage backends and selects the file storage backend with the largest available resource weight value as the preferred file storage backend for creating a first-level shared file system. If multiple file storage backends have the same available resource weight value, any one of them is randomly selected as the preferred file storage backend.
[0085] S206, the storage scheduling component 1102 notifies the storage management component 1103 via a remote procedure call protocol to create a primary shared file system on the preferred file storage backend. The storage scheduling component 1102 sends the preferred file storage backend information and the creation command for the primary shared file system to the storage management component 1103 via the remote procedure call protocol, and releases the global lock after completing the file storage backend selection. Upon receiving the command, the storage management component 1103 distributes the creation command for the primary shared file system to the selected storage cluster via SSH, and the storage cluster creates the primary directory at the underlying level, completing the instantiation of the primary shared file system. The storage management component 1103 updates the status of the corresponding primary shared file system based on the return result from the storage cluster and feeds back the status information to the storage control component 1101.
[0086] Figure 3 The illustration shows a capacity filtering process of a two-level shared file method according to an embodiment of this application.
[0087] like Figure 3 As shown, the steps include:
[0088] S301, the storage scheduling component 1102 obtains the capacity parameters and protocol information of each file storage backend. The storage scheduling component 1102 reads the information of each file storage backend from the shared cache, where the capacity parameters include, but are not limited to, the total backend capacity, the allocated capacity of the backend, and the pre-set maximum super-resolution ratio. The protocol information is the sharing protocols supported by each file storage backend, commonly used ones such as NFS and CIFS. It also obtains the sharing protocol and requested capacity specified in the first-level shared file system creation request.
[0089] S302, the storage scheduling component 1102 calculates the over-splitting ratio of each file storage backend. The over-splitting ratio is equal to the sum of the allocated capacity of the backend and the first-level requested capacity, divided by the total capacity of the backend.
[0090] Among them, the backend allocated capacity is the total capacity that the file storage backend has currently allocated to other shared file systems, the first-level requested capacity is the capacity required for this first-level shared file system creation request, and the backend total capacity is the total storage resources of the file storage backend.
[0091] S303, the storage scheduling component 1102 determines whether the super-resolution ratio of each file storage backend meets the preset threshold. First, it compares the calculated super-resolution ratio with the preset maximum super-resolution ratio threshold for that file storage backend:
[0092] If the over-resolution ratio is less than or equal to this maximum over-resolution ratio threshold, then the file storage backend meets the capacity requirements.
[0093] If the over-resolution ratio exceeds this maximum over-resolution ratio threshold, the file storage backend will be marked as non-compliant because the capacity exceeds the limit.
[0094] S304, Storage scheduling component 1102 determines whether the protocols of each file storage backend match. It verifies the sharing protocols supported by each file storage backend against the sharing protocol specified in the first-level shared file system creation request:
[0095] If the two match, then the file storage backend meets the requirements at the protocol level;
[0096] If there is a mismatch, the file storage backend is marked as non-compliant due to protocol incompatibility.
[0097] S305 filters out all file storage backends that do not meet the requirements and outputs the file storage backends that do meet the requirements. File storage backends that exceed the limit or have incompatible protocols are filtered out and removed, and file storage backends that meet the verification requirements are retained as candidates for subsequent capacity weighing.
[0098] Figure 4 The illustration shows a schematic diagram of the capacity weighing process of a two-level shared file method according to an embodiment of this application.
[0099] like Figure 4 As shown, the steps include:
[0100] S401, the storage scheduling component 1102 calculates the available resource weight value for the capacity-filtered file storage backends. The storage scheduling component 1102 obtains the capacity parameters of each file storage backend retained after capacity filtering from the shared cache, including but not limited to: total backend storage capacity, preset maximum super-resolution ratio of the backend, capacity already allocated to the shared file system, and preset capacity reservation percentage of the backend. Based on these parameters, the available resource weight value of each file storage backend is calculated. This can be obtained by calculating the remaining allocable capacity of the file storage backend, or by other calculation methods based on actual needs.
[0101] S402, the storage scheduling component 1102 compares the available resource weight values of all file storage backends and selects the file storage backend with the largest value. The storage scheduling component 1102 compares the available resource weight values of all candidate file storage backends one by one, filters out the file storage backend with the largest weight value, and initially determines it as the preferred file storage backend for creating a first-level shared file system.
[0102] S403, when the available resource weight values of multiple file storage backends are the same, the storage scheduling component 1102 randomly selects one of them. If there are two or more file storage backends with completely identical available resource weight values, and all of them are the maximum values, then the storage scheduling component 1102 randomly determines one of these file storage backends as the final preferred file storage backend.
[0103] S404, Output the selected preferred file storage backend. The storage scheduling component 1102 feeds back the determined preferred file storage backend, its identifier, capacity information, and other data to the storage management component 1103 via a remote procedure call protocol for subsequent creation operations of the first-level shared file system.
[0104] Figure 5 The illustration shows a schematic diagram of the creation process of a two-level shared file system according to an embodiment of the present application.
[0105] like Figure 5 As shown, the steps include:
[0106] S501, Storage Control Component 1101 receives a secondary shared file system creation request and extracts parameters. Storage Control Component 1101 receives a secondary shared file system creation request and extracts key parameters from the request, including but not limited to sharing protocols such as NFS and CIFS, sharing type, requested capacity size, and unique identifier of the associated primary shared file system.
[0107] S502, the storage control component 1101 encapsulates parameters into a request message packet using the Remote Procedure Call protocol and pushes it to the message queue of the storage scheduling component 1102. The storage control component 1101 extracts relevant parameters of the secondary shared file system creation request, encapsulates them into a standardized request message packet using the Remote Procedure Call protocol, and pushes this request message packet to the corresponding message queue of the storage scheduling component 1102. This decoupling between the storage control component 1101 and the storage scheduling component 1102 improves concurrent processing capabilities.
[0108] S503, the storage scheduling component 1102 locates the file storage backend of the primary shared file system using its unique identifier. After retrieving the request message packet for the creation request of the secondary shared file system from the corresponding message queue, the storage scheduling component 1102 searches for the metadata information corresponding to the primary shared file system in the shared cache based on the unique identifier of the primary shared file system contained in the request, thereby locating the file storage backend. After completing the location of the file storage backend, the storage scheduling component 1102 sends the information of that file storage backend to the storage management component 1103.
[0109] S504, the storage management component 1103 performs capacity verification. After receiving the file storage backend information sent by the storage scheduling component 1102, the storage management component 1103 reads the total capacity of the primary shared file system and the total capacity already allocated to the existing secondary shared file systems from the shared cache, and calculates the remaining available capacity of the primary shared file system. It then compares the capacity requested for creating the secondary shared file system with the remaining available capacity to verify whether the requested capacity is less than or equal to the remaining available capacity.
[0110] S505, if the capacity verification passes, the storage management component 1103 creates a secondary shared file system under the primary shared file system directory. After the capacity verification passes, the storage management component 1103, based on preset configuration logic, allocates an independent subdirectory as the storage carrier for the secondary shared file system under the file directory of the file storage backend corresponding to the primary shared file system, achieving logical isolation from other secondary shared file systems and other directories of the primary shared file system. Simultaneously, the storage management component 1103 records the configuration information of the secondary shared file system, such as its unique identifier, capacity, associated primary shared file system identifier, mount address, etc., and updates the remaining available capacity of the primary shared file system and the status information of the secondary shared file system in the shared cache, completing the creation process.
[0111] Figure 6 The illustration shows a schematic diagram of the request processing flow of a two-level shared file method according to an embodiment of this application.
[0112] like Figure 6 As shown, the steps include:
[0113] S601, storage control component 1101 receives a primary / secondary shared file system creation request. Storage control component 1101 is configured to receive either a primary shared file system creation request or a secondary shared file system creation request. The secondary shared file system creation request must be initiated based on an existing primary shared file system and explicitly associated with a specific primary shared file system.
[0114] S602, Storage control component 1101 extracts parameters from the request. Storage control component 1101 parses the received request and extracts key parameters.
[0115] For a first-level shared file system creation request, the extracted parameters should include at least the sharing protocol, sharing type, and capacity.
[0116] For a request to create a secondary shared file system, in addition to the sharing protocol, sharing type, and capacity, the extracted parameters must also include the unique identifier of the associated primary shared file system, which is used to bind the corresponding primary shared file system.
[0117] S603, the storage control component 1101 encapsulates parameters into request message packets via the Remote Procedure Call (RPC) protocol. The storage control component 1101 uses the RPC protocol to encapsulate the extracted parameters into standardized request message packets. The message packet contains information such as a request type identifier, the extracted parameters, and a unique request identifier.
[0118] S604, the storage control component 1101 pushes the request message packet to the message queue corresponding to the storage scheduling component 1102. The storage control component 1101 pushes the encapsulated request message packet to the corresponding message queue preset by the storage scheduling component 1102. The message queue decouples the storage control component 1101 and the storage scheduling component 1102, improving concurrent processing capabilities and operational stability.
[0119] S605, the storage scheduling component 1102 retrieves request message packets from the message queue and processes them. The storage scheduling component 1102 retrieves request message packets from the corresponding message queues in the order they entered the message queues, and executes the corresponding processing flow according to the request type identifier in the message packet.
[0120] For a first-level shared file system creation request: the storage scheduling component 1102 acquires a global lock, reads the capacity information of each file storage backend from the shared cache, selects the preferred file storage backend through capacity filtering and weighing mechanisms, and releases the global lock after completion.
[0121] For a secondary shared file system creation request: the storage scheduling component 1102 locates the file storage backend where the primary shared file system is located from the shared cache based on the unique identifier of the primary shared file system in the message packet, sends the location result to the storage management component 1103, and then releases the global lock.
[0122] After processing is completed, the storage scheduling component 1102 transmits the corresponding processing result to the storage management component 1103 for subsequent operations.
[0123] Figure 7 The illustration shows a schematic diagram of a two-level shared file system expansion process according to an embodiment of the present application.
[0124] like Figure 7 As shown, the steps include:
[0125] S701, the storage control component 1101 receives an expansion request for a secondary shared file system. The storage control component 1101 receives an expansion request initiated for a secondary shared file system that has been created. This request must include key information such as the unique identifier of the secondary shared file system to be expanded and the target expansion capacity, so as to clarify the expansion target and the expansion scale.
[0126] S702, the storage control component 1101 encapsulates the expansion request into a message packet via the Remote Procedure Call protocol and pushes it to the message queue of the storage scheduling component 1102. The storage control component 1101 extracts parameters from the expansion request, such as the unique identifier of the secondary shared file system and the target expansion capacity, and encapsulates them into a standardized request message packet via the Remote Procedure Call protocol. It then pushes the request message packet to the corresponding message queue of the storage scheduling component 1102, awaiting processing by the storage scheduling component 1102.
[0127] S703, the storage scheduling component 1102 reads the remaining available capacity of the backend corresponding to the primary shared file system associated with the secondary shared file system. The storage scheduling component 1102 retrieves an expansion request message packet from the message queue and, based on the unique identifier of the secondary shared file system, queries the shared cache for the unique identifier of its associated primary shared file system, thereby locating the file storage backend where the primary shared file system resides. It then reads the remaining available capacity of the primary shared file system in that file storage backend and synchronizes this information to the storage management component 1103.
[0128] S704, the storage management component 1103 verifies whether the sum of the current capacity of the secondary shared file system and the target capacity of this expansion request is less than or equal to the remaining available capacity of its associated primary shared file system. The storage management component 1103 obtains the current capacity of the secondary shared file system to be expanded and calculates the actual increment of this expansion. It then compares and verifies the actual increment of the secondary shared file system's expansion with the remaining available capacity of the primary shared file system.
[0129] S705, if the verification passes, the storage management component 1103 allocates the corresponding resource capacity from the file storage backend to the secondary shared file system, and updates the capacity information in the shared cache and the configuration information of the secondary shared file system. After successful verification, the storage management component 1103 allocates the resource capacity corresponding to the increment to the secondary shared file system from the file storage backend where the primary shared file system is located, completing the expansion of the underlying storage space. At the same time, it updates the configuration information of the secondary shared file system in the shared cache and synchronously updates the remaining available capacity of the primary shared file system to ensure that the cached data is consistent with the actual storage state. After the expansion is completed, the expansion result is fed back to the storage control component 1101.
[0130] Figure 8 The illustration shows a schematic diagram of the mounting association between a secondary shared file system and a target access node in a secondary shared file method according to an embodiment of this application.
[0131] like Figure 8 As shown, the steps include:
[0132] S801, Storage Control Component 1101 receives a mount request for a secondary shared file system. Storage Control Component 1101 receives a mount request for a secondary shared file system from the target access node. This request contains a unique identifier of the secondary shared file system to be mounted, used to accurately locate the target secondary shared file system and ensure that the mount operation points to the correct target.
[0133] S802, Storage Control Component 1101 returns the valid mount address of the secondary shared file system. Based on the unique identifier of the secondary shared file system in the request, Storage Control Component 1101 queries the configuration information of the secondary shared file system from the shared cache and extracts its corresponding mount address. This mount address, generated by Storage Management Component 1103 when creating the secondary shared file system, includes information such as the network address of the file storage backend and the path of the secondary subdirectories. Storage Control Component 1101 returns this valid mount address to the target access node as a connection identifier for establishing an association.
[0134] In step S803, the target access node establishes an association with the secondary shared file system via the mount address. After receiving the mount address returned by the storage control component 1101, the target access node initiates a mount operation based on a preset mount protocol, such as NFS or CIFS. By parsing the network path and directory information in the mount address, the target access node establishes a network connection with the file storage backend where the secondary shared file system resides, enabling access to that secondary shared file system. After successful mounting, the target access node can only access file resources within the secondary shared file system and cannot access other directories of the primary shared file system or unmounted secondary shared file systems, thus achieving data isolation.
[0135] Figure 9 The illustration shows a schematic diagram of the remaining capacity update process of a primary shared file system according to an embodiment of the present application for a secondary shared file method.
[0136] like Figure 9 As shown, the steps include:
[0137] S901, the storage management component 1103 reads the total capacity and used capacity of the primary shared file system. The storage management component 1103 reads key capacity data from the file storage backend where the primary shared file system resides, according to a predetermined time period or after triggering specific events such as the creation, expansion, or deletion of a secondary shared file system. The total capacity of the primary shared file system is the initial total storage capacity allocated when the primary shared file system is created, and is a fixed value; the used capacity of the primary shared file system is the sum of the capacities of all created secondary shared file systems within the primary shared file system.
[0138] S902, storage management component 1103 calculates the remaining available capacity. Based on the total capacity parameter and used capacity parameter of the read primary shared file system, storage management component 1103 obtains the remaining available capacity of the primary shared file system in the current state, which is obtained by subtracting the used capacity from the total capacity.
[0139] S903, storage management component 1103 updates the remaining available capacity of the first-level shared file system in the shared cache. After completing the calculation, storage management component 1103 synchronously updates the new remaining available capacity to the metadata record of the corresponding first-level shared file system in the shared cache, overwriting the original old value.
[0140] Figure 10 The illustration shows a schematic diagram of a capacity quota application mechanism for a two-level shared file system according to an embodiment of the present application.
[0141] like Figure 10 As shown, the steps include:
[0142] S1001, Storage Control Component 1101 receives capacity requests from secondary shared file systems. Storage Control Component 1101 receives one or more capacity request requests from secondary shared file systems initiated based on the same primary shared file system. Each request includes parameters such as the unique identifier of the associated primary shared file system and the requested capacity. Storage Control Component 1101 aggregates these requests and records the requested capacity and corresponding primary system identifier for each request.
[0143] S1002, if the total requested capacity of the secondary shared file system is less than the remaining available capacity of the primary shared file system, then the storage management component 1103 creates the corresponding secondary shared file system. The storage management component 1103 obtains the current remaining available capacity of the primary shared file system from the shared cache and calculates the total capacity of all pending secondary shared file system capacity requests. The total requested capacity is compared with the remaining available capacity.
[0144] When the total requested capacity is less than or equal to the remaining available capacity, it indicates that resources are sufficient. At this time, the storage management component 1103 will create corresponding secondary shared file systems in sequence under the directory of the primary shared file system according to the parameters of each request, and allocate independent subdirectory space for each secondary system to achieve data isolation.
[0145] When the total requested capacity exceeds the remaining available capacity, it indicates insufficient resources. At this time, the storage management component 1103 will reject all or part of the requests according to a preset policy and return a message indicating insufficient capacity.
[0146] S1003, Storage management component 1103 updates the remaining available capacity of the primary shared file system. After all the verified secondary shared file systems have been created, storage management component 1103 calculates the latest value of the remaining available capacity of the primary shared file system based on the actual allocated total capacity. It then updates the metadata record of the corresponding primary shared file system in the shared cache with this latest value of remaining available capacity.
[0147] Figure 11 The schematic diagram illustrates the overall architecture of a secondary file sharing device according to an embodiment of this application.
[0148] like Figure 11 As shown, the secondary shared file device is deployed based on a cloud computing platform and includes a storage control component 1101, a storage scheduling component 1102, and a storage management component 1103.
[0149] Storage control component 1101 is configured to receive requests for creating a primary shared file system, a secondary shared file system, and a mount request, and extract key parameters from the requests, such as the sharing protocol, capacity, and the identifier of the associated primary shared file system. These parameters are then encapsulated into standardized request message packets using a remote procedure call protocol and pushed to the message queue corresponding to storage scheduling component 1102. Storage control component 1101 also receives status information, such as mount address, from storage scheduling component 1102 and storage management component 1103.
[0150] The storage scheduling component 1102 is configured to, when processing a first-level shared file system creation request, first add a global lock to ensure the consistency of capacity data, and then read the capacity information of each file storage backend from the shared cache, selecting the preferred file storage backend through capacity filtering and capacity weighing. When processing a second-level shared file system creation request, it locates the file storage backend where the first-level system resides from the shared cache based on the unique identifier of the first-level system, and sends the processing result to the storage management component 1103. After completing the scheduling, it releases the global lock to ensure the rationality and accuracy of resource allocation.
[0151] Storage management component 1103 is configured to create a primary directory and update its status on the preferred file storage backend for primary shared file systems. For secondary shared file systems, it first verifies the compatibility between the requested capacity and the remaining available capacity of the primary system. After successful verification, it allocates an independent subdirectory under the primary shared file system directory as the storage medium for the secondary shared file system, and simultaneously performs full lifecycle management operations such as creation, deletion, and expansion. Furthermore, storage management component 1103 generates mount addresses for the secondary system through preset mount protocols such as NFS and CIFS, establishes associations with target access nodes, achieves data isolation and shared access, and ensures effective utilization and secure management of storage resources.
[0152] Figure 12 The diagram illustrates a storage control component structure of a secondary shared file device according to an embodiment of this application.
[0153] like Figure 12 As shown, the storage control component 1101 includes a primary creation request processing unit 1104 and a secondary creation request processing unit 1105.
[0154] The primary creation request processing unit 1104 is configured to handle creation requests for the primary shared file system. Upon receiving a primary shared file system creation request, the primary creation request processing unit 1104 extracts key parameters from the request, including the sharing protocol, sharing type, and capacity. These key parameters are then encapsulated into standardized request message packets via a remote procedure call protocol, and the request message packets are pushed to the message queue corresponding to the storage scheduling component 1102. This provides a data foundation for the subsequent selection and optimization of file storage backends by the storage scheduling component 1102.
[0155] The secondary creation request processing unit 1105 is configured to handle creation requests for secondary shared file systems. The secondary creation request processing unit 1105 receives a secondary shared file system creation request initiated based on an existing primary shared file system, extracts parameters from the request (including sharing protocol, sharing type, and capacity), and also extracts the unique identifier of the associated primary shared file system for binding the corresponding primary shared file system. Then, it encapsulates the extracted key parameters into a request message packet via a remote procedure call protocol and pushes it to the message queue corresponding to the storage scheduling component 1102.
[0156] Figure 13 The illustration shows a schematic diagram of the storage scheduling component structure of a secondary shared file device according to an embodiment of the present application.
[0157] like Figure 13 As shown, the storage scheduling component 1102 includes a primary backend filtering unit 1106 and a secondary backend positioning unit 1107.
[0158] The primary backend filtering unit 1106 is configured to filter file storage backends during the creation of the primary shared file system. After receiving the creation request message packet of the primary shared file system pushed by the storage control component 1101, the primary backend filtering unit 1106 generates a globally unique lock identifier and locks it to prevent inconsistencies in capacity information caused by concurrent requests. Then, it reads the capacity parameters of each file storage backend, such as total capacity, allocated capacity, maximum over-resolution ratio, and supported sharing protocols, from the shared cache. It filters out file storage backends with over-resolution ratios exceeding limits or with incompatible protocols through capacity filtering. Then, it calculates the available resource weight value of the remaining file storage backends through a capacity weighing method, selects the one with the largest available resource weight value as the preferred file storage backend, and finally sends the information of the preferred file storage backend and the creation instruction of the primary shared file system to the storage management component 1103 through a remote procedure call protocol. After completing the filtering, it releases the global lock to ensure the rationality of resource allocation and data consistency.
[0159] The secondary backend location unit 1107 is configured to perform backend location during the creation of the secondary shared file system. After receiving the secondary creation request message packet pushed by the storage control component 1101, the secondary backend location unit 1107 queries the file storage backend information where the primary shared file system is located from the shared cache based on the unique identifier of the primary shared file system contained in the request. After completing the location, it sends the file storage backend information to the storage management component 1103 and schedules it to execute the creation operation of the secondary shared file system, ensuring that the secondary shared file system and the associated primary shared file system are on the same file storage backend, providing a basis for data isolation and capacity management.
[0160] Figure 14 The illustration shows a schematic diagram of the storage management component structure of a secondary shared file device according to an embodiment of the present application.
[0161] like Figure 14 As shown, the storage management component 1103 includes a primary system control unit 1108, a secondary system generation unit 1109, a secondary system management unit 1110, and a shared association unit 1111.
[0162] The primary system control unit 1108 is configured to respond to instructions from the storage scheduling component 1102 and perform instantiation operations on the primary shared file system. After receiving the preferred file storage backend information and creation instructions sent by the storage scheduling component 1102, the primary system control unit 1108 sends the creation command of the primary shared file system to the corresponding storage cluster via SSH, drives the underlying storage resources to partition and create the primary shared file system directory, and updates the status information of the primary shared file system in the shared cache in real time according to the execution results returned by the storage cluster, and feeds back the status to the storage control component 1101.
[0163] The secondary system generation unit 1109 creates a secondary shared file system based on the resources of the primary shared file system. After receiving the file storage backend information of the primary shared file system pushed by the storage scheduling component 1102, the secondary system generation unit 1109 reads the remaining available capacity of the primary shared file system from the shared cache and verifies whether the capacity of the secondary shared file system creation request meets the requirements. If the verification passes, it divides an independent sub-file directory under the file directory corresponding to the primary shared file system as the storage carrier of the secondary system, records the association relationship between the secondary shared file system and the primary shared file system, and writes the configuration information of the secondary shared file system, such as capacity and path, into the shared cache.
[0164] The secondary system management unit 1110 is configured to perform management operations on the secondary shared file system, including deletion, expansion, shrinking, and authorization. For example, after receiving an expansion request forwarded by the storage scheduling component 1102, the secondary system management unit 1110 verifies whether the remaining capacity of the file storage backend corresponding to the primary shared file system meets the expansion requirements. If the requirements are met, it allocates the corresponding resources from the file storage backend to the secondary shared file system, and simultaneously updates the capacity information of the secondary shared file system and the remaining available capacity of the primary shared file system in the shared cache to ensure data consistency.
[0165] The shared association unit 1111 is configured to mount and associate the secondary shared file system with the target access node. Based on a preset file system protocol such as NFS or CIFS, the shared association unit 1111 generates a unique mount address for the created secondary shared file system, including the corresponding network address and subdirectory path. When the target access node initiates a mount request, the storage control component 1101 returns this mount address, establishing a network connection between the target access node and the secondary shared file system. This enables targeted access to resources within the secondary shared file system, achieving data isolation and ensuring data security.
[0166] Figure 15 An exemplary block diagram of a computer program product of a two-level file sharing method according to an embodiment of this application is shown schematically.
[0167] like Figure 15 As shown, the computer program product stores a computer program 1501, which, when executed by a processor, implements the method provided in any embodiment of this application.
[0168] The basic principles of this application have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in this application are merely examples and not limitations, and should not be considered as essential features of each embodiment of this application. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the application to the necessity of employing the aforementioned specific details for implementation.
[0169] The block diagrams of devices, apparatuses, devices, and systems involved in this application are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Words such as “comprising,” “including,” “having,” etc., are open-ended terms meaning “including but not limited to,” and are used interchangeably with them. The terms “or” and “and” as used herein refer to the terms “and / or,” and are used interchangeably with them unless the context clearly indicates otherwise. The term “such as” as used herein refers to the phrase “such as but not limited to,” and is used interchangeably with it.
[0170] Additionally, as used herein, the "or" used in a list of items beginning with "at least one" indicates a separate list, such that a list of, for example, "at least one of A, B, or C" means A or B or C, or AB or AC or BC, or ABC (i.e., A and B and C). Furthermore, the word "exemplary" does not imply that the described example is preferred or better than other examples.
[0171] It should also be noted that in the system and method of this application, the components or steps can be decomposed and / or recombined. These decompositions and / or recombinations should be considered as equivalent solutions of this application.
[0172] Various changes, substitutions, and modifications can be made to the technology described above without departing from the teachings defined by the appended claims. Furthermore, the scope of the claims is not limited to the specific aspects of the processes, machines, manufacturing processes, events, means, methods, and actions described above. Currently existing or later-developed processes, machines, manufacturing processes, events, means, methods, or actions that perform substantially the same function or achieve substantially the same result as the corresponding aspects described above can be utilized. Therefore, the appended claims include such processes, machines, manufacturing processes, events, means, methods, or actions within their scope.
[0173] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein can be applied to other aspects without departing from the scope of this application. Therefore, this application is not intended to be limited to the aspects shown herein, but rather to be accorded the widest scope consistent with the principles and novel features disclosed herein.
[0174] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of this application to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations thereof.
Claims
1. A two-level shared file method, characterized in that, Includes the following steps: The storage control component based on the cloud computing platform receives a primary shared file system creation request and forwards the request to the storage scheduling component. The storage scheduling component acquires a global lock on the data in the shared cache based on the request, reads the capacity information data of each file storage backend from it, filters out file storage backends that do not meet the preset requirements, selects the preferred file storage backend, and completes the creation of the primary shared file system. Upon receiving a request to create a secondary shared file system, the system verifies the requested capacity of the secondary shared file system against the remaining available capacity of the primary shared file system based on the resource capacity of the primary shared file system. If the verification passes, the system allocates an independent subdirectory under the directory of the primary shared file system as the carrier of the secondary shared file system, records the association between the secondary shared file system and the primary shared file system, and updates the remaining available capacity of the primary shared file system and the configuration information of the secondary shared file system in the shared cache. The storage management component of the cloud computing platform performs management operations for the secondary shared file system; By establishing an association between the secondary shared file system and the target access node through a preset mounting protocol, the corresponding file resources of the secondary shared file system can be shared and accessed based on the association.
2. The method according to claim 1, characterized in that, The parameters in the first-level shared file system creation request include at least one of the following: sharing protocol, sharing type, and capacity size; the parameters in the second-level shared file system creation request include at least one of the following: sharing protocol, sharing type, capacity size, and unique identifier of the first-level shared file system.
3. The method according to claim 1, characterized in that, The storage control component encapsulates the parameters in the first-level shared file system creation request and the second-level shared file system creation request into a request message packet using a remote procedure call protocol, and pushes the request message packet to the message queue corresponding to the storage scheduling component.
4. The method according to claim 1, characterized in that, The specific steps for the storage scheduling component to acquire a global lock are as follows: The storage scheduling component generates a globally unique lock identifier, reads the capacity information data of each file storage backend from the shared cache, and releases the global lock after the file storage backend has been selected.
5. The method according to claim 2, characterized in that, It also includes capacity filtering methods, specifically: Based on the allocated capacity, first-level request capacity, and total capacity of the file storage backend, the super-resolution ratio of the file storage backend is calculated. If the super-resolution ratio is greater than the preset maximum super-resolution ratio, the file storage backend is marked as non-compliant and filtered. If the sharing protocol supported by the file storage backend does not match the sharing protocol in the first-level shared file system creation request, the file storage backend will be marked as non-compliant and filtered.
6. The method according to claim 5, characterized in that, It also includes volumetric weighing methods, specifically including: The storage scheduling component extracts capacity parameters of the file storage backends that are retained after being filtered by the capacity filtering method. The capacity parameters include at least one of the following: total backend storage capacity, maximum super-resolution ratio pre-configured for the backend, capacity allocated to the shared file system for the backend, and capacity reservation percentage preset for the backend. Based on the capacity parameter, the available resource weight value of the file storage backend is calculated. The storage scheduling component compares the available resource weight values of all eligible file storage backends and selects the file storage backend with the largest available resource weight value as the preferred file storage backend for creating a first-level shared file system. If multiple file storage backends have the same available resource weight value, any one of them is randomly selected as the preferred file storage backend.
7. The method according to claim 1, characterized in that, Based on the resource capacity of the primary shared file system, the secondary shared file system is generated through the preset configuration logic of the storage management component of the cloud computing platform, specifically including: The configuration parameters of the secondary shared file system are obtained through the parameter interaction interface of the storage control component of the cloud computing platform, including at least one of the following: target capacity, unique identifier, and associated primary shared file system identifier; Based on the configuration parameters, after the requested capacity of the secondary shared file system and the remaining available capacity of the primary shared file system pass the verification, an independent sub-file directory is partitioned under the file directory of the preferred file storage backend corresponding to the primary shared file system as the storage carrier of the secondary shared file system.
8. The method according to claim 3, characterized in that, The management operations for the secondary shared file system include at least one of creation, deletion, expansion, reduction, and authorization.
9. The method according to claim 8, characterized in that, The expansion operation specifically includes: The storage control component receives the expansion request from the secondary shared file system, encapsulates it into a request message packet using the remote procedure call protocol, and pushes it to the message queue corresponding to the storage scheduling component. The storage scheduling component reads the remaining backend capacity corresponding to the primary shared file system associated with the secondary shared file system and verifies whether it meets the target expansion capacity. If the target expansion capacity is met, the corresponding resource capacity is allocated from the file storage backend to the secondary shared file system, and the capacity information of the file storage backend and the configuration information of the secondary shared file system in the shared cache are updated.
10. The method according to claim 1, characterized in that, The preset mounting protocol includes at least one of the network file system protocol and the general Internet file system protocol.
11. The method according to claim 1, characterized in that, When the target access node is mounted, the association between the target access node and the corresponding secondary shared file system is established through the valid mount address returned by the storage control component.
12. The method according to claim 1, characterized in that, The remaining available capacity information of the primary shared file system is updated once every predetermined time period; within the update period, the capacity quota of the secondary shared file system can be applied for multiple times, and the total capacity quota applied for multiple times shall not exceed the remaining available capacity of the primary shared file system before the update; after the update period, the applied capacity quota shall not exceed the remaining available capacity after the update.
13. A two-level shared file device, characterized in that, Deployed on a cloud computing platform, it includes storage control components, storage scheduling components, and storage management components, among which: The storage control component is configured to receive a primary shared file system creation request and a secondary shared file system creation request, extract the request parameters, push the request message packet to the storage scheduling component through a remote procedure call protocol and a message queue, and receive the mount address and the status of the primary and secondary shared file systems. When processing the creation request of the first-level shared file system, the storage scheduling component is configured to first add a global lock, read the capacity information of each file storage backend from the shared cache, and select the file storage backend with the largest available resource weight value through a capacity filtering method and a capacity weighing method; when processing the creation request of the second-level shared file system, the component locates the file storage backend where the first-level shared file system is located, sends the location information to the storage management component, and then releases the global lock. The storage management component is configured to perform the creation operation of the first-level shared file system and update the status of the first-level shared file system; before creating the second-level shared file system, a capacity verification is performed. If the verification passes, an independent space is allocated in the first-level shared file system to generate the second-level shared file system; management operations are performed on the second-level shared file system, and data isolation is achieved through mounting.
14. The apparatus according to claim 13, characterized in that, The storage control component includes a primary creation request processing unit and a secondary creation request processing unit. The first-level creation request processing unit is configured to receive the first-level shared file system creation request, extract the request parameters, encapsulate them into a request message packet through a remote procedure call protocol, and push the request message packet to the message queue corresponding to the storage scheduling component; The secondary creation request processing unit is configured to receive the secondary shared file system creation request, extract the request parameters, encapsulate them into a request message packet via a remote procedure call protocol, and push the request message packet to the message queue corresponding to the storage scheduling component.
15. The apparatus according to claim 13, characterized in that, The storage scheduling component includes a primary backend filtering unit and a secondary backend positioning unit; The first-level backend filtering unit is configured to generate a globally unique lock identifier, read the capacity information of each file storage backend from the shared cache, first remove the file storage backends that do not meet the preset requirements by the capacity filtering method, and then select the file storage backend with the largest available resource weight value by the capacity weighing method as the preferred file storage backend. The preferred file storage backend information and the first-level shared file system creation request are sent to the storage management component through the remote procedure call protocol. The secondary backend positioning unit is configured to query the information of the file storage backend where the primary shared file system is located from the shared cache according to the secondary shared file system creation request, and schedule the storage management component corresponding to the file storage backend to perform the secondary shared file system creation operation.
16. The apparatus according to claim 13, characterized in that, The storage management component includes a primary system control unit, a secondary system generation unit, and a secondary system management unit; The primary system control unit is configured to respond to the storage scheduling component by sending control commands for the primary shared file system to the selected storage cluster, and updating the status of the primary shared file system based on the results returned by the storage cluster. The secondary system generation unit is configured to perform capacity verification based on the resource capacity of the primary shared file system. If the capacity verification passes, an independent storage logical space is allocated under the file directory of the primary shared file system to generate the secondary shared file system. The secondary system management unit is configured to perform the management operation for the secondary shared file system, wherein the expansion operation needs to verify the remaining available capacity of the file storage backend corresponding to the primary shared file system, and if the capacity is satisfied, resource capacity is allocated and the information of the shared cache is updated.
17. The apparatus according to claim 13, characterized in that, The storage management component also includes a shared association unit, which is configured to be integrated into the storage management component and is used to perform a mount operation. Through a preset file system protocol, the mount address of the secondary shared file system is returned to the target access node, and an association is established between the target access node and the corresponding secondary shared file system.
18. An electronic device, characterized in that, It includes a processor and a memory, the memory storing a computer program, and the processor executing the computer program to implement the secondary shared file method according to any one of claims 1 to 12.
19. A computer program product comprising a computer-readable storage medium on which a computer program is stored, characterized in that, When the computer program is executed by a processor, it implements the two-level shared file method as described in any one of claims 1 to 12.
Citation Information
Patent Citations
Universal cloning method and device for cloud platform shared file storage
CN113886139A
Method and system for creating file storage resources based on shared cache mechanism
CN117573630A