Storage volume management method, electronic equipment, storage medium and product

By creating a mapping relationship between the target host and volume in the storage device, and obtaining the connection and multipath information of the target volume, the problem that cloud platforms cannot call storage supporting multipath devices is solved, and storage performance is improved.

CN120371220AActive Publication Date: 2025-07-25INSPUR SUZHOU INTELLIGENT TECH CO LTD

Patent Information

Application Number
CN202510851588.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-24
Publication Date
2025-07-25
Estimated Expiration
2045-06-24

AI Technical Summary

Technical Problem

Cloud platforms cannot call multi-path devices that are equipped with storage, affecting storage performance.

Method used

Create a target host in the storage device, establish a mapping relationship between the target volume and the host, obtain the connection information of the target volume and the multi-path command line information, and manage the target volume based on this information.

Benefits of technology

Improve the storage performance of the cloud platform and realize the call to storage supporting multi-path devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120371220A_ABST
    Figure CN120371220A_ABST
Patent Text Reader

Abstract

The invention discloses a storage volume management method, electronic equipment, a storage medium and a product, and relates to the technical field of cloud platforms. Searching a target volume in a storage device according to the identifier of the volume, and creating a mapping relationship between the target volume and the target host; in response to successful creation of the mapping relation, target information of the target volume is obtained, and the target information comprises connection information and multi-path command line information; and managing the target volume based on the connection information and the multi-path command line information, thereby solving the technical problem that the storage performance of the flat holder is influenced because the cloud platform can only call the multi-path command line of the system and cannot call the storage-matched multi-path equipment in a related scheme, and achieving the purposes of calling the storage-matched multi-path equipment and improving the storage performance of the flat holder. And the storage performance of the cloud platform is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cloud platform technology, and in particular to storage volume management methods, electronic devices, storage media and products. Background Art

[0002] In the relevant storage volume management solution, the cloud platform uses the system's built-in multipath software in order to manage all storage vendors' commercial storage at the same time. Even if the user installs the self-developed multipath software for storage in the cloud platform computing node, the cloud platform will only call the system's built-in multipath command line and cannot call the storage-supported multipath device, which will affect the storage performance of the platform. Summary of the invention

[0003] The present application provides a storage volume management method, an electronic device, a storage medium and a product, so as to at least solve the problem in the related technology that the cloud platform can only call the multi-path command line provided by the system, but cannot call the multi-path device supporting the storage, thereby affecting the storage performance of the cloud platform.

[0004] The present application provides a storage volume management method, including: Create a target host in the storage device; Search the target volume in the storage device according to the volume identifier, and create a mapping relationship between the target volume and the target host; In response to the mapping relationship being successfully created, obtaining target information of the target volume, the target information including connection information and multipath command line information; Manage the target volume based on the connection information and multipath command line information.

[0005] The present application also provides a storage volume management device, including: A first creation unit, used for creating a target host in a storage device; The second creation unit is used to search the target volume in the storage device according to the volume identifier and create a mapping relationship between the target volume and the target host; An acquisition unit, configured to acquire target information of a target volume in response to successful creation of the mapping relationship, wherein the target information includes connection information and multipath command line information; The management unit is used to manage the target volume based on the connection information and the multipath command line information.

[0006] The present application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of any one of the above storage volume management methods when executing the computer program.

[0007] The present application also provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of any of the above storage volume management methods.

[0008] The present application also provides a computer program product including a computer program, which, when executed by a processor, implements the steps of any of the above storage volume management methods.

[0009] Through the present application, a target host is created in a storage device; a target volume is searched for in the storage device according to the identifier of the volume, and a mapping relationship between the target volume and the target host is created; in response to the successful creation of the mapping relationship, target information of the target volume is obtained, where the target information includes connection information and multipath command line information; based on the connection information and the multipath command line information, the target volume is managed, thereby solving the technical problem in the related solutions that the cloud platform can only call the command line of the system-built multipath and cannot call the multipath device supporting the storage, thus affecting the storage performance of the cloud platform, and achieving the technical effect of calling the multipath device supporting the storage and improving the storage performance of the cloud platform. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] To more clearly illustrate the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0011] Figure 1 It is a schematic flowchart of a process for a cloud platform to mount a volume provided by an embodiment of the present application; Figure 2 It is a schematic flowchart of a storage volume management method provided by an embodiment of the present application; Figure 3 It is a schematic structural diagram of a storage volume management device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0012] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all of them. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts fall within the protection scope of the present application.

[0013] It should be noted that in the description of this application, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or device. The terms "first", "second", etc. in this application are used to distinguish similar objects, rather than to describe a specific order or sequence.

[0014] To facilitate those skilled in the art to better understand the technical solutions described in the embodiments of the present disclosure, before introducing the embodiments of the present disclosure, the following explanations are made for the technical terms in the embodiments of the present disclosure.

[0015] Input / Output (IO): It refers to the data exchange process between a computer system and external devices. In the storage field, I / O specifically refers to the data read and write operations between the host and the storage device.

[0016] Multipath refers to a software that can send IO requests through multiple network paths. The difference between it and single-path software is that single-path software can only send IO through one network path, while multipath software can use multiple network paths simultaneously.

[0017] OpenStack is a cloud computing operating system that manages a large number of computing, storage, and network resources in a data center.

[0018] The Nova service is a service in the OpenStack cloud platform responsible for the life cycle management of virtual machine instances and the scheduling of computing resources.

[0019] The Cinder service is a volume management service in the OpenStack cloud platform, which can provide data persistence functions for virtual machine instances.

[0020] The Os_brick service is specifically responsible for handling the connection and discovery of storage devices, communicating with different types of storage backends, establishing connections, and providing storage devices for Nova instances to use.

[0021] Multipath refers to the native multipath software of the Linux system.

[0022] Redundant Array of Inexpensive Disks (RAID) can improve storage redundancy by combining multiple independent physical hard disks in different ways to form a logical hard disk.

[0023] Due to the strong scalability and ease of use of OpenStack, more and more enterprises and organizations are using OpenStack to build private clouds, establish cloud hosts, and deploy their businesses. As the business scale expands, enterprises need to store large amounts of data, so enterprises purchase commercial storage and connect the storage to the OpenStack cloud platform, create data volumes in the storage through OpenStack, and mount them to the cloud host for use.

[0024] In order to ensure the security of data in cloud platform virtual machines, OpenStack usually uses storage volumes in conjunction with multipath software. Storage multipath software can significantly improve the reliability, performance, and manageability of storage systems through redundancy design, load balancing, and intelligent fault recovery.

[0025] Multipath software is divided into system-provided multipath software and self-developed multipath software provided by storage vendors. The self-developed multipath software of storage vendors is usually proprietary, such as PowerPath of American companies, while the multipath software provided by the operating system is more universal, such as Linux multipath and Windows multipath input and output (MultiPath I / O, MPIO).

[0026] Compared with the system's built-in multipath, the self-developed multipath software has the following advantages: Deep hardware integration, optimized for vendor-owned storage devices, can fully utilize hardware features (such as cache, RAID strategy) to improve performance and stability. Support vendor-proprietary protocols for more efficient communication. More storage-matched load balancing strategy: Dynamically dispatch IO to the corresponding storage controller based on the I / O logical block addressing (LBA) address. Enhanced fault recovery: Faster path health detection and timely recovery of failed paths.

[0027] Advanced function support, storage virtualization support, seamless integration with vendors' virtualized storage solutions. Multi-protocol support, simultaneous management of Fibre Channel (FC), Internet Small Computer System Interface (ISCSI), Non-Volatile Memory Host Controller Interface Specification through Network Structure Transmission (NVMe-oF) and other protocols, adapting to complex storage architectures.

[0028] like Figure 1 As shown, Figure 1A flow chart of a cloud platform volume mounting process provided for an embodiment of the present application includes: a user initiates a volume mounting request, and mounts the storage volume to a virtual machine through a Nova API request. Nova notifies Cinder to prepare the volume, and Nova calls the Cinder API to trigger the Cinder volume mounting process. In this process, Cinder returns the volume connection information, including the storage service port IP, the storage volume LUN ID and other information. Nova connects to the storage backend through os_brick. After Nova receives the volume connection information returned by Cinder, it calls os_brick to establish a connection with the storage device. In this process, multipath-related command lines are called to scan and aggregate the paths, and finally the multipath device is discovered. Nova mounts the device to the virtual machine, and Nova attaches the multipath device discovered in the previous step to the virtual machine instance.

[0029] In the relevant storage volume management solution, the cloud platform uses the system's built-in multipath software in order to manage all storage vendors' commercial storage at the same time. Even if the user installs the self-developed multipath software for storage in the cloud platform computing node, the cloud platform will only call the system's built-in multipath command line and cannot call the storage-supported multipath device, which will affect the storage performance of the platform.

[0030] The present application includes creating a target host in a storage device; searching for a target volume in the storage device according to a volume identifier, and creating a mapping relationship between the target volume and the target host; in response to successful creation of the mapping relationship, obtaining target information of the target volume, the target information including connection information and multipath command line information; managing the target volume based on the connection information and the multipath command line information, thereby solving the technical problem in related solutions that a cloud platform can only call a multipath command line provided by the system, but cannot call a multipath device supporting the storage, thereby affecting the storage performance of the cloud platform, and achieving the technical effect of calling a multipath device supporting the storage and improving the storage performance of the cloud platform.

[0031] The present application provides a storage volume management method, which can be applied to ISCSI / FC links. The present application takes ISCSI links as an example to describe the implementation process, and FC links are similar. The method can be executed by specific components and services in the cloud platform.

[0032] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0033] Figure 2 A flowchart of a storage volume management method provided by an embodiment of the present disclosure.

[0034] like Figure 2 As shown, the method comprises the following steps: Step 201, create a target host in the storage device; In some embodiments, the cloud platform and the storage device can be connected using a security protocol, and a target host is created in the storage device. The name of the target host is associated with the name of the compute node.

[0035] In some embodiments, the security protocol in this application refers to the Secure Shell (SSH) protocol, which is used to create a secure remote connection channel in an insecure network. It encrypts the transmitted data through encryption technology to prevent the data from being eavesdropped, tampered with, or forged, and is commonly used in scenarios such as remote login, file transfer, and port forwarding.

[0036] In some embodiments, the storage device refers to a backend storage system, and the target host refers to an entity on the storage device that controls the access rights to storage volumes. The compute node is just a server that runs virtual machines in the cloud platform and usually deploys services such as Nova.

[0037] In some embodiments, the SSH connection between the cloud platform and the storage device can be established through the OpenStack ssh_utils connection pool module.

[0038] In some embodiments, a target host named host-compute-node01 can be created in the storage device, which is the same as the name of the compute node in the cloud platform; the iSCSI identifier name (iSCSI Qualified Name, IQN) of the compute node is added to this target host to complete the binding. Specifically, the target host can be created in the storage by calling the storage CLI command line; the name of the compute node where the OpenStack virtual machine is located can be passed through the initialize_connection interface to associate the name of the target host with the name of the compute node.

[0039] Step 202, find the target volume in the storage device according to the identifier of the volume, and create a mapping relationship between the target volume and the target host; In some embodiments, the identifier of the volume can be a Universally Unique Identifier (UUID), a volume name, a Logical Unit Number Identifier (LUN ID), etc. The identifier of the volume is used to locate a specific storage volume. Specifically, the UUID of the volume can be passed through the initialize_connection parameter.

[0040] In some embodiments, the target volume refers to the storage volume that needs to be mounted for use by the virtual machine.

[0041] In some embodiments, the mapping relationship between the target volume and the target host is used to indicate which target host can access the target volume, that is, to establish the binding of the LUN ID to the target host. For example, when the LUN ID is 25, it is mapped to host-compute-node01.

[0042] Step 203: In response to the successful creation of the mapping relationship, obtain the target information of the target volume. The target information includes connection information and multipath command-line information. In some embodiments, after the mapping relationship between the target volume and the target host is successfully created, the Cinder driver in the cloud platform obtains the target information of the target volume.

[0043] In some embodiments, the connection information is used to construct the parameters required for ISCSI login, and the multipath command-line information is used to construct the multipath device.

[0044] In some embodiments, the connection information in the storage device can be obtained by calling the storage CLI command line.

[0045] In some embodiments, the target information of the target volume can be returned in a predefined format, which is: {'target_iqns': [], 'target_portals': [], 'target_luns': [],'multipath_commands': {'reconfig': '', 'resize': '', 'addpath': '', 'delpath': '', 'delmap': ''}}. Among them, target_iqns is a list containing the IQN information of each storage node. target_portals is a list containing the IP and port of all service ports of the storage (such as 1.1.1.1:3260). target_luns is a list containing the Lun IDs allocated for the volume by the storage. reconfig represents the command for reconfiguring the multipath in the self-developed multipath. resize represents the command for re-identifying the volume size in the self-developed multipath. addpath represents the command for adding a path device in the self-developed multipath. delpath represents the command for deleting a path device in the self-developed multipath. delmap represents the command for deleting a multipath device in the self-developed multipath.

[0046] Step 204: Manage the target volume based on the connection information and the multipath command-line information.

[0047] In some embodiments, managing a target volume refers to a series of control and maintenance operations performed on the target volume on a computing node, which can ensure that the target volume can be correctly identified, used, released, and dynamically adjusted in capacity. Managing the target volume includes, but is not limited to, mounting, unmounting, and expanding the capacity of the target volume.

[0048] In some embodiments, by managing the target volume based on connection information and multipath command-line information, dynamic identification of storage paths, capacity updates, failover, and multipath status synchronization can be achieved, thereby improving the high availability and flexibility of storage access in the cloud platform.

[0049] Through the present application, which includes creating a target host in a storage device; searching for a target volume in the storage device according to the identifier of the volume and creating a mapping relationship between the target volume and the target host; upon successful creation of the mapping relationship, obtaining target information of the target volume, where the target information includes connection information and multipath command-line information; and managing the target volume based on the connection information and multipath command-line information, the technical problem in related solutions that the cloud platform can only call the multipath command line provided by the system and cannot call the multipath device provided by the storage, thereby affecting the storage performance of the flat cloud platform, is solved, and the technical effect of calling the multipath device provided by the storage and improving the storage performance of the cloud platform is achieved.

[0050] In some embodiments, upon successful creation of the mapping relationship, obtaining the target information of the target volume includes: Upon successful creation of the mapping relationship, performing a scan operation on the disk device using the computing service module of the cloud platform; In some embodiments, it means that the storage device has mapped the target volume to a target host, enabling the host to access the target volume.

[0051] In some embodiments, the computing service module of the cloud platform refers to the Nova module. Before performing a scan operation on the disk device using the Nova module, first inherit the BaseLinuxConnector class of the OpenStack os_brick module and override the connect_volume method. Call this method through the Nova module to connect to and scan the disk device. After the storage side maps the target volume to the target host, it is necessary to rescan on the computing node to discover the device and use it.

[0052] In some embodiments, the scan operation on the disk device is to discover newly connected storage devices.

[0053] Upon completion of the scan operation on the disk device, obtain the target information of the target volume.

[0054] In some embodiments, after the scanning operation is completed, the system generates a new device file and obtains the target information of the target volume through the OpenStack os_brick module.

[0055] In some embodiments, by responding to the successful creation of the mapping relationship, the computing service module of the cloud platform performs a scanning operation on the disk device; in response to the end of the disk device scanning operation, obtaining the target information of the target volume can achieve path recognition, device binding, and multi-path mapping update of the target volume, thereby ensuring that the target volume can be stably mounted on the computing node and normally accessed by the virtual machine.

[0056] In some embodiments, obtaining the target information of the target volume in response to the end of the disk device scanning operation includes: In response to the end of the disk device scanning operation, determine whether a volume management request from the cloud platform is received. The volume management request includes a volume mount request, a volume unmount request, and a volume expansion request; In some embodiments, the volume management request of the cloud platform refers to an instruction initiated by a user or a cloud platform service to operate on a storage volume. The volume mount request refers to a request to mount a specified volume on a virtual machine instance so that it can be accessed; the volume unmount request refers to a request to unmount the volume from the virtual machine instance and disconnect it from the computing node; the volume expansion request refers to a request to expand the capacity of an existing volume, which is often used to meet the data growth requirement.

[0057] If a volume management request is received, then parse the connection property parameters to obtain the target information of the target volume.

[0058] In some embodiments, the connection property parameters are a set of structured data returned by the Cinder driver to Nova, used to describe how to connect to the target volume. In this application, it refers to the connection_properties parameter. Parse the connection_properties parameter to obtain the target information of the volume, that is, the connection information of the volume and the command line of the self-developed multi-path.

[0059] In some embodiments, managing the target volume based on the connection information and the multi-path command line information includes: Based on the connection information, determine multiple triple arrays, and the triple arrays are used for Internet Small Computer System Interface (ISCSI) login; In some embodiments, the triple array refers to a set containing three elements, used to uniquely identify an ISCSI login operation.

[0060] In some embodiments, in OpenStack, connection_properties contains information about multiple paths, and os-brick extracts multiple ('target_portal', 'target_iqn', 'target_lun') combinations from it; each connection information corresponds to a triple array.

[0061] Obtain the session identifier corresponding to the triple array; In some embodiments, the session identifier refers to the unique number used to identify an iSCSI session in the iSCSI protocol. Each time an iSCSI target is successfully logged in, the system assigns a unique session identifier to it.

[0062] Manage the target volume based on the session identifier and multi-path command line information.

[0063] In some embodiments, managing the target volume based on the session identifier and multi-path information includes constructing a multi-path device, monitoring the path status, load balancing scheduling, and automatic failure switching.

[0064] In some embodiments, by determining multiple triple arrays based on the connection information, where the triple arrays are used for Internet Small Computer System Interface (iSCSI) login; obtaining the session identifier corresponding to the triple array; and managing the target volume based on the session identifier and multi-path command line information, the reliability and performance of storage access can be improved.

[0065] In some embodiments, obtaining the session identifier corresponding to the triple array includes: Start the target thread corresponding to the connection information; In some embodiments, the target thread corresponding to the connection information refers to starting multiple threads in the OpenStack os_brick module.

[0066] Based on the target thread, use the triple array for iSCSI login; In some embodiments, each thread performs iSCSI login according to a triple array, and the specific command is iscsiadm -m node -T {target_iqn} -p {target_portal} -l, where target_iqn and target_portal are the information obtained by the aforementioned cinder driver from the storage device.

[0067] In response to the end of the login using the triple array, establish a login session and obtain the session identifier corresponding to the triple array.

[0068] In some embodiments, the login session refers to a successful iSCSI connection instance.

[0069] In some embodiments, by starting a target thread corresponding to the connection information; based on the target thread, using a ternary array to perform Internet Small Computer System Interface (ISCSI) login; in response to the end of the login using the ternary array, establishing a login session and obtaining a session identifier corresponding to the ternary array for subsequent operations such as multipath management, path monitoring, and failover.

[0070] In some embodiments, managing a target volume based on the session identifier and multipath command line information includes: Based on the session identifier, determining device identifier information, where the device identifier information at least includes host adapter information; In some embodiments, the device identifier information refers to block device information associated with the session in the operating system, and the device identifier information may further include a channel number (channel), a target number (target), a lun number, etc., and the host adapter information refers to a host number (host).

[0071] In some embodiments, specific device identifier information, i.e., HCTL information (host, channel, target, lun), can be obtained from the / sys / class / iscsi_host / host / device / session directory.

[0072] Based on the host adapter information and the connection information, perform a disk scanning operation on the computing node to generate target path devices; In some embodiments, the disk scanning operation refers to the system re-scanning the ISCSI bus to discover newly connected storage devices.

[0073] In some embodiments, the target path devices refer to all the scanned path devices.

[0074] In some embodiments, perform disk scanning in the computing node according to the host information and the target_lun to generate target path devices, i.e., sdx path devices. The specific command is: echo '--{target_lun}' / sys / class / scsi_host / host{host} / scan.

[0075] Based on the multipath command line information, add the target path devices to manage the target volume.

[0076] In some embodiments, by executing the addpath command in the multipath command line information, add the sdx device to the multipath topology.

[0077] In some embodiments, by determining device identification information based on a session identifier, the device identification information at least includes host adapter information; based on the host adapter information and connection information, perform a disk scanning operation on a computing node to generate a target path device; based on multi-path command line information, add the target path device to manage the target volume, and the newly identified path can be added to the existing multi-path device to participate in I / O path selection.

[0078] In some embodiments, inherit the BaseLinuxConnector class of the OpenStack os_brick module. Override the disconnect_volume method, which is called by the Nova module of OpenStack to delete the multi-path device and path device in the computing node.

[0079] In some embodiments, after obtaining the session identifier corresponding to the triple array, the volume management method further includes: Based on the session identifier, obtain the first path device under the login session; In some embodiments, obtain the corresponding session identifier in the target host according to the above triple array, denoted as s_id. All path devices under this session can be obtained through the / sys / class / scsi_host / host / device / session{s_id} / target / block directory.

[0080] In some embodiments, the first path device refers to one or more path devices identified under this session. For example, / dev / sda, / dev / sdb, and / dev / sdc represent devices that access the same logical unit through different paths.

[0081] Based on the connection information, determine the second path device from the first path devices; In some embodiments, the second path device refers to those path devices that belong to the multi-path device.

[0082] In some embodiments, the second path device can be filtered from the first path devices according to the target_lun in the connection information.

[0083] Based on the multi-path command line information, delete the first path device or the second path device to manage the target volume.

[0084] In some embodiments, the delpath command in the multi-path command line information can be executed to remove the second path device from the multi-path topology, and the delmap command in the multi-path command line information can be executed to delete the first path device, that is, the multi-path device.

[0085] In some embodiments, by obtaining a first path device under a login session based on a session identifier, determining a second path device from the first path devices based on connection information, and deleting the first path device or the second path device based on multi-path command line information, operations such as path management, failover, and resource recovery of a target volume can be achieved.

[0086] In some embodiments, inherit the BaseLinuxConnector class of the OpenStack os_brick module. Override the extend_volume method, which is called by the Nova module of OpenStack to dynamically refresh the capacity of a multi-path device and a normal path device in a compute node.

[0087] In some embodiments, after obtaining a session identifier corresponding to a triple array, the volume management method further includes: Determine a third path device corresponding to the triple array; In some embodiments, the third path device refers to a path device among all path devices, and a unique normal path device (sdx) can be obtained by matching from the / dev / disk / by-path directory according to each triple array.

[0088] Based on the third path device, determine device identification information corresponding to the third path device; In some embodiments, for each normal path device, obtain its corresponding HCTL information (host, channel, target, lun) in the target host.

[0089] Based on the device identification information, refresh the capacity of the third path device, and based on the multi-path command line information, refresh the device information of the second path device to manage the target volume.

[0090] In some embodiments, the capacity of each normal path device can be refreshed by using the echo 1 / sys / bus / scsi / drivers / sd / {host}:{channel}:{target}: {lun} / rescan instruction. Refreshing the capacity of the third path device means notifying the operating system to reread the device capacity information for expanding the target volume.

[0091] In some embodiments, refreshing the device information of the second path device means notifying the multi-path tool to rescan and update the path status to ensure accurate mapping of the multi-path device. Among them, the device information of the second path device may include mapping table information and capacity information.

[0092] In some embodiments, a third path device corresponding to the ternary array is determined; based on the third path device, device identification information corresponding to the third path device is determined; based on the device identification information, the capacity of the third path device is refreshed, and based on the multipath command line information, the device information of the second path device is refreshed, so as to realize the dynamic capacity expansion of the target volume and the synchronous management of the multipath state.

[0093] In some embodiments, after refreshing the capacity of the third path device based on the device identification information, the storage volume management method further includes: Obtain the domain name information of the target volume; In some embodiments, the domain name information of the target volume refers to the World Wide Name (WWN), and the WWN information of the target volume can be obtained by executing the command / lib / udev / scsi_id --page 0x83 --whitelisted / dev / sdx.

[0094] Based on the domain name information of the target volume, determine the soft link information corresponding to the domain name information; In some embodiments, the soft link information refers to a symbolic link in the Linux system, usually located in the / dev / disk / by-path / or / dev / disk / by-id / directory. The soft link information is used to map the device path to a more readable name.

[0095] Parse the soft link information to obtain the name of the second path device.

[0096] In some embodiments, based on the domain name information of the target volume, the name of the second path device can be determined by parsing / dev / disk / by-id / dm-uuid-mpath-{WWN} in the host, and the actual device path can be obtained by reading the target path in the soft link.

[0097] In some embodiments, refreshing the device information of the second path device based on the multipath command line information includes: Based on the multipath command line information, obtain a first command and a second command. The first command is a reconfiguration command, and the second command is a command to re-identify the size of the target volume; Use the first command to refresh the mapping table information of the second path device, or use the second command to refresh the capacity information of the second path device.

[0098] In some embodiments, the reconfiguration command is a command used to notify the system to reload the configuration or refresh the device mapping table to ensure path state synchronization.

[0099] In some embodiments, the target volume size re-identification command is used to notify the operating system or multipath to refresh the device capacity information after volume expansion.

[0100] In some embodiments, the mapping table (map) information of the host multipath can be refreshed by executing the reconfig command in the multipath command line information. The mapping table information includes information such as the number of paths, path status, and load balancing policy.

[0101] In some embodiments, the capacity information of the multipath device can be refreshed by executing the resize command in the multipath command line information.

[0102] In some embodiments, by obtaining a first command and a second command based on the multipath command line information, where the first command is a reconfiguration command and the second command is a target volume size re-identification command; using the first command to refresh the mapping table information of the second path device, or using the second command to refresh the capacity information of the second path device, the path status synchronization and capacity update of the target volume can be performed, improving the availability and flexibility of storage access.

[0103] In some embodiments, the connection information includes the network protocol address, the unique identifier of the storage device, and the volume identifier assigned by the storage device for mapping to the target volume.

[0104] In some embodiments, the network protocol address is used for the network address and port number to establish a storage connection; the unique identifier of the storage device refers to the globally unique name or identifier of the storage device, which is IQN in the ISCSI protocol, and the IQN in the current session can be viewed through the command line; the volume identifier assigned by the storage device for mapping to the target volume refers to the aforementioned volume LUN ID, and different LUN IDs identify different storage volumes.

[0105] In some embodiments, the multipath command line information includes reconfiguration multipath command line information, target volume size re-identification information, path device addition information, path device deletion information, and multipath device deletion information.

[0106] In some embodiments, the multipath command line information is used to control and maintain the multipath devices in the Linux system.

[0107] In some embodiments, reconfiguring multi-path command line information is typically used after configuration changes such as updating multi-path policies and path priorities; re-identifying volume size information is used to notify the system to re-identify the capacity information of a certain block device. In a multi-path environment, it is necessary to refresh the capacity information of both the underlying path device and the upper-layer multi-path device simultaneously; adding path device information is used to add a newly discovered path device to the existing multi-path device mapping; deleting path device information is used to remove a certain path device from the multi-path device mapping; deleting multi-path device information means deleting the entire multi-path device, which is usually used when unmounting a volume, cleaning up resources, or reconstructing a multi-path mapping.

[0108] In some embodiments, by extending the functions of the Cinder driver, in the interface for mounting a volume, in addition to returning the connection information of the volume, a multi-path command set is also returned, including 5 standard actions: reconfig, resize, addpath, delpath, and delmap. Cinder drivers developed by different storage vendors can register the multi-path commands they support in this way to the os_brick module of the cloud platform.

[0109] In some embodiments, by extending the OpenStack os_brick module, by rewriting the interfaces for mounting a volume, unmounting a volume, and expanding the volume, and cooperating with the multi-path command set developed by the storage vendor independently, device discovery, device deletion, and device capacity refresh on the host side are completed. This enables the cloud platform to manage storage volumes through the independently developed multi-path.

[0110] In some embodiments, through the extension and enhancement of the functions of the Cinder driver and the OpenStack os_brick module, the independently developed multi-path command line set of the storage is registered in the os_brick module, so that the cloud platform can identify and call the independently developed multi-path commands during the processes of mounting a volume, unmounting a volume, and online expanding a volume. It realizes the integration of the independently developed multi-path in the OpenStack cloud platform to manage storage volumes, and when the cloud platform uses the storage volume, it can exert the ultimate performance of the storage.

[0111] Through the present application, including creating a target host in the storage device; searching for a target volume in the storage device according to the identifier of the volume and creating a mapping relationship between the target volume and the target host; in response to the successful creation of the mapping relationship, obtaining the target information of the target volume, where the target information includes connection information and multi-path command line information; based on the connection information and the multi-path command line information, managing the target volume, it solves the technical problem that in the related solutions, the cloud platform can only call the command line of the system-built-in multi-path and cannot call the multi-path device supporting the storage, thus affecting the storage performance of the flat cloud platform, and achieves the technical effect of calling the multi-path device supporting the storage and improving the storage performance of the cloud platform.

[0112] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases, the former is a better implementation method.

[0113] An embodiment of the present application further provides a storage volume management device 300. Figure 3 As shown in the structural schematic diagram of a storage volume management device provided by an embodiment of the present disclosure, Figure 3 as shown, it includes: A first creation unit 301, configured to create a target host in a storage device; A second creation unit 302, configured to find a target volume in the storage device according to the identifier of the volume, and create a mapping relationship between the target volume and the target host; An acquisition unit 303, configured to, in response to the successful creation of the mapping relationship, acquire target information of the target volume, where the target information includes connection information and multipath command line information; A management unit 304, configured to manage the target volume based on the connection information and the multipath command line information.

[0114] Further, in a possible implementation manner of an embodiment of the present disclosure, the acquisition unit 303 is configured to: In response to the successful creation of the mapping relationship, use the computing service module of the cloud platform to perform a scanning operation on the disk device; In response to the end of the disk device scanning operation, acquire the target information of the target volume.

[0115] Further, in a possible implementation manner of an embodiment of the present disclosure, the acquisition unit 303 is configured to: In response to the end of the disk device scanning operation, determine whether a volume management request of the cloud platform is received, where the volume management request includes a volume mounting request, a volume unmounting request, and a volume expansion request; If a volume management request is received, parse the connection attribute parameters to acquire the target information of the target volume.

[0116] Further, in a possible implementation manner of an embodiment of the present disclosure, the management unit 304 is configured to: Based on the connection information, determine a plurality of triple arrays for Internet Small Computer System Interface (iSCSI) login; Acquire a session identifier corresponding to the triple array; Manage the target volume based on the session identifier and the multipath command line information.

[0117] Further, in a possible implementation manner of an embodiment of the present disclosure, the management unit 304 is configured to: Start a target thread corresponding to the connection information; Based on the target thread, use a ternary array to perform Internet Small Computer System Interface (ISCSI) login; In response to the end of the login using the ternary array, establish a login session and obtain a session identifier corresponding to the ternary array.

[0118] Furthermore, in a possible implementation manner of the embodiment of the present disclosure, the management unit 304 is configured to: Based on the session identifier, determine device identifier information, where the device identifier information at least includes host adapter information; Based on the host adapter information and connection information, perform a disk scanning operation on the computing node to generate a target path device; Based on the multipath command line information, add the target path device to manage the target volume.

[0119] Furthermore, in a possible implementation manner of the embodiment of the present disclosure, the storage volume management device 300 further includes a deletion unit, and the deletion unit is configured to: Based on the session identifier, obtain the first path device under the login session; Based on the connection information, determine the second path device from the first path devices; Based on the multipath command line information, delete the first path device or the second path device to manage the target volume.

[0120] Furthermore, in a possible implementation manner of the embodiment of the present disclosure, the storage volume management device 300 further includes a refresh unit, and the refresh unit is configured to: Determine the third path device corresponding to the ternary array; Based on the third path device, determine the device identifier information corresponding to the third path device; Based on the device identifier information, refresh the capacity of the third path device, and based on the multipath command line information, refresh the device information of the second path device to manage the target volume.

[0121] Furthermore, in a possible implementation manner of the embodiment of the present disclosure, the storage volume management device 300 further includes a parsing unit, and the parsing unit is configured to: Obtain the domain name information of the target volume; Based on the domain name information of the target volume, determine the soft link information corresponding to the domain name information; Parse the soft link information to obtain the name of the second path device.

[0122] Furthermore, in a possible implementation manner of the embodiment of the present disclosure, the refresh unit is further configured to: Based on the multipath command line information, obtain a first command and a second command, where the first command is a reconfiguration command, and the second command is a command to re-identify the size of the target volume; Refresh the mapping table information of the second path device using a first command, or refresh the capacity information of the second path device using a second command.

[0123] Further, in a possible implementation manner of the embodiments of the present disclosure, the connection information includes a network protocol address, a unique identifier of the storage device, and a volume identifier assigned by the storage device for target volume mapping.

[0124] Further, in a possible implementation manner of the embodiments of the present disclosure, the multipath command line information includes reconfiguring the multipath command line information, re-identifying the volume size information, adding path device information, deleting path device information, and deleting multipath device information.

[0125] Through this application, it includes creating a target host in a storage device; searching for a target volume in the storage device according to the identifier of the volume, and creating a mapping relationship between the target volume and the target host; in response to the successful creation of the mapping relationship, obtaining target information of the target volume, where the target information includes connection information and multipath command line information; based on the connection information and the multipath command line information, managing the target volume, solving the technical problem in the related solutions that the cloud platform can only call the command line of the system-built multipath and cannot call the multipath device supporting the storage, thereby affecting the storage performance of the flat cloud platform, and achieving the technical effect of calling the multipath device supporting the storage and improving the storage performance of the cloud platform.

[0126] For the description of the features in the corresponding embodiments of the storage volume management device, reference can be made to the relevant descriptions in the corresponding embodiments of the storage volume management method, which will not be elaborated here one by one.

[0127] An embodiment of the present application further provides an electronic device, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the embodiments of the above storage volume management method.

[0128] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps in any one of the embodiments of the above storage volume management method when running.

[0129] In an exemplary embodiment, the above computer-readable storage medium may include, but is not limited to: USB flash drives, read-only memories (ROM for short), random access memories (RAM for short), mobile hard disks, magnetic disks, or optical discs and other various media that can store computer programs.

[0130] Embodiments of the present application also provide a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the steps in any of the above embodiments of the storage volume management method are implemented.

[0131] Embodiments of the present application also provide another computer program product, including a non-volatile computer-readable storage medium. The non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above embodiments of the storage volume management method are implemented.

[0132] Those skilled in the art can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed in this article can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Skilled professionals can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.

[0133] The above has introduced in detail a storage volume management method, an electronic device, a storage medium, and a product provided by this application. Specific examples are used in this article to elaborate on the principle and implementation manner of this application. The description of the above embodiments is only used to help understand the method and its core idea of this application. It should be noted that for those of ordinary skill in the art in this technical field, without departing from the principle of this application, several improvements and modifications can be made to this application, and these improvements and modifications also fall within the protection scope of the claims of this application.

Claims

1. A storage volume management method, characterized in that, Including: Create a target host in the storage device; Find a target volume in the storage device according to the identifier of the volume, and create a mapping relationship between the target volume and the target host; In response to the successful creation of the mapping relationship, obtain target information of the target volume, where the target information includes connection information and multipath command line information; Manage the target volume based on the connection information and the multipath command line information.

2. The storage volume management method according to claim 1, wherein The obtaining the target information of the target volume in response to the successful creation of the mapping relationship includes: In response to the successful creation of the mapping relationship, use the computing service module of the cloud platform to perform a scan operation on the disk device; In response to the end of the disk device scan operation, obtain the target information of the target volume.

3. The storage volume management method according to claim 2, wherein The obtaining the target information of the target volume in response to the end of the disk device scan operation includes: In response to the end of the disk device scan operation, determine whether a volume management request of the cloud platform is received, where the volume management request includes a volume mount request, a volume unmount request, and a volume expansion request; If the volume management request is received, parse the connection attribute parameters to obtain the target information of the target volume.

4. The storage volume management method according to claim 1, wherein The managing the target volume based on the connection information and the multipath command line information includes: Based on the connection information, determine a plurality of triple arrays, where the triple arrays are used for Internet Small Computer System Interface (iSCSI) login; Obtain a session identifier corresponding to the triple array; Manage the target volume based on the session identifier and the multipath command line information.

5. The storage volume management method according to claim 4, wherein The obtaining the session identifier corresponding to the triple array includes: Start a target thread corresponding to the connection information; Based on the target thread, use the triple array to perform iSCSI login; In response to the end of the login using the triple array, establish a login session and obtain a session identifier corresponding to the triple array.

6. The storage volume management method according to claim 4, wherein The managing the target volume based on the session identifier and the multipath command line information includes: Based on the session identifier, determine device identifier information, where the device identifier information at least includes host adapter information; Based on the host adapter information and the connection information, perform a disk scan operation on the computing node to generate a target path device; Based on the multipath command line information, add the target path device to manage the target volume.

7. The storage volume management method according to claim 4, wherein After the obtaining the session identifier corresponding to the triple array, the method further includes: Based on the session identifier, obtain a first path device in the login session; Based on the connection information, determine a second path device from the first path devices; Based on the multipath command line information, delete the first path device or the second path device to manage the target volume.

8. The storage volume management method according to claim 7, wherein After the obtaining the session identifier corresponding to the triple array, the method further includes: Determine a third path device corresponding to the triple array; Based on the third path device, determine device identifier information corresponding to the third path device; Refresh the capacity of the third-path device based on the device identification information, and refresh the device information of the second-path device based on the multipath command-line information to manage the target volume.

9. The storage volume management method according to claim 8, wherein After refreshing the capacity of the third-path device based on the device identification information, the method further includes: Obtain the domain name information of the target volume; Determine the soft link information corresponding to the domain name information based on the domain name information of the target volume; Parse the soft link information to obtain the name of the second-path device.

10. The storage volume management method according to claim 8, wherein The refreshing the device information of the second-path device based on the multipath command-line information includes: Based on the multipath command-line information, obtain a first command and a second command, where the first command is a reconfiguration command and the second command is a command to re-identify the size of the target volume; Use the first command to refresh the mapping table information of the second-path device, or use the second command to refresh the capacity information of the second-path device.

11. The storage volume management method according to claim 1, characterized in that The connection information includes a network protocol address, a unique identifier of the storage device, and a volume identifier assigned by the storage device for mapping the target volume.

12. The storage volume management method according to claim 1, wherein The multipath command-line information includes reconfiguration multipath command-line information, re-identifying volume size information, adding path device information, deleting path device information, and deleting multipath device information.

13. An electronic device, characterized in that, including: A memory for storing a computer program; A processor for implementing the steps of the storage volume management method according to any one of claims 1 to 12 when executing the computer program.

14. A computer-readable storage medium, characterized in that, A computer program is stored in the computer-readable storage medium, wherein the computer program implements the steps of the storage volume management method according to any one of claims 1 to 12 when executed by a processor.

15. A computer program product comprising a computer program, characterized in that, The computer program implements the steps of the storage volume management method according to any one of claims 1 to 12 when executed by a processor.

Citation Information

Patent Citations

  • Management method and system for multi-path software based on multiple storage manufacturers

    CN106814977A

  • Path aggregation method, access method, communication equipment and storage medium

    CN111352899A

  • Method, system and device for using storage device based on cloud platform and medium

    CN112463035A

  • Dual-live volume calling method and device, equipment and medium

    CN113703676A

  • Volume mapping management method and device, equipment and medium

    CN117539398A

Cited By

  • Interface card management method, computer equipment, storage medium and program product

    CN120909971A

  • Interface card management method, computer device, storage medium and program product

    CN120909971B