WO2017054697A1 - 在sas存储系统中实现hba卡访问sata磁盘的方法及设备 - Google Patents

在sas存储系统中实现hba卡访问sata磁盘的方法及设备 Download PDF

Info

Publication number
WO2017054697A1
WO2017054697A1 PCT/CN2016/100246 CN2016100246W WO2017054697A1 WO 2017054697 A1 WO2017054697 A1 WO 2017054697A1 CN 2016100246 W CN2016100246 W CN 2016100246W WO 2017054697 A1 WO2017054697 A1 WO 2017054697A1
Authority
WO
WIPO (PCT)
Prior art keywords
whitelist
sata disk
hba card
hba
identifier
Prior art date
Application number
PCT/CN2016/100246
Other languages
English (en)
French (fr)
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 WO2017054697A1 publication Critical patent/WO2017054697A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers

Definitions

  • the present invention relates to the technical field of data storage, and more particularly to a method and device for implementing an HBA card to access a SATA disk in a SAS storage system.
  • SAS Serial Attached SCSI
  • SCSI Serial ATA
  • SATA Serial ATA
  • the SAS interface technology can be backward compatible with SATA, that is, SAS disks or SATA disks can be installed on the SAS interface. SATA disks are inexpensive, and SAS disks are not cheap, so SATA disks are preferred over expensive SAS disks when implementing storage solutions.
  • FIG. 1 schematically illustrates a SAS storage system 100 including a plurality of terminal devices connected by an expander interconnect set 110, including SAS disks 101 and 102, SATA disks 103 and 104, and HBA cards 105 and 106.
  • Patent application CN 101488077 discloses a redundant HBA card system in which two identical HBA cards are inserted on the server motherboard, and each HBA card is considered to be independent of each other. Each HBA card can form a complete system with all other components, and two HBA cards form two redundant Remaining, mutual backup system.
  • FIG. 2 schematically shows a case where two HBAs cause the SATA disk of the SAS domain to not work properly.
  • FIG. 2 schematically illustrates a SAS storage system 200 including an expander set 210, SAS disks 201 and 202 in normal operation, SATA disks 203 and 204, and HBA card 206, and a newly accessed terminal device HBA card. 205.
  • HBA card 206 When the HBA card 206 is accessing the SATA disk 204, there is an access channel 214 between them. If another HBA card 205 is accessed at this time, the HBA is attempted to establish the HBA according to the driver of the existing HBA card.
  • the data link between the card and all SATA disks will preempt the access channel between the HBA card 206 and the SATA disk 204, causing the existing data link of the HBA card 206 and the SATA disk 204 to be interrupted, resulting in abnormal access of the SATA disk 204.
  • one of the purposes of the embodiments of the present invention is to solve the problem of preemption of SATA disks that may occur in multiple HBA cards accessed in the SAS domain.
  • a method of implementing an HBA card access to a SATA disk in a SAS storage system includes: obtaining an identifier of the HBA card and an identifier of at least one SATA disk in the SAS storage system; accessing a whitelist including an HBA card identifier and a SATA disk identifier to obtain the HBA card An associated whitelist item, wherein the whitelist is configured such that one of the at least one SATA disk can be accessed by only one HBA card at the same time; and the HBA card is caused according to the obtained whitelist entry Accessing the SATA disk in the whitelist entry in the at least one SATA disk.
  • an apparatus for implementing an HBA card to access a SATA disk in a SAS storage system includes: an identifier obtaining means, configured to acquire an identifier of the HBA card and an identifier of at least one SATA disk in the SAS storage system; a whitelist item obtaining means for accessing an HBA card identifier and a whitelist of SATA disk identifiers for obtaining a whitelist entry associated with the HBA card, wherein the whitelist is configured such that one of the at least one SATA disk can be accessed by only one HBA card at a time And the access device, configured to enable the HBA card to access the SATA disk in the whitelist item in the at least one SATA disk according to the obtained whitelist item.
  • a computer program product embodied in a computer readable storage medium having computer readable program code portions stored therein, the computer readable program code The portion is configured to perform according to the aforementioned method.
  • the computer readable program code portion includes: a first executable portion for acquiring an identifier of the HBA card and an identifier of at least one SATA disk in the SAS storage system; a second executable portion, Used to access a whitelist including an HBA card identifier and a SATA disk identifier to obtain a whitelist entry associated with the HBA card, wherein the whitelist is configured to cause a SATA in the at least one SATA disk The disk can be accessed by only one HBA card at the same time; and the third executable part is configured to enable the HBA card to access the whitelist entry in the at least one SATA disk according to the obtained whitelist entry SATA disk.
  • the problem of preempting the SATA disk that may occur when implementing the redundantly backed up HBA card in the SAS domain is solved.
  • FIG 1 schematically illustrates an example SAS storage system in the prior art
  • FIG. 2 is a schematic diagram showing a preemptive access channel that may occur between multiple HBA cards and SATA disks in a SAS storage system in the prior art
  • FIG. 3 illustrates a flow chart of a method of implementing an HBA card access to a SATA disk in a SAS storage system in accordance with an embodiment of the present invention
  • 4A and 4B illustrate an example of a whitelist in accordance with an embodiment of the present invention
  • FIG. 5 illustrates a block diagram of an apparatus for implementing an HBA card access to a SATA disk in a SAS storage system, in accordance with an embodiment of the present invention.
  • FIG. 3 a flow diagram of a method 300 of implementing an HBA card access SATA disk in a SAS storage system in accordance with various embodiments of the present invention is shown.
  • an identifier of the HBA card and an identifier of at least one SATA disk in the SAS storage system are acquired.
  • a whitelist including the HBA card identifier and the SATA disk identifier is accessed to obtain a whitelist entry associated with the HBA card.
  • the whitelist entry includes the HBA card identifier and the SATA disk identifier that are paired with each other.
  • the whitelist is configured such that one SATA disk in at least one SATA disk can only be accessed by one HBA card at a time.
  • step S330 the HBA card is caused to access the SATA disk in the whitelist item in the at least one SATA disk according to the obtained whitelist item.
  • the HBA card identifier and the SATA disk identifier are represented by SAS addresses in the SAS domain.
  • all terminal devices, including disks and HBA cards, have a unique and fixed SAS address, so each terminal device can be uniquely identified by the SAS address.
  • the SAS address is used as the HBA card identifier and the SATA disk identifier
  • the HBA card identifier and the SATA disk identifier may also be otherwise capable of being performed in the SAS system. Different forms, such as different naming, numbering, etc. of different terminal devices.
  • the driver will enforce the operation of clearing the existing data link for all SATA disk devices, that is, it will preempt other HBA cards and the SATA disk link, resulting in other access to the SATA disk.
  • the HBA card can no longer read data from the SATA disk.
  • a technique of controlling access of a HBA card to a SATA disk by a whitelist is implemented, and the problem of preemption is solved.
  • a whitelist kernel module is implemented.
  • the kernel module maintains a whitelist, wherein the whitelist entry can be composed of an HBA card SAS address and a SATA disk SAS address, such as 0x0000000000001111 and 0x0000000000000005, indicating that the allowed address is
  • the HBA card of the 0x0000000000001111 accesses the SATA disk with the address 0x0000000000005; otherwise, if the SATA disk SAS address is not in the whitelist entry corresponding to the HAB, the HBA card is not allowed to access the SATA disk.
  • the Whitelist kernel module can be managed and configured, for example, by the procfs file system.
  • the following executable files can be set, namely add, del, and list:
  • ⁇ /proc/whitelist/add file used to add a whitelist entry. It is added by writing (HBA card SAS address: SATA disk SAS address). For example, writing "0x0000000000001111: 0x0000000000000005" means adding the corresponding whitelist entry.
  • ⁇ /proc/whitelist/del file Deletes the whitelist entry and deletes it by writing (HBA card SAS address: SATA disk SAS address). For example, writing "0x0000000000001111:0x0000000000000005" means deleting the corresponding whitelist entry;
  • ⁇ /proc/whitelist/list file Obtain the list of existing whitelist items by reading the contents of the file.
  • the HBA obtains a white list associated with the HBA card, and scans all devices in the SAS domain according to the SAS protocol to obtain basic information such as the type and SAS address of each device. And report this information to the HBA driver.
  • the whitelist kernel module can be implemented in each computer system of the SAS domain such that each HBA card in one or more HBA cards in each computer system can be from the same whitelist kernel
  • the module gets a whitelist, for example by accessing a list file, or executing an executable command like the output of a list file.
  • the manner in which the HBA card acquires the whitelist associated with the HBA card may further include loading a whitelist pre-configured by a third-party vendor from the firmware of the HAB card or from a separate domain in the SAS domain.
  • the server or database gets the whitelist it maintains for the entire SAS domain.
  • the process of controlling the HBA card and the SATA to establish a data link through the whitelist mechanism may be: before the HBA card attempts to access each SATA disk, the HBA card driver The sequence has obtained the SAS address of the HBA card itself and the SAS address of the SATA disk. Based on these two addresses, the whitelist is checked for matching items:
  • different whitelist entries can be configured for different HBA cards to ensure that one SATA disk is only accessed by one HBA card at the same time, thereby avoiding the problem of being preempted.
  • 4A and 4B illustrate examples of whitelisting, respectively, in accordance with an embodiment of the present invention. As shown in FIG. 4A and FIG. 4B, it shows two SATA disks whose HBA access SAS addresses are 0x0000000000000005 and 0x0000000000000006 at a certain time (FIG. 4A) allowing the SAS address to be 0x000000001111, allowing another HBA with a SAS address of 0x000000001112.
  • the method may also include the steps of creating, modifying, and/or deleting a whitelist.
  • the method may further comprise the step of deleting, and/or adding a whitelisted item. Further, when the whitelist item is deleted in real time, the HBA card driver checks whether a connection has been established with the SATA disk, and if so, the link is automatically closed; when the whitelist is added in real time, only the SATA disk, the HBA card needs to be reset. The driver will automatically connect to the SATA disk.
  • FIG. 5 is a schematic diagram of implementing an HBA card in a SAS storage system according to various embodiments of the present invention.
  • the device 500 may include: an identifier obtaining means 510, configured to acquire an identifier of the HBA card and an identifier of at least one SATA disk in the SAS storage system; and a whitelist entry obtaining means 520 for accessing the HBA card identifier and the SATA a whitelist of disk identifiers for obtaining a whitelist entry associated with the HBA card; and access device 530 for causing the HBA card to access the whitelist of the at least one SATA disk based on the obtained whitelist entry The SATA disk in the entry.
  • the whitelist entry includes the HBA card identifier and the SATA disk identifier that are paired with each other.
  • the whitelist is configured such that one SATA disk in at least one SATA disk can only be accessed by one HBA card at a time.
  • device 500 may also include means for creating, modifying, and/or deleting whitelists, and/or a whitelist for adding and/or deleting whitelisted items in the whitelist. Item addition and deletion device.
  • each device recited in device 500 corresponds to each step in method 300 described with reference to FIG.
  • the operations and features described above with respect to FIG. 3 are equally applicable to device 500 and the devices included therein, and the repeated content is not described herein.
  • the teachings of the present invention may also be embodied as a computer program product of a computer readable storage medium, comprising computer program code which, when executed by a processor, enables a processor to be implemented in accordance with a method of an embodiment of the present invention
  • the multi-HBA card access SATA disk is implemented in the SAS storage system according to the embodiment of the present disclosure.
  • the computer storage medium can be any tangible medium such as a floppy disk, CD-ROM, DVD, hard drive, or even network media.
  • the HBA card can only access the SAS in the white list corresponding to the identifier of the HBA card.
  • the SATA disk in the domain avoids the problem that the newly accessed HBA card in the SAS domain will preempt the access channel between the existing HBA card and the SATA disk.
  • the method or apparatus of the embodiments of the present invention is implemented in the form of software such as an HBA card driver, but it should be understood that the method or apparatus of the embodiments of the present invention may be implemented by software, hardware or software and hardware.
  • the hardware portion can be implemented using dedicated logic; the software portion can be stored in memory and executed by a suitable instruction execution system, such as a microprocessor or dedicated design hardware.
  • processor control code such as a carrier medium such as a magnetic disk, CD or DVD-ROM, such as a read only memory.
  • Such code is provided on a programmable memory (firmware) or on a data carrier such as an optical or electronic signal carrier.
  • the method and apparatus of the present invention may be implemented by hardware circuits such as very large scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, etc., or programmable hardware devices such as field programmable gate arrays, programmable logic devices, etc., also It can be implemented by software executed by various types of processors, or by a combination of the above-described hardware circuits and software such as firmware.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Stored Programmes (AREA)
  • Debugging And Monitoring (AREA)

Abstract

在SAS存储系统中实现HBA卡访问SATA磁盘的方法和设备。该方法包括:获取HBA卡的标识符和SAS存储系统中的至少一个SATA磁盘的标识符(S310);访问包括HBA卡标识符和SATA磁盘标识符的白名单,以便获取与HBA卡相关联的白名单项(S320),其中白名单被配置为使得至少一个SATA磁盘中的一块SATA磁盘同时只能被一个HBA卡访问;以及根据所获取的白名单项,使得HBA卡访问至少一个SATA磁盘中的处在白名单项中的SATA磁盘(S330)。解决了SAS域中在实现冗余备份HBA卡时可能出现的抢占SATA磁盘的问题。

Description

在SAS存储系统中实现HBA卡访问SATA磁盘的方法及设备 技术领域
本发明涉及数据存储的技术领域,更具体地,涉及在SAS存储系统中实现HBA卡访问SATA磁盘的方法及设备。
发明背景
SAS(Serial Attached SCSI、串行连接SCSI)是新一代的SCSI(小型计算机系统接口)技术,和现在流行的SATA(Serial ATA、串行ATA)磁盘相同,都是采用串行技术以获得更高的数据传输速度,并通过缩短连结线来获得改善的内部空间等优势。SAS的接口技术可以向下兼容SATA,即可以在SAS接口上安装SAS磁盘或者SATA磁盘。SATA磁盘费用低廉,而SAS磁盘则并不便宜,因此在实现存储方案时会优先选用SATA磁盘来替代昂贵的SAS磁盘。
在一个SAS存储系统中,终端设备,包括磁盘和主机适配器(也称为HBA卡),连接到扩展器(Expander)上,同时扩展器相互连接,构成一个网络结构,称为SAS域,连接到同一个SAS域中的各种设备可以建立数据链接进行通信。图1示意性地示出了SAS存储系统100,其包括通过扩展器互连集合110连接的多个终端设备,包括SAS磁盘101和102、SATA磁盘103和104、以及HBA卡105和106。
为了实现高可用,即在SAS域中的一块HBA卡失效后由另外一块HBA卡接管磁盘,可以在同一个SAS域同时接入多块HBA卡,相互作为备份,以便在一个HBA卡损坏的情况下快速切换。专利申请CN 101488077(公开日为2009年7月22日)公开了一种冗余HBA卡系统,其在服务器主板上插两块相同的HBA卡,每块HBA卡都被认为是相互独立的,每块HBA卡均能与其他所有部件组成一个完整的系统,两块HBA卡构成了两个互为冗 余、互为备份的系统。
然而,在实践中,在SAS域中接入SATA磁盘的情况下,如果同时又有多个HBA卡接入该SAS域,那么就会存在抢占的问题:相对于SAS磁盘来说,SATA磁盘只支持单通道,即同一时间内,只能由一个HBA来访问该磁盘。如果在SAS域中,同时接入多个HBA卡,那么这些HBA卡就会不断的抢占SATA磁盘的访问通道,导致系统不能正常工作。图2示意性示出了两块HBA导致SAS域的SATA磁盘无法正常工作的情况。
图2示意性地示出了SAS存储系统200,其包括扩展器集合210,正常工作中的SAS磁盘201和202、SATA磁盘203和204、和HBA卡206,以及新接入的终端设备HBA卡205。当HBA卡206正在访问SATA磁盘204的情况下,在它们之间存在访问通道214,此时若再接入另外一个HBA卡205,则根据现有HBA卡的驱动程序实现,会尝试建立该HBA卡与所有SATA磁盘的数据链接,因而会抢占HBA卡206和SATA磁盘204之间的访问通道,导致会中断HBA卡206和SATA磁盘204的现有数据链接,造成SATA磁盘204的访问异常。
发明内容
有鉴于此,本发明实施方式的目的之一在于解决前述的SAS域中接入的多个HBA卡会出现的对于SATA磁盘的抢占问题。
根据本发明的一个方面,提供一种在SAS存储系统中实现HBA卡访问SATA磁盘的方法。该方法包括:获取所述HBA卡的标识符和所述SAS存储系统中的至少一个SATA磁盘的标识符;访问包括HBA卡标识符和SATA磁盘标识符的白名单,以便获取与所述HBA卡相关联的白名单项,其中所述白名单被配置为使得所述至少一个SATA磁盘中的一块SATA磁盘同时只能被一个HBA卡访问;以及根据所获取的白名单项,使得所述HBA卡访问所述至少一个SATA磁盘中的处在所述白名单项中的SATA磁盘。
根据本发明的另一个方面,提供一种在SAS存储系统中实现HBA卡访问SATA磁盘的设备。该设备包括:标识符获取装置,用于获取所述HBA卡的标识符和所述SAS存储系统中的至少一个SATA磁盘的标识符;白名单项获取装置,用于访问包括HBA卡标识符和SATA磁盘标识符的白名单,以便获取与所述HBA卡相关联的白名单项,其中所述白名单被配置为使得所述至少一个SATA磁盘中的一块SATA磁盘同时只能被一个HBA卡访问;以及访问装置,用于根据所获取的白名单项,使得所述HBA卡访问所述至少一个SATA磁盘中的处在所述白名单项中的SATA磁盘。
根据本发明的又一个方面,提供一种在计算机可读存储介质中实现的计算机程序产品,所述计算机可读存储介质具有存储于其中的计算机可读程序代码部分,所述计算机可读程序代码部分被配置为执行根据前述方法。比如,所述计算机可读程序代码部分包括:第一可执行部分,用于获取所述HBA卡的标识符和所述SAS存储系统中的至少一个SATA磁盘的标识符;第二可执行部分,用于访问包括HBA卡标识符和SATA磁盘标识符的白名单,以便获取与所述HBA卡相关联的白名单项,其中所述白名单被配置为使得所述至少一个SATA磁盘中的一块SATA磁盘同时只能被一个HBA卡访问;以及第三可执行部分,用于根据所获取的白名单项,使得所述HBA卡访问所述至少一个SATA磁盘中的处在所述白名单项中的SATA磁盘。
根据本发明的实施方式,解决了SAS域中的在实现冗余备份的HBA卡时可能出现的抢占SATA磁盘的问题。
从下文结合附图所做出的详细描述中,本发明的这些和其他优点和特征将变得明显,其中在整个下文描述的若干附图中,类似的元件将具有类似的编号。
附图简要说明
图1示意性地示出了现有技术中的一个示例SAS存储系统;
图2示意性地示出了现有技术中的、SAS存储系统中的多个HBA卡和SATA磁盘之间可能发生的抢占访问通道的情形;
图3图示根据本发明的实施方式的在SAS存储系统中实现HBA卡访问SATA磁盘的方法的流程图;
图4A和图4B图示根据本发明的实施方式的白名单的示例;以及
图5图示根据本发明的实施方式的在SAS存储系统中实现HBA卡访问SATA磁盘的设备的框图。
实施本发明的方式
下文将参考附图更完整地描述本公开内容,其中在附图中显示了本公开内容的实施方式。但是这些实施方式可以用许多不同形式来实现并且不应该被解释为限于本文所述的实施方式。相反地,提供这些实例以使得本公开内容将是透彻和完整的,并且将全面地向本领域的熟练技术人员表达本公开内容的范围。
下面结合附图以示例的方式详细描述本发明的各种实施方式。
参考图3,其示出了本发明的各种实施方式在SAS存储系统中实现HBA卡访问SATA磁盘的方法300的流程图。
在步骤S310,获取HBA卡的标识符和SAS存储系统中的至少一个SATA磁盘的标识符。
在步骤S320,访问包括HBA卡标识符和SATA磁盘标识符的白名单,以便获取与HBA卡相关联的白名单项。白名单项包括相互配对的HBA卡标识符和SATA磁盘标识符。白名单被配置为使得至少一个SATA磁盘中的一块SATA磁盘同时只能被一个HBA卡访问。
在步骤S330,根据所获取的白名单项,使得HBA卡访问所述至少一个SATA磁盘中的处在白名单项中的SATA磁盘。
应当注意,尽管出于简化说明的目的将该方法表示和描述为一连串动作,但是应理解和认识到要求保护的主题内容将不受这些动作的执行顺序所限制,因为一些动作可以按照与这里示出和描述的顺序不同的顺序出现或者与其它动作并行地出现,同时一些动作还可能包括若干子步骤,而这些子步骤之间可能出现时序上交叉执行的可能。另外,可能并非所有图示的动作是实施根据所附权利要求书所述的方法所必须的。再者,前述步骤的描述不排除该方法还可以包括可能取得附加效果的附加步骤。
在一个实施例中,HBA卡标识符和SATA磁盘标识符采用SAS域中的SAS地址来表示。在一个SAS域中,所有终端设备,包括磁盘和HBA卡,都会拥有一个唯一且固定的SAS地址,因此可以通过SAS地址来唯一标识每一个终端设备。
应当理解,虽然在上述实施例中,采用SAS地址作为HBA卡标识符和SATA磁盘标识符,但是在其他的实施例中,HBA卡标识符和SATA磁盘标识符也可以为其他能够在SAS系统进行相互区分的形式,比如不同终端设备的不同的命名、编号等。
在现有HBA卡驱动程序实现中,驱动程序会对所有SATA磁盘设备强制执行清除已有的数据链接的操作,即会抢占其他HBA卡和该SATA磁盘的链接,导致正在访问该SATA磁盘的其他HBA卡不能再从该SATA磁盘读取数据。然而,根据本发明的各种实施方式,实现了通过白名单来控制HBA卡对SATA磁盘访问的技术,解决了抢占的问题。
在一个实施例中,实现了一个whitelist内核模块,该内核模块维护一张白名单,其中的白名单项可以由一个HBA卡SAS地址和SATA磁盘SAS地址构成,比如0x0000000000001111和0x0000000000000005,表示允许地址为0x0000000000001111的HBA卡访问地址为0x0000000000000005的SATA磁盘;反之,如果SATA磁盘SAS地址不在与该HAB存在对应关系的白名单项中,则不允许该HBA卡访问该SATA磁盘。
Whitelist内核模块例如可以通过procfs文件系统来管理和配置,例如,可以设置如下的可执行文件,即add、del和list:
●/proc/whitelist/add文件:用于添加白名单项,通过写入(HBA卡SAS地址:SATA磁盘SAS地址)对来添加,比如写入“0x0000000000001111:0x0000000000000005”表示添加对应的白名单项;
●/proc/whitelist/del文件:用于删除白名单项,通过写入(HBA卡SAS地址:SATA磁盘SAS地址)对来删除,比如写入“0x0000000000001111:0x0000000000000005”表示删除对应的白名单项;
●/proc/whitelist/list文件:通过读取该文件内容,得到现有的白名单项列表。
在其他实施方式中,也可以利用可执行命令来实现以上的add、del和list等操作。
在一个实施例中,在HBA卡的初始化过程中,HBA卡获取与该HBA卡相关联的白名单,同时按照SAS协议扫描SAS域中的所有设备,得到各个设备的类型和SAS地址等基本信息,并将这些信息汇报给HBA驱动程序。
在所描述的实施例中,可以在SAS域的每台计算机系统中实现whitelist内核模块,这样,每台计算机系统中的一个或多个HBA卡中的每个HBA卡可以从该同一个whitelist内核模块获得白名单,例如通过访问list文件,或者执行类似具有list文件的输出结果的可执行命令。
根据本发明的其他实施方式,例如,HBA卡获取与该HBA卡相关联的白名单的方式还可以包括从HAB卡的固件中加载由第三方厂商预先配置的白名单或者从SAS域中的单独的服务器或数据库处获得其所维护的针对整个SAS域的白名单。
在一个实施例中,通过白名单机制来控制HBA卡和SATA建立数据链接的过程可以为:在HBA卡尝试访问每一个SATA磁盘前,HBA卡驱动程 序已经获得HBA卡本身的SAS地址和SATA磁盘的SAS地址,根据这两个地址查询白名单中是否有匹配的项:
●如果有,则按照原有流程和SATA磁盘建立数据链接,并访问该SATA磁盘上的数据;
●否则,跳过该SATA磁盘,这样就不会影响该SATA磁盘和其他HBA卡之间的数据链接。
根据本发明的实施方式,可以为不同的HBA卡配置不同的白名单项,保证一块SATA磁盘只会同时被一个HBA卡访问,避免被抢占的问题。图4A和图4B分别图示了根据本发明的实施方式的白名单的示例。如图4A和图4B所示,其示出了在某一时刻(图4A)允许SAS地址为0x0000000000001111的HBA访问SAS地址为0x0000000000000005和0x0000000000000006的两块SATA磁盘,允许SAS地址为0x0000000000001112的另一块HBA访问SAS地址为0x0000000000000007和0x0000000000000009的两块SATA磁盘;而在另一时刻(图4B),则允许SAS地址为0x0000000000001111的HBA访问SAS地址为0x0000000000000005、0x0000000000000006和0x0000000000000007的三块SATA磁盘,只允许SAS地址为0x0000000000001112的另一块HBA访问SAS地址为0x0000000000000009的SATA磁盘。
在一种实施方式中,所述方法还可以包括创建、修改、和/或删除白名单的步骤。
在一种实施方式中,所述方法还可以包括删除、和/或添加白名单项的步骤。进一步地,当实时删除白名单项时,HBA卡驱动程序检查是否已经和该SATA磁盘建立连接,如果是,会自动关闭链接;当实时添加白名单时,只需要重置一下SATA磁盘,HBA卡驱动程序会自动连接到该SATA磁盘。
图5示意性根据本发明的各种实施方式在SAS存储系统中实现HBA卡 访问SATA磁盘的设备500的框图。设备500可以包括:标识符获取装置510,用于获取HBA卡的标识符和SAS存储系统中的至少一个SATA磁盘的标识符;白名单项获取装置520,用于访问包括HBA卡标识符和SATA磁盘标识符的白名单,以便获取与HBA卡相关联的白名单项;以及访问装置530,用于根据所获取的白名单项,使得HBA卡访问所述至少一个SATA磁盘中的处在白名单项中的SATA磁盘。
白名单项包括相互配对的HBA卡标识符和SATA磁盘标识符。白名单被配置为使得至少一个SATA磁盘中的一块SATA磁盘同时只能被一个HBA卡访问。
在进一步的实施例中,设备500还可以包括用于白名单的创建、修改、和/或删除的装置,和/或用于在所述白名单中添加和/或删除白名单项的白名单项增删装置。
应当理解,设备500中记载的每个装置与参考图3描述的方法300中的每个步骤相对应。由此,上文针对图3描述的操作和特征同样适用于设备500及其中包含的装置,重复的内容在此不再赘述。
本发明的教导还可以实现为一种计算机可读存储介质的计算机程序产品,包括计算机程序代码,当计算机程序代码由处理器执行时,其使得处理器能够按照本发明实施方式的方法来实现如本文实施方式所述的在SAS存储系统中实现多HBA卡访问SATA磁盘。计算机存储介质可以为任何有形媒介,例如软盘、CD-ROM、DVD、硬盘驱动器、甚至网络介质等。
根据本发明的实施方式,包括前述方法和设备,按照包括HBA卡标识符和SATA磁盘标识符的白名单,使得HBA卡仅能够访问白名单中的与该HBA卡的标识符存在对应关系的SAS域中的SATA磁盘,从而避免了SAS域中新接入的HBA卡会对已经存在的HBA卡和SATA磁盘之间的访问通道造成抢占的问题。根据本发明的实施方式,只需要在第一次访问SATA磁盘时检查白名单,之后读取写入数据都不必再次检查白名单,对磁盘读 写性能没有任何影响。
在前述实施例中,将本发明的实施方式的方法或设备实现为比如HBA卡驱动程序的软件形式,但是应当理解,本发明的实施方式的方法或设备可以被依软件、硬件或者软件和硬件的结合来实现。硬件部分可以利用专用逻辑来实现;软件部分可以存储在存储器中,由适当的指令执行系统,例如微处理器或者专用设计硬件来执行。本领域的普通技术人员可以理解上述的方法和设备可以使用计算机可执行指令和/或包含在处理器控制代码中来实现,例如在诸如磁盘、CD或DVD-ROM的载体介质、诸如只读存储器(固件)的可编程的存储器或者诸如光学或电子信号载体的数据载体上提供了这样的代码。本发明的方法和设备可以由诸如超大规模集成电路或门阵列、诸如逻辑芯片、晶体管等的半导体、或者诸如现场可编程门阵列、可编程逻辑设备等的可编程硬件设备的硬件电路实现,也可以用由各种类型的处理器执行的软件实现,也可以由上述硬件电路和软件的结合例如固件来实现。
应当理解,尽管在上文的详细描述中提及了系统的若干装置或子装置,但是这种划分仅仅是示例性而非强制性的。实际上,根据本发明的示例性实施方式,上文描述的两个或更多装置的特征和功能可以在一个装置中实现。反之,上文描述的一个装置的特征和功能可以进一步划分为由多个装置来实现。
还应当理解,为了不模糊本发明的实施方式,说明书仅对一些关键、未必必要的技术和特征进行了描述,而可能未对一些本领域技术人员能够实现的特征做出说明。
以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换等,均应包含在本发明的保护范围之内。

Claims (7)

  1. 一种在SAS存储系统中实现HBA卡访问SATA磁盘的方法,其特征在于,包括:
    获取所述HBA卡的标识符和所述SAS存储系统中的至少一个SATA磁盘的标识符;
    访问包括HBA卡标识符和SATA磁盘标识符的白名单,以便获取与所述HBA卡相关联的白名单项,其中所述白名单被配置为使得所述至少一个SATA磁盘中的一块SATA磁盘同时只能被一个HBA卡访问;以及
    根据所获取的白名单项,使得所述HBA卡访问所述至少一个SATA磁盘中的处在所述白名单项中的SATA磁盘。
  2. 根据权利要求1所述的方法,其特征在于,所述白名单针对以下项之一进行配置:
    每个HBA卡;
    允许连接多个HBA卡的每台计算机;或者
    整个SAS存储系统。
  3. 根据权利要求1或2所述的方法,其特征在于,进一步包括:
    在所述白名单中添加和/或删除白名单项,其中,
    当在所述白名单中添加白名单项时,所述方法还包括:建立所添加的白名单项所表示的HBA卡和SATA磁盘之间的访问通道,或者
    当在所述白名单中删除白名单项时,所述方法还包括:关闭所删除的白名单项所表示的HBA卡和SATA磁盘之间的访问通道。
  4. 一种在SAS存储系统中实现HBA卡访问SATA磁盘的设备,其特征在于,包括:
    标识符获取装置,用于获取所述HBA卡的标识符和所述SAS存储系统中的至少一个SATA磁盘的标识符;
    白名单项获取装置,用于访问包括HBA卡标识符和SATA磁盘标识符 的白名单,以便获取与所述HBA卡相关联的白名单项,其中所述白名单被配置为使得所述至少一个SATA磁盘中的一块SATA磁盘同时只能被一个HBA卡访问;以及
    访问装置,用于根据所获取的白名单项,使得所述HBA卡访问所述至少一个SATA磁盘中的处在所述白名单项中的SATA磁盘。
  5. 根据权利要求4所述的设备,其特征在于,所述白名单针对以下项之一进行配置:
    每个HBA卡;
    允许连接多个HBA卡的每台计算机;或者
    整个SAS存储系统。
  6. 根据权利要求4或5所述的设备,其特征在于,进一步包括:
    白名单项增删装置,用于在所述白名单中添加和/或删除白名单项,其中,
    当在所述白名单中添加白名单项时,所述设备还包括:用于建立所添加的白名单项所表示的HBA卡和SATA磁盘之间的访问通道的装置,或者
    当在所述白名单中删除白名单项时,所述设备还包括:用于关闭所删除的白名单项所表示的HBA卡和SATA磁盘之间的访问通道的装置。
  7. 一种在计算机可读存储介质中实现的计算机程序产品,所述计算机可读存储介质具有存储于其中的计算机可读程序代码部分,所述计算机可读程序代码部分被配置为执行根据权利要求1-3所述的方法。
PCT/CN2016/100246 2015-09-28 2016-09-27 在sas存储系统中实现hba卡访问sata磁盘的方法及设备 WO2017054697A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510626055.8 2015-09-28
CN201510626055.8A CN105260137B (zh) 2015-09-28 2015-09-28 在sas存储系统中实现hba卡访问sata磁盘的方法及设备

Publications (1)

Publication Number Publication Date
WO2017054697A1 true WO2017054697A1 (zh) 2017-04-06

Family

ID=55099844

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/100246 WO2017054697A1 (zh) 2015-09-28 2016-09-27 在sas存储系统中实现hba卡访问sata磁盘的方法及设备

Country Status (2)

Country Link
CN (1) CN105260137B (zh)
WO (1) WO2017054697A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113296704A (zh) * 2021-05-27 2021-08-24 济南浪潮数据技术有限公司 Sas hba卡固件日志的在线并行收集方法、装置及设备
CN115186255A (zh) * 2022-09-13 2022-10-14 北京六方云信息技术有限公司 工业主机白名单提取方法、装置、终端设备以及存储介质

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105260137B (zh) * 2015-09-28 2018-06-22 天津书生云科技有限公司 在sas存储系统中实现hba卡访问sata磁盘的方法及设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6230240B1 (en) * 1998-06-23 2001-05-08 Hewlett-Packard Company Storage management system and auto-RAID transaction manager for coherent memory map across hot plug interface
CN101488077A (zh) * 2009-02-24 2009-07-22 浪潮电子信息产业股份有限公司 冗余磁盘控制服务器系统
CN101615106A (zh) * 2008-06-23 2009-12-30 国际商业机器公司 用于虚拟化sas存储适配器的方法和系统
CN104657316A (zh) * 2015-03-06 2015-05-27 北京百度网讯科技有限公司 服务器
CN105260137A (zh) * 2015-09-28 2016-01-20 天津书生云科技有限公司 在sas存储系统中实现hba卡访问sata磁盘的方法及设备

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101944029A (zh) * 2009-07-10 2011-01-12 环旭电子股份有限公司 磁盘固件更新装置及磁盘固件更新方法
US8943258B2 (en) * 2011-11-04 2015-01-27 Lsi Corporation Server direct attached storage shared through virtual SAS expanders
CN104077083A (zh) * 2014-07-01 2014-10-01 浪潮(北京)电子信息产业有限公司 新加存储方法、装置和系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6230240B1 (en) * 1998-06-23 2001-05-08 Hewlett-Packard Company Storage management system and auto-RAID transaction manager for coherent memory map across hot plug interface
CN101615106A (zh) * 2008-06-23 2009-12-30 国际商业机器公司 用于虚拟化sas存储适配器的方法和系统
CN101488077A (zh) * 2009-02-24 2009-07-22 浪潮电子信息产业股份有限公司 冗余磁盘控制服务器系统
CN104657316A (zh) * 2015-03-06 2015-05-27 北京百度网讯科技有限公司 服务器
CN105260137A (zh) * 2015-09-28 2016-01-20 天津书生云科技有限公司 在sas存储系统中实现hba卡访问sata磁盘的方法及设备

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113296704A (zh) * 2021-05-27 2021-08-24 济南浪潮数据技术有限公司 Sas hba卡固件日志的在线并行收集方法、装置及设备
CN113296704B (zh) * 2021-05-27 2022-12-02 济南浪潮数据技术有限公司 Sas hba卡固件日志的在线并行收集方法、装置及设备
CN115186255A (zh) * 2022-09-13 2022-10-14 北京六方云信息技术有限公司 工业主机白名单提取方法、装置、终端设备以及存储介质
CN115186255B (zh) * 2022-09-13 2022-11-29 北京六方云信息技术有限公司 工业主机白名单提取方法、装置、终端设备以及存储介质

Also Published As

Publication number Publication date
CN105260137A (zh) 2016-01-20
CN105260137B (zh) 2018-06-22

Similar Documents

Publication Publication Date Title
US10467044B2 (en) Transaction processing method and apparatus, and computer system
US8135869B2 (en) Task scheduling to devices with same connection address
US8954398B1 (en) Systems and methods for managing deduplication reference data
US10732889B2 (en) Information handling system with multi-key secure erase of distributed namespace
WO2017054697A1 (zh) 在sas存储系统中实现hba卡访问sata磁盘的方法及设备
WO2016177067A1 (zh) 一种扩展手机存储的方法及终端
US8776232B2 (en) Controller capable of preventing spread of computer viruses and storage system and method thereof
US11210024B2 (en) Optimizing read-modify-write operations to a storage device by writing a copy of the write data to a shadow block
US10366076B1 (en) Systems and methods for repairing corrupted data segments in deduplicated data systems
US8738816B2 (en) Management of detected devices coupled to a host machine
US9575658B2 (en) Collaborative release of a virtual disk
US10592133B1 (en) Managing raw device mapping during disaster recovery
CN108573049B (zh) 数据处理方法和分布式存储装置
CN107437422B (zh) 用于在电力损失时保存关键数据的方法和系统
US11416155B1 (en) System and method for managing blocks of data and metadata utilizing virtual block devices
US20150269092A1 (en) Information processing device and shared memory management method
US9703497B2 (en) Storage system and storage control method
US9665310B2 (en) Storage control apparatus, storage control system, and control method
US20130031320A1 (en) Control device, control method and storage apparatus
US20120290875A1 (en) Methods and structure for storing errors for error recovery in a hardware controller
US20210149863A1 (en) Systems and methods for improving indexer performance by multiplexing data of an underlying index
BR102015026086A2 (pt) método para remover ocupação de arquivo, aparelho para remover ocupação de arquivo, meio de armazenamento legível por computador, produto de programa de computador e dispositivo de computador
US10114664B1 (en) Systems and methods for automated delivery and identification of virtual drives
WO2023092430A1 (zh) 一种虚拟机初始化方法、装置、终端设备及存储介质
TWI726403B (zh) 用來提升增量備份的速度之方法、橋接裝置以及儲存系統

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: 16850321

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16850321

Country of ref document: EP

Kind code of ref document: A1