FC card sharing method, FC card, storage device and storage medium

By virtualizing the FC card and single input/output virtualization, the multi-storage controller sharing of FC cards is realized, solving the problem of limited use of FC cards in the FC-SAN system, and improving the reliability of storage devices and networking efficiency.

CN119853802APending Publication Date: 2025-04-18ZTE CORP
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202311306385.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-09
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

In existing FC-SAN systems, FC cards can only be used by one storage controller, resulting in complex networking and low reliability of storage devices.

Method used

By virtualizing the physical FC ports in the FC card, multiple virtual FC ports are obtained, and a single input/output virtualization of the FC card is obtained, multiple PCIe VFs are obtained, and multiple PCIe VFs are allocated to different storage controllers, so that the FC card can be shared and used by multiple storage controllers.

Benefits of technology

It improves the reliability of storage devices, reduces the complexity and cost of FC-SAN networking, and allows the storage controller to flexibly use different FC cards.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119853802A_ABST
    Figure CN119853802A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an FC card sharing method, an FC card, storage equipment and a storage medium, and belongs to the field of storage. The method comprises the following steps: virtualizing a physical FC port in an FC card to obtain a plurality of virtual FC ports, and carrying out single-root input / output virtualization on the FC card to obtain a plurality of PCIe VFs; and allocating a virtual FC port to each PCIe VF and allocating a plurality of PCIe VFs to different storage controllers in the storage device, so that the FC card can be shared and used by the different storage controllers. The method improves the reliability of the storage device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of storage technology, and in particular to an FC card sharing method, an FC card, a storage device and a storage medium. Background Art

[0002] Storage Area Network (SAN) based on Fibre Channel (FC) protocol, namely FC-SAN, is used to realize communication between servers and storage devices. At present, FC-SAN usually uses FC switches and multiple FC interface cards (also called FC cards) to realize communication between servers and storage devices, and one FC card can only physically belong to one storage controller in the storage device, that is, one FC card can only be used by one storage controller. The networking is relatively complex and prone to abnormalities, and the reliability of storage devices is low. Summary of the invention

[0003] The embodiment of the present invention provides an FC card sharing method, an FC card, a storage device and a storage medium, aiming to improve the reliability of the storage device.

[0004] In a first aspect, an embodiment of the present invention provides an FC card sharing method, comprising:

[0005] Virtualizing a physical FC port in the FC card to obtain a plurality of virtual FC ports, and virtualizing a single input / output of the FC card to obtain a plurality of PCIe VFs;

[0006] One virtual FC port is allocated to each PCIe VF, and a plurality of the PCIe VFs are allocated to different storage controllers in a storage device, so that the FC card can be shared by different storage controllers.

[0007] In a second aspect, an embodiment of the present invention further provides an FC card, including:

[0008] The FC chip is used to virtualize the physical FC port in the FC card to obtain n virtual FC ports, and to virtualize a single input / output of the FC card to obtain n PCIe VFs, where n is an integer greater than or equal to 2;

[0009] The sharing module is used to allocate one virtual FC port to each PCIe VF and allocate n PCIe VFs to different storage controllers in the storage device, so that the FC card can be shared by different storage controllers.

[0010] In a third aspect, an embodiment of the present invention further provides a storage device, comprising a plurality of disk array cards, a plurality of storage controllers, and one or more FC cards as described in the second aspect, wherein one of the disk array cards is connected to one of the storage controllers;

[0011] The FC card is used to connect the plurality of storage controllers and the FC switch, and the FC switch is connected to a server, so that the server can communicate with the plurality of storage controllers through the FC switch and the FC card.

[0012] In a fourth aspect, an embodiment of the present invention further provides a storage medium for computer-readable storage, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the FC card sharing method as described in the first aspect.

[0013] The embodiment of the present invention provides an FC card sharing method, an FC card, a storage device and a storage medium. The embodiment of the present invention virtualizes a physical FC port in an FC card to obtain multiple virtual FC ports, and performs single root input / output virtualization (SR-IOV) on the FC card to obtain multiple PCIe VFs, then allocates a virtual FC port to each PCIe VF and allocates multiple PCIe VFs to different storage controllers in the storage device, so that the FC card can be shared by different storage controllers. In this way, the storage controllers can use different FC cards, thereby improving the reliability of the storage device and reducing the complexity and cost of FC-SAN networking. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0015] Figure 1 is a schematic diagram of FC-SAN networking in an embodiment of the present invention;

[0016] Figure 2 is another schematic diagram of FC-SAN networking in an embodiment of the present invention;

[0017] Figure 3 It is a flow chart of an FC card sharing method provided by an embodiment of the present invention;

[0018] Figure 4This is a schematic diagram of a scenario of FC card virtualization in an embodiment of the present invention;

[0019] Figure 5 is another schematic diagram of FC-SAN networking in an embodiment of the present invention;

[0020] Figure 6 It is a schematic block diagram of the structure of an FC card provided by an embodiment of the present invention;

[0021] Figure 7 The present invention is a schematic structural block diagram of a storage device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0022] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0023] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.

[0024] It should be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0025] Some embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0026] At present, FC-SAN usually uses FC switches and multiple FC interface cards (also called FC cards) to realize the communication between servers and storage devices, and one FC card can only physically belong to one storage controller in the storage device, that is, one FC card can only be used by one storage controller. The network is relatively complex and prone to abnormalities, and the reliability of storage devices is low. For example, Figure 1As shown, the storage device includes a first storage controller 41, a second storage controller 42, a third storage controller 43, a fourth storage controller 44, a first SAS (Serial Attached SCSI, serial connection SCSI interface) card 51, a second SAS card 52, a third SAS card 53 and a fourth SAS card 54, and the first storage controller 41 is connected to the first SAS card 51, the second storage controller 42 is connected to the second SAS card 52, the third storage controller 43 is connected to the third SAS card 53, and the fourth storage controller 44 is connected to the fourth SAS card 54.

[0027] Since the storage device includes four storage controllers, in order to realize the communication between the server 10 and the four storage controllers, four FC cards are required, namely, the first FC card 31, the second FC card 32, the third FC card 33 and the fourth FC card 34, and the first FC card 31 belongs to the first storage controller 41, the second FC card 32 belongs to the second storage controller 42, the third FC card 33 belongs to the third storage controller 43, and the fourth FC card 34 belongs to the fourth storage controller 44. The first FC card 31, the second FC card 32, the third FC card 33 and the fourth FC card 34 are all connected to the FC switch 20 through optical fibers, so that the server 10 can communicate with the first storage controller 41 through the FC switch 20 and the first FC card 31, communicate with the second storage controller 42 through the FC switch 20 and the second FC card 32, communicate with the third storage controller 43 through the FC switch 20 and the third FC card 33, and communicate with the fourth storage controller 44 through the FC switch 20 and the fourth FC card 34.

[0028] To solve the above problems, an embodiment of the present invention provides an FC card sharing method, an FC card, a storage device and a storage medium. The method virtualizes the physical FC port in the FC card to obtain multiple virtual FC ports, and performs single root I / O virtualization (SR-IOV) on the FC card to obtain multiple PCIe VFs (PCIe Virtual Functions), and then allocates a virtual FC port to each PCIe VF and allocates multiple PCIe VFs to different storage controllers in the storage device, so that the FC card can be shared by different storage controllers, so that the storage controller can use different FC cards, thereby improving the reliability of the storage device and reducing the complexity and cost of FC-SAN networking. Among them, PCIe (Peripheral Component Interconnect Express, a high-speed serial computer expansion bus standard) belongs to high-speed serial point-to-point dual-channel high-bandwidth transmission, and the connected devices are allocated exclusive channel bandwidth and do not share bus bandwidth. It mainly supports active power management, error reporting, end-to-end reliability transmission, hot plugging and quality of service (QOS) and other functions.

[0029] For example, Figure 2As shown, after the FC card 100 is processed according to the FC card sharing method provided by the embodiment of the present invention, the FC card 100 includes a first virtual FC port 101, a second virtual FC port 102, a third virtual FC port 103, a fourth virtual FC port 104, a first PCIe VF 105, a second PCIe VF 106, a third PCIe VF 107, and a fourth PCIe VF 108, and the first virtual FC port 101 is bound to the first PCIe VF 105, the second virtual FC port 102 is bound to the second PCIe VF 106, the third virtual FC port 103 is bound to the third PCIe VF 107, the fourth virtual FC port 104 is bound to the fourth PCIe VF 108, the first PCIe VF 105 has a mapping relationship with the first storage controller 41, the second PCIe VF 106 has a mapping relationship with the second storage controller 42, and the third PCIe VF 108 has a mapping relationship with the fourth PCIe VF 109. There is a mapping relationship between 107 and the third storage controller 43, and there is a mapping relationship between the fourth PCIeVF 108 and the fourth storage controller 44. Therefore, the first storage controller 41, the second storage controller 42, the third storage controller 43 and the fourth storage controller 44 can share the FC card 100. At this time, the server 10 can communicate with the first storage controller 41, the second storage controller 42, the third storage controller 43 and the fourth storage controller 44 through the FC switch 20 and the FC card 100, that is, at least one FC card is required to realize the communication between the server 10 and the four storage controllers, which reduces the complexity and cost of networking and improves the reliability of storage devices.

[0030] The following will be combined Figure 2 The FC card sharing method provided by the embodiment of the present invention is described in detail in the scenario. It should be noted that Figure 2 The scenario is only used to explain the FC card sharing method provided in the embodiment of the present invention, but does not constitute a limitation on the application scenario of the FC card sharing method provided in the embodiment of the present invention.

[0031] See also Figure 3 , Figure 3 The figure is a flow chart of a FC card sharing method provided by an embodiment of the present invention. The FC card sharing method can be applied to FC cards or storage devices including FC cards.

[0032] like Figure 3 As shown, the FC card sharing method includes steps S101 to S102.

[0033] Step S101: virtualize a physical FC port in an FC card to obtain multiple virtual FC ports, and virtualize a single input / output of the FC card to obtain multiple PCIe VFs.

[0034] In this embodiment, the number of virtual FC ports is the same as the number of PCIe VFs, the storage device may include one or more FC cards (also called FC interface cards), the FC card may include one or more physical FC ports, the port rate of the physical FC port may include 8Gbps, 16Gbps, 32Gbps or other higher port rates, and the embodiment of the present invention does not specifically limit this. Among them, the NPIV (Node port id virtualization) technology can be used to virtualize the physical FC port in the FC card to obtain multiple virtual FC ports, and each virtual FC port corresponds to an FC wwn (WorldWide Name), and the FC wwn is used to uniquely identify the virtual FC port. The SR-IOV (Single root I / O virtualization) technology can be used to virtualize multiple PCIe VFs from the FC card.

[0035] In some embodiments, when it is detected that the FC card is connected to the FC switch, the physical FC port in the FC card is virtualized to obtain multiple virtual FC ports, and the single input / output of the FC card is virtualized to obtain multiple PCIe VFs. This embodiment can reduce the number of virtualization times of the FC card and reduce the power consumption of the storage device by virtualizing the physical FC port in the FC card to obtain multiple virtual FC ports and virtualizing the single input / output of the FC card to obtain multiple PCIe VFs only when it is detected that the FC card is connected to the FC switch.

[0036] In some embodiments, when it is detected that the FC card is connected to a storage device and the FC card is connected to a FC switch, the physical FC port in the FC card is virtualized to obtain multiple virtual FC ports, and the single input / output of the FC card is virtualized to obtain multiple PCIe VFs. In this embodiment, the number of virtualization times of the FC card can be reduced, and the power consumption of the storage device can be reduced by virtualizing the physical FC port in the FC card to obtain multiple virtual FC ports and performing single input / output virtualization on the FC card to obtain multiple PCIe VFs only when it is detected that the FC card is connected to a storage device and the FC card is connected to a FC switch.

[0037] In some embodiments, the number of virtual FC ports corresponding to different physical FC ports is the same or different. For example, if the FC card includes 4 physical FC ports, then the 4 physical FC ports can be virtualized using NPIV technology to obtain 16 virtual FC ports, one physical FC port corresponds to 4 virtual FC ports, and SR-IOV technology can be used to virtualize 4 PCIe PFs (PCIe Physical functions) and 16 PCIe AFs, one physical FC port corresponds to one PCIe PF, and one PCIe PF corresponds to 4 PCIe AFs.

[0038] In some embodiments, virtualizing a physical FC port in an FC card to obtain multiple virtual FC ports, and virtualizing a single input / output of the FC card to obtain multiple PCIe VFs may include: obtaining the number of storage controllers, where the number of storage controllers is the number of storage controllers included in the storage device; virtualizing a physical FC port in the FC card according to the number of storage controllers to obtain multiple virtual FC ports, and virtualizing a single input / output of the FC card to obtain multiple PCIe VFs. The number of virtual FC ports is the same as the number of PCIe VFs, and the number of virtual FC ports is less than or equal to the number of storage controllers. In this embodiment, the FC card is virtualized by the number of storage controllers included in the storage device, so that the number of virtual FC ports and PCIe VFs obtained by virtualization can match the number of storage controllers included in the storage device.

[0039] For example, Figure 4 As shown, the FC card 100 includes a first physical FC port 111, a second physical FC port 112, a third physical FC port 113 and a fourth physical FC port 114. Assuming that the number of storage controllers is 4, the first physical FC port 111, the second physical FC port 112, the third physical FC port 113 and the fourth physical FC port 114 can be virtualized by using the NPIV technology to obtain 16 virtual FC ports, and the first physical FC port 111, the second physical FC port 112, the third physical FC port 113 and the fourth physical FC port 114 all correspond to the four virtual FC ports. In addition, the FC card 100 is virtualized by using the SR-IOV technology to obtain a first PCIe PF, a second PCIe PF, a third PCIe PF, a fourth PCIe PF and 16 PCIe VFs, and the first PCIe PF, the second PCIe PF, the third PCIe PF and the fourth PCIe PF correspond to four PCIe VFs respectively.

[0040] Step S102: Allocate a virtual FC port to each PCIe VF and allocate multiple PCIe VFs to different storage controllers in the storage device, so that the FC card can be shared by different storage controllers.

[0041] For example, Figure 2 As shown, the first virtual FC port 101 can be assigned to the first PCIe VF 105, the second virtual FC port 102 can be assigned to the second PCIe VF 106, the third virtual FC port 103 can be assigned to the third PCIe VF 107, and the fourth virtual FC port 104 can be assigned to the fourth PCIe VF 108. In addition, the first PCIe VF 105 can be assigned to the first storage controller 41, the second PCIe VF 106 can be assigned to the second storage controller 42, the third PCIe VF 107 can be assigned to the third storage controller 43, and the fourth PCIe VF 108 can be assigned to the fourth storage controller 44. In this way, the first storage controller 41, the second storage controller 42, the third storage controller 43 and the fourth storage controller 44 can share the FC card 100. At this time, the server 10 can communicate with the first storage controller 41, the second storage controller 42, the third storage controller 43 and the fourth storage controller 44 through the FC switch 20 and the FC card 100.

[0042] In some embodiments, allocating a virtual FC port to each PCIe VF and allocating multiple PCIe VFs to different storage controllers in a storage device may include: obtaining a target configuration file, the target configuration file including a first relationship table and a second relationship table; allocating a virtual FC port to each PCIe VF according to the first relationship table, the first relationship table being used to store the correspondence between the PCIe VF and the virtual FC port; and allocating multiple PCIe VFs to different storage controllers in the storage device according to the second relationship table, the second relationship table being used to store the correspondence between the PCIe VF and the storage controller. In this embodiment, by using the target configuration file, a virtual FC port is allocated to each PCIe VF and multiple PCIe VFs are allocated to different storage controllers in the storage device, so that the FC card can meet different business requirements.

[0043] In some embodiments, the target configuration file may be obtained from a terminal device or a server. For example, the storage device establishes a communication connection with the terminal device, and obtains the target configuration file selected by the user from the terminal device. The communication connection between the storage device and the terminal device may be a wired connection or a wireless connection, which is not specifically limited in the embodiments of the present invention.

[0044] In some embodiments, a storage controller corresponds to one or more PCIe VFs. Figure 2 As shown, the first storage controller 41 corresponds to the first PCIe VF 105, the second storage controller 42 corresponds to the second PCIe VF 106, the third storage controller 43 corresponds to the third PCIe VF 107, and the fourth storage controller 44 corresponds to the fourth PCIe VF 108, that is, the first storage controller 41, the second storage controller 42, the third storage controller 43 and the fourth storage controller 44 correspond to one PCIe VF respectively.

[0045] For example, Figure 5 As shown, the first storage controller 41 corresponds to the first PCIe VF in the first PCIe PF, the second PCIe PF, the third PCIe PF, and the fourth PCIe PF, respectively, that is, the first storage controller 41 corresponds to 4 PCIe VFs, and these 4 PCIe VFs belong to different PCIe VFs (one physical FC port corresponds to one PCIe VF). The second storage controller 42 corresponds to the second PCIe VF in the first PCIe PF, the second PCIe PF, the third PCIe PF, and the fourth PCIe PF, respectively, that is, the second storage controller 42 corresponds to 4 PCIe VFs, and these 4 PCIe VFs belong to different PCIe VFs (one physical FC port corresponds to one PCIe VF).

[0046] The third storage controller 43 corresponds to the third PCIe VF in the first PCIe PF, the second PCIe PF, the third PCIe PF and the fourth PCIe PF, that is, the third storage controller 43 corresponds to 4 PCIe VFs, and these 4 PCIe VFs belong to different PCIe VFs (one physical FC port corresponds to one PCIe VF). The fourth storage controller 44 corresponds to the fourth PCIe VF in the first PCIe PF, the second PCIe PF, the third PCIe PF and the fourth PCIe PF, that is, the fourth storage controller 44 corresponds to 4 PCIe VFs, and these 4 PCIe VFs belong to different PCIe VFs (one physical FC port corresponds to one PCIe VF).

[0047] In some embodiments, when at least one physical FC port of at least one FC card in the storage device is connected to the FC switch, the server can communicate with all storage controllers in the storage device through the FC switch and the target physical FC port (the physical FC port connected to the FC switch). Figure 5As shown, the first physical FC port 111 of the FC card 100 is connected to the FC switch 20, and the first PCIe VF in the first physical FC port 111 belongs to the first storage controller 41, the second PCIe VF in the first physical FC port 111 belongs to the second storage controller 42, the third PCIe VF in the first physical FC port 111 belongs to the third storage controller 43, and the fourth PCIe VF in the first physical FC port 111 belongs to the fourth storage controller 44. At this time, the server 10 can communicate with the first storage controller 41, the second storage controller 42, the third storage controller 43 and the fourth storage controller 44 through the FC switch 20 and the first physical FC port 111 in the FC card 100.

[0048] The FC card sharing method provided in the above embodiment virtualizes the physical FC port in the FC card to obtain multiple virtual FC ports, and performs single root I / O virtualization (SR-IOV) on the FC card to obtain multiple PCIe VFs, then allocates a virtual FC port to each PCIe VF and allocates multiple PCIe VFs to different storage controllers in the storage device, so that the FC card can be shared by different storage controllers. In this way, the storage controllers can use different FC cards, thereby improving the reliability of the storage device and reducing the complexity and cost of FC-SAN networking.

[0049] See also Figure 6 , Figure 6 The figure is a schematic block diagram of the structure of an FC card provided by an embodiment of the present invention.

[0050] like Figure 6 As shown, the FC card 100 includes:

[0051] The FC chip 110 is used to virtualize the physical FC port in the FC card to obtain n virtual FC ports, and to virtualize a single input / output of the FC card to obtain n PCIe VFs, where n is an integer greater than or equal to 2;

[0052] The sharing module 120 is used to allocate one virtual FC port to each PCIe VF and allocate n PCIe VFs to different storage controllers in the storage device, so that the FC card can be shared by different storage controllers.

[0053] In some embodiments, the shared module 120 may include a shared module implemented based on a FPGA (Field-Programmable Gate Array), a shared module implemented based on a SOC (System on Chip), or a shared module implemented based on an ASIC (Application Specific Integrated Circuit).

[0054] In some embodiments, the FC card 100 includes one or more physical FC ports, and the port rate of the physical FC port includes 8 Gbps, 16 Gbps or 32 Gbps.

[0055] In some embodiments, the FC card 100 includes a plurality of the physical FC ports, and the numbers of the virtual FC ports corresponding to different physical FC ports are the same or different.

[0056] In some embodiments, the FC chip 110 is further used for:

[0057] Obtaining the number of storage controllers, where the number of storage controllers is the number of storage controllers included in the storage device;

[0058] According to the number of the storage controllers, the physical FC port in the FC card is virtualized to obtain a plurality of virtual FC ports, and a single input / output virtualization is performed on the FC card to obtain a plurality of PCIe VFs;

[0059] The number of the virtual FC ports is the same as the number of the PCIe VFs, and the number of the virtual FC ports is less than or equal to the number of the storage controllers.

[0060] In some embodiments, the FC chip 110 is further used for:

[0061] When it is detected that the FC card is connected to the FC switch, a physical FC port in the FC card is virtualized to obtain a plurality of virtual FC ports, and a single input / output virtualization is performed on the FC card to obtain a plurality of PCIe VFs.

[0062] In some embodiments, the sharing module 120 is further used to:

[0063] Acquire a target configuration file, wherein the target configuration file includes a first relationship table and a second relationship table;

[0064] Allocate one of the virtual FC ports to each of the PCIe VFs according to the first relationship table, wherein the first relationship table is used to store a correspondence between the PCIe VFs and the virtual FC ports; and

[0065] According to the second relationship table, the plurality of PCIe VFs are allocated to different storage controllers in the storage device, and the second relationship table is used to store the corresponding relationship between the PCIe VFs and the storage controllers.

[0066] In some embodiments, one of the storage controllers corresponds to one or more of the PCIe VFs.

[0067] It should be noted that those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working process of the FC card described above can refer to the corresponding process in the aforementioned FC card sharing method embodiment, which will not be repeated here.

[0068] See also Figure 7 , Figure 7 It is a schematic block diagram of the structure of a storage device provided by an embodiment of the present invention.

[0069] like Figure 7 As shown, the storage device 200 includes multiple disk array cards 210, multiple storage controllers 220, and one or more FC cards 100. One disk array card 210 is connected to one storage controller 220, the FC card 100 is used to connect multiple storage controllers 220 and FC switches, and the FC switch is connected to the server, so that the server can communicate with multiple storage controllers 220 through the FC switch and the FC card 100. Among them, the storage device 200 may include multiple card slots, the FC card 100 may be installed in any card slot of the storage device 200, and the disk array card 210 may also be installed in any card slot of the storage device 200, different FC cards 100 are installed in different card slots of the storage device 200, and the FC card 100 and the disk array card 210 are installed in different card slots of the storage device 200, respectively.

[0070] It should be noted that those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working process of the storage device 200 described above can refer to the corresponding process in the aforementioned FC card sharing method embodiment, and will not be repeated here.

[0071] An embodiment of the present invention further provides a storage medium for computer-readable storage, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement any FC card sharing method provided in the description of the embodiment of the present invention.

[0072] The storage medium may be an internal storage unit of the FC card or storage device described in the above embodiment, such as a hard disk or memory of the FC card or storage device. The storage medium may also be an external storage device of the FC card or storage device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc., equipped on the FC card or storage device.

[0073] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In a hardware embodiment, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those of ordinary skill in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0074] It should be understood that the term "and / or" used in the present specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, including these combinations. It should be noted that, in this article, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "including a..." does not exclude the presence of other identical elements in the process, method, article or system including the element.

[0075] The serial numbers of the embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments. The above description is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A FC card sharing method, characterized in that: include: Virtualizing a physical FC port in the FC card to obtain a plurality of virtual FC ports, and virtualizing a single input / output of the FC card to obtain a plurality of PCIe VFs; One virtual FC port is allocated to each PCIe VF, and a plurality of the PCIe VFs are allocated to different storage controllers in a storage device, so that the FC card can be shared by different storage controllers.

2. The FC card sharing method according to claim 1, characterized in that: The step of virtualizing the physical FC port in the FC card to obtain multiple virtual FC ports, and virtualizing a single input / output of the FC card to obtain multiple PCIe VFs, includes: Obtaining the number of storage controllers, where the number of storage controllers is the number of storage controllers included in the storage device; According to the number of the storage controllers, the physical FC port in the FC card is virtualized to obtain a plurality of virtual FC ports, and a single input / output virtualization is performed on the FC card to obtain a plurality of PCIe VFs; The number of the virtual FC ports is the same as the number of the PCIe VFs, and the number of the virtual FC ports is less than, equal to, or greater than the number of the storage controllers.

3. The FC card sharing method according to claim 1, characterized in that: The step of virtualizing the physical FC port in the FC card to obtain multiple virtual FC ports, and virtualizing a single input / output of the FC card to obtain multiple PCIe VFs, includes: When it is detected that the FC card is connected to the FC switch, a physical FC port in the FC card is virtualized to obtain a plurality of virtual FC ports, and a single input / output virtualization is performed on the FC card to obtain a plurality of PCIe VFs.

4. The FC card sharing method according to claim 1, characterized in that: The allocating one virtual FC port to each PCIe VF and allocating multiple PCIe VFs to different storage controllers in the storage device includes: Acquire a target configuration file, wherein the target configuration file includes a first relationship table and a second relationship table; Allocate one of the virtual FC ports to each of the PCIe VFs according to the first relationship table, wherein the first relationship table is used to store a correspondence between the PCIe VFs and the virtual FC ports; and According to the second relationship table, the plurality of PCIe VFs are allocated to different storage controllers in the storage device, and the second relationship table is used to store the corresponding relationship between the PCIe VFs and the storage controllers.

5. The FC card sharing method according to any one of claims 1 to 4, characterized in that: One storage controller corresponds to one or more PCIe VFs.

6. An FC card, characterized in that: include: The FC chip is used to virtualize the physical FC port in the FC card to obtain n virtual FC ports, and to virtualize a single input / output of the FC card to obtain n PCIe VFs, where n is an integer greater than or equal to 2; The sharing module is used to allocate one virtual FC port to each PCIe VF and allocate n PCIe VFs to different storage controllers in the storage device, so that the FC card can be shared by different storage controllers.

7. The FC card according to claim 6, characterized in that: The FC card includes one or more physical FC ports, and the port rate of the physical FC port includes 8 Gbps, 16 Gbps or 32 Gbps.

8. The FC card according to claim 6, characterized in that: The FC card includes a plurality of the physical FC ports, and the numbers of the virtual FC ports corresponding to different physical FC ports are the same or different.

9. A storage device, characterized in that: The method comprises a plurality of disk array cards, a plurality of storage controllers and one or more FC cards as claimed in any one of claims 6 to 8, wherein one of the disk array cards is connected to one of the storage controllers; The FC card is used to connect the plurality of storage controllers and the FC switch, and the FC switch is connected to a server, so that the server can communicate with the plurality of storage controllers through the FC switch and the FC card.

10. A storage medium for computer-readable storage, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the FC card sharing method according to any one of claims 1 to 5.

Citation Information

Cited By

  • Storage device and processing method thereof, centralized storage system and electronic equipment

    CN120540599A