WO2020134530A1 - Path aggregation method and access method, communication device, and storage medium - Google Patents

Path aggregation method and access method, communication device, and storage medium Download PDF

Info

Publication number
WO2020134530A1
WO2020134530A1 PCT/CN2019/114423 CN2019114423W WO2020134530A1 WO 2020134530 A1 WO2020134530 A1 WO 2020134530A1 CN 2019114423 W CN2019114423 W CN 2019114423W WO 2020134530 A1 WO2020134530 A1 WO 2020134530A1
Authority
WO
WIPO (PCT)
Prior art keywords
path
access
unified
device file
file
Prior art date
Application number
PCT/CN2019/114423
Other languages
French (fr)
Chinese (zh)
Inventor
缪星星
王良家
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2020134530A1 publication Critical patent/WO2020134530A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices

Definitions

  • Embodiments of the present application relate to, but are not limited to, the field of communication technology, and specifically, to but not limited to a path aggregation method, access method, communication device, and storage medium.
  • the storage requirements of the virtual machine disk are very high, requiring large capacity and high concurrent IO.
  • the external storage disk array is used to map the volumes (ie, block devices) on the magnetic array to the computing node where the virtual machine is located, so that after the computing storage is separated, the management can be effectively differentiated.
  • the magnetic array volume is mapped to the host to meet the large capacity requirements, but it also needs high concurrent IO and high reliability. Once the network path between the linking devices is disconnected, it can be quickly switched to another path. Therefore, there will be N physical network links between the magnetic array and the host.
  • each path will generate a block device file on the host machine, and the N block device files point to the same volume on the magnetic array, so the N block devices also need to be aggregated to implement path selection and failover , IO load balancing and other functions, this aggregation management software is called multi-path software.
  • multi-path software Different storage vendors may use different multi-path software in order to optimize their magnetic arrays. For example, the most common multipath (multipath software), ZTE's superpath (superpath software), Huawei's UltraPath (multipath software), Hitachi's HDLM (Hitachi Dynamic Link Manager, dynamic link manager), EMC's PowerPath (multipath Software) etc. With so many multipath softwares, the aggregate path device names generated on the operating system are different, and the upper-layer applications need to adapt various device names when they are used, such as accessing /dev/sm on ZTE storage devices -X path, it is very inconvenient to access the /dev/dm-X path on the Sequoia magnetic array.
  • the path aggregation method, access method, communication device, and storage medium provided by the embodiments of the present application mainly solve the technical problem that: in different storage environments, different multi-path software generates different device files, which causes the application to be modified in advance. Technical problems that can only be used with matching parameters.
  • the embodiments of the present application provide a path aggregation method.
  • the method includes:
  • a unified device file is generated based on the block device file, and the unified device file is used to provide access information to the access device in a uniform format for access management of different storage volume devices.
  • the embodiments of the present application also provide an access method, and the method includes:
  • the unified device file is generated by a block device file generated by the multi-path software based on the aggregation of device files generated by each access path;
  • embodiments of the present application also provide a communication device, including: a path aggregation device, the path aggregation device includes: a detection module and a unified management module;
  • the detection module is configured to obtain block device files generated by each multi-path software, and the block device files are aggregated and generated by device files generated by the multi-path software based on each access link;
  • the unified management module is configured to generate a unified device file according to the block device file, and the unified device file is used to provide a unified path for the access device to perform access management on different storage volume devices.
  • embodiments of the present application also provide a communication device, including a processor, a memory, a communication unit, and a communication bus;
  • the communication bus is used to implement a communication connection between the processor, the communication unit, and the memory;
  • the processor is configured to execute one or more programs stored in the memory to implement the steps of the path aggregation method as described above, or to implement the steps of the access method as described above.
  • embodiments of the present application also provide a computer-readable storage medium, where the computer-readable storage medium stores one or more computer programs, and the one or more computer programs may be used by one or more Each processor executes to implement the steps of the path aggregation method described above, or to implement the steps of the access method described above.
  • this method aggregates the device files generated by each access path through the multi-path software to generate a block device file, and then the block device file Convert to a unified device file, and access the storage volume device according to the unified device file during access, that is, according to the unified device file conversion of the aggregation device generated by various multi-path software, according to the new device file
  • the access path and the magnetic array of the storage volume device are managed in a unified manner, and a unified device file is provided for the upper layer application, which avoids the phenomenon that the upper layer needs to do different adaptations when using the multi-path block device, and allows the upper layer application to do when it is used
  • To the transparent processing of multi-path devices which improves the compatibility of access devices to storage volume devices of different brands, and solves the problem that device files generated by different multi-path software must be modified in advance to use the adaptation parameters, which greatly improves Performance of the device
  • Figure 1 is a block diagram of the access process between the existing disk array and the host
  • FIG. 2 is a block diagram of an access process between a disk array and a host provided by an embodiment of this application;
  • FIG. 3 is a flowchart of a path aggregation method provided by an embodiment of this application.
  • FIG. 5 is a schematic structural diagram of a path aggregation device provided by an embodiment of this application.
  • FIG. 6 is a schematic structural diagram of an access device provided by an embodiment of this application.
  • FIG. 7 is a schematic diagram of a link between a disk array and a host provided by an embodiment of this application.
  • FIG. 8 is a schematic diagram of the structure of the management layer on the host in FIG. 7;
  • FIG. 9 is a schematic diagram of the relationship between the management layers of each device on the host provided by this embodiment.
  • FIG. 10 is a flowchart of device management for adding a volume according to an embodiment of the present application.
  • FIG. 11 is a flowchart of device management after modifying a volume path provided by an embodiment of the present application.
  • FIG. 12 is a flowchart of device management for deleting a volume provided by an embodiment of the present application.
  • FIG. 13 is a schematic structural diagram of a communication device according to an embodiment of this application.
  • FIG. 14 is another schematic structural diagram of a communication device according to an embodiment of the present application.
  • the use of different multi-path software to generate the aggregate device file needs to be adapted to different parameters, which causes the upper-layer device to not communicate well when using the multi-path block device.
  • Figure 1 it is the existing Block diagram of the access flow between different disk arrays and hosts with unified management. Without the intermediate unified device layer, applications need to access the corresponding device paths according to different multi-path software. Such as /dev/dm-1 or /dev/sm-1.
  • the embodiments of the present application adopt unified management of aggregation devices generated by various multi-path software, and provide unified device files for upper-layer applications, which avoids the need for different adaptations when the upper-layer uses multi-path block devices .
  • the method also provides the basic information of the magnetic array and the volume by processing the unified device, including: the link mode of the host and the magnetic needle, the magnetic array manufacturer, the link IP address (if it is the iSCSI mode), lun's wwid, and so on.
  • the block device files are aggregated and generated by the device files generated by the multi-path software based on each access path.
  • the specific implementation method can be that when the host is connected to the disk array and can access the volume devices on the disk array, the operating system will generate a device file according to each path, and then the multi-path software will generate an aggregate block device according to the path information. file.
  • the unified device file refers to a device file with a uniform access path format, or even path information with the same name format, and the unified device file is mainly used to provide unified access device The path manages access to different storage volume devices.
  • the specific implementation process of this step is to generate a unified device file path based on the information of the volume in the storage volume device.
  • the unified device file contains at least the identifier wwid of the volume, which is convenient for the upper layer to find the corresponding device file.
  • the access management specifically includes direct access and indirect access, but whether it is direct or indirect, the access device is directly implemented by a unified device file in a uniform format, and is not The access device needs to be adapted to the model or manufacturer of the storage volume device.
  • the unified device file includes at least one of the following information: the manufacturer information of the storage volume device, the logical unit number lun of the volume in the storage volume device, and the WWID of the volume in the storage volume device , Information of the controller of the storage volume device, path information, device name and volume size. That is to say, in the process of generating unified device files, in addition to the same access format, specific access data is extracted based on block device files generated by various multi-path software, such as access path information, path information, equipment manufacturers Information such as information is aggregated in the same newly generated device file in the same format.
  • the access management of different storage volume devices according to the unified device file includes:
  • determine the corresponding block device file according to the WWID access the volume in the storage volume device according to the block device file, and perform read and write operations.
  • a new unified format device file is added, and the access device is implemented through the unified format device file regardless of access to the device brand storage device.
  • the adaptation has been adjusted to improve the compatibility of the device.
  • the method provided in the embodiment of the application further includes obtaining notification information of generating the unified device file, that is, obtaining notification information of the block device file generated by the multi-path software, and the notification information refers to the access One of the path addition, modification, and deletion notifications.
  • the management method further includes:
  • the method further includes:
  • the method further includes:
  • the method also provides a query function, which is convenient for the user to understand the storage volume device parameters or access parameters in advance.
  • a query function which is convenient for the user to understand the storage volume device parameters or access parameters in advance.
  • the related information including at least one of the following information: manufacturer information of the storage volume device, volume in the storage volume device Logical unit number lun, WWID of the volume in the storage volume device, information of the controller of the storage volume device, path information, device name, and size of the volume.
  • the block device file is converted into a unified device file, and the unified device file
  • the storage volume device can be accessed to avoid the problem that different multi-path software generates different device files in different storage environments, resulting in the problem that upper-layer applications need to modify the adaptation in advance to use the storage volume device, which greatly improves the access efficiency and performance of the device .
  • FIG. 4 is an access method provided in this embodiment.
  • the method is an access method implemented based on the path aggregation method provided in the first embodiment.
  • the implementation steps of the access method are as follows:
  • the unified device file is generated by the block device file generated by the multi-path software based on the aggregation of the device files generated by each access path.
  • S402 Perform access management on different storage volume devices according to the unified device file.
  • the access management specifically includes direct access and indirect access, but whether it is direct or indirect, the access device is directly implemented by a unified device file in a uniform format, and is not The access device needs to be adapted to the model or manufacturer of the storage volume device.
  • the unified device file includes at least one of the following information: the manufacturer information of the storage volume device, the logical unit number lun of the volume in the storage volume device, and the WWID of the volume in the storage volume device , Information of the controller of the storage volume device, path information, device name and volume size. That is to say, in the process of generating unified device files, in addition to the same access format, specific access data is extracted based on block device files generated by various multi-path software, such as access path information, path information, equipment manufacturers Information such as information is aggregated in the same newly generated device file in the same format.
  • the access management of different storage volume devices according to the unified device file includes:
  • determine the corresponding block device file according to the WWID access the volume in the storage volume device according to the block device file, and perform read and write operations.
  • a new unified format device file is added, and the access device is implemented through the unified format device file regardless of access to the device brand storage device.
  • the adaptation has been adjusted to improve the compatibility of the device.
  • the method provided in the embodiment of the application further includes obtaining notification information of generating the unified device file, that is, obtaining notification information of the block device file generated by the multi-path software, and the notification information refers to the access One of the path addition, modification, and deletion notifications.
  • the access method provided in this embodiment can be achieved by reading the unified device file converted from the block device file, and accessing the storage volume device according to the unified device file during access, so as to avoid different storage environments,
  • the device files generated by different multipath software are different, which leads to the problem that upper-layer applications need to modify the adaptation in advance to use the storage volume device, which greatly improves the access efficiency and performance of the device.
  • This embodiment provides a path aggregation device, which can be applied to various base stations or terminals.
  • the device includes:
  • the detection module 41 is configured to obtain block device files generated by each multi-path software, and the block device files are aggregated and generated by device files generated by the multi-path software based on each access path;
  • the unified management module 42 is configured to generate a unified device file according to the block device file, and the unified device file is used to provide a unified path for the access device to perform access management on different storage volume devices.
  • the unified device file includes at least one of the following information: manufacturer information of the storage volume device, logical unit number lun of the volume in the storage volume device, and volume of the volume in the storage volume device WWID, information of the controller of the storage volume device, link information, device name, and size of the volume.
  • the access storage management of different storage volume devices according to the unified device file specifically includes the following two methods:
  • Method 1 directly access the volume corresponding to the WWID in the storage volume device through the IO interface according to the WWID, and perform read and write operations;
  • Method 2 Determine the corresponding block device file according to the WWID, access the volume in the storage volume device according to the block device file, and perform read and write operations.
  • the detection module is further configured to obtain notification information of the block device file generated by the multi-path software, and the notification information includes one of addition, modification, and deletion notifications to the access path.
  • the unified management module 42 adjusts the unified device file according to the received notification information. For example, when receiving a volume mapping on the magnetic array of the storage device to the host, it is necessary to add the corresponding The access path information of the volume and the related information of the volume; in the same way, for the modification or deletion, the unified device file will also be processed accordingly.
  • the query function provided by the apparatus is to receive a query request for storage volume device related information through the query module; query the storage volume device from the unified device information according to the query request Related information, the related information includes at least one of the following information: manufacturer information of the storage volume device, logical unit number lun of the volume in the storage volume device, WWID of the volume in the storage volume device, the Storage volume controller information, link information, device name, and volume size.
  • Multi-path aggregation device detection module When the host is connected to the disk array and can access the volume devices on the disk array, the operating system will generate a device file according to each path, and then the multi-path software will generate an aggregate block according to the path information. Device file.
  • the detection module of the method captures the generation of the device file of the block, and at the same time filters the notification events of other devices (eg, local disk devices, single-path devices).
  • the detection module can capture the addition, modification, and deletion of multipath, and make corresponding operations on these series of events.
  • Unified device file generation A unified device file path is generated based on the volume information.
  • the file contains the wwid information of the volume, so that the upper layer can find the corresponding device file.
  • the application can query some basic information of the volume through this module interface, such as the manufacturer of the magnetic array, the volume lunid number, the volume wwid, and the information of the controller.
  • the block device file is converted into a unified device file, and the storage is performed according to the unified device file during access
  • the volume device can be accessed, that is, according to the unified device file conversion of the aggregation device generated by various multi-path software, the access path and the magnetic array of the storage volume device are managed according to the new device file, and the upper layer application is provided.
  • the unified device file avoids the phenomenon that the upper layer needs to make different adaptations when using the multi-path block device, so that the upper-layer application can transparently process the multi-path device when it is used, thereby improving the access device to different
  • the access compatibility of the storage volume devices of the brand solves the problem that the device files generated by different multi-path software must be modified in advance before the adaptation parameters can be used, thereby greatly improving the performance of the device.
  • This embodiment provides an access device, which can be applied to various base stations or terminals.
  • the device includes:
  • the obtaining module 61 is set to read a unified device file, which is generated by a block device file generated by the multi-path software based on the aggregation of device files generated by each access path;
  • the access management module 62 is configured to perform access management on different storage volume devices according to the unified device file.
  • the unified device file is generated by the block device file generated by the multi-path software based on the aggregation of the device files generated by each access path.
  • the access management module 62 specifically includes direct access and indirect access to access management, but whether it is direct or indirect, the access device is directly implemented by a unified device file in a unified format, not It is also necessary to adapt the access device to the model or manufacturer of the storage volume device according to the existing technology.
  • the unified device file includes at least one of the following information: the manufacturer information of the storage volume device, the logical unit number lun of the volume in the storage volume device, and the WWID of the volume in the storage volume device , Information of the controller of the storage volume device, link information, device name, and size of the volume. That is to say, in the process of generating a unified device file, in addition to the same access format, specific access data, such as access path information, link information, and device, are extracted based on the block device files generated by various multi-path software Information such as manufacturer information is aggregated in the same newly generated device file in the same format.
  • the access management of different storage volume devices according to the unified device file includes:
  • determine the corresponding block device file according to the WWID access the volume in the storage volume device according to the block device file, and perform read and write operations.
  • the access device provided in this embodiment can read the unified device file converted from the block device file, and access the storage volume device according to the unified device file during access, thereby avoiding different storage environments,
  • the device files generated by different multipath software are different, which leads to the problem that upper-layer applications need to modify the adaptation in advance to use the storage volume device, which greatly improves the access efficiency and performance of the device.
  • Figure 2 is a block diagram of the access process between the disk array and the host after adding a unified device layer in the existing multi-path software management process.
  • the specific access process is as follows:
  • S02 Join the middle unified device layer, and a unified device path is generated from the middle unified device layer: /dev/vmc/serial-lunwwid.
  • the application program does not need to care about the manufacturer of the underlying magnetic array and what kind of multipath software is used, and can directly read/write data by accessing /dev/vmc/serial-lunwwid.
  • S21 The host and the disk array are each connected to the switch through two paths to form four access paths.
  • the operating system driver layer generates single-path devices according to each access path, such as sda, sdb, and sdc.
  • Multipath software (superpath/multipath/ultrapath, etc.) generates aggregate path devices based on single path devices, such as dm-1, dm-2 or sm-1, sm-2, etc.
  • the unified management system detects the aggregation device and generates a unified device file.
  • the device file name path is: /dev/vmc/serial-lunwwid
  • the middleware unified device layer captures the generation of multipath devices through kernel udev events.
  • the unified device layer generates a unified device file /dev/vmc/serial-lunwwid.
  • the unified device layer provides query functions, including link information query, device name query, magnetic array manufacturer information query, and volume size query.
  • S101 Delete a volume that has been mapped to the host on the magnetic array.
  • the operating system driver layer and the multi-path software layer delete the single-path device and the aggregate-path device, respectively.
  • the middleware unified device layer captures the delete operation of the multipath device through the kernel udev event.
  • the unified device layer deletes the unified device file /dev/vmc/serial-lunwwid.
  • S91 The disk array is disconnected from the path link on the host, or a new link is added.
  • the operating system driver layer adds or deletes single-path devices according to the path changes, and the multi-path software layer refreshes the aggregation path devices.
  • the middleware unified device layer captures the modification operation of the multipath device through the kernel udev event.
  • the unified device layer regenerates the unified device file /dev/vmc/serial-lunwwid.
  • the device includes a path aggregation device 10, and the path aggregation device 10 specifically uses the path aggregation device described in the foregoing second embodiment.
  • FIG. 14 another structure of a communication device is provided, as shown in FIG. 14, specifically including a processor 211, a memory 212, a communication unit 213, and a communication bus 214;
  • the communication bus 214 is used to realize the communication connection between the processor 2111, the communication unit 213 and the memory 212;
  • the processor 211 is configured to execute one or more programs stored in the memory to implement the steps of the path aggregation method in the above embodiments.
  • the processor 211 is configured to execute one or more programs stored in the memory to implement the steps of the path aggregation method in the above embodiments.
  • the steps of the path aggregation method in the above embodiments For the specific implementation process of each step, refer to the above embodiments Note, I won’t repeat them here.
  • This embodiment also provides a computer-readable storage medium, which is implemented in any method or technology for storing information (such as computer-readable instructions, data structures, computer program modules, or other data) Volatile or non-volatile, removable or non-removable media.
  • Computer-readable storage media include but are not limited to RAM (Random Access Memory, random access memory), ROM (Read-Only Memory, read-only memory), EEPROM (Electrically Erasable Programmable read only memory, live erasable programmable read-only memory ), flash memory or other memory technologies, CD-ROM (Compact Disc Read-Only Memory, CD-ROM), digital versatile disk (DVD) or other optical disk storage, magnetic box, magnetic tape, magnetic disk storage or other magnetic storage devices, Or any other medium that can be used to store desired information and can be accessed by a computer.
  • the computer-readable storage medium in this embodiment may be configured to store one or more first computer programs, and the one or more first computer programs may be executed by one or more processors to implement The steps of the path aggregation method in the above embodiments.
  • This embodiment also provides a computer program (or computer software) that can be distributed on a computer-readable medium and executed by a computable device to implement at least the path aggregation method shown in the above embodiments One step; and in some cases, at least one step shown or described may be performed in an order different from that described in the above embodiment.
  • This embodiment also provides a computer program product, including a computer readable device, where the computer program shown above is stored on the computer readable device.
  • the computer-readable device may include the computer-readable storage medium shown above.
  • the communication medium generally contains computer-readable instructions, data structures, computer program modules, or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and may include any information delivery medium. Therefore, this application is not limited to any specific combination of hardware and software.
  • this method aggregates the device files generated by each access path through the multi-path software to generate block device files, and then blocks the device files Convert to a unified device file, and access the storage volume device according to the unified device file during access, that is, according to the unified device file conversion of the aggregation device generated by various multi-path software, according to the new device file
  • the access path and magnetic array of the storage volume device are managed in a unified manner, and a unified device file is provided for the upper layer application, which avoids the phenomenon that the upper layer needs to make different adaptations when using the multi-path block device, and allows the upper layer application to do when it is used
  • To the transparent processing of multi-path devices which improves the compatibility of access devices to storage volume devices of different brands, and solves the problem that device files generated by different multi-path software must be modified in advance to use the adaptation parameters, which greatly improves Performance of the device.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A path aggregation method and access method, a communication device, and a computer readable storage medium. The method comprises: after aggregating device files generated by each access link by means of multipath software to generate block device files, converting the block device files into a unified device file; accessing a storage volume device according to the unified device file in a unified manner when accessing, that is, performing unified device file conversion on aggregation devices generated for various multipath software, and performing unified management on access paths of the storage volume device according to a new device file; providing the unified device file for an upper layer application, so that the upper layer application performs transparency processing on a multipath device during use, the compatibility of accesses of access devices for different storage volume devices is improved, and the problem that the device files generated by different multipath software must be used by modifying adaption parameters in advance is solved.

Description

路径聚合方法、访问方法及通信设备、存储介质Path aggregation method, access method, communication equipment and storage medium 技术领域Technical field
本申请实施例涉及但不限于通信技术领域,具体而言,涉及但不限于一种路径聚合方法、访问方法及通信设备、存储介质。Embodiments of the present application relate to, but are not limited to, the field of communication technology, and specifically, to but not limited to a path aggregation method, access method, communication device, and storage medium.
背景技术Background technique
在虚拟化场景中,对虚拟机磁盘的存储要求很高,需要大容量高并发IO。一般会使用外接存储磁盘阵列的方式,将磁阵上的卷(即块设备)映射至虚拟机所在的计算节点上,这样计算存储分离之后,能有效区分管理。磁阵卷映射到主机上之后满足了大容量的要求,但是还需要高并发IO以及高可靠性,一旦链接设备之间的网络路径断开之后能迅速切换至其他的路径。因此一般磁阵跟主机之间的物理网络链接会有N条。这时每一条路径都会在宿主机上生成一个块设备文件,N个块设备文件指向了磁阵上的同一个卷,所以还需要对这N个块设备做聚合管理,实现路径选择、故障切换、IO负载均衡等功能,这个聚合管理的软件就被称为多路径软件。In the virtualization scenario, the storage requirements of the virtual machine disk are very high, requiring large capacity and high concurrent IO. Generally, the external storage disk array is used to map the volumes (ie, block devices) on the magnetic array to the computing node where the virtual machine is located, so that after the computing storage is separated, the management can be effectively differentiated. The magnetic array volume is mapped to the host to meet the large capacity requirements, but it also needs high concurrent IO and high reliability. Once the network path between the linking devices is disconnected, it can be quickly switched to another path. Therefore, there will be N physical network links between the magnetic array and the host. At this time, each path will generate a block device file on the host machine, and the N block device files point to the same volume on the magnetic array, so the N block devices also need to be aggregated to implement path selection and failover , IO load balancing and other functions, this aggregation management software is called multi-path software.
不同的存储厂商为了给自己的磁阵做特定的优化,可能会使用不同的多路径软件。比如最通用的multipath(多路径软件)、ZTE的superpath(超级路径软件)、华为的UltraPath(多路径软件)、日立的HDLM(Hitachi Dynamic Link Manager,动态链接管理器)、EMC的PowerPath(多路径软件)等。这么多的多路径软件,各自在操作系统上生成的聚合路径设备名称都不一样,上层应用在使用的时候就需要适配各种设备名称,比如在ZTE的存储设备上需要访问/dev/sm-X路径,在红杉磁阵上需要访问/dev/dm-X路径,非常不方便。Different storage vendors may use different multi-path software in order to optimize their magnetic arrays. For example, the most common multipath (multipath software), ZTE's superpath (superpath software), Huawei's UltraPath (multipath software), Hitachi's HDLM (Hitachi Dynamic Link Manager, dynamic link manager), EMC's PowerPath (multipath Software) etc. With so many multipath softwares, the aggregate path device names generated on the operating system are different, and the upper-layer applications need to adapt various device names when they are used, such as accessing /dev/sm on ZTE storage devices -X path, it is very inconvenient to access the /dev/dm-X path on the Sequoia magnetic array.
发明内容Summary of the invention
本申请实施例提供的一种路径聚合方法、访问方法及通信设备、存储介质,主要解决的技术问题是:在不同存储环境下,不同多路径软件生成 的设备文件不同而导致应用需要提前修改适配参数才能使用的技术问题。The path aggregation method, access method, communication device, and storage medium provided by the embodiments of the present application mainly solve the technical problem that: in different storage environments, different multi-path software generates different device files, which causes the application to be modified in advance. Technical problems that can only be used with matching parameters.
为解决上述技术问题,本申请实施例提供了一种路径聚合方法,所述方法包括:To solve the above technical problems, the embodiments of the present application provide a path aggregation method. The method includes:
获取各多路径软件产生的块设备文件,所述块设备文件为所述多路径软件基于每条访问路径生成的设备文件聚合生成;Obtain block device files generated by each multipath software, where the block device files are aggregated and generated by the device files generated by the multipath software based on each access path;
根据所述块设备文件生成统一设备文件,所述统一设备文件用于为访问设备提供统一格式的路径信息对不同存储卷设备进行访问管理。A unified device file is generated based on the block device file, and the unified device file is used to provide access information to the access device in a uniform format for access management of different storage volume devices.
为解决上述技术问题,本申请实施例还提供了一种访问方法,所述方法包括:To solve the above technical problems, the embodiments of the present application also provide an access method, and the method includes:
读取统一设备文件,所述统一设备文件由所述多路径软件基于每条访问路径生成的设备文件聚合生成的块设备文件生成;Reading a unified device file, the unified device file is generated by a block device file generated by the multi-path software based on the aggregation of device files generated by each access path;
根据所述统一设备文件对不同存储卷设备进行访问管理。Perform access management on different storage volume devices according to the unified device file.
为解决上述技术问题,本申请实施例还提供了一种通信设备,包括:路径聚合装置,所述路径聚合装置包括:检测模块和统一管理模块;To solve the above technical problems, embodiments of the present application also provide a communication device, including: a path aggregation device, the path aggregation device includes: a detection module and a unified management module;
所述检测模块设置为获取各多路径软件产生的块设备文件,所述块设备文件为所述多路径软件基于每条访问链路生成的设备文件聚合生成;The detection module is configured to obtain block device files generated by each multi-path software, and the block device files are aggregated and generated by device files generated by the multi-path software based on each access link;
所述统一管理模块设置为根据所述块设备文件生成统一设备文件,所述统一设备文件用于为访问设备提供统一路径对不同存储卷设备进行访问管理。The unified management module is configured to generate a unified device file according to the block device file, and the unified device file is used to provide a unified path for the access device to perform access management on different storage volume devices.
为解决上述技术问题,本申请实施例还提供了一种通信设备,包括处理器、存储器、通信单元和通信总线;To solve the above technical problems, embodiments of the present application also provide a communication device, including a processor, a memory, a communication unit, and a communication bus;
所述通信总线用于实现所述处理器、所述通信单元和所述存储器之间的通信连接;The communication bus is used to implement a communication connection between the processor, the communication unit, and the memory;
所述处理器设置为执行存储器中存储的一个或者多个程序,以实现如上所述的路径聚合方法的步骤,或以实现如上所述的访问方法的步骤。The processor is configured to execute one or more programs stored in the memory to implement the steps of the path aggregation method as described above, or to implement the steps of the access method as described above.
为解决上述技术问题,本申请实施例还提供了一种计算机可读存储介 质,所述计算机可读存储介质存储有一个或者多个计算机程序,所述一个或者多个计算机程序可被一个或者多个处理器执行,以实现如上所述的路径聚合方法的步骤,或以实现如上所述的访问方法的步骤。To solve the above technical problems, embodiments of the present application also provide a computer-readable storage medium, where the computer-readable storage medium stores one or more computer programs, and the one or more computer programs may be used by one or more Each processor executes to implement the steps of the path aggregation method described above, or to implement the steps of the access method described above.
本申请的有益效果是:The beneficial effects of this application are:
根据本申请实施例提供的路径聚合方法、访问方法及通信设备、计算机可读存储介质,该方法在通过多路径软件将每条访问路径生成的设备文件聚合生成块设备文件之后,将块设备文件转换为统一设备文件,而在访问时统一根据统一设备文件对存储卷设备进行访问即可,即是根据对各种多路径软件产生的聚合设备进行统一的设备文件转换,根据新的设备文件对存储卷设备的访问路径和磁阵进行统一管理,对上层应用提供了统一的设备文件,避免了上层在使用多路径块设备时需要做不同的适配的现象,让上层应用在使用的时候做到对多路径设备的透明化处理,从而提高了访问设备对不同品牌的存储卷设备的访问兼容,解决了不同多路径软件生成的设备文件必须提前修改适配参数才能使用的问题,从而大大提高了设备的性能。According to the path aggregation method, access method, communication device, and computer-readable storage medium provided in the embodiments of the present application, this method aggregates the device files generated by each access path through the multi-path software to generate a block device file, and then the block device file Convert to a unified device file, and access the storage volume device according to the unified device file during access, that is, according to the unified device file conversion of the aggregation device generated by various multi-path software, according to the new device file The access path and the magnetic array of the storage volume device are managed in a unified manner, and a unified device file is provided for the upper layer application, which avoids the phenomenon that the upper layer needs to do different adaptations when using the multi-path block device, and allows the upper layer application to do when it is used To the transparent processing of multi-path devices, which improves the compatibility of access devices to storage volume devices of different brands, and solves the problem that device files generated by different multi-path software must be modified in advance to use the adaptation parameters, which greatly improves Performance of the device.
本申请其他特征和相应的有益效果在说明书的后面部分进行阐述说明,且应当理解,至少部分有益效果从本申请说明书中的记载变的显而易见。Other features and corresponding beneficial effects of the present application are explained in the later part of the description, and it should be understood that at least part of the beneficial effects become obvious from the description in the description of the present application.
附图说明BRIEF DESCRIPTION
此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:The drawings described here are used to provide a further understanding of the present application and form a part of the present application. The schematic embodiments and descriptions of the present application are used to explain the present application and do not constitute an undue limitation on the present application. In the drawings:
图1为现有的磁盘阵列与主机之间的访问流程框图;Figure 1 is a block diagram of the access process between the existing disk array and the host;
图2为本申请实施例提供的磁盘阵列与主机之间的访问流程框图;2 is a block diagram of an access process between a disk array and a host provided by an embodiment of this application;
图3为本申请实施例提供的路径聚合方法的流程图;3 is a flowchart of a path aggregation method provided by an embodiment of this application;
图4为本申请实施例提供的访问方法的流程图4 is a flowchart of an access method provided by an embodiment of the present application
图5为本申请实施例提供的路径聚合装置的结构示意图;5 is a schematic structural diagram of a path aggregation device provided by an embodiment of this application;
图6为本申请实施例提供的访问装置的结构示意图;6 is a schematic structural diagram of an access device provided by an embodiment of this application;
图7为本申请实施例提供的磁盘阵列与主机的链接示意图;7 is a schematic diagram of a link between a disk array and a host provided by an embodiment of this application;
图8为图7中host上的管理层结构示意图;8 is a schematic diagram of the structure of the management layer on the host in FIG. 7;
图9为本实施例提供的主机上各个设备管理层之间的关系示意图;9 is a schematic diagram of the relationship between the management layers of each device on the host provided by this embodiment;
图10为本申请实施例提供的增加卷的设备管理流程图;10 is a flowchart of device management for adding a volume according to an embodiment of the present application;
图11为本申请实施例提供的修改卷路径之后的设备管理流程图;11 is a flowchart of device management after modifying a volume path provided by an embodiment of the present application;
图12为本申请实施例提供的删除卷的设备管理流程图;12 is a flowchart of device management for deleting a volume provided by an embodiment of the present application;
图13为本申请实施例的通信设备的结构示意图;13 is a schematic structural diagram of a communication device according to an embodiment of this application;
图14为本申请实施例的通信设备的另一种结构示意图。14 is another schematic structural diagram of a communication device according to an embodiment of the present application.
具体实施方式detailed description
为了使本申请的目的、技术方案及优点更加清楚明白,下面通过具体实施方式结合附图对本申请实施例作进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solutions and advantages of the present application clearer, the embodiments of the present application will be further described in detail below through specific implementations in conjunction with the accompanying drawings. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.
实施例一:Example one:
基于现有技术的使用不同的多路径软件产生聚合设备文件需要适配不同的参数而造成了上层设备在使用多路径块设备时不能很好的兼容通信,如图1所示,为现有的不同具有统一管理的磁盘阵列与主机之间的访问流程框图,在没有中间统一设备层的情况下,应用程序需要根据不同的多路径软件,访问相应的设备路径。如/dev/dm-1或者/dev/sm-1等。基于此,本申请实施例通过采用对各种多路径软件产生的聚合设备进行了统一管理,对上层应用提供了统一的设备文件,避免了上层在使用多路径块设备时需要做不同的适配。本方法还通过对该统一设备的处理,提供磁阵以及卷的基本信息,包括:主机与磁针的链接方式、磁阵厂商、链接ip地址(如果是iSCSI方式)、lun的wwid等。Based on the existing technology, the use of different multi-path software to generate the aggregate device file needs to be adapted to different parameters, which causes the upper-layer device to not communicate well when using the multi-path block device. As shown in Figure 1, it is the existing Block diagram of the access flow between different disk arrays and hosts with unified management. Without the intermediate unified device layer, applications need to access the corresponding device paths according to different multi-path software. Such as /dev/dm-1 or /dev/sm-1. Based on this, the embodiments of the present application adopt unified management of aggregation devices generated by various multi-path software, and provide unified device files for upper-layer applications, which avoids the need for different adaptations when the upper-layer uses multi-path block devices . The method also provides the basic information of the magnetic array and the volume by processing the unified device, including: the link mode of the host and the magnetic needle, the magnetic array manufacturer, the link IP address (if it is the iSCSI mode), lun's wwid, and so on.
请参见图3所示,该路径聚合方法的实现步骤,具体如下:Please refer to Figure 3, the implementation steps of this path aggregation method are as follows:
S301,获取各多路径软件产生的块设备文件。S301. Obtain block device files generated by each multi-path software.
在该步骤中,所述块设备文件为所述多路径软件基于每条访问路径生成的设备文件聚合生成。具体的实现方式可以为在主机连接磁盘阵列,并且能访问磁盘阵列上的卷设备时,操作系统会根据每一条路径生成一个设备文件,然后多路径软件会根据路径信息,生成一个聚合的块设备文件。In this step, the block device files are aggregated and generated by the device files generated by the multi-path software based on each access path. The specific implementation method can be that when the host is connected to the disk array and can access the volume devices on the disk array, the operating system will generate a device file according to each path, and then the multi-path software will generate an aggregate block device according to the path information. file.
S302,根据块设备文件生成统一设备文件。S302. Generate a unified device file according to the block device file.
在本实施例中,所述统一设备文件指的是具有统一的访问路径格式的设备文件,甚至可以说是名称格式相同的路径信息,且所述统一设备文件主要是用于为访问设备提供统一路径对不同存储卷设备进行访问管理。In this embodiment, the unified device file refers to a device file with a uniform access path format, or even path information with the same name format, and the unified device file is mainly used to provide unified access device The path manages access to different storage volume devices.
在实际应用中,该步骤具体的实现过程是根据存储卷设备中的卷的信息生成统一的设备文件路径,该统一的设备文件中至少包含了该卷的标识符wwid信息,便于上层找到对应设备文件。In practical applications, the specific implementation process of this step is to generate a unified device file path based on the information of the volume in the storage volume device. The unified device file contains at least the identifier wwid of the volume, which is convenient for the upper layer to find the corresponding device file.
在本实施例中,对访问管理具体包括了直接访问和间接访问,但是不管是直接还是间接,其访问设备都是直接通过统一格式的统一设备文件来实现的,并不是与现有技术的还需要对访问设备进行与存储卷设备的型号或者厂商进行对应的适配。In this embodiment, the access management specifically includes direct access and indirect access, but whether it is direct or indirect, the access device is directly implemented by a unified device file in a uniform format, and is not The access device needs to be adapted to the model or manufacturer of the storage volume device.
在实际应用中,所述统一设备文件至少包括以下信息中的一种:所述存储卷设备的厂商信息、所述存储卷设备中卷的逻辑单元号lun、所述存储卷设备中卷的WWID、所述存储卷设备的控制器的信息、路径信息、设备名称和卷的大小。也即是说在生成统一设备文件的过程中,除了进行访问格式的同一之外,还根据各种多路径软件生成的块设备文件提取具体的访问数据,如访问路径信息、路径信息、设备厂商信息等等的信息聚合在新生成的同一格式的同一设备文件中。In practical applications, the unified device file includes at least one of the following information: the manufacturer information of the storage volume device, the logical unit number lun of the volume in the storage volume device, and the WWID of the volume in the storage volume device , Information of the controller of the storage volume device, path information, device name and volume size. That is to say, in the process of generating unified device files, in addition to the same access format, specific access data is extracted based on block device files generated by various multi-path software, such as access path information, path information, equipment manufacturers Information such as information is aggregated in the same newly generated device file in the same format.
进一步的,若所述统一设备文件包括所述存储卷设备中卷的标识符WWID时,所述根据所述统一设备文件对不同存储卷设备进行访问管理包括:Further, if the unified device file includes the identifier WWID of the volume in the storage volume device, the access management of different storage volume devices according to the unified device file includes:
根据所述WWID通过IO接口直接访问所述存储卷设备中与所述WWID对应的卷,并进行读写操作;Directly access the volume corresponding to the WWID in the storage volume device through the IO interface according to the WWID, and perform read and write operations;
或者,根据所述WWID确定对应的所述块设备文件,根据所述块设备文件访问所述存储卷设备中的卷,并进行读写操作。Or, determine the corresponding block device file according to the WWID, access the volume in the storage volume device according to the block device file, and perform read and write operations.
由于在现有的块设备文件的基础上,增加了生成一个新的统一格式的设备文件,而访问设备不管访问设备品牌的存储设备,都通过该统一格式的设备文件来实现,不需要在额外的进行适配调整了,从而提高了设备的兼容性使用。Based on the existing block device file, a new unified format device file is added, and the access device is implemented through the unified format device file regardless of access to the device brand storage device. The adaptation has been adjusted to improve the compatibility of the device.
在实际应用中,除了在生成统一格式的统一设备文件之外,有可能还会存在开发人员或者用户对存储设备进行卷磁阵的修改、增加、删除等处理,而针对于这种情况,本申请实施例提供的方法中,还包括了获取所述统一设备文件的生成通知信息,即是获取所述多路径软件生成的块设备文件的通知信息,而该通知信息指的是对所述访问路径的增加、修改、删除通知中的一种。In practical applications, in addition to generating uniform device files in a uniform format, there may be developers or users who modify, add, or delete volume magnetic arrays on the storage device. The method provided in the embodiment of the application further includes obtaining notification information of generating the unified device file, that is, obtaining notification information of the block device file generated by the multi-path software, and the notification information refers to the access One of the path addition, modification, and deletion notifications.
在本实施例中,若获取到的通知信息是对所述访问路径的增加通知时,所述管理方法还包括:In this embodiment, if the obtained notification information is an increase notification for the access path, the management method further includes:
获取根据所述增加通知进行增加处理后的块设备文件;Obtain the block device file after adding processing according to the adding notification;
将所述增加处理后的块设备文件中对应的卷及路径信息增加到所述统一设备文件中。Add the corresponding volume and path information in the block device file after the addition process to the unified device file.
若所述通知信息为对所述访问路径的修改通知时,在所述根据所述块设备文件生成统一设备文件之后,还包括:If the notification information is a modification notification of the access path, after the generating a unified device file according to the block device file, the method further includes:
获取根据所述修改通知进行修改处理后的块设备文件;Obtain the block device file after modification processing according to the modification notification;
将所述修改处理后的块设备文件中对应的卷及路径信息对所述统一设备文件中的卷及路径信息进行修改。Modifying the corresponding volume and path information in the modified block device file to the volume and path information in the unified device file.
若所述通知信息为对所述访问路径的删除通知时,在所述根据所述块设备文件生成统一设备文件之后,还包括:If the notification information is a notification to delete the access path, after generating the unified device file according to the block device file, the method further includes:
获取根据所述删除通知进行删除处理后的块设备文件;Obtain the block device file after the deletion processing according to the deletion notification;
将所述删除处理后后的块设备文件删除所述统一设备文件中对应的卷及路径信息。Deleting the block device file after the deletion processing corresponding volume and path information in the unified device file.
进一步的,除了根据上述的方式对原来生成的统一设备文件进行修改之外,还可以根据通知信息获取完整的块设备文件,然后根据块设备文件生成新的统一设备文件,最后将新生成的统一设备文件替换原来的统一设备文件,这样可以有效地降低在修改数据时出现的混乱。Further, in addition to modifying the original unified device file generated in the above manner, you can also obtain the complete block device file according to the notification information, then generate a new unified device file based on the block device file, and finally generate the new unified device file. The device file replaces the original unified device file, which can effectively reduce the confusion when modifying data.
在本实施例中,该方法还提供了查询的功能,该查询功能是便于用户对存储卷设备参数或者访问参数的提前了解,具体的,在所述根据所述块设备文件生成统一设备文件之后,还包括:In this embodiment, the method also provides a query function, which is convenient for the user to understand the storage volume device parameters or access parameters in advance. Specifically, after the unified device file is generated according to the block device file ,Also includes:
接收存储卷设备相关信息的查询请求;Receive query requests for information about storage volume devices;
根据所述查询请求从所述统一设备信息中查询所述存储卷设备相关信息,所述相关信息包括以下信息中的至少一种:所述存储卷设备的厂商信息、所述存储卷设备中卷的逻辑单元号lun、所述存储卷设备中卷的WWID、所述存储卷设备的控制器的信息、路径信息、设备名称和卷的大小。Querying the storage volume device related information from the unified device information according to the query request, the related information including at least one of the following information: manufacturer information of the storage volume device, volume in the storage volume device Logical unit number lun, WWID of the volume in the storage volume device, information of the controller of the storage volume device, path information, device name, and size of the volume.
本实施例提供的路径聚合方法,在通过多路径软件将每条访问路径生成的设备文件聚合生成块设备文件之后,将块设备文件转换为统一设备文件,而在访问时统一根据统一设备文件对存储卷设备进行访问即可,从而避免不同存储环境下,不同多路径软件生成的设备文件不同而导致上层应用需要提前修改适配才能使用存储卷设备的问题,大大提高了设备的访问效率和性能。In the path aggregation method provided in this embodiment, after the device files generated by each access path are aggregated into a block device file through multi-path software, the block device file is converted into a unified device file, and the unified device file The storage volume device can be accessed to avoid the problem that different multi-path software generates different device files in different storage environments, resulting in the problem that upper-layer applications need to modify the adaptation in advance to use the storage volume device, which greatly improves the access efficiency and performance of the device .
实施例二:Example two:
请参见图4,为本实施例提供的访问方法,该方法是基于上述实施例一提供的路径聚合方法的基础上实现的访问方法,该访问方法的实现步骤,具体如下:Please refer to FIG. 4, which is an access method provided in this embodiment. The method is an access method implemented based on the path aggregation method provided in the first embodiment. The implementation steps of the access method are as follows:
S401,读取统一设备文件。S401, read the unified device file.
在该步骤中,所述统一设备文件由所述多路径软件基于每条访问路径生成的设备文件聚合生成的块设备文件生成的。In this step, the unified device file is generated by the block device file generated by the multi-path software based on the aggregation of the device files generated by each access path.
S402,根据所述统一设备文件对不同存储卷设备进行访问管理。S402: Perform access management on different storage volume devices according to the unified device file.
在本实施例中,对访问管理具体包括了直接访问和间接访问,但是不管是直接还是间接,其访问设备都是直接通过统一格式的统一设备文件来实现的,并不是与现有技术的还需要对访问设备进行与存储卷设备的型号或者厂商进行对应的适配。In this embodiment, the access management specifically includes direct access and indirect access, but whether it is direct or indirect, the access device is directly implemented by a unified device file in a uniform format, and is not The access device needs to be adapted to the model or manufacturer of the storage volume device.
在实际应用中,所述统一设备文件至少包括以下信息中的一种:所述存储卷设备的厂商信息、所述存储卷设备中卷的逻辑单元号lun、所述存储卷设备中卷的WWID、所述存储卷设备的控制器的信息、路径信息、设备名称和卷的大小。也即是说在生成统一设备文件的过程中,除了进行访问格式的同一之外,还根据各种多路径软件生成的块设备文件提取具体的访问数据,如访问路径信息、路径信息、设备厂商信息等等的信息聚合在新生成的同一格式的同一设备文件中。In practical applications, the unified device file includes at least one of the following information: the manufacturer information of the storage volume device, the logical unit number lun of the volume in the storage volume device, and the WWID of the volume in the storage volume device , Information of the controller of the storage volume device, path information, device name and volume size. That is to say, in the process of generating unified device files, in addition to the same access format, specific access data is extracted based on block device files generated by various multi-path software, such as access path information, path information, equipment manufacturers Information such as information is aggregated in the same newly generated device file in the same format.
进一步的,若所述统一设备文件包括所述存储卷设备中卷的标识符WWID时,所述根据所述统一设备文件对不同存储卷设备进行访问管理包括:Further, if the unified device file includes the identifier WWID of the volume in the storage volume device, the access management of different storage volume devices according to the unified device file includes:
根据所述WWID通过IO接口直接访问所述存储卷设备中与所述WWID对应的卷,并进行读写操作;Directly access the volume corresponding to the WWID in the storage volume device through the IO interface according to the WWID, and perform read and write operations;
或者,根据所述WWID确定对应的所述块设备文件,根据所述块设备文件访问所述存储卷设备中的卷,并进行读写操作。Or, determine the corresponding block device file according to the WWID, access the volume in the storage volume device according to the block device file, and perform read and write operations.
由于在现有的块设备文件的基础上,增加了生成一个新的统一格式的设备文件,而访问设备不管访问设备品牌的存储设备,都通过该统一格式的设备文件来实现,不需要在额外的进行适配调整了,从而提高了设备的兼容性使用。Based on the existing block device file, a new unified format device file is added, and the access device is implemented through the unified format device file regardless of access to the device brand storage device. The adaptation has been adjusted to improve the compatibility of the device.
在实际应用中,除了在生成统一格式的统一设备文件之外,有可能还 会存在开发人员或者用户对存储设备进行卷磁阵的修改、增加、删除等处理,而针对于这种情况,本申请实施例提供的方法中,还包括了获取所述统一设备文件的生成通知信息,即是获取所述多路径软件生成的块设备文件的通知信息,而该通知信息指的是对所述访问路径的增加、修改、删除通知中的一种。In practical applications, in addition to generating uniform device files in a uniform format, there may be developers or users who modify, add, or delete volume magnetic arrays on the storage device. The method provided in the embodiment of the application further includes obtaining notification information of generating the unified device file, that is, obtaining notification information of the block device file generated by the multi-path software, and the notification information refers to the access One of the path addition, modification, and deletion notifications.
综上,本实施例提供的访问方法,通过读取由块设备文件转换成的统一设备文件,而在访问时统一根据统一设备文件对存储卷设备进行访问即可,从而避免不同存储环境下,不同多路径软件生成的设备文件不同而导致上层应用需要提前修改适配才能使用存储卷设备的问题,大大提高了设备的访问效率和性能。In summary, the access method provided in this embodiment can be achieved by reading the unified device file converted from the block device file, and accessing the storage volume device according to the unified device file during access, so as to avoid different storage environments, The device files generated by different multipath software are different, which leads to the problem that upper-layer applications need to modify the adaptation in advance to use the storage volume device, which greatly improves the access efficiency and performance of the device.
实施例三:Example three:
本实施例提供了一种路径聚合装置,其可应用于各种基站或者终端,参见图5所示,该装置包括:This embodiment provides a path aggregation device, which can be applied to various base stations or terminals. Referring to FIG. 5, the device includes:
检测模块41,设置为获取各多路径软件产生的块设备文件,所述块设备文件为所述多路径软件基于每条访问路径生成的设备文件聚合生成;The detection module 41 is configured to obtain block device files generated by each multi-path software, and the block device files are aggregated and generated by device files generated by the multi-path software based on each access path;
统一管理模块42,设置为根据所述块设备文件生成统一设备文件,所述统一设备文件用于为访问设备提供统一路径对不同存储卷设备进行访问管理。The unified management module 42 is configured to generate a unified device file according to the block device file, and the unified device file is used to provide a unified path for the access device to perform access management on different storage volume devices.
在本实施例中,所述统一设备文件至少包括以下信息中的一种:所述存储卷设备的厂商信息、所述存储卷设备中卷的逻辑单元号lun、所述存储卷设备中卷的WWID、所述存储卷设备的控制器的信息、链路信息、设备名称和卷的大小。In this embodiment, the unified device file includes at least one of the following information: manufacturer information of the storage volume device, logical unit number lun of the volume in the storage volume device, and volume of the volume in the storage volume device WWID, information of the controller of the storage volume device, link information, device name, and size of the volume.
若所述统一设备文件包括所述存储卷设备中卷的标识符WWID时,在根据所述统一设备文件对不同存储卷设备进行访问管理时具体包括以下两种方式:If the unified device file includes the identifier WWID of the volume in the storage volume device, the access storage management of different storage volume devices according to the unified device file specifically includes the following two methods:
方式一,根据所述WWID通过IO接口直接访问所述存储卷设备中与 所述WWID对应的卷,并进行读写操作;Method 1: directly access the volume corresponding to the WWID in the storage volume device through the IO interface according to the WWID, and perform read and write operations;
方式二,根据所述WWID确定对应的所述块设备文件,根据所述块设备文件访问所述存储卷设备中的卷,并进行读写操作。Method 2: Determine the corresponding block device file according to the WWID, access the volume in the storage volume device according to the block device file, and perform read and write operations.
进一步的,所述检测模块还设置为获取所述多路径软件生成的块设备文件的通知信息,所述通知信息包括对所述访问路径的增加、修改、删除通知中的一种。Further, the detection module is further configured to obtain notification information of the block device file generated by the multi-path software, and the notification information includes one of addition, modification, and deletion notifications to the access path.
而统一管理模块42在根据接收到的通知信息对统一设备文件进行对应的调整,比如接收到是在存储设备的磁阵上增加一个卷映射给主机时,则需要在统一设备文件中增加对应的卷的访问路径信息和卷的相关信息;同理对于修改或者删除,也会对统一设备文件进行对应的处理。The unified management module 42 adjusts the unified device file according to the received notification information. For example, when receiving a volume mapping on the magnetic array of the storage device to the host, it is necessary to add the corresponding The access path information of the volume and the related information of the volume; in the same way, for the modification or deletion, the unified device file will also be processed accordingly.
在本实施例中,所述装置还提供的查询的功能,即是通过该查询模块接收存储卷设备相关信息的查询请求;根据所述查询请求从所述统一设备信息中查询所述存储卷设备相关信息,所述相关信息包括以下信息中的至少一种:所述存储卷设备的厂商信息、所述存储卷设备中卷的逻辑单元号lun、所述存储卷设备中卷的WWID、所述存储卷设备的控制器的信息、链路信息、设备名称和卷的大小。In this embodiment, the query function provided by the apparatus is to receive a query request for storage volume device related information through the query module; query the storage volume device from the unified device information according to the query request Related information, the related information includes at least one of the following information: manufacturer information of the storage volume device, logical unit number lun of the volume in the storage volume device, WWID of the volume in the storage volume device, the Storage volume controller information, link information, device name, and volume size.
进一步的,上述模块的具体是实现过程如下:Further, the specific implementation process of the above modules is as follows:
多路径聚合设备检测模块:在主机连接磁盘阵列,并且能访问磁盘阵列上的卷设备时,操作系统会根据每一条路径生成一个设备文件,然后多路径软件会根据路径信息,生成一个聚合的块设备文件。本方法的检测模块捕捉该块设备文件的生成,同时过滤其他设备(如,本地磁盘设备,单路径设备)的通知事件。该检测模块能够捕获多路径的增加、修改、删除,并对这一系列事件作出相应的操作。Multi-path aggregation device detection module: When the host is connected to the disk array and can access the volume devices on the disk array, the operating system will generate a device file according to each path, and then the multi-path software will generate an aggregate block according to the path information. Device file. The detection module of the method captures the generation of the device file of the block, and at the same time filters the notification events of other devices (eg, local disk devices, single-path devices). The detection module can capture the addition, modification, and deletion of multipath, and make corresponding operations on these series of events.
统一设备文件生成:根据卷的信息生成统一的设备文件路径,文件中包含了该卷的wwid信息,便于上层找到对应设备文件。Unified device file generation: A unified device file path is generated based on the volume information. The file contains the wwid information of the volume, so that the upper layer can find the corresponding device file.
查询模块:应用程序通过该模块接口可以查询到卷的一些基本信息,比如磁阵的厂商、卷lunid号、卷wwid、控制器的信息等。Query module: The application can query some basic information of the volume through this module interface, such as the manufacturer of the magnetic array, the volume lunid number, the volume wwid, and the information of the controller.
在本实施例中,对于该装置中的各个模块所实现的步骤和具体过程,可参照本申请各实施例所示的路径聚合方法的过程,在此不再赘述。In this embodiment, for the steps and specific processes implemented by each module in the device, reference may be made to the process of the path aggregation method shown in each embodiment of this application, and details are not described herein again.
本实施例提供的装置中,在通过多路径软件将每条访问路径生成的设备文件聚合生成块设备文件之后,将块设备文件转换为统一设备文件,而在访问时统一根据统一设备文件对存储卷设备进行访问即可,即是根据对各种多路径软件产生的聚合设备进行统一的设备文件转换,根据新的设备文件对存储卷设备的访问路径和磁阵进行统一管理,对上层应用提供了统一的设备文件,避免了上层在使用多路径块设备时需要做不同的适配的现象,让上层应用在使用的时候做到对多路径设备的透明化处理,从而提高了访问设备对不同品牌的存储卷设备的访问兼容,解决了不同多路径软件生成的设备文件必须提前修改适配参数才能使用的问题,从而大大提高了设备的性能。In the apparatus provided in this embodiment, after the device files generated by each access path are aggregated to generate a block device file through multi-path software, the block device file is converted into a unified device file, and the storage is performed according to the unified device file during access The volume device can be accessed, that is, according to the unified device file conversion of the aggregation device generated by various multi-path software, the access path and the magnetic array of the storage volume device are managed according to the new device file, and the upper layer application is provided. The unified device file avoids the phenomenon that the upper layer needs to make different adaptations when using the multi-path block device, so that the upper-layer application can transparently process the multi-path device when it is used, thereby improving the access device to different The access compatibility of the storage volume devices of the brand solves the problem that the device files generated by different multi-path software must be modified in advance before the adaptation parameters can be used, thereby greatly improving the performance of the device.
实施例四:Example 4:
本实施例提供了一种访问装置,其可应用于各种基站或者终端,参见图6所示,该装置包括:This embodiment provides an access device, which can be applied to various base stations or terminals. Referring to FIG. 6, the device includes:
获取模块61,设置为读取统一设备文件,所述统一设备文件由所述多路径软件基于每条访问路径生成的设备文件聚合生成的块设备文件生成;The obtaining module 61 is set to read a unified device file, which is generated by a block device file generated by the multi-path software based on the aggregation of device files generated by each access path;
访问管理模块62,设置为根据所述统一设备文件对不同存储卷设备进行访问管理。The access management module 62 is configured to perform access management on different storage volume devices according to the unified device file.
在本实施例中,所述统一设备文件由所述多路径软件基于每条访问路径生成的设备文件聚合生成的块设备文件生成的。In this embodiment, the unified device file is generated by the block device file generated by the multi-path software based on the aggregation of the device files generated by each access path.
在本实施例中,所述访问管理模块62对访问管理具体包括了直接访问和间接访问,但是不管是直接还是间接,其访问设备都是直接通过统一格式的统一设备文件来实现的,并不是与现有技术的还需要对访问设备进行与存储卷设备的型号或者厂商进行对应的适配。In this embodiment, the access management module 62 specifically includes direct access and indirect access to access management, but whether it is direct or indirect, the access device is directly implemented by a unified device file in a unified format, not It is also necessary to adapt the access device to the model or manufacturer of the storage volume device according to the existing technology.
在实际应用中,所述统一设备文件至少包括以下信息中的一种:所述 存储卷设备的厂商信息、所述存储卷设备中卷的逻辑单元号lun、所述存储卷设备中卷的WWID、所述存储卷设备的控制器的信息、链路信息、设备名称和卷的大小。也即是说在生成统一设备文件的过程中,除了进行访问格式的同一之外,还根据各种多路径软件生成的块设备文件提取具体的访问数据,如访问路径信息、链路信息、设备厂商信息等等的信息聚合在新生成的同一格式的同一设备文件中。In practical applications, the unified device file includes at least one of the following information: the manufacturer information of the storage volume device, the logical unit number lun of the volume in the storage volume device, and the WWID of the volume in the storage volume device , Information of the controller of the storage volume device, link information, device name, and size of the volume. That is to say, in the process of generating a unified device file, in addition to the same access format, specific access data, such as access path information, link information, and device, are extracted based on the block device files generated by various multi-path software Information such as manufacturer information is aggregated in the same newly generated device file in the same format.
进一步的,若所述统一设备文件包括所述存储卷设备中卷的标识符WWID时,所述根据所述统一设备文件对不同存储卷设备进行访问管理包括:Further, if the unified device file includes the identifier WWID of the volume in the storage volume device, the access management of different storage volume devices according to the unified device file includes:
根据所述WWID通过IO接口直接访问所述存储卷设备中与所述WWID对应的卷,并进行读写操作;Directly access the volume corresponding to the WWID in the storage volume device through the IO interface according to the WWID, and perform read and write operations;
或者,根据所述WWID确定对应的所述块设备文件,根据所述块设备文件访问所述存储卷设备中的卷,并进行读写操作。Or, determine the corresponding block device file according to the WWID, access the volume in the storage volume device according to the block device file, and perform read and write operations.
综上,本实施例提供的访问装置,通过读取由块设备文件转换成的统一设备文件,而在访问时统一根据统一设备文件对存储卷设备进行访问即可,从而避免不同存储环境下,不同多路径软件生成的设备文件不同而导致上层应用需要提前修改适配才能使用存储卷设备的问题,大大提高了设备的访问效率和性能。In summary, the access device provided in this embodiment can read the unified device file converted from the block device file, and access the storage volume device according to the unified device file during access, thereby avoiding different storage environments, The device files generated by different multipath software are different, which leads to the problem that upper-layer applications need to modify the adaptation in advance to use the storage volume device, which greatly improves the access efficiency and performance of the device.
实施例五:Example 5:
下面结合具体的具体的应用场景来对本申请实施例提供的路径聚合方法进行详细说明。The path aggregation method provided in this embodiment of the present application will be described in detail below in conjunction with specific application scenarios.
如图2为在现有的多路径软件管理流程中增加统一设备层后的磁盘阵列与主机之间的访问流程框图,具体访问过程如下:Figure 2 is a block diagram of the access process between the disk array and the host after adding a unified device layer in the existing multi-path software management process. The specific access process is as follows:
S01:在同时存在最通用的multipath(多路径软件)、ZTE的superpath(超级路径软件)、华为的UltraPath(多路径软件)和EMC的PowerPath(多路径软件)时,应用程序需要根据不同的多路径软件,生成对应格式 的块设备文件,即是需要生成与设备参数对应访问相应的设备路径。如/dev/dm-1或者/dev/sm-1等。S01: When the most common multipath (multipath software), ZTE's superpath (superpath software), Huawei's UltraPath (multipath software) and EMC's PowerPath (multipath software) exist at the same time, the application needs to be based on different The path software generates a block device file in a corresponding format, that is, it is necessary to generate a device path corresponding to the device parameter access. Such as /dev/dm-1 or /dev/sm-1.
S02:加入中间统一设备层,由中间统一设备层产生统一的设备路径:/dev/vmc/serial-lunwwid。应用程序不需要关心底层磁阵的厂家以及使用的何种多路径软件,直接访问/dev/vmc/serial-lunwwid即可读写数据。S02: Join the middle unified device layer, and a unified device path is generated from the middle unified device layer: /dev/vmc/serial-lunwwid. The application program does not need to care about the manufacturer of the underlying magnetic array and what kind of multipath software is used, and can directly read/write data by accessing /dev/vmc/serial-lunwwid.
具体的,基于图7-9所示的磁盘阵列与主机的链接关系,其具体实现方法如下:Specifically, based on the link relationship between the disk array and the host shown in Figures 7-9, the specific implementation method is as follows:
S21:主机和磁盘阵列各通过两条路径链接至交换机,形成4条访问路径。S21: The host and the disk array are each connected to the switch through two paths to form four access paths.
S22:操作系统驱动层根据每条访问路径,生成单路径设备,如sda、sdb、sdc等。S22: The operating system driver layer generates single-path devices according to each access path, such as sda, sdb, and sdc.
S23:多路径软件(superpath/multipath/ultrapath等)根据单路径设备生成聚合路径设备,如dm-1、dm-2或者sm-1、sm-2等。S23: Multipath software (superpath/multipath/ultrapath, etc.) generates aggregate path devices based on single path devices, such as dm-1, dm-2 or sm-1, sm-2, etc.
S24:统一管理层系统检测出聚合设备,生成统一设备文件,设备文件名路径为:/dev/vmc/serial-lunwwidS24: The unified management system detects the aggregation device and generates a unified device file. The device file name path is: /dev/vmc/serial-lunwwid
S25:应用程序通过访问统一路径完成对磁阵上卷的读写操作。S25: The application program completes the reading and writing operations on the magnetic array by accessing the unified path.
进一步的,在本实施例中,当捕捉该块设备文件的生成的通知事件是增加卷时,具体方法如图10所示:Further, in this embodiment, when the notification event that captures the generation of the block device file is to increase the volume, the specific method is shown in FIG. 10:
S81:磁阵上增加一个卷映射给主机,操作系统驱动层和多路径软件层分别生成单路径设备和聚合路径设备。S81: Add a volume mapping to the host on the magnetic array, and the operating system driver layer and the multi-path software layer respectively generate single-path devices and aggregate path devices.
S82:中间件统一设备层通过内核udev事件捕捉到多路径设备的产生。S82: The middleware unified device layer captures the generation of multipath devices through kernel udev events.
S83:统一设备层生成统一设备文件/dev/vmc/serial-lunwwid。S83: The unified device layer generates a unified device file /dev/vmc/serial-lunwwid.
S84:统一设备层提供查询功能,包括链路信息查询、设备名称查询、磁阵厂商信息查询、卷大小查询等。S84: The unified device layer provides query functions, including link information query, device name query, magnetic array manufacturer information query, and volume size query.
当捕捉该块设备文件的生成的通知事件是删除卷时,具体方法如图12所示:When the notification event that captures the generation of the block device file is volume deletion, the specific method is shown in Figure 12:
S101:磁阵上删除一个已映射给主机的卷,操作系统驱动层和多路径软件层分别删除单路径设备和聚合路径设备。S101: Delete a volume that has been mapped to the host on the magnetic array. The operating system driver layer and the multi-path software layer delete the single-path device and the aggregate-path device, respectively.
S102:中间件统一设备层通过内核udev事件捕捉到多路径设备的删除操作。S102: The middleware unified device layer captures the delete operation of the multipath device through the kernel udev event.
S103:统一设备层删除统一设备文件/dev/vmc/serial-lunwwid。S103: The unified device layer deletes the unified device file /dev/vmc/serial-lunwwid.
当捕捉该块设备文件的生成的通知事件是修改卷路径时,具体方法如图11所示:When the notification event of capturing the generated block device file is to modify the volume path, the specific method is shown in Figure 11:
S91:磁阵跟主机上路径链路断开,或者增加新的链路,操作系统驱动层根据路径变化增删单路径设备,多路径软件层刷新聚合路径设备。S91: The disk array is disconnected from the path link on the host, or a new link is added. The operating system driver layer adds or deletes single-path devices according to the path changes, and the multi-path software layer refreshes the aggregation path devices.
S92:中间件统一设备层通过内核udev事件捕捉到多路径设备的修改操作。S92: The middleware unified device layer captures the modification operation of the multipath device through the kernel udev event.
S93:防止路径不可访问造成的IO卡主,统一设备层重新生成统一设备文件/dev/vmc/serial-lunwwid。S93: To prevent the IO card owner from being inaccessible by the path, the unified device layer regenerates the unified device file /dev/vmc/serial-lunwwid.
实施例六:Example 6:
本实施例提供了一种通信设备,参见图13所示,该设备包括路径聚合装置10,而该路径聚合装置10具体是采用上述实施例二所述的路径聚合装置。This embodiment provides a communication device. Referring to FIG. 13, the device includes a path aggregation device 10, and the path aggregation device 10 specifically uses the path aggregation device described in the foregoing second embodiment.
进一步的,还可以是通过对现有的通信终端进行改进,即是在现有的通信终端的基础上增加具有路径聚合装置的各个功能模块的功能单元来实现。Further, it can also be achieved by improving the existing communication terminal, that is, adding a functional unit with each function module of the path aggregation device on the basis of the existing communication terminal.
在本实施例中,还提供了另一种通信设备的结构,如图14所示,具体的包括处理器211、存储器212、通信单元213和通信总线214;In this embodiment, another structure of a communication device is provided, as shown in FIG. 14, specifically including a processor 211, a memory 212, a communication unit 213, and a communication bus 214;
通信总线214用于实现处理器2111、通信单元213和存储器212之间的通信连接;The communication bus 214 is used to realize the communication connection between the processor 2111, the communication unit 213 and the memory 212;
一种实例中,所述处理器211设置为执行存储器中存储的一个或者多 个程序,以实现如上各个实施例中的路径聚合方法的步骤,其各个步骤的具体实现过程参照上述各实施例的说明,这里不再重复赘述。In an example, the processor 211 is configured to execute one or more programs stored in the memory to implement the steps of the path aggregation method in the above embodiments. For the specific implementation process of each step, refer to the above embodiments Note, I won’t repeat them here.
本实施例还提供了一种计算机可读存储介质,该计算机可读存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、计算机程序模块或其他数据)的任何方法或技术中实施的易失性或非易失性、可移除或不可移除的介质。计算机可读存储介质包括但不限于RAM(Random Access Memory,随机存取存储器),ROM(Read-Only Memory,只读存储器),EEPROM(Electrically Erasable Programmable read only memory,带电可擦可编程只读存储器)、闪存或其他存储器技术、CD-ROM(Compact Disc Read-Only Memory,光盘只读存储器),数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。This embodiment also provides a computer-readable storage medium, which is implemented in any method or technology for storing information (such as computer-readable instructions, data structures, computer program modules, or other data) Volatile or non-volatile, removable or non-removable media. Computer-readable storage media include but are not limited to RAM (Random Access Memory, random access memory), ROM (Read-Only Memory, read-only memory), EEPROM (Electrically Erasable Programmable read only memory, live erasable programmable read-only memory ), flash memory or other memory technologies, CD-ROM (Compact Disc Read-Only Memory, CD-ROM), digital versatile disk (DVD) or other optical disk storage, magnetic box, magnetic tape, magnetic disk storage or other magnetic storage devices, Or any other medium that can be used to store desired information and can be accessed by a computer.
在一种示例中,本实施例中的计算机可读存储介质可设置为存储一个或者多个第一计算机程序,该一个或者多个第一计算机程序可被一个或者多个处理器执行,以实现如上各实施例中的路径聚合方法的步骤。In an example, the computer-readable storage medium in this embodiment may be configured to store one or more first computer programs, and the one or more first computer programs may be executed by one or more processors to implement The steps of the path aggregation method in the above embodiments.
本实施例还提供了一种计算机程序(或称计算机软件),该计算机程序可以分布在计算机可读介质上,由可计算装置来执行,以实现如上各实施例所示的路径聚合方法的至少一个步骤;并且在某些情况下,可以采用不同于上述实施例所描述的顺序执行所示出或描述的至少一个步骤。This embodiment also provides a computer program (or computer software) that can be distributed on a computer-readable medium and executed by a computable device to implement at least the path aggregation method shown in the above embodiments One step; and in some cases, at least one step shown or described may be performed in an order different from that described in the above embodiment.
本实施例还提供了一种计算机程序产品,包括计算机可读装置,该计算机可读装置上存储有如上所示的计算机程序。本实施例中该计算机可读装置可包括如上所示的计算机可读存储介质。This embodiment also provides a computer program product, including a computer readable device, where the computer program shown above is stored on the computer readable device. In this embodiment, the computer-readable device may include the computer-readable storage medium shown above.
可见,本领域的技术人员应该明白,上文中所公开方法中的全部或某些步骤、系统、装置中的功能模块/单元可以被实施为软件(可以用计算装置可执行的计算机程序代码来实现)、固件、硬件及其适当的组合。在硬件实施方式中,在以上描述中提及的功能模块/单元之间的划分不一定对应于物理组件的划分;例如,一个物理组件可以具有多个功能,或者一个功 能或步骤可以由若干物理组件合作执行。某些物理组件或所有物理组件可以被实施为由处理器,如中央处理器、数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。It can be seen that those skilled in the art should understand that all or some of the steps, systems, and functional modules/units in the method disclosed above can be implemented as software (which can be implemented by computer program code executable by a computing device) ), firmware, hardware and their appropriate combinations. In a hardware implementation, the division between the functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be composed of several physical The components are executed in cooperation. Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit .
此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、计算机程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。所以,本申请不限制于任何特定的硬件和软件结合。In addition, it is well known to those of ordinary skill in the art that the communication medium generally contains computer-readable instructions, data structures, computer program modules, or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and may include any information delivery medium. Therefore, this application is not limited to any specific combination of hardware and software.
以上内容是结合具体的实施方式对本申请实施例所作的进一步详细说明,不能认定本申请的具体实施只局限于这些说明。对于本申请所属技术领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干简单推演或替换,都应当视为属于本申请的保护范围。The above content is a further detailed description of the embodiments of the present application in conjunction with specific implementations, and it cannot be assumed that the specific implementation of the present application is limited to these descriptions. For a person of ordinary skill in the technical field to which this application belongs, without deviating from the concept of this application, several simple deductions or replacements can be made, which should be regarded as falling within the protection scope of this application.
工业实用性Industrial applicability
通过本申请实施例提供的路径聚合方法、访问方法及通信设备、计算机可读存储介质,该方法在通过多路径软件将每条访问路径生成的设备文件聚合生成块设备文件之后,将块设备文件转换为统一设备文件,而在访问时统一根据统一设备文件对存储卷设备进行访问即可,即是根据对各种多路径软件产生的聚合设备进行统一的设备文件转换,根据新的设备文件对存储卷设备的访问路径和磁阵进行统一管理,对上层应用提供了统一的设备文件,避免了上层在使用多路径块设备时需要做不同的适配的现象,让上层应用在使用的时候做到对多路径设备的透明化处理,从而提高了访问设备对不同品牌的存储卷设备的访问兼容,解决了不同多路径软件生成的设备文件必须提前修改适配参数才能使用的问题,从而大大提高了设备的性能。Through the path aggregation method, access method, communication device, and computer-readable storage medium provided by the embodiments of the present application, this method aggregates the device files generated by each access path through the multi-path software to generate block device files, and then blocks the device files Convert to a unified device file, and access the storage volume device according to the unified device file during access, that is, according to the unified device file conversion of the aggregation device generated by various multi-path software, according to the new device file The access path and magnetic array of the storage volume device are managed in a unified manner, and a unified device file is provided for the upper layer application, which avoids the phenomenon that the upper layer needs to make different adaptations when using the multi-path block device, and allows the upper layer application to do when it is used To the transparent processing of multi-path devices, which improves the compatibility of access devices to storage volume devices of different brands, and solves the problem that device files generated by different multi-path software must be modified in advance to use the adaptation parameters, which greatly improves Performance of the device.

Claims (10)

  1. 一种路径聚合方法,其中,所述方法包括:A path aggregation method, wherein the method includes:
    获取各多路径软件产生的块设备文件,所述块设备文件为所述多路径软件基于每条访问路径生成的设备文件聚合生成;Obtain block device files generated by each multipath software, where the block device files are aggregated and generated by the device files generated by the multipath software based on each access path;
    根据所述块设备文件生成统一设备文件,所述统一设备文件用于为访问设备提供统一格式的路径信息对不同存储卷设备进行访问管理。A unified device file is generated based on the block device file, and the unified device file is used to provide access information to the access device in a uniform format for access management of different storage volume devices.
  2. 根据权利要求1所述的路径聚合方法,所述统一设备文件包括所述存储卷设备中卷的标识符WWID时,所述访问设备对不同存储卷设备进行访问管理包括:According to the path aggregation method of claim 1, when the unified device file includes the identifier WWID of the volume in the storage volume device, the access device managing access to different storage volume devices includes:
    根据所述WWID通过IO接口直接访问所述存储卷设备中与所述WWID对应的卷,并进行读写操作;Directly access the volume corresponding to the WWID in the storage volume device through the IO interface according to the WWID, and perform read and write operations;
    或者,根据所述WWID确定对应的所述块设备文件,根据所述块设备文件访问所述存储卷设备中的卷,并进行读写操作。Or, determine the corresponding block device file according to the WWID, access the volume in the storage volume device according to the block device file, and perform read and write operations.
  3. 根据权利要求1所述的路径聚合方法,在所述根据所述块设备文件生成统一设备文件之后,还包括:The path aggregation method according to claim 1, after the generating a unified device file according to the block device file, further comprising:
    接收存储卷设备相关信息的查询请求;Receive query requests for information about storage volume devices;
    根据所述查询请求从所述统一设备信息中查询所述存储卷设备相关信息,所述相关信息包括以下信息中的至少一种:所述存储卷设备的厂商信息、所述存储卷设备中卷的逻辑单元号lun、所述存储卷设备中卷的WWID、所述存储卷设备的控制器的信息、路径信息、设备名称和卷的大小。Querying the storage volume device related information from the unified device information according to the query request, the related information including at least one of the following information: manufacturer information of the storage volume device, volume in the storage volume device Logical unit number lun, WWID of the volume in the storage volume device, information of the controller of the storage volume device, path information, device name, and size of the volume.
  4. 根据权利要求1-3任一项所述的路径聚合方法,所述方法还包括:获取所述多路径软件生成的块设备文件的通知信息,所述通知信息包括对所述访问路径的增加、修改、删除通知中的一种。The path aggregation method according to any one of claims 1-3, the method further comprising: acquiring notification information of a block device file generated by the multi-path software, the notification information including an increase in the access path, Modify or delete one of the notifications.
  5. 根据权利要求4所述的路径聚合方法,在所述根据所述块设备 文件生成统一设备文件之后,还包括:The path aggregation method according to claim 4, after the generating a unified device file according to the block device file, further comprising:
    获取根据所述增加通知进行增加处理后的块设备文件;将所述增加处理后的块设备文件中对应的卷及路径信息增加到所述统一设备文件中;Obtain the block device file after the addition processing according to the increase notification; add the corresponding volume and path information in the block device file after the addition processing to the unified device file;
    或者,获取根据所述修改通知进行修改处理后的块设备文件;将所述修改处理后的块设备文件中对应的卷及路径信息对所述统一设备文件中的卷及路径信息进行修改;Or, obtain the block device file modified according to the modification notification; modify the corresponding volume and path information in the modified block device file to the volume and path information in the unified device file;
    或者,获取根据所述删除通知进行删除处理后的块设备文件;将所述删除处理后后的块设备文件删除所述统一设备文件中对应的卷及路径信息。Alternatively, obtain the block device file that has been deleted according to the deletion notification; delete the block device file that has been deleted and delete the corresponding volume and path information in the unified device file.
  6. 一种访问方法,其中,所述方法包括:An access method, wherein the method includes:
    读取统一设备文件,所述统一设备文件由所述多路径软件基于每条访问路径生成的设备文件聚合生成的块设备文件生成;Reading a unified device file, the unified device file is generated by a block device file generated by the multi-path software based on the aggregation of device files generated by each access path;
    根据所述统一设备文件对不同存储卷设备进行访问管理。Perform access management on different storage volume devices according to the unified device file.
  7. 一种通信设备,其中,包括路径聚合装置,所述路径聚合装置包括:检测模块和统一管理模块;A communication device, including a path aggregation device, the path aggregation device includes: a detection module and a unified management module;
    所述检测模块设置为获取各多路径软件产生的块设备文件,所述块设备文件为所述多路径软件基于每条访问链路生成的设备文件聚合生成;The detection module is configured to obtain block device files generated by each multi-path software, and the block device files are aggregated and generated by device files generated by the multi-path software based on each access link;
    所述统一管理模块设置为根据所述块设备文件生成统一设备文件,所述统一设备文件用于为访问设备提供统一路径对不同存储卷设备进行访问管理。The unified management module is configured to generate a unified device file according to the block device file, and the unified device file is used to provide a unified path for the access device to perform access management on different storage volume devices.
  8. 一种访问装置,其中,包括:An access device, including:
    获取模块,设置为读取统一设备文件,所述统一设备文件由所述多路径软件基于每条访问路径生成的设备文件聚合生成的块设备文件生成;The acquisition module is set to read a unified device file, which is generated by a block device file generated by the multi-path software based on the aggregation of device files generated by each access path;
    访问管理模块,设置为根据所述统一设备文件对不同存储卷设备进行 访问管理。The access management module is configured to perform access management on different storage volume devices according to the unified device file.
  9. 一种通信设备,其中,包括处理器、存储器、通信单元和通信总线;A communication device, including a processor, a memory, a communication unit, and a communication bus;
    所述通信总线用于实现所述处理器、所述通信单元和所述存储器之间的无线通信连接;The communication bus is used to realize a wireless communication connection between the processor, the communication unit and the memory;
    所述处理器设置为执行存储器中存储的一个或者多个程序,以实现如权利要求1至5任一项所述的路径聚合方法的步骤,或者以实现如权利要求6所述的访问方法的步骤。The processor is configured to execute one or more programs stored in the memory to implement the steps of the path aggregation method according to any one of claims 1 to 5, or to implement the access method according to claim 6. step.
  10. 一种计算机可读存储介质,其中,所述计算机可读存储介质存储有一个或者多个计算机程序,所述一个或者多个计算机程序可被一个或者多个处理器执行,以实现如权利要求1至5任一项所述的路径聚合方法的步骤,或者以实现如权利要求6所述的访问方法的步骤。A computer-readable storage medium, wherein the computer-readable storage medium stores one or more computer programs, and the one or more computer programs can be executed by one or more processors to implement claim 1. The steps of the path aggregation method according to any one of 5 to 5, or the steps of implementing the access method according to claim 6.
PCT/CN2019/114423 2018-12-24 2019-10-30 Path aggregation method and access method, communication device, and storage medium WO2020134530A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811585036.5 2018-12-24
CN201811585036.5A CN111352899B (en) 2018-12-24 2018-12-24 Path aggregation method, access method, communication device, and storage medium

Publications (1)

Publication Number Publication Date
WO2020134530A1 true WO2020134530A1 (en) 2020-07-02

Family

ID=71129652

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/114423 WO2020134530A1 (en) 2018-12-24 2019-10-30 Path aggregation method and access method, communication device, and storage medium

Country Status (2)

Country Link
CN (1) CN111352899B (en)
WO (1) WO2020134530A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112100008B (en) * 2020-11-09 2021-06-18 杭州沃趣科技股份有限公司 Cross-node multilink redundancy protection method and system
CN113625944B (en) * 2021-06-25 2024-02-02 济南浪潮数据技术有限公司 Disaster recovery method and system based on multipath and remote replication technology
CN113238719B (en) * 2021-07-12 2021-10-15 苏州浪潮智能科技有限公司 Method, device and equipment for cleaning residual path of host end

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101387957A (en) * 2008-09-12 2009-03-18 成都市华为赛门铁克科技有限公司 Multi-path software implementing apparatus and method
CN103150127A (en) * 2013-03-21 2013-06-12 浪潮(北京)电子信息产业有限公司 System for accessing storage in multiple paths, configuration of system, and access method
CN103577149A (en) * 2013-11-20 2014-02-12 华为技术有限公司 HBA compatibility processing method, device and system
CN105740469A (en) * 2016-03-07 2016-07-06 华为技术有限公司 Storage server and metadata access method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8732354B1 (en) * 2005-09-30 2014-05-20 Symantec Operating Corporation Method and apparatus for controlling access to a storage area network
CN106814977A (en) * 2017-01-19 2017-06-09 郑州云海信息技术有限公司 The management method and system of the multi-path software based on many storage manufacturers

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101387957A (en) * 2008-09-12 2009-03-18 成都市华为赛门铁克科技有限公司 Multi-path software implementing apparatus and method
CN103150127A (en) * 2013-03-21 2013-06-12 浪潮(北京)电子信息产业有限公司 System for accessing storage in multiple paths, configuration of system, and access method
CN103577149A (en) * 2013-11-20 2014-02-12 华为技术有限公司 HBA compatibility processing method, device and system
CN105740469A (en) * 2016-03-07 2016-07-06 华为技术有限公司 Storage server and metadata access method

Also Published As

Publication number Publication date
CN111352899B (en) 2024-04-12
CN111352899A (en) 2020-06-30

Similar Documents

Publication Publication Date Title
US11775569B2 (en) Object-backed block-based distributed storage
WO2020134530A1 (en) Path aggregation method and access method, communication device, and storage medium
CN112130748B (en) Data access method, network card and server
WO2018090290A1 (en) Mirror image file conversion method and apparatus
US20050228937A1 (en) System and method for emulating operating system metadata to provide cross-platform access to storage volumes
US11262916B2 (en) Distributed storage system, data processing method, and storage node
CN112395264B (en) Processing method for mapping between logical targets and volumes in distributed storage system
US11675499B2 (en) Synchronous discovery logs in a fabric storage system
WO2018121456A1 (en) Data storage method, server and storage system
US10552089B2 (en) Data processing for managing local and distributed storage systems by scheduling information corresponding to data write requests
US11240306B2 (en) Scalable storage system
US9767119B2 (en) System and method for monitoring hosts and storage devices in a storage system
US20220222016A1 (en) Method for accessing solid state disk and storage device
US20220269428A1 (en) System Startup Method and Related Device
CN111782318A (en) Sharing access system and method for remotely mounting local disk to cloud desktop virtual machine
EP3679478A1 (en) Scalable storage system
US20240126847A1 (en) Authentication method and apparatus, and storage system
WO2019232932A1 (en) Node processing method and apparatus, and computer-readable storage medium and electronic device
US20230342087A1 (en) Data Access Method and Related Device
WO2023186143A1 (en) Data processing method, host, and related device
CN107391047B (en) Method and device for managing storage system
WO2023029485A1 (en) Data processing method and apparatus, computer device, and computer-readable storage medium
CN113835625B (en) Data storage method, device, equipment and storage medium based on sub-path
US11169728B2 (en) Replication configuration for multiple heterogeneous data stores
EP4160422A1 (en) Method for using intermediate device to process data, computer system, and intermediate device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19902228

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 16/11/2021)

122 Ep: pct application non-entry in european phase

Ref document number: 19902228

Country of ref document: EP

Kind code of ref document: A1