FTTR shared storage unified management method and device, equipment and medium
The unified Samba configuration in FTTR systems allows for transparent access to USB storage across all devices using a fixed management IP, addressing the limitations of existing FTTR systems and enhancing storage capacity and access.
Patent Information
- Application Number
- CN202510214046.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-26
- Publication Date
- 2025-06-17
AI Technical Summary
Existing FTTR systems are limited in that only the main gateway can connect USB storage, failing to fully utilize the USB storage capabilities of multiple devices due to identical management IPs and unpredictable business IPs that change after reboot, making it difficult for users to access different sub-gateways consistently.
A unified Samba configuration is distributed by the main gateway to sub-gateways, with the main gateway listening for USB device connections and disconnections, mapping local directories, and managing shared paths through a fixed management IP to enable transparent access to USB storage across all devices.
Enables transparent access to USB storage across all FTTR devices via a fixed management IP, enhancing the network's storage capacity and facilitating unified path access and expansion.
Smart Images

Figure CN120166321A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of shared storage, and particularly to a unified management method, device, equipment and medium for FTTR shared storage. Background Art
[0002] FTTR (Fiber to the Room), that is, fiber to the room, directly extends the optical fiber to each room, and can achieve gigabit-plus coverage throughout the house.
[0003] In the existing FTTR system, only the main gateway can be externally connected to a USB storage, and the USB storage capabilities of the multi-device networking of FTTR cannot be fully utilized.
[0004] In the FTTR system, the reasons why the sub-gateways cannot be externally connected to USB storage are as follows:
[0005] The management IP of each sub-gateway is the same, and users cannot access different sub-gateways through the same IP;
[0006] The service IPs of each sub-gateway are different, but they are invisible to users, and each time after restarting, the obtained service IP will change, and users cannot access the sub-gateways through fixed service IPs.
[0007] In summary, there is an urgent need for a technical solution for unified management of FTTR shared storage. Summary of the Invention
[0008] In view of the above problems, the present disclosure provides a unified management method, device, equipment and medium for FTTR shared storage.
[0009] In a first aspect, a unified management method for FTTR shared storage, the method includes:
[0010] The main gateway issues a unified samba configuration to the sub-gateways;
[0011] After the main gateway receives the shared information reported by the sub-gateways, it maps the local directory to the network shared path of the sub-gateways, updates the samba configuration and starts it.
[0012] Further, after the main gateway issues a unified samba configuration to the sub-gateways, it further includes:
[0013] The main gateway monitors the plug-and-play messages of its own USB devices and configures and starts the samba sharing.
[0014] Further, the main gateway monitors the plug-and-play messages of its own USB devices, including:
[0015] Monitoring the plug-and-play messages of the USB devices to obtain the directory paths of the USB devices;
[0016] If the USB device goes online, configure the directory path into the Samba configuration file and specify the Samba share name;
[0017] If the USB device goes offline, delete the directory path corresponding to the Samba configuration and the Samba share name;
[0018] After the USB device goes online or offline, restart the Samba service program.
[0019] Furthermore, when the master gateway receives the shared information reported by the slave gateway, it includes:
[0020] The service IP, MAC address, Samba share name, and online / offline type corresponding to the slave gateway.
[0021] Furthermore, after the master gateway receives the shared information reported by the slave gateway, map the local directory to the network shared path of the slave gateway, update the Samba configuration and start it, including:
[0022] If the report is of the offline type, the master gateway deletes the shared configuration of the corresponding slave gateway;
[0023] If the report is of the online type and the reported MAC has been added to the share of the master gateway, the master gateway deletes the shared configuration of the corresponding slave gateway;
[0024] Form the Samba network shared address of the slave gateway according to the reported service IP and Samba share name;
[0025] According to the unified Samba account and password, the Samba network shared address reported by the slave gateway, and the mapping of the network system directory of CIFS or NFS configured for the master gateway, map the local directory of the master gateway to the Samba network shared address of the slave gateway;
[0026] Configure the local directory path of the master gateway into the Samba configuration file of the master gateway and specify the Samba share name;
[0027] Restart the Samba service program of the master gateway.
[0028] In the second aspect, a management method for the FTTR shared storage slave gateway adopts the above-mentioned unified management method for FTTR shared storage,
[0029] The slave gateway receives the unified Samba configuration issued by the master gateway;
[0030] The slave gateway listens to the online / offline messages of its respective USB devices and configures and starts the Samba share;
[0031] The slave gateway reports the shared information to the master gateway.
[0032] In a third aspect, an FTTR shared storage unified management device adopts the above-mentioned FTTR shared storage unified management method to manage the FTTR master gateway shared storage.
[0033] In a fourth aspect, an FTTR shared storage sub-gateway management device adopts the above-mentioned FTTR shared storage sub-gateway management method to manage the FTTR sub-gateway shared storage.
[0034] In a fifth aspect, an electronic device includes a processor, a communication interface, a memory, and a communication bus. Among them, the processor, the communication interface, and the memory complete communication with each other through the communication bus;
[0035] The memory stores a computer program;
[0036] When the processor is used to execute the computer program stored on the memory, it implements the above-mentioned FTTR shared storage unified management method or the above-mentioned FTTR shared storage sub-gateway management method.
[0037] In a sixth aspect, a computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the above-mentioned FTTR shared storage unified management method or the above-mentioned FTTR shared storage sub-gateway management method.
[0038] The present disclosure at least includes the following beneficial effects:
[0039] The present disclosure accesses the usb shared storage of the master gateway and each sub-gateway through the management IP of the master gateway, realizes transparent access to the external usb shared storage of all devices under FTTR, and expands the usb storage capacity under the FTTR network, which is beneficial to the expansion of the user's shared storage and unified path access.
[0040] Other features and advantages of the present disclosure will be described in the following specification, and part of them will become obvious from the specification or be understood by implementing the present disclosure. The objectives and other advantages of the present disclosure can be achieved and obtained through the structures pointed out in the specification and the drawings. Description of the Drawings
[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are some embodiments of the present disclosure. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0042] Figure 1Schematic diagram of the FTTR shared storage management process according to an embodiment of the present disclosure;
[0043] Figure 2 Schematic diagram of the FTTR shared storage networking architecture according to an embodiment of the present disclosure;
[0044] Figure 3 Schematic diagram of the FTTR shared storage device architecture according to an embodiment of the present disclosure;
[0045] Figure 4 Schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure. Detailed implementation manners
[0046] To make the objectives, technical solutions, and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present disclosure. Apparently, the described embodiments are some, but not all, of the embodiments of the present disclosure. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present disclosure without creative efforts shall fall within the protection scope of the present disclosure.
[0047] As Figure 1 shown, a unified management method for FTTR shared storage, the method includes:
[0048] The main gateway issues a unified samba configuration to the sub-gateway;
[0049] The main gateway listens for the online and offline messages of the corresponding usb device and configures and starts the samba sharing;
[0050] After the main gateway receives the shared information reported by the sub-gateway, it maps the local directory to the network shared path of the sub-gateway, updates the samba configuration, and starts it.
[0051] Specifically, when implementing, the main gateway issues a unified samba configuration to the sub-gateway, and the issued content is the samba account password;
[0052] The main gateway listens for the online and offline messages of its respective usb devices and configures and starts the samba sharing, including:
[0053] Listening for the online and offline messages of the usb device and obtaining the directory path of the usb device;
[0054] If the usb device is online, configure the directory path to the samba configuration file and specify the samba share name;
[0055] If the usb device is offline, delete the directory path and samba share name corresponding to the samba configuration;
[0056] Restart the samba service program.
[0057] After the master gateway receives the reporting information from the slave gateway, it maps the local directory to the network shared path of the slave gateway, updates the samba configuration and starts it, including:
[0058] If the report is of the offline type, the master gateway deletes the shared configuration of the corresponding slave gateway;
[0059] If the report is of the online type and the reported mac has already been added to the sharing of the master gateway, the master gateway deletes the shared configuration of the corresponding slave gateway;
[0060] Compose the samba network shared address of the slave gateway according to the reported service ip and samba share name;
[0061] According to the unified samba account password, the samba network shared address reported by the slave gateway, and the configuration of the network system directory mapping of cifs or nfs of the master gateway, map the local directory of the master gateway to the samba network shared address of the slave gateway;
[0062] Configure the local directory path of the master gateway into the configuration file of the master gateway samba, and specify the samba share name;
[0063] Restart the master gateway samba service program.
[0064] Among them, when the master gateway deletes the shared configuration of the corresponding slave gateway, it first deletes the existing configuration of the online slave gateway, and then updates the configuration of this slave gateway. The subsequent steps are actually to update the configuration of the slave gateway. This can be compatible with two scenarios: sharing of newly online slave gateways and configuration update of existing online slave gateways.
[0065] Combined with Figure 1 the schematic diagram of the FTTR shared storage management process in Figure 2 and the network architecture diagram of the FTTR shared storage networking in
[0066] S101, the slave gateway storage monitoring module monitors that a usb device is inserted into the gateway and obtains the directory path of the usb device;
[0067] S102, the slave gateway storage monitoring module reports the directory path of the usb device to the storage proxy module;
[0068] S201, the slave gateway storage proxy module obtains the usb device directory;
[0069] S202, the slave gateway storage proxy module configures the usb device directory to the path attribute of the samba configuration, configures the corresponding shared name, and then enables the local samba service;
[0070] S203, The sub-gateway obtains the MAC and IP of the local service interface, and then reports the MAC, IP, and Samba shared directory name to the storage management module of the main gateway;
[0071] S301, The storage management module of the main gateway obtains the MAC, IP, and Samba shared directory name reported by the sub-gateway;
[0072] S302, The storage management module of the main gateway searches for the sub-gateway MAC list that has been mounted under the main gateway network directory according to the reported MAC;
[0073] S303, The storage management module of the main gateway determines whether the network directory with the same MAC has been mounted; if yes, execute S304; if no, jump to S305;
[0074] S304, If the network directory with the same MAC has been mounted, the storage management module of the main gateway unmounts the already-mounted network directory of the sub-gateway;
[0075] S305, If the network directory with the same MAC has not been mounted, the storage management module of the main gateway first combines the reported IP and Samba shared directory name into a shared network address, such as: / / 192.168.1.2 / sub, and then maps this network address to the local directory through CIFS or NFS;
[0076] S306, The storage management module of the main gateway stores the reported MAC in the MAC list for judging whether the messages are reported by the same device next time;
[0077] S307, The storage management module of the main gateway reports the mapped local directory to the local storage proxy module; the storage proxy configures the mapped local directory to the path attribute of the Samba configuration file and sets the corresponding shared name, such as subA, and then restarts the local Samba service;
[0078] The storage management module of the main gateway can also send the Samba configuration to the storage proxy module of the sub-gateway, such as creating a new Samba shared directory or uniformly configuring the Samba account password;
[0079] The management IP of the main gateway is fixed, usually 192.168.1.1. Users can access the USB shared storage of the main gateway and sub-gateways by accessing the management IP of the main gateway. For example, accessing \\192.168.1.1\main means accessing the USB shared storage of the main gateway; accessing \\192.168.1.1\subA means accessing the USB shared storage of sub-gateway A.
[0080] A method for managing an FTTR shared storage sub-gateway adopts the above-mentioned method for unified management of FTTR shared storage.
[0081] The sub-gateway receives the unified samba configuration issued by the main gateway.
[0082] The sub-gateway monitors the plug-and-play messages of its respective usb devices and configures and starts the samba sharing.
[0083] The sub-gateway reports the sharing information to the main gateway.
[0084] As Figure 3 shown, a device for unified management of FTTR shared storage adopts the above-mentioned method for unified management of FTTR shared storage to manage the shared storage of the FTTR main gateway.
[0085] A device for managing an FTTR shared storage sub-gateway adopts the above-mentioned method for managing an FTTR shared storage sub-gateway to manage the shared storage of the FTTR sub-gateway.
[0086] Specifically, the implementation is introduced as follows:
[0087] The sub-gateway includes two modules: storage monitoring and storage proxy; the main gateway includes three modules: storage monitoring, storage proxy, and storage management.
[0088] The storage monitoring module is used to monitor the plug-and-play messages of local usb devices and notify the storage proxy module of the plug-and-play type of the usb device and the directory path of the usb device
[0089] The storage proxy module is used to receive the plug-and-play information of the usb device reported by the storage monitoring and the configuration information issued by the storage management; then perform local samba configuration and service start and stop, and report the sharing information to the storage management module of the main gateway;
[0090] The storage management module is used for the main gateway to manage the unified samba account password, receive the sharing information reported by the storage proxy, configure the cifs and nfs network system directory mappings to the sharing address of the sub-gateway, and issue the configuration to the storage proxy module.
[0091] As Figure 4 shown, the present disclosure provides an electronic device, including a processor 401, a communication interface 402, a memory 403, and a communication bus 404. Among them, the processor 401, the communication interface 402, and the memory 403 complete mutual communication through the communication bus 404;
[0092] The memory 403 stores a computer program;
[0093] The processor 401, when executing the computer program stored in the memory 403, implements the above-mentioned unified management method for FTTR shared storage or the above-mentioned management method for FTTR shared storage sub-gateway.
[0094] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the above-mentioned unified management method for FTTR shared storage or the above-mentioned management method for FTTR shared storage sub-gateway.
[0095] The computer-readable storage medium may be included in the device / apparatus described in the above embodiments; or it may exist alone without being assembled into the device / apparatus. The above computer-readable storage medium carries one or more programs, and when the one or more programs are executed, the method according to the embodiments of the present disclosure is implemented.
[0096] According to the embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, it may include but is not limited to: portable computer disks, hard disks, random access memories (RAMs), read-only memories (ROMs), erasable programmable read-only memories (EPROMs or flash memories), portable compact disk read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the above. In the present disclosure, the computer-readable storage medium may be any tangible medium that contains or stores a program, and the program can be used by or combined with an instruction execution system, device, or apparatus.
[0097] Although the present disclosure has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments or perform equivalent replacements for some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure.
Claims
1. A FTTR shared storage unified management method, characterized in that: The method comprises: The main gateway sends unified samba configuration to the sub-gateway; After receiving the sharing information reported by the sub-gateway, the main gateway maps the local directory to the network sharing path of the sub-gateway, updates the samba configuration and starts it.
2. A FTTR shared storage unified management method according to claim 1, characterized in that: The main gateway sends a unified samba configuration to the sub-gateway, which also includes: The main gateway monitors the online and offline messages of the USB device of the main gateway itself, and configures and starts the samba share.
3. A FTTR shared storage unified management method according to claim 2, characterized in that: The main gateway monitors the online and offline messages of the USB device of the main gateway itself, including: Monitor the online and offline messages of USB devices and obtain the directory path of USB devices; If the USB device is online, configure the directory path to the samba configuration file and specify the samba share name; If the USB device is offline, delete the directory path and samba share name corresponding to the samba configuration; After the USB device goes online or offline, restart the samba service program.
4. A FTTR shared storage unified management method according to claim 1, characterized in that: The main gateway receives the shared information reported by the sub-gateway, including: The service IP, MAC address, Samba share name and online and offline types corresponding to the sub-gateway.
5. The FTTR shared storage unified management method according to claim 1, characterized in that: After receiving the sharing information reported by the sub-gateway, the main gateway maps the local directory to the network sharing path of the sub-gateway, updates the samba configuration and starts it, including: If the report is offline, the main gateway deletes the shared configuration of the corresponding sub-gateway; If the report is of online type, and the reported mac has been added to the sharing of the main gateway, the main gateway deletes the sharing configuration of the corresponding sub-gateway; The samba network sharing address of the sub-gateway is formed based on the reported business IP and samba sharing name; Based on the unified samba account and password, the samba network sharing address reported by the sub-gateway, and the cifs or nfs network system directory mapping configured on the main gateway, the local directory of the main gateway is mapped to the samba network sharing address of the sub-gateway; Configure the local directory path of the primary gateway to the primary gateway samba configuration file and specify the samba share name; Restart the primary gateway samba service program.
6. A FTTR shared storage sub-gateway management method, characterized in that: A FTTR shared storage unified management method according to any one of claims 1 to 5 is adopted, The sub-gateway receives the unified samba configuration sent by the main gateway; The sub-gateway monitors the online and offline messages of each USB device, and configures and starts samba sharing; The sub-gateway reports the shared information to the main gateway.
7. A FTTR shared storage unified management device, characterized in that: The FTTR main gateway shared storage is managed by adopting a FTTR shared storage unified management method as described in any one of claims 1-5.
8. A FTTR shared storage sub-gateway management device, characterized in that: The FTTR sub-gateway shared storage management method described in claim 6 is used to manage the FTTR sub-gateway shared storage.
9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; a memory storing a computer program; The processor is used to implement a FTTR shared storage unified management method as described in any one of claims 1 to 5, or implement a FTTR shared storage sub-gateway management method as described in claim 6 when executing a computer program stored in the memory.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, it implements a FTTR shared storage unified management method described in any one of claims 1-5, or implements a FTTR shared storage sub-gateway management method described in claim 6.