Movatterモバイル変換


[0]ホーム

URL:


CN101776984A - Method and device for processing disk roam in storage system - Google Patents

Method and device for processing disk roam in storage system
Download PDF

Info

Publication number
CN101776984A
CN101776984ACN201010112533ACN201010112533ACN101776984ACN 101776984 ACN101776984 ACN 101776984ACN 201010112533 ACN201010112533 ACN 201010112533ACN 201010112533 ACN201010112533 ACN 201010112533ACN 101776984 ACN101776984 ACN 101776984A
Authority
CN
China
Prior art keywords
disk
drive
groove position
raid
drive letter
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN201010112533A
Other languages
Chinese (zh)
Other versions
CN101776984B (en
Inventor
张宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Metabrain Intelligent Technology Co Ltd
Original Assignee
Inspur Beijing Electronic Information Industry Co Ltd
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 Inspur Beijing Electronic Information Industry Co LtdfiledCriticalInspur Beijing Electronic Information Industry Co Ltd
Priority to CN2010101125330ApriorityCriticalpatent/CN101776984B/en
Publication of CN101776984ApublicationCriticalpatent/CN101776984A/en
Application grantedgrantedCritical
Publication of CN101776984BpublicationCriticalpatent/CN101776984B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Landscapes

Abstract

Translated fromChinese

本发明提供一种在存储系统中处理磁盘漫游的方法和装置,涉及存储领域;所述方法包括:当存储系统发生磁盘漫游时,将预先设置的未发生磁盘漫游时磁盘的盘符和/或槽位更新为该磁盘当前的盘符和/或槽位;根据更新后的盘符和/或槽位以及未发生磁盘漫游时的RAID信息,构建冗余磁盘阵列(RAID)信息。

Figure 201010112533

The present invention provides a method and device for processing disk roaming in a storage system, relating to the storage field; the method includes: when disk roaming occurs in the storage system, the preset drive letter and/or The slot is updated to the current drive letter and/or slot of the disk; according to the updated drive letter and/or slot and the RAID information when no disk roaming occurs, redundant disk array (RAID) information is constructed.

Figure 201010112533

Description

Translated fromChinese
在存储系统中处理磁盘漫游的方法和装置Method and device for processing disk roaming in storage system

技术领域technical field

本发明涉及存储领域,尤其涉及一种在存储系统中处理磁盘漫游的方法和装置。The invention relates to the field of storage, in particular to a method and device for processing disk roaming in a storage system.

背景技术Background technique

中高端存储系统通常由多控制器和多个磁盘柜组成,其中每个控制器均挂接多个磁盘柜(Just Bundle Of Disks,JBOD),其中每个磁盘柜上有多个槽位,每个槽位上可部署一块磁盘。如果用户从槽位上取出磁盘后放到了错误的槽位,或者在开机状态下进行磁盘的插拔,会出现磁盘与用户界面上盘符不一致的问题,该现象是属于磁盘漫游问题。一旦出现磁盘漫游问题,在磁盘基础上利用磁盘盘符构建冗余磁盘阵列(Redundant Array of IndependentDisk,RAID)将会产生问题,造成用户无法访问磁盘中的数据。A mid-to-high-end storage system usually consists of multiple controllers and multiple disk cabinets, where each controller is connected to multiple disk cabinets (Just Bundle Of Disks, JBOD), where each disk cabinet has multiple slots, each One disk can be deployed in the slot. If the user removes the disk from the slot and puts it in the wrong slot, or inserts or removes the disk while the computer is powered on, there will be a discrepancy between the disk and the drive letter on the user interface. This phenomenon is a disk roaming problem. Once the problem of disk roaming occurs, building a redundant array of independent disks (Redundant Array of Independent Disk, RAID) on the basis of the disk will cause problems, causing users to be unable to access the data in the disk.

为避免磁盘漫游后引起RAID信息错误,现有技术中,在初始化磁盘时,预先存储该磁盘的备用RAID信息。在发生磁盘漫游后,原RAID信息瓦解后,从磁盘提取已存储的备用RAID信息,重建RAID信息的,但是采用上述方法,减少了磁盘上用户可使用的存储空间。In order to avoid RAID information errors caused by disk roaming, in the prior art, when a disk is initialized, the backup RAID information of the disk is stored in advance. After the disk roaming occurs, after the original RAID information is disintegrated, the stored backup RAID information is extracted from the disk to rebuild the RAID information, but the above method reduces the storage space available to the user on the disk.

发明内容Contents of the invention

本发明提供一种在存储系统中处理磁盘漫游的方法,构建RAID信息的实现方式简单。The invention provides a method for processing disk roaming in a storage system, and the realization method of constructing RAID information is simple.

为达到上述发明目的,本发明提供了如下技术方案:In order to achieve the above object of the invention, the present invention provides the following technical solutions:

一种在存储系统中处理磁盘漫游的方法,包括:A method for handling disk roaming in a storage system, comprising:

当存储系统发生磁盘漫游时,将预先设置的未发生磁盘漫游时磁盘的盘符和/或槽位更新为该磁盘当前的盘符和/或槽位;When disk roaming occurs in the storage system, update the preset drive letter and/or slot of the disk when no disk roaming occurs to the current drive letter and/or slot of the disk;

根据更新后的盘符和/或槽位以及未发生磁盘漫游时的RAID信息,构建冗余磁盘阵列(RAID)信息。Construct redundant disk array (RAID) information according to the updated drive letter and/or slot and the RAID information when no disk roaming occurs.

进一步的,所述方法还具有如下特点:所述磁盘对应的盘符和槽位是通过如下方式得到的:Further, the method also has the following characteristics: the drive letter and the slot corresponding to the disk are obtained in the following manner:

获取盘符和槽位的SAS地址以及盘符与磁盘的对应关系;Obtain the SAS address of the drive letter and slot and the correspondence between the drive letter and the disk;

根据SAS地址对盘符和槽位进行匹配,得到盘符和槽位的对应关系;Match the drive letter and the slot according to the SAS address to obtain the corresponding relationship between the drive letter and the slot;

根据盘符,对所述盘符和槽位的对应关系以及所述盘符与磁盘的对应关系,得到磁盘、盘符和槽位之间的映射关系。According to the disk letter, the correspondence between the disk letter and the slot and the correspondence between the disk letter and the disk, the mapping relationship between the disk, the disk letter and the slot is obtained.

进一步的,所述方法还具有如下特点:所述磁盘是通过主键(LU)进行标识的。Further, the method also has the following characteristics: the disk is identified by a primary key (LU).

进一步的,所述方法还具有如下特点:所述构建RAID信息具体包括:Further, the method also has the following characteristics: the constructing RAID information specifically includes:

采用更新后的盘符以及该更新盘符后磁盘对应的RAID信息构建RAID。Use the updated drive letter and the RAID information corresponding to the disk after the updated drive letter to build a RAID.

一种控制器,包括:A controller comprising:

更新模块,用于当存储系统发生磁盘漫游时,将预先设置的未发生磁盘漫游时磁盘的盘符和/或槽位更新为该磁盘当前的盘符和/或槽位;An update module, configured to update the preset drive letter and/or slot of the disk when disk roaming does not occur to the current drive letter and/or slot of the disk when disk roaming occurs in the storage system;

构建模块,用于根据更新后的盘符和/或槽位以及未发生磁盘漫游时的RAID信息,构建冗余磁盘阵列(RAID)信息。The construction module is used for constructing redundant disk array (RAID) information according to the updated drive letter and/or slot and the RAID information when no disk roaming occurs.

进一步的,所述控制器还具有如下特点:所述控制器还包括:Further, the controller also has the following characteristics: the controller also includes:

获取模块,用于获取盘符和槽位的SAS地址以及盘符与磁盘的对应关系,并根据SAS地址对盘符和槽位进行匹配,得到盘符和槽位的对应关系,再根据盘符,对所述盘符和槽位的对应关系以及所述盘符与磁盘的对应关系,得到磁盘、盘符和槽位之间的映射关系。The acquisition module is used to obtain the SAS address of the drive letter and the slot and the corresponding relationship between the drive letter and the disk, and match the drive letter and the slot according to the SAS address to obtain the corresponding relationship between the drive letter and the slot, and then according to the drive letter , according to the corresponding relationship between the drive letter and the slot and the corresponding relationship between the drive letter and the disk, the mapping relationship between the disk, the drive letter and the slot is obtained.

进一步的,所述控制器还具有如下特点:所述控制器通过主键(LU)标识磁盘。Further, the controller also has the following feature: the controller identifies the disk through a primary key (LU).

进一步的,所述控制器还具有如下特点:Further, the controller also has the following characteristics:

所述构建模块具体用于:采用更新后的盘符以及该更新盘符后磁盘对应的RAID信息构建RAID。The construction module is specifically used for constructing RAID by using the updated drive letter and the RAID information corresponding to the disk after the updated drive letter.

本发明提供的技术方案,在存储系统发生磁盘漫游时,将未发生磁盘漫游时的盘符和/或槽位更新为该磁盘当前的盘符和/或槽位,再根据更新后的盘符和/或槽位以及未发生磁盘漫游时的RAID信息,构建冗余磁盘阵列(RAID)信息,保证未发生磁盘漫游时的RAID可用,采用可用的RAID信息构建存储系统新的RAID信息,实现方式简单且无需预先在磁盘占用存储空间存储备用的RAID信息,提高了磁盘的可用空间。In the technical solution provided by the present invention, when disk roaming occurs in the storage system, the drive letter and/or slot when no disk roaming occurs is updated to the current drive letter and/or slot of the disk, and then according to the updated drive letter And/or slots and RAID information when disk roaming does not occur, construct redundant disk array (RAID) information, ensure that RAID is available when disk roaming does not occur, and use available RAID information to construct new RAID information of the storage system. Implementation method It is simple and does not need to store spare RAID information in the storage space occupied by the disk in advance, which improves the available space of the disk.

附图说明Description of drawings

图1为本发明中在存储系统中处理磁盘漫游的方法流程图;Fig. 1 is a flowchart of a method for processing disk roaming in a storage system in the present invention;

图2为本发明中在存储系统中处理磁盘漫游的方法另一流程图;Fig. 2 is another flow chart of the method for processing disk roaming in the storage system in the present invention;

图3为本发明提供一种控制器的结构示意图;Fig. 3 is a schematic structural diagram of a controller provided by the present invention;

图4为图3所示实施例中控制器的另一结构示意图。FIG. 4 is another structural schematic diagram of the controller in the embodiment shown in FIG. 3 .

具体实施方式Detailed ways

下面结合附图对本发明提供的技术方案作进一步介绍。The technical solutions provided by the present invention will be further introduced below in conjunction with the accompanying drawings.

如图1所示,本发明提供一种在存储系统中处理磁盘漫游的方法,包括:As shown in Figure 1, the present invention provides a method for processing disk roaming in a storage system, including:

步骤101、当存储系统发生磁盘漫游时,将预先设置的未发生磁盘漫游时磁盘的盘符和/或槽位更新为该磁盘当前的盘符和/或槽位;Step 101, when disk roaming occurs in the storage system, update the preset drive letter and/or slot of the disk when no disk roaming occurs to the current drive letter and/or slot of the disk;

步骤102、根据更新后的盘符和/或槽位以及未发生磁盘漫游时的RAID信息,构建冗余磁盘阵列(RAID)信息。Step 102, construct redundant disk array (RAID) information according to the updated drive letter and/or slot and the RAID information when no disk roaming occurs.

本发明提供的方法,在存储系统发生磁盘漫游时,将未发生磁盘漫游时的盘符和/或槽位更新为该磁盘当前的盘符和/或槽位,再根据更新后的盘符和/或槽位以及未发生磁盘漫游时的RAID信息,构建冗余磁盘阵列(RAID)信息,保证未发生磁盘漫游时的RAID可用,采用可用的RAID信息构建存储系统新的RAID信息,实现方式简单且无需预先在磁盘占用存储空间存储备用的RAID信息,提高了磁盘的可用空间。In the method provided by the present invention, when disk roaming occurs in the storage system, the drive letter and/or slot when no disk roaming occurs is updated to the current drive letter and/or slot of the disk, and then according to the updated drive letter and /or slots and RAID information when disk roaming does not occur, construct redundant disk array (RAID) information to ensure that RAID is available when disk roaming does not occur, use available RAID information to construct new RAID information for the storage system, and the implementation method is simple And there is no need to store spare RAID information in the storage space occupied by the disk in advance, which improves the available space of the disk.

下面对本发明提供的技术方案作进一步说明,如图3所示:The technical scheme provided by the present invention is further described below, as shown in Figure 3:

步骤201、在存储系统运行正常时,控制器获取与本地连接的磁盘柜上每个磁盘的盘符与该磁盘所在槽位的标准映射关系,其中该标准映射关系是未发生磁盘漫游时该磁盘的盘符与槽位之间正确的映射关系。Step 201, when the storage system is running normally, the controller obtains the standard mapping relationship between the drive letter of each disk on the locally connected disk cabinet and the slot where the disk is located, wherein the standard mapping relationship is the disk's location when no disk roaming occurs. The correct mapping relationship between drive letters and slots.

具体的,获取该标准映射关系的过程可以通过如下方式实现,以Linux操作系统进行说明:Specifically, the process of obtaining the standard mapping relationship can be implemented in the following manner, which will be described with the Linux operating system:

步骤1、获取与本地连接的全部磁盘柜;Step 1. Obtain all disk cabinets connected to the local area;

具体的,向该磁盘柜发送expander sg查询指令,如sginfo-l。Specifically, send an expander sg query command, such as sginfo-l, to the disk cabinet.

Expander为扩展器,是磁盘柜与控制器之间的物理连接,根据连接使用的支持协议,会有相关适配卡,而通过适配卡从控制器接出去的扩展器在控制器上会有扩展号(即sg号)。在本发明里,磁盘柜在控制器上会显示一个sg号,通过查询该sg,会有该磁盘柜的详细信息。Expander is an expander, which is the physical connection between the disk cabinet and the controller. According to the support protocol used for the connection, there will be related adapter cards, and the expander connected from the controller through the adapter card will have a Extension number (i.e. sg number). In the present invention, the disk cabinet will display a sg number on the controller, and the detailed information of the disk cabinet will be obtained by querying the sg.

步骤2、获取每个expander sg上槽位的SAS(Serial Attached SCSI,串行SCSI)地址;Step 2. Obtain the SAS (Serial Attached SCSI, serial SCSI) address of the slot on each expander sg;

具体的,向该磁盘柜发送expander sg查询指令,如sg_ses-p 0xa/dev/sg*,其中‘*’指步骤1中的sg号。Specifically, send an expander sg query command to the disk cabinet, such as sg_ses-p 0xa/dev/sg*, where '*' refers to the sg number in step 1.

步骤3、根据存储系统中盘符,获取该磁盘柜槽位上磁盘的SAS地址和LU地址;Step 3. According to the drive letter in the storage system, obtain the SAS address and LU address of the disk on the slot of the disk cabinet;

具体的,发送磁盘信息查询指令,如sg_inq-p 0x83/dev/sd*,其中‘*’指该存储系统中的盘符。Specifically, send a disk information query command, such as sg_inq-p 0x83/dev/sd*, where '*' refers to the drive letter in the storage system.

其中步骤1~2与步骤3并无先后顺序。Steps 1-2 and Step 3 are not in sequence.

步骤4、建立具有相同SAS地址的槽位、磁盘的主键和磁盘的盘符之间的映射关系。Step 4, establishing a mapping relationship among slots with the same SAS address, the primary key of the disk, and the drive letter of the disk.

  JBOD号JBOD number  槽位号slot number  SAS地址SAS address  盘符drive letter  LU(主键)LU (primary key)  00  0101  0x5000c500178db8a20x5000c500178db8a2  cc  0x5000c5001996c3740x5000c5001996c374  00  0202  0x500163600012390a0x500163600012390a  dd  0x5000c5001999c4bd0x5000c5001999c4bd  ……...  ……...  ……...  ……...  ……...

表1映射关系表Table 1 Mapping relationship table

步骤202、当用户进行磁盘插拔后,获取当前磁盘的盘符与该磁盘所在槽位的待校映射关系,其中获取方法可参见步骤201。Step 202 , after the user inserts or removes the disk, obtains the pending mapping relationship between the drive letter of the current disk and the slot where the disk is located, and the obtaining method can refer tostep 201 .

步骤203、判断待校映射关系与标准映射关系是否一致;Step 203, judging whether the mapping relationship to be checked is consistent with the standard mapping relationship;

具体的,在第一映射关系和第二映射关系中,判断磁盘柜上每个SAS地址下LU信息、盘符信息和槽位信息是否相同,如果相同,确定待校映射关系与标准映射关系一致,确定未发生磁盘漫游,流程结束;否则,表示待校映射关系与标准映射关系不一致,确定发生磁盘漫游,其中包括3种情况,以下以表1中盘符c的映射关系为例进行说明:Specifically, in the first mapping relationship and the second mapping relationship, determine whether the LU information, drive letter information, and slot information under each SAS address on the disk cabinet are the same, and if they are the same, determine that the mapping relationship to be corrected is consistent with the standard mapping relationship, If it is determined that disk roaming has not occurred, the process ends; otherwise, it means that the mapping relationship to be checked is inconsistent with the standard mapping relationship, and it is determined that disk roaming occurs, including 3 situations. The following uses the mapping relationship of drive letter c in Table 1 as an example to illustrate:

情况一:磁盘插在正确的槽位上,但磁盘在存储系统上对应错误的盘符;Case 1: The disk is inserted into the correct slot, but the disk corresponds to the wrong drive letter on the storage system;

情况二:磁盘在存储系统上对应正确的盘符,但磁盘插在错误的槽位上;Case 2: The disk corresponds to the correct drive letter on the storage system, but the disk is inserted into the wrong slot;

情况三:磁盘插在错误的槽位上,且磁盘在存储系统上对应错误的盘符。Case 3: The disk is inserted into the wrong slot, and the disk corresponds to the wrong drive letter on the storage system.

在确定发生磁盘漫游后,执行步骤204;After it is determined that disk roaming occurs,step 204 is performed;

步骤204、对与待校映射关系不一致的标准映射关系进行更新。Step 204, updating the standard mapping relationship inconsistent with the mapping relationship to be checked.

以下以表1中盘符c的映射关系为例进行说明:The following uses the mapping relationship of drive letter c in Table 1 as an example for illustration:

情况一:磁盘插在正确的槽位上,但磁盘在存储系统上对应错误的盘符,例如磁盘对应的正确盘符是C盘,但发生磁盘漫游后,该磁盘对应的盘符为D盘,此情况可能是用户在存储系统处于开机状态下将磁盘取出后再次放回原槽位造成的;Case 1: The disk is inserted into the correct slot, but the disk corresponds to the wrong drive letter on the storage system. For example, the correct drive letter corresponding to the disk is C drive, but after disk roaming, the corresponding drive letter of the disk is D drive , this situation may be caused by the user taking out the disk and putting it back into the original slot when the storage system is powered on;

  JBOD号JBOD number  槽位号slot number  SAS地址SAS address  盘符drive letter  LU(主键)LU (primary key)  00  0101  0x5000c500178db8a20x5000c500178db8a2  cc  0x5000c5001996c3740x5000c5001996c374  00  0101  0x5000c500178db8a20x5000c500178db8a2  dd  0x5000c5001996c3740x5000c5001996c374  ……...  ……...  ……...  ……...  ……...

在c盘发生发生磁盘漫游后,如果系统用到C盘时,由于C盘已经不存在,会产生错误,系统通过遍历所有盘符对应的LU地址,如发送磁盘信息查询指令sg_inq-p 0x83/dev/sd*,其中‘*’指该存储系统中的所有盘符,得到具有原c盘LU地址的盘符,即盘符d,则删除该磁盘对应的原盘符c,更新该磁盘的盘符为d。After disk roaming occurs on disk c, if the system uses disk C, an error will occur because disk C no longer exists. The system traverses the LU addresses corresponding to all disk letters, such as sending the disk information query command sg_inq-p 0x83/ dev/sd*, where '*' refers to all the drive letters in the storage system. If you get the drive letter with the LU address of the original c drive, that is, the drive letter d, then delete the original drive letter c corresponding to the disk and update the drive letter of the disk. The drive letter is d.

情况二:磁盘在存储系统上对应正确的盘符,但磁盘插在错误的槽位上,此情况可能是用户在存储系统处于关机状态下将磁盘取出后放到其他槽位造成的。Situation 2: The disk corresponds to the correct drive letter on the storage system, but the disk is inserted into the wrong slot. This situation may be caused by the user taking out the disk and putting it in another slot when the storage system is powered off.

  JBOD号JBOD number  槽位号slot number  SAS地址SAS address  盘符drive letter  LU(主键)LU (primary key)  00  0101  0x5000c500178db8a20x5000c500178db8a2  cc  0x5000c5001996c3740x5000c5001996c374  00  0202  0x500163600012390a0x500163600012390a  cc  0x5000c5001996c3740x5000c5001996c374  ……...  ……...  ……...  ……...  ……...

由于盘符是正确的,在该磁盘上构建的RAID不会出错,但是,在新建RAID时,会容易选到已经建立了RAID的磁盘,因此需要对标准映射表进行更新,具体包括:向该磁盘柜发送expander sg查询指令,如sg_ses-p 0xa/dev/sg*,其中‘*’指步骤201中步骤1中所指的sg号,得到磁盘柜(JBOD0)上全部槽位的SAS地址和LU地址,获取该LU地址当前对应的SAS地址,再根据得到的SAS地址得到该LU地址当前对应的槽位,本例中当前的槽位为02,则更新该LU地址对应的原槽位01为槽位02。Since the drive letter is correct, the RAID built on this disk will not go wrong. However, when creating a new RAID, it will be easy to select a disk that has already established a RAID, so the standard mapping table needs to be updated, specifically including: The disk cabinet sends an expander sg query command, such as sg_ses-p 0xa/dev/sg*, where '*' refers to the sg number indicated in step 1 instep 201, and obtains the SAS addresses and LU address, obtain the SAS address currently corresponding to the LU address, and then obtain the current slot corresponding to the LU address according to the obtained SAS address. In this example, the current slot is 02, then update the original slot 01 corresponding to the LU address It is slot 02.

当然也可以选择重建标准映射表,具体过程参见步骤201。Of course, you can also choose to rebuild the standard mapping table, seestep 201 for the specific process.

情景三:磁盘插在错误的槽位上,且磁盘在存储系统上对应错误的盘符,此情况可能是用户在存储系统处于开机状态下将磁盘取出后放到其他槽位造成的。Scenario 3: The disk is inserted into the wrong slot, and the disk corresponds to the wrong drive letter on the storage system. This situation may be caused by the user removing the disk and putting it in another slot when the storage system is powered on.

  JBOD号JBOD number  槽位号slot number  SAS地址SAS address  盘符drive letter  LU(主键)LU (primary key)  00  0101  0x5000c500178db8a20x5000c500178db8a2  cc  0x5000c5001996c3740x5000c5001996c374  00  0202  0x500163600012390a0x500163600012390a  dd  0x5000c5001996c3740x5000c5001996c374  ……...  ……...  ……...  ……...  ……...

该情形类似情形1,需要更新盘符,但是,该情形比情形1需要多做的工作就是遍历磁盘柜槽位信息,跟磁盘目前的SAS地址做比较,更新映射表中的磁盘槽位信息,如上表,原有盘符为c,系统发现c盘符无法使用了,需要更新,步骤如下:This situation is similar to situation 1, and the drive letter needs to be updated. However, this situation requires more work than situation 1. It is to traverse the slot information of the disk cabinet, compare it with the current SAS address of the disk, and update the disk slot information in the mapping table. As shown in the above table, the original drive letter is c. The system finds that the drive letter c is unusable and needs to be updated. The steps are as follows:

步骤1:发送磁盘信息查询指令,如sg_inq-p 0x83/dev/sd*,其中‘*’指该存储系统中的盘符。查询到d盘的LU与原盘符c的LU一致,则进行更新盘符d到映射表,并且将d的SAS地址项进行更新;Step 1: Send a disk information query command, such as sg_inq-p 0x83/dev/sd*, where '*' refers to the drive letter in the storage system. If the LU of drive d is found to be consistent with the LU of the original drive letter c, update the drive letter d to mapping table, and update the SAS address item of d;

步骤2:向该磁盘柜发送expander sg查询指令,如sg_ses-p 0xa/dev/sg*,其中‘*’指步骤201中步骤1中所指的sg号。获取的SAS地址,与d盘的SAS地址进行匹对,如果一致,则更新槽位信息至映射表中,例如该例子中当前为槽位02,原为槽位01。Step 2: Send an expander sg query command to the disk cabinet, such as sg_ses-p 0xa/dev/sg*, where '*' refers to the sg number indicated in step 1 instep 201. The obtained SAS address is matched with the SAS address of the d disk. If they are consistent, the slot information is updated to the mapping table. For example, in this example, the current slot is 02, and it was originally slot 01.

步骤205、根据更新后的标准映射表构建RAID信息。Step 205, construct RAID information according to the updated standard mapping table.

具体的,由于RAID信息是采用盘符信息建立的,例如RAID信息是使用盘符a、盘符b和盘符c进行构建的,如果没有漫游,根据盘符开机就能构建RAID。如果发生磁盘漫游,比如盘符c没了,从更新后的标准映射表得到,原来的盘符c更新为盘符d,则原盘符c对应磁盘中的RAID信息并没有瓦解,只需要将用于构建RAID信息的盘符c修改为盘符d即可。Specifically, since RAID information is established using drive letter information, for example, RAID information is constructed using drive letter a, drive letter b, and drive letter c, if there is no roaming, the RAID can be built according to the drive letter. If disk roaming occurs, for example, the drive letter c is missing, and the original drive letter c is updated to drive letter d from the updated standard mapping table, the RAID information on the disk corresponding to the original drive letter c has not collapsed. The drive letter c used to construct the RAID information can be changed to the drive letter d.

如果是新建RAID信息,在磁盘插错槽位发生磁盘漫游后,从更新后的标准映射关系中可以得到哪些磁盘为未构建RAID信息的磁盘,再新建RAID信息,从而避免现有技术中在发生磁盘漫游后对同一磁盘重复构建RAID信息。If new RAID information is created, after disk roaming occurs when the disk is inserted into the wrong slot, it can be obtained from the updated standard mapping relationship which disks are disks without RAID information, and then new RAID information is created, thereby avoiding the existing technology. After disk roaming, construct RAID information repeatedly for the same disk.

由此可以看出,当存储系统发生磁盘漫游时,磁盘保存的RAID信息并没有瓦解,而是通过修改盘符和/或槽位,采用原有的RAID信息进行构建,从而无需在磁盘中预先存储RAID信息造成存储空间浪费,采用本实施例的方法能够节省存储空间。It can be seen from this that when disk roaming occurs in the storage system, the RAID information stored on the disk is not disintegrated. Instead, the original RAID information is used to construct the disk by modifying the drive letter and/or slot. Storage of RAID information causes waste of storage space, and the method of this embodiment can save storage space.

需要说明的是,由于通常JBOD由两个冗余的控制器主控,而查到的槽位SAS地址可能在不同控制器上不能保证是完全一致的,通常为了保证磁盘的一致,在维护映射关系过程中,不但查询磁盘的SAS地址,还查询LU地址(logical unit),该地址由厂家协议支持,是磁盘的唯一性标识。It should be noted that since the JBOD is usually controlled by two redundant controllers, the SAS addresses of the slots found may not be completely consistent on different controllers. Usually, in order to ensure the consistency of the disks, when maintaining the mapping During the relationship process, not only the SAS address of the disk is queried, but also the LU address (logical unit), which is supported by the manufacturer's agreement and is the unique identifier of the disk.

对应的,本发明提供一种采用上述方法的控制器,如图3所示,包括:Correspondingly, the present invention provides a controller using the above method, as shown in Figure 3, including:

更新模块301,用于当存储系统发生磁盘漫游时,将预先设置的未发生磁盘漫游时磁盘的盘符和/或槽位更新为该磁盘当前的盘符和/或槽位;Anupdate module 301, configured to update the preset drive letter and/or slot of the disk when disk roaming does not occur to the current drive letter and/or slot of the disk when disk roaming occurs in the storage system;

构建模块302,用于根据更新后的盘符和/或槽位以及未发生磁盘漫游时的RAID信息,构建冗余磁盘阵列(RAID)信息。Theconstruction module 302 is configured to construct redundant disk array (RAID) information according to the updated drive letter and/or slot and the RAID information when no disk roaming occurs.

如图4所示,所述控制器还可以进一步包括:As shown in Figure 4, the controller may further include:

获取模块401,用于获取盘符和槽位的SAS地址以及盘符与磁盘的对应关系,并根据SAS地址对盘符和槽位进行匹配,得到盘符和槽位的对应关系,再根据盘符,对所述盘符和槽位的对应关系以及所述盘符与磁盘的对应关系,得到磁盘、盘符和槽位之间的映射关系。The obtainingmodule 401 is used to obtain the SAS address of the drive letter and the slot and the corresponding relationship between the drive letter and the disk, and match the drive letter and the slot according to the SAS address to obtain the correspondence between the drive letter and the slot, and then according to the disk characters, and for the corresponding relationship between the drive letter and the slot and the corresponding relationship between the drive letter and the disk, the mapping relationship between the disk, the drive letter and the slot is obtained.

其中所述控制器通过主键(LU)标识磁盘。Wherein the controller identifies the disk through a primary key (LU).

所述构建模块302具体用于:采用更新后的盘符以及该更新盘符后磁盘对应的RAID信息构建RAID。Theconstruction module 302 is specifically configured to: use the updated drive letter and the RAID information corresponding to the disk after the updated drive letter to construct a RAID.

本领域普通技术人员可以理解实现上述实施例的全部或部分步骤是可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,该程序在执行时,包括方法实施例的步骤之一或其组合。Those of ordinary skill in the art can understand that all or part of the steps for realizing the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium. When the program is executed, it includes One or a combination of the steps of the method embodiment.

另外,在本发明各个实施例中的各功能单元可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。In addition, each functional unit in each embodiment of the present invention may be implemented in the form of hardware, or may be implemented in the form of software functional modules. If the integrated modules are realized in the form of software function modules and sold or used as independent products, they can also be stored in a computer-readable storage medium.

上述提到的存储介质可以是只读存储器,磁盘或光盘等。The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, and the like.

以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求所述的保护范围为准。The above is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Anyone skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present invention. Should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope described in the claims.

Claims (8)

CN2010101125330A2010-02-202010-02-20Method and device for processing disk roam in storage systemActiveCN101776984B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN2010101125330ACN101776984B (en)2010-02-202010-02-20Method and device for processing disk roam in storage system

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN2010101125330ACN101776984B (en)2010-02-202010-02-20Method and device for processing disk roam in storage system

Publications (2)

Publication NumberPublication Date
CN101776984Atrue CN101776984A (en)2010-07-14
CN101776984B CN101776984B (en)2011-09-14

Family

ID=42513458

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN2010101125330AActiveCN101776984B (en)2010-02-202010-02-20Method and device for processing disk roam in storage system

Country Status (1)

CountryLink
CN (1)CN101776984B (en)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN103189834A (en)*2012-07-162013-07-03华为技术有限公司Method, apparatus and system for determining drive
CN105353983A (en)*2015-11-032016-02-24山东超越数控电子有限公司Method and apparatus for identifying disk information in RAID
CN105373351A (en)*2015-11-302016-03-02曙光信息产业股份有限公司Disk positioning method and apparatus
CN105468482A (en)*2014-08-292016-04-06研祥智能科技股份有限公司Hard disk position identification and fault diagnosis method and server device
CN106469103A (en)*2015-08-142017-03-01华为软件技术有限公司The maintaining method of hard disk and device
CN106933748A (en)*2017-03-172017-07-07郑州云海信息技术有限公司The SAS address configuration methods and system of a kind of Expander
CN106933498A (en)*2015-12-312017-07-07中兴通讯股份有限公司A kind of management method of JBOD, mass-storage system and middleware
CN106933583A (en)*2017-03-062017-07-07联想(北京)有限公司The method and computer equipment of hardware device are recognized in operating system
CN107239231A (en)*2017-05-032017-10-10深圳市同泰怡信息技术有限公司A kind of method of fixed disk slot number and disc identifier mapping relations
CN107402721A (en)*2017-06-302017-11-28郑州云海信息技术有限公司A kind of control method of hard disk, device and server
CN107783841A (en)*2017-11-102018-03-09郑州云海信息技术有限公司A kind of method of RACK server pools management of product optimization
CN108255410A (en)*2016-12-282018-07-06华为技术有限公司A kind of method, apparatus and equipment for handling disk roam
US10671403B2 (en)2017-02-172020-06-02Lenovo (Beijing) Co., Ltd.Method and apparatus for identifying hardware device in operating system
CN114444137A (en)*2021-12-172022-05-06苏州浪潮智能科技有限公司Method, system, equipment and medium for positioning expander of cabinet where hard disk is located
CN116069266A (en)*2023-04-062023-05-05苏州浪潮智能科技有限公司 Disk Roaming Control Method, Device, Equipment, and Computer-Readable Storage Medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101604226B (en)*2009-07-142010-12-01浪潮电子信息产业股份有限公司 A Method of Constructing a Dynamic Cache Pool Based on Virtual RAID to Improve Storage System Performance

Cited By (22)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
WO2014012203A1 (en)*2012-07-162014-01-23华为技术有限公司Method, device and system for determining drive letter
CN103189834B (en)*2012-07-162015-07-08华为技术有限公司Method, apparatus and system for determining drive mark
CN103189834A (en)*2012-07-162013-07-03华为技术有限公司Method, apparatus and system for determining drive
CN105468482A (en)*2014-08-292016-04-06研祥智能科技股份有限公司Hard disk position identification and fault diagnosis method and server device
CN106469103A (en)*2015-08-142017-03-01华为软件技术有限公司The maintaining method of hard disk and device
CN106469103B (en)*2015-08-142019-10-18华为软件技术有限公司The maintaining method and device of hard disk
CN105353983A (en)*2015-11-032016-02-24山东超越数控电子有限公司Method and apparatus for identifying disk information in RAID
CN105373351A (en)*2015-11-302016-03-02曙光信息产业股份有限公司Disk positioning method and apparatus
CN106933498A (en)*2015-12-312017-07-07中兴通讯股份有限公司A kind of management method of JBOD, mass-storage system and middleware
CN108255410A (en)*2016-12-282018-07-06华为技术有限公司A kind of method, apparatus and equipment for handling disk roam
CN108255410B (en)*2016-12-282021-06-01华为技术有限公司 A method, RAID controller and device for handling disk roaming
US10671403B2 (en)2017-02-172020-06-02Lenovo (Beijing) Co., Ltd.Method and apparatus for identifying hardware device in operating system
CN106933583A (en)*2017-03-062017-07-07联想(北京)有限公司The method and computer equipment of hardware device are recognized in operating system
CN106933748A (en)*2017-03-172017-07-07郑州云海信息技术有限公司The SAS address configuration methods and system of a kind of Expander
CN107239231A (en)*2017-05-032017-10-10深圳市同泰怡信息技术有限公司A kind of method of fixed disk slot number and disc identifier mapping relations
CN107239231B (en)*2017-05-032020-12-04深圳市同泰怡信息技术有限公司Method for fixing mapping relation between disk slot position number and disk identifier
CN107402721A (en)*2017-06-302017-11-28郑州云海信息技术有限公司A kind of control method of hard disk, device and server
CN107783841A (en)*2017-11-102018-03-09郑州云海信息技术有限公司A kind of method of RACK server pools management of product optimization
CN107783841B (en)*2017-11-102020-07-21苏州浪潮智能科技有限公司 A method for optimizing RACK server pooled product management
CN114444137A (en)*2021-12-172022-05-06苏州浪潮智能科技有限公司Method, system, equipment and medium for positioning expander of cabinet where hard disk is located
CN114444137B (en)*2021-12-172024-02-02苏州浪潮智能科技有限公司 A method, system, equipment and media for locating a cabinet expander where a hard disk is located
CN116069266A (en)*2023-04-062023-05-05苏州浪潮智能科技有限公司 Disk Roaming Control Method, Device, Equipment, and Computer-Readable Storage Medium

Also Published As

Publication numberPublication date
CN101776984B (en)2011-09-14

Similar Documents

PublicationPublication DateTitle
CN101776984B (en)Method and device for processing disk roam in storage system
CN103412769B (en)External card parameter configuration, equipment and system
CN108255410B (en) A method, RAID controller and device for handling disk roaming
US10437485B2 (en)Managing storage array configuration
KR102198609B1 (en)Mobile divece and operating method thereof
CN110399267B (en)PCIE (peripheral component interface express) equipment monitoring method, system and equipment of server and readable storage medium
US8756345B2 (en)Methods and structure for managing protection information with a serial attached SCSI expander
US10324810B2 (en)Method and apparatus for redundant array of independent disks with raid metadata and sub-raid metadata stored using different raid algorithms
CN103534688B (en)Data reconstruction method, memory device and storage system
JP6001773B2 (en) Nondisruptive controller replacement in network storage systems
CN112199240A (en) A method and related equipment for node switching when a node fails
CN102497286A (en)Method and device for matching management information base (MIB)
US11755338B2 (en)Systems and methods for operating data processing units
US8966161B2 (en)Memory storage device and restoring method thereof
CN117055923A (en)Firmware upgrading system, method and device, electronic equipment and storage medium
US8015439B2 (en)Method for handling more than a maximum number of supported drives in a raid configuration
CN117631996A (en) Fault domain expansion method, device, computer equipment and storage medium
US11983138B2 (en)Self-configuring SSD multi-protocol support in host-less environment
US20100070705A1 (en)Method and system for resolving configuration conflicts in raid systems
CN114625399A (en) System upgrade method and related apparatus, equipment and storage medium
CN105393207B (en)Shared storage system and the method for controlling the access to storage facility
CN117435127A (en)Configuration method and device of disk array Raid card and computing equipment
CN115469911A (en)Parameter configuration method, system and computer readable storage medium
JP6435842B2 (en) Storage control device and storage control program
JP2017041110A (en) Multi-computer system, management device and management program

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
C10Entry into substantive examination
SE01Entry into force of request for substantive examination
C14Grant of patent or utility model
GR01Patent grant
TR01Transfer of patent right

Effective date of registration:20201111

Address after:215100 No. 1 Guanpu Road, Guoxiang Street, Wuzhong Economic Development Zone, Suzhou City, Jiangsu Province

Patentee after:SUZHOU LANGCHAO INTELLIGENT TECHNOLOGY Co.,Ltd.

Address before:100085 Beijing, Haidian District on the road to information on the ground floor, building 2-1, No. 1, C

Patentee before:Inspur (Beijing) Electronic Information Industry Co.,Ltd.

TR01Transfer of patent right
CP03Change of name, title or address

Address after:Building 9, No.1, guanpu Road, Guoxiang street, Wuzhong Economic Development Zone, Wuzhong District, Suzhou City, Jiangsu Province

Patentee after:Suzhou Yuannao Intelligent Technology Co.,Ltd.

Country or region after:China

Address before:Building 9, No.1, guanpu Road, Guoxiang street, Wuzhong Economic Development Zone, Wuzhong District, Suzhou City, Jiangsu Province

Patentee before:SUZHOU LANGCHAO INTELLIGENT TECHNOLOGY Co.,Ltd.

Country or region before:China


[8]ページ先頭

©2009-2025 Movatter.jp