Movatterモバイル変換


[0]ホーム

URL:


CN109947622A - A server physical disk positioning method, device, equipment and medium - Google Patents

A server physical disk positioning method, device, equipment and medium
Download PDF

Info

Publication number
CN109947622A
CN109947622ACN201910217477.8ACN201910217477ACN109947622ACN 109947622 ACN109947622 ACN 109947622ACN 201910217477 ACN201910217477 ACN 201910217477ACN 109947622 ACN109947622 ACN 109947622A
Authority
CN
China
Prior art keywords
physical disk
disk
physical
flickering
read
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
CN201910217477.8A
Other languages
Chinese (zh)
Other versions
CN109947622B (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.)
Inspur Power Commercial Systems Co Ltd
Original Assignee
Inspur Power Commercial Systems 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 Power Commercial Systems Co LtdfiledCriticalInspur Power Commercial Systems Co Ltd
Priority to CN201910217477.8ApriorityCriticalpatent/CN109947622B/en
Publication of CN109947622ApublicationCriticalpatent/CN109947622A/en
Application grantedgrantedCritical
Publication of CN109947622BpublicationCriticalpatent/CN109947622B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Landscapes

Abstract

Translated fromChinese

本申请公开了一种服务器物理磁盘定位方法、装置、设备及介质,服务器的每一物理磁盘的逻辑盘符均携带有唯一对应的编码信息,每一所述编码信息均为N位二进制编码,并且,每一物理磁盘上均设有N个指示灯,每一物理磁盘上的N个指示灯与相应所述编码信息中的N位二进制编码分别一一对应;所述方法包括:执行N轮物理磁盘读写操作;记录闪烁统计结果;根据编码信息从预设映射表中确定出与每一物理磁盘的N个指示灯对应的预设闪烁特征;从闪烁统计结果中查找与预设闪烁特征相一致的实际闪烁特征以及相应的磁盘安装位置,并将查找到的磁盘安装位置确定为相应物理磁盘的安装位置。通过上述技术方案,能够有效减少对服务器的磁盘进行定位时所需时间。

The present application discloses a method, device, equipment and medium for locating a physical disk of a server. The logical drive letter of each physical disk of the server carries unique corresponding encoding information, and each encoding information is an N-bit binary code. Moreover, each physical disk is provided with N indicator lights, and the N indicator lights on each physical disk are in one-to-one correspondence with the N-bit binary codes in the corresponding encoded information; the method includes: performing N rounds of Physical disk read and write operations; record flicker statistical results; determine the preset flicker characteristics corresponding to the N indicators of each physical disk from the preset mapping table according to the coding information; search for the preset flicker characteristics from the flicker statistical results Consistent with the actual flickering characteristics and the corresponding disk installation position, and determine the found disk installation position as the installation position of the corresponding physical disk. Through the above technical solution, the time required for locating the disk of the server can be effectively reduced.

Description

Translated fromChinese
一种服务器物理磁盘定位方法、装置、设备及介质A server physical disk positioning method, device, equipment and medium

技术领域technical field

本申请涉及服务器技术领域,特别涉及一种服务器物理磁盘定位方法、装置、设备及介质。The present application relates to the technical field of servers, and in particular, to a method, apparatus, device and medium for locating a physical disk of a server.

背景技术Background technique

当前,对服务器中的物理磁盘进行定位的最简单有效的方法是利用系统内磁盘读写命令,如linux系统下使用dd命令对一块磁盘进行读写,磁盘上有对应的读写指示灯,运行dd命令时查看服务器磁盘的指示灯,指示灯闪烁则表示此磁盘在进行读写,以此定位磁盘的物理位置。At present, the easiest and most effective way to locate the physical disk in the server is to use the disk read and write commands in the system. For example, in the Linux system, use the dd command to read and write a disk. When using the dd command, check the indicator of the server disk. If the indicator flashes, it indicates that the disk is reading and writing, so as to locate the physical location of the disk.

虽然上述磁盘定位方法简单有效,能够非常直观的确定逻辑盘符对应的物理磁盘的位置,但是这种方案的缺点在于每轮磁盘读写操作只对一个磁盘进行读写,也即每轮读写操作只能确定一块磁盘的位置。当磁盘数量很多的时候,这种方案是非常费时的。Although the above-mentioned disk positioning method is simple and effective, and can very intuitively determine the location of the physical disk corresponding to the logical drive letter, the disadvantage of this solution is that each round of disk read and write operations only reads and writes to one disk, that is, each round of read and write operations. An operation can only determine the location of a disk. When the number of disks is large, this solution is very time-consuming.

发明内容SUMMARY OF THE INVENTION

有鉴于此,本申请的目的在于提供一种服务器物理磁盘定位方法、装置、设备及介质,能够有效地减少对服务器的磁盘进行定位时所需时间。其具体方案如下:In view of this, the purpose of the present application is to provide a method, apparatus, device and medium for locating a physical disk of a server, which can effectively reduce the time required for locating a disk of a server. Its specific plan is as follows:

第一方面,本申请公开了一种服务器物理磁盘定位方法,用于对服务器中的物理磁盘进行定位,其中,每一物理磁盘的逻辑盘符均携带有唯一对应的编码信息,每一所述编码信息均为N位二进制编码,并且,每一物理磁盘上均设有N个指示灯,每一物理磁盘上的N个指示灯与相应所述编码信息中的N位二进制编码分别一一对应,N为小于物理磁盘总数的正整数;所述方法包括:In a first aspect, the present application discloses a method for locating a physical disk of a server, which is used for locating a physical disk in a server, wherein the logical drive letter of each physical disk carries unique corresponding coding information, and each of the The encoded information is all N-bit binary codes, and each physical disk is provided with N indicator lights, and the N indicator lights on each physical disk are in one-to-one correspondence with the N-bit binary codes in the corresponding encoded information. , N is a positive integer smaller than the total number of physical disks; the method includes:

执行N轮物理磁盘读写操作;其中,在执行第i轮物理磁盘读写操作时,对所述编码信息的第i位二进制符号为1的物理磁盘同时进行读写操作;Perform N rounds of physical disk read-write operations; wherein, when performing the i-th round of physical disk read-write operations, the physical disks whose i-th binary symbol of the encoded information is 1 are simultaneously read and written operations;

记录所述N轮物理磁盘读写操作中每一物理磁盘的N个指示灯的实际闪烁特征以及与实际闪烁特征对应的磁盘安装位置,得到相应的闪烁统计结果;Record the actual flickering characteristics of the N indicator lights of each physical disk in the N rounds of physical disk read-write operations and the disk installation positions corresponding to the actual flickering characteristics, and obtain corresponding flickering statistical results;

根据每一物理磁盘的逻辑盘符所对应的所述编码信息,从预设映射表中确定出与每一物理磁盘的N个指示灯对应的预设闪烁特征;According to the encoding information corresponding to the logical drive letter of each physical disk, the preset flickering feature corresponding to the N indicator lights of each physical disk is determined from the preset mapping table;

从所述闪烁统计结果中,查找与每一物理磁盘对应的预设闪烁特征相一致的实际闪烁特征以及相应的磁盘安装位置,并将查找到的磁盘安装位置确定为相应物理磁盘的安装位置。From the flicker statistics results, search for the actual flicker characteristic consistent with the preset flicker characteristic corresponding to each physical disk and the corresponding disk installation position, and determine the found disk installation position as the installation position of the corresponding physical disk.

可选的,所述执行N轮物理磁盘读写操作,包括:Optionally, the performing N rounds of physical disk read and write operations includes:

获取每一物理磁盘的逻辑盘符的编码信息;Obtain the encoding information of the logical drive letter of each physical disk;

根据每一所述编码信息,从所有物理磁盘中确定出每一轮物理磁盘读写操作对应的需要进行写入操作的物理磁盘,得到所述N轮物理磁盘读写操作的待读写磁盘统计信息;According to each of the encoded information, determine the physical disks that need to be written corresponding to each round of physical disk read and write operations from all the physical disks, and obtain the statistics of the disks to be read and written for the N rounds of physical disk read and write operations. information;

根据所述待读写磁盘统计信息,自动地执行所述N轮物理磁盘读写操作。According to the statistical information of the disk to be read and written, the N rounds of physical disk read and write operations are automatically performed.

可选的,所述执行N轮物理磁盘读写操作,包括:Optionally, the performing N rounds of physical disk read and write operations includes:

获取用户通过预设读写指令接口输入的读写指令集;Obtain the read and write command set input by the user through the preset read and write command interface;

根据所述读写指令集,执行所述N轮物理磁盘读写操作。According to the read and write instruction set, the N rounds of physical disk read and write operations are performed.

可选的,所述记录所述N轮物理磁盘读写操作中每一物理磁盘的N个指示灯的实际闪烁特征以及与实际闪烁特征对应的磁盘安装位置,得到相应的闪烁统计结果,包括:Optionally, the actual flickering characteristics of the N indicator lights of each physical disk in the N rounds of physical disk read-write operations and the disk installation positions corresponding to the actual flickering characteristics are recorded, and corresponding flickering statistical results are obtained, including:

利用预设的闪烁特征采集装置,记录所述N轮物理磁盘读写操作中每一物理磁盘的N个指示灯的实际闪烁特征;Utilize a preset flickering feature acquisition device to record the actual flickering features of the N indicator lights of each physical disk in the N rounds of physical disk read-write operations;

将记录的实际闪烁特征与相应的磁盘安装位置进行绑定,得到相应的闪烁统计结果。Bind the recorded actual flicker characteristics to the corresponding disk installation positions to obtain the corresponding flicker statistical results.

可选的,所述记录所述N轮物理磁盘读写操作中每一物理磁盘的N个指示灯的实际闪烁特征以及与实际闪烁特征对应的磁盘安装位置,得到相应的闪烁统计结果,包括:Optionally, the actual flickering characteristics of the N indicator lights of each physical disk in the N rounds of physical disk read-write operations and the disk installation positions corresponding to the actual flickering characteristics are recorded, and corresponding flickering statistical results are obtained, including:

通过人工记录方式,记录所述N轮物理磁盘读写操作中每一物理磁盘的N个指示灯的实际闪烁特征以及与实际闪烁特征对应的磁盘安装位置,得到相应的闪烁统计结果。By manual recording, the actual flickering characteristics of the N indicators of each physical disk in the N rounds of physical disk read and write operations and the disk installation positions corresponding to the actual flickering characteristics are recorded, and corresponding flickering statistical results are obtained.

可选的,所述从预设映射表中确定出与每一物理磁盘的N个指示灯对应的预设闪烁特征之前,还包括:Optionally, before the preset flickering feature corresponding to the N indicator lights of each physical disk is determined from the preset mapping table, the method further includes:

通过表格方式,记录每一所述编码信息与相应的预设闪烁特征之间的对应关系,得到所述预设映射表。In a table manner, the corresponding relationship between each of the encoded information and the corresponding preset flickering feature is recorded to obtain the preset mapping table.

可选的,所述服务器物理磁盘定位方法,还包括:Optionally, the method for locating a physical disk of a server further includes:

根据所述服务器中的物理磁盘的数量,确定每一物理磁盘的所述编码信息的位数。The number of bits of the encoded information per physical disk is determined according to the number of physical disks in the server.

第二方面,本申请公开了一种服务器物理磁盘定位装置,用于对服务器中的物理磁盘进行定位,其中,每一物理磁盘的逻辑盘符均携带有唯一对应的编码信息,每一所述编码信息均为N位二进制编码,并且,每一物理磁盘上均设有N个指示灯,每一物理磁盘上的N个指示灯与相应所述编码信息中的N位二进制编码分别一一对应,N为小于物理磁盘总数的正整数;所述装置包括:In a second aspect, the present application discloses a device for locating a physical disk of a server, which is used for locating a physical disk in a server, wherein the logical drive letter of each physical disk carries unique corresponding encoding information, and each of the The encoded information is all N-bit binary codes, and each physical disk is provided with N indicator lights, and the N indicator lights on each physical disk are in one-to-one correspondence with the N-bit binary codes in the corresponding encoded information. , N is a positive integer smaller than the total number of physical disks; the device includes:

读写执行模块,用于执行N轮物理磁盘读写操作;其中,在执行第i轮物理磁盘读写操作时,对所述编码信息的第i位二进制符号为1的物理磁盘同时进行读写操作;The read-write execution module is used for performing N rounds of physical disk read-write operations; wherein, when performing the i-th round of physical disk read-write operations, simultaneously read and write to the physical disk whose i-th binary symbol of the encoded information is 1 operate;

闪烁统计模块,用于记录所述N轮物理磁盘读写操作中每一物理磁盘的N个指示灯的实际闪烁特征以及与实际闪烁特征对应的磁盘安装位置,得到相应的闪烁统计结果;A flickering statistics module, used to record the actual flickering characteristics of the N indicator lights of each physical disk in the N rounds of physical disk read-write operations and the disk installation positions corresponding to the actual flickering characteristics, and obtain corresponding flickering statistical results;

特征确定模块,用于根据每一物理磁盘的逻辑盘符所对应的所述编码信息,从预设映射表中确定出与每一物理磁盘的N个指示灯对应的预设闪烁特征;A feature determination module, configured to determine, from a preset mapping table, a preset flickering feature corresponding to the N indicator lights of each physical disk according to the encoding information corresponding to the logical drive letter of each physical disk;

位置确定模块,用于从所述闪烁统计结果中,查找与每一物理磁盘对应的预设闪烁特征相一致的实际闪烁特征以及相应的磁盘安装位置,并将查找到的磁盘安装位置确定为相应物理磁盘的安装位置。A location determination module, configured to search for the actual flickering feature consistent with the preset flickering feature corresponding to each physical disk and the corresponding disk installation position from the flickering statistical results, and determine the found disk installation position as the corresponding The installation location of the physical disk.

第三方面,本申请公开了一种服务器物理磁盘定位设备,用于对服务器中的物理磁盘进行定位,其中,每一物理磁盘的逻辑盘符均携带有唯一对应的编码信息,每一所述编码信息均为N位二进制编码,并且,每一物理磁盘上均设有N个指示灯,每一物理磁盘上的N个指示灯与相应所述编码信息中的N位二进制编码分别一一对应,N为小于物理磁盘总数的正整数;所述设备包括:In a third aspect, the present application discloses a server physical disk locating device for locating physical disks in a server, wherein the logical drive letter of each physical disk carries unique corresponding encoding information, and each The encoded information is all N-bit binary codes, and each physical disk is provided with N indicator lights, and the N indicator lights on each physical disk are in one-to-one correspondence with the N-bit binary codes in the corresponding encoded information. , N is a positive integer smaller than the total number of physical disks; the device includes:

存储器,用于保存计算机程序;memory for storing computer programs;

处理器,用于执行所述计算机程序,以实现前述公开的服务器物理磁盘定位方法。The processor is configured to execute the computer program to implement the method for locating a physical disk of a server disclosed above.

第四方面,本申请公开了一种计算机可读存储介质,用于保存计算机程序;其中,所述计算机程序被处理器执行时实现前述公开的服务器物理磁盘定位方法。In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the aforementioned method for locating a physical disk of a server is implemented.

可见,本申请中每一物理磁盘的逻辑盘符均携带有唯一对应的编码信息,每一所述编码信息均为N位二进制编码,并且,每一物理磁盘上均设有N个指示灯,每一物理磁盘上的N个指示灯与相应所述编码信息中的N位二进制编码分别一一对应,N为小于物理磁盘总数的正整数;在对服务器的磁盘进行定位时,只需进行N轮物理磁盘读写操作,每轮读写操作中可以对编码信息的第i位二进制符号为1的物理磁盘同时进行读写操作,并且会记录与上述N轮读写操作对应的指示灯的闪烁统计结果,基于上述闪烁统计结果以及预设映射表,便可以得到服务器中所有物理磁盘的安装位置。由此可见,本申请中只需进行N轮(N小于物理磁盘总数)读写操作即可实现对服务器中的所有物理磁盘的定位,从而有效地减少了对服务器的磁盘进行定位时所需时间。It can be seen that the logical drive letter of each physical disk in this application carries unique corresponding encoding information, and each described encoding information is an N-bit binary code, and each physical disk is provided with N indicator lights, The N indicators on each physical disk are in one-to-one correspondence with the N-bit binary codes in the corresponding encoded information, and N is a positive integer less than the total number of physical disks; when locating the disks of the server, only N Rounds of physical disk read and write operations. In each round of read and write operations, read and write operations can be performed on the physical disk with the ith binary symbol of the encoded information being 1 at the same time, and the flashing of the indicator lights corresponding to the above N rounds of read and write operations will be recorded. According to the statistical result, based on the above-mentioned flickering statistical result and the preset mapping table, the installation positions of all physical disks in the server can be obtained. It can be seen that, in this application, only N rounds (N is less than the total number of physical disks) of read and write operations can be performed to locate all physical disks in the server, thereby effectively reducing the time required for locating the disks of the server .

附图说明Description of drawings

为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the accompanying drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only It is an embodiment of the present application. For those of ordinary skill in the art, other drawings can also be obtained according to the provided drawings without any creative effort.

图1为本申请公开的一种服务器物理磁盘定位方法流程图;1 is a flowchart of a method for locating a physical disk of a server disclosed in the application;

图2为本申请公开的一种服务器物理磁盘定位装置结构示意图。FIG. 2 is a schematic structural diagram of a server physical disk positioning device disclosed in the present application.

具体实施方式Detailed ways

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of this application.

当前,对服务器中的物理磁盘进行定位的最简单有效的方法是利用系统内磁盘读写命令对一块磁盘进行读写,磁盘上有对应的读写指示灯,运行dd命令时查看服务器磁盘的指示灯,指示灯闪烁则表示此磁盘在进行读写,以此定位磁盘的物理位置。虽然上述磁盘定位方法简单有效,能够非常直观的确定逻辑盘符对应的物理磁盘的位置,但是这种方案的缺点在于每轮磁盘读写操作只对一个磁盘进行读写,也即每轮读写操作只能确定一块磁盘的位置。当磁盘数量很多的时候,这种方案是非常费时的。为此,本申请公开了一种服务器物理磁盘定位方案,能够有效解决上述技术问题。At present, the simplest and most effective way to locate the physical disk in the server is to use the disk read and write commands in the system to read and write a disk. There are corresponding read and write indicators on the disk. When running the dd command, check the instructions of the server disk. The indicator light flashes to indicate that the disk is reading and writing, so as to locate the physical location of the disk. Although the above-mentioned disk positioning method is simple and effective, and can very intuitively determine the location of the physical disk corresponding to the logical drive letter, the disadvantage of this solution is that each round of disk read and write operations only reads and writes to one disk, that is, each round of read and write operations. An operation can only determine the location of a disk. When the number of disks is large, this solution is very time-consuming. Therefore, the present application discloses a server physical disk positioning solution, which can effectively solve the above technical problems.

参见图1所示,本申请实施例公开了一种服务器物理磁盘定位方法,用于对服务器中的物理磁盘进行定位,其中,每一物理磁盘的逻辑盘符均携带有唯一对应的编码信息,每一所述编码信息均为N位二进制编码,并且,每一物理磁盘上均设有N个指示灯,每一物理磁盘上的N个指示灯与相应所述编码信息中的N位二进制编码分别一一对应,N为小于物理磁盘总数的正整数;所述方法包括:Referring to FIG. 1 , an embodiment of the present application discloses a method for locating a physical disk of a server, which is used for locating a physical disk in a server, wherein the logical drive letter of each physical disk carries unique corresponding encoding information, Each of the encoded information is an N-bit binary code, and each physical disk is provided with N indicator lights, and the N indicator lights on each physical disk correspond to the N-bit binary code in the encoded information. One-to-one correspondence, N is a positive integer smaller than the total number of physical disks; the method includes:

步骤S11:执行N轮物理磁盘读写操作;其中,在执行第i轮物理磁盘读写操作时,对所述编码信息的第i位二进制符号为1的物理磁盘同时进行读写操作;i的取值范围从1至N;Step S11: perform N rounds of physical disk read-write operations; wherein, when performing the i-th round of physical disk read-write operations, simultaneously perform read-write operations to the physical disk whose i-th binary symbol of the encoded information is 1; The value ranges from 1 to N;

步骤S12:记录所述N轮物理磁盘读写操作中每一物理磁盘的N个指示灯的实际闪烁特征以及与实际闪烁特征对应的磁盘安装位置,得到相应的闪烁统计结果;Step S12: record the actual flickering characteristics of the N indicator lights of each physical disk in the N rounds of physical disk read-write operations and the disk installation positions corresponding to the actual flickering characteristics, and obtain corresponding flickering statistical results;

步骤S13:根据每一物理磁盘的逻辑盘符所对应的所述编码信息,从预设映射表中确定出与每一物理磁盘的N个指示灯对应的预设闪烁特征;Step S13: According to the coding information corresponding to the logical drive letter of each physical disk, determine the preset flickering feature corresponding to the N indicator lights of each physical disk from the preset mapping table;

步骤S14:从所述闪烁统计结果中,查找与每一物理磁盘对应的预设闪烁特征相一致的实际闪烁特征以及相应的磁盘安装位置,并将查找到的磁盘安装位置确定为相应物理磁盘的安装位置。Step S14: From the flicker statistics results, search for the actual flicker feature consistent with the preset flicker feature corresponding to each physical disk and the corresponding disk installation position, and determine the found disk installation position as the corresponding physical disk. installation location.

需要指出的是,本实施例中,指示灯闪烁时,对应的二进制符合为1,指示灯不闪烁时,对应的二进制符号为0。It should be noted that, in this embodiment, when the indicator light is flashing, the corresponding binary coincidence is 1, and when the indicator light is not flashing, the corresponding binary symbol is 0.

下面,以linux系统下服务器的12块物理磁盘定位为例。假定磁盘逻辑盘符为sda、sdb、sdc、sdd、sde、sdf、sdg、sdh、sdi、sdj、sdk、sdl,以二进制将上述12块逻辑盘符编码如下表1所示:Below, take the location of 12 physical disks of the server under the Linux system as an example. Assuming that the disk logical drive letters are sda, sdb, sdc, sdd, sde, sdf, sdg, sdh, sdi, sdj, sdk, and sdl, the above 12 logical drive letters are encoded in binary as shown in Table 1 below:

表1Table 1

盘符drive letter编码codingsdasda00000000sdbsdb00010001sdcsdc00100010sddsd00110011sdesde01000100sdfsdf01010101sdgsdg01100110sdhsdh01110111sdisdi10001000sdjsdj10011001sdksdk10101010sdlsdl10111011

按照4位二进制编码,一共进行4轮物理磁盘读写操作,编码第一位为1的磁盘进行第一轮读写操作,编码第二位为1的磁盘进行第二轮磁盘读写操作,编码第三位为1的磁盘进行第三轮磁盘读写操作,编码第四位为1的磁盘进行第四轮磁盘读写操作。本例中四轮磁盘读写操作如下:According to the 4-bit binary code, a total of 4 rounds of physical disk read and write operations are performed. The first round of read and write operations is performed on the disk whose first bit is 1. The second round of disk read and write operations is performed on the disk with the second bit of 1. The disk whose third digit is 1 performs the third round of disk read and write operations, and the disk whose fourth digit is 1 performs the fourth round of disk read and write operations. In this example, the four rounds of disk read and write operations are as follows:

第一次执行指令:Execute the command for the first time:

dd if=/dev/sdi of=/dev/zero&dd if=/dev/sdi of=/dev/zero&

dd if=/dev/sdj of=/dev/zero&dd if=/dev/sdj of=/dev/zero&

dd if=/dev/sdk of=/dev/zero&dd if=/dev/sdk of=/dev/zero&

dd if=/dev/sdl of=/dev/zero&dd if=/dev/sdl of=/dev/zero&

第二次执行指令:The second execution of the command:

dd if=/dev/sde of=/dev/zero&dd if=/dev/sde of=/dev/zero&

dd if=/dev/sdf of=/dev/zero&dd if=/dev/sdf of=/dev/zero&

dd if=/dev/sdg of=/dev/zero&dd if=/dev/sdg of=/dev/zero&

dd if=/dev/sdh of=/dev/zero&dd if=/dev/sdh of=/dev/zero&

第三次执行指令:The third execution of the command:

dd if=/dev/sdc of=/dev/zero&dd if=/dev/sdc of=/dev/zero&

dd if=/dev/sdd of=/dev/zero&dd if=/dev/sdd of=/dev/zero&

dd if=/dev/sdg of=/dev/zero&dd if=/dev/sdg of=/dev/zero&

dd if=/dev/sdh of=/dev/zero&dd if=/dev/sdh of=/dev/zero&

dd if=/dev/sdk of=/dev/zero&dd if=/dev/sdk of=/dev/zero&

dd if=/dev/sdl of=/dev/zero&dd if=/dev/sdl of=/dev/zero&

第四次执行指令:Fourth execution of the command:

dd if=/dev/sdb of=/dev/zero&dd if=/dev/sdb of=/dev/zero&

dd if=/dev/sdd of=/dev/zero&dd if=/dev/sdd of=/dev/zero&

dd if=/dev/sdf of=/dev/zero&dd if=/dev/sdf of=/dev/zero&

dd if=/dev/sdh of=/dev/zero&dd if=/dev/sdh of=/dev/zero&

dd if=/dev/sdj of=/dev/zero&dd if=/dev/sdj of=/dev/zero&

dd if=/dev/sdl of=/dev/zero&dd if=/dev/sdl of=/dev/zero&

执行以上四轮操作后能够得到四个物理磁盘指示灯闪烁的统计结果,根据编码可以分析得到下表2,由此可以得到所有物理磁盘对应的位置。以上编码方式可以扩展到任意多个磁盘,根据二进制编码的原理,n位编码能够表示2的n次方个不同的符号,因此对于服务器的k个磁盘来说,只需要floor(log2k)+1轮(其中floor表示向下取整函数)操作就能够将服务器中的所有物理磁盘全部完成定位。After performing the above four rounds of operations, the statistical results of the flashing indicators of the four physical disks can be obtained. According to the code, the following table 2 can be obtained by analysis, from which the corresponding positions of all physical disks can be obtained. The above encoding method can be extended to any number of disks. According to the principle of binary encoding, n-bit encoding can represent 2 to the nth power of different symbols. Therefore, for the k disks of the server, only floor(log2 k) +1 round (where floor represents the rounding down function) operation can complete the positioning of all physical disks in the server.

表2Table 2

第一轮first round第二轮second round第三轮third round第四轮fourth round对应磁盘Corresponding disk不闪烁not flickering不闪烁not flickering不闪烁not flickering不闪烁not flickeringsdasda不闪烁not flickering不闪烁not flickering不闪烁not flickering闪烁flickersdbsdb不闪烁not flickering不闪烁not flickering闪烁flicker不闪烁not flickeringsdcsdc不闪烁not flickering不闪烁not flickering闪烁flicker闪烁flickersddsd不闪烁not flickering闪烁flicker不闪烁not flickering不闪烁not flickeringsdesde不闪烁not flickering闪烁flicker不闪烁not flickering闪烁flickersdfsdf不闪烁not flickering闪烁flicker闪烁flicker不闪烁not flickeringsdgsdg不闪烁not flickering闪烁flicker闪烁flicker闪烁flickersdhsdh闪烁flicker不闪烁not flickering不闪烁not flickering不闪烁not flickeringsdisdi闪烁flicker不闪烁not flickering不闪烁not flickering闪烁flickersdjsdj闪烁flicker不闪烁not flickering闪烁flicker不闪烁not flickeringsdksdk闪烁flicker不闪烁not flickering闪烁flicker闪烁flickersdlsdl

可见,本申请实施例中每一物理磁盘的逻辑盘符均携带有唯一对应的编码信息,每一所述编码信息均为N位二进制编码,并且,每一物理磁盘上均设有N个指示灯,每一物理磁盘上的N个指示灯与相应所述编码信息中的N位二进制编码分别一一对应,N为小于物理磁盘总数的正整数;在对服务器的磁盘进行定位时,只需进行N轮物理磁盘读写操作,每轮读写操作中可以对编码信息的第i位二进制符号为1的物理磁盘同时进行读写操作,并且会记录与上述N轮读写操作对应的指示灯的闪烁统计结果,基于上述闪烁统计结果以及预设映射表,便可以得到服务器中所有物理磁盘的安装位置。由此可见,本申请实施例中只需进行N轮(N小于物理磁盘总数)读写操作即可实现对服务器中的所有物理磁盘的定位,从而有效地减少了对服务器的磁盘进行定位时所需时间。It can be seen that in the embodiments of the present application, the logical drive letter of each physical disk carries unique corresponding encoding information, each of the encoding information is an N-bit binary code, and each physical disk is provided with N indications The N indicators on each physical disk are in one-to-one correspondence with the N-bit binary codes in the corresponding encoded information, and N is a positive integer less than the total number of physical disks; when locating the disks of the server, only Perform N rounds of physical disk read and write operations. In each round of read and write operations, read and write operations can be performed on the physical disk with the ith binary symbol of coded information being 1 at the same time, and the indicator lights corresponding to the above N rounds of read and write operations will be recorded. Based on the flicker statistics result and the preset mapping table, the installation positions of all physical disks in the server can be obtained. It can be seen that, in the embodiment of the present application, only N rounds of read and write operations (N is less than the total number of physical disks) can be performed to locate all physical disks in the server, thereby effectively reducing the time required for locating the disks of the server. It takes time.

在前述实施例的基础上,本申请实施例对技术方案进行了进一步的说明和优化。具体如下:On the basis of the foregoing embodiments, the embodiments of the present application further describe and optimize the technical solutions. details as follows:

在一种具体实施方式中,所述执行N轮物理磁盘读写操作,具体可以包括:In a specific implementation manner, the performing N rounds of physical disk read and write operations may specifically include:

获取用户通过预设读写指令接口输入的读写指令集;Obtain the read and write command set input by the user through the preset read and write command interface;

根据所述读写指令集,执行所述N轮物理磁盘读写操作。According to the read and write instruction set, the N rounds of physical disk read and write operations are performed.

为了提高读写操作的执行效率,在另一种具体实施方式中,所述执行N轮物理磁盘读写操作,具体可以包括:In order to improve the execution efficiency of read and write operations, in another specific implementation manner, the performing N rounds of physical disk read and write operations may specifically include:

获取每一物理磁盘的逻辑盘符的编码信息;Obtain the encoding information of the logical drive letter of each physical disk;

根据每一所述编码信息,从所有物理磁盘中确定出每一轮物理磁盘读写操作对应的需要进行写入操作的物理磁盘,得到所述N轮物理磁盘读写操作的待读写磁盘统计信息;According to each of the encoded information, determine the physical disks that need to be written corresponding to each round of physical disk read and write operations from all the physical disks, and obtain the statistics of the disks to be read and written for the N rounds of physical disk read and write operations. information;

根据所述待读写磁盘统计信息,自动地执行所述N轮物理磁盘读写操作。According to the statistical information of the disk to be read and written, the N rounds of physical disk read and write operations are automatically performed.

在一种具体实施方式中,所述记录所述N轮物理磁盘读写操作中每一物理磁盘的N个指示灯的实际闪烁特征以及与实际闪烁特征对应的磁盘安装位置,得到相应的闪烁统计结果,具体可以包括:In a specific embodiment, the actual flickering characteristics of the N indicator lights of each physical disk in the N rounds of physical disk read and write operations and the disk installation positions corresponding to the actual flickering characteristics are recorded, and corresponding flicker statistics are obtained. The results, specifically, can include:

通过人工记录方式,记录所述N轮物理磁盘读写操作中每一物理磁盘的N个指示灯的实际闪烁特征以及与实际闪烁特征对应的磁盘安装位置,得到相应的闪烁统计结果。By manual recording, the actual flickering characteristics of the N indicators of each physical disk in the N rounds of physical disk read and write operations and the disk installation positions corresponding to the actual flickering characteristics are recorded, and corresponding flickering statistical results are obtained.

为了提高闪烁统计速度,在另一种具体实施方式中,所述记录所述N轮物理磁盘读写操作中每一物理磁盘的N个指示灯的实际闪烁特征以及与实际闪烁特征对应的磁盘安装位置,得到相应的闪烁统计结果,具体可以包括:In order to improve the speed of flicker statistics, in another specific implementation manner, the actual flicker characteristics of the N indicator lights of each physical disk in the N rounds of physical disk read and write operations and the disk installation corresponding to the actual flicker characteristics are recorded. position, and obtain the corresponding flickering statistical results, which can include:

利用预设的闪烁特征采集装置,记录所述N轮物理磁盘读写操作中每一物理磁盘的N个指示灯的实际闪烁特征;Utilize a preset flickering feature acquisition device to record the actual flickering features of the N indicator lights of each physical disk in the N rounds of physical disk read-write operations;

将记录的实际闪烁特征与相应的磁盘安装位置进行绑定,得到相应的闪烁统计结果。Bind the recorded actual flicker characteristics to the corresponding disk installation positions to obtain the corresponding flicker statistical results.

可以理解的是,上述闪烁特征采集装置具体可以是光线传感器。It can be understood that, the above-mentioned flicker feature collection device may specifically be a light sensor.

进一步的,所述从预设映射表中确定出与每一物理磁盘的N个指示灯对应的预设闪烁特征之前,还包括:Further, before determining the preset flickering features corresponding to the N indicators of each physical disk from the preset mapping table, the method further includes:

通过表格方式,记录每一所述编码信息与相应的预设闪烁特征之间的对应关系,得到所述预设映射表。In a table manner, the corresponding relationship between each of the encoded information and the corresponding preset flickering feature is recorded to obtain the preset mapping table.

进一步的,本实施例中的服务器物理磁盘定位方法,还可以包括:根据所述服务器中的物理磁盘的数量,确定每一物理磁盘的所述编码信息的位数。Further, the method for locating a physical disk of a server in this embodiment may further include: determining the number of bits of the encoded information of each physical disk according to the number of physical disks in the server.

优选的,本实施例可以将floor(log2k)+1的数值作为所述编码信息的位数,其中,k为服务器中物理磁盘的数量。Preferably, in this embodiment, the value of floor(log2 k)+1 may be used as the number of bits of the encoded information, where k is the number of physical disks in the server.

参见图2所示,本申请实施例还公开了一种服务器物理磁盘定位装置,用于对服务器中的物理磁盘进行定位,其中,每一物理磁盘的逻辑盘符均携带有唯一对应的编码信息,每一所述编码信息均为N位二进制编码,并且,每一物理磁盘上均设有N个指示灯,每一物理磁盘上的N个指示灯与相应所述编码信息中的N位二进制编码分别一一对应,N为小于物理磁盘总数的正整数;所述装置包括:Referring to FIG. 2 , an embodiment of the present application further discloses a server physical disk positioning device for positioning physical disks in the server, wherein the logical drive letter of each physical disk carries unique corresponding encoding information , each described encoding information is N-bit binary code, and, each physical disk is provided with N indicator lights, the N indicator lights on each physical disk and the N-bit binary code in the corresponding described encoding information The codes are in one-to-one correspondence, and N is a positive integer smaller than the total number of physical disks; the device includes:

读写执行模块11,用于执行N轮物理磁盘读写操作;其中,在执行第i轮物理磁盘读写操作时,对所述编码信息的第i位二进制符号为1的物理磁盘同时进行读写操作;The read-write execution module 11 is used to perform N rounds of physical disk read-write operations; wherein, when performing the i-th round of physical disk read-write operations, the physical disks whose i-th binary symbol of the encoded information is 1 are simultaneously read write operation;

闪烁统计模块12,用于记录所述N轮物理磁盘读写操作中每一物理磁盘的N个指示灯的实际闪烁特征以及与实际闪烁特征对应的磁盘安装位置,得到相应的闪烁统计结果;The flicker statistics module 12 is used to record the actual flicker characteristics of the N indicator lights of each physical disk in the N rounds of physical disk read-write operations and the disk installation positions corresponding to the actual flicker characteristics, and obtain corresponding flicker statistical results;

特征确定模块13,用于根据每一物理磁盘的逻辑盘符所对应的所述编码信息,从预设映射表中确定出与每一物理磁盘的N个指示灯对应的预设闪烁特征;The feature determination module 13 is used to determine the preset flickering feature corresponding to the N indicator lights of each physical disk from the preset mapping table according to the coding information corresponding to the logical drive letter of each physical disk;

位置确定模块14,用于从所述闪烁统计结果中,查找与每一物理磁盘对应的预设闪烁特征相一致的实际闪烁特征以及相应的磁盘安装位置,并将查找到的磁盘安装位置确定为相应物理磁盘的安装位置。The position determination module 14 is used to find the actual flickering feature consistent with the preset flickering feature corresponding to each physical disk and the corresponding disk installation position from the flickering statistical results, and determine the found disk installation position as The installation location of the corresponding physical disk.

其中,关于上述各个模块更加具体的工作过程可以参考前述实施例中公开的相应内容,在此不再进行赘述。For more specific working processes of the above-mentioned modules, reference may be made to the corresponding contents disclosed in the foregoing embodiments, which will not be repeated here.

可见,本申请实施例中每一物理磁盘的逻辑盘符均携带有唯一对应的编码信息,每一所述编码信息均为N位二进制编码,并且,每一物理磁盘上均设有N个指示灯,每一物理磁盘上的N个指示灯与相应所述编码信息中的N位二进制编码分别一一对应,N为小于物理磁盘总数的正整数;在对服务器的磁盘进行定位时,只需进行N轮物理磁盘读写操作,每轮读写操作中可以对编码信息的第i位二进制符号为1的物理磁盘同时进行读写操作,并且会记录与上述N轮读写操作对应的指示灯的闪烁统计结果,基于上述闪烁统计结果以及预设映射表,便可以得到服务器中所有物理磁盘的安装位置。由此可见,本申请实施例中只需进行N轮(N小于物理磁盘总数)读写操作即可实现对服务器中的所有物理磁盘的定位,从而有效地减少了对服务器的磁盘进行定位时所需时间。It can be seen that in the embodiments of the present application, the logical drive letter of each physical disk carries unique corresponding encoding information, each of the encoding information is an N-bit binary code, and each physical disk is provided with N indications The N indicators on each physical disk are in one-to-one correspondence with the N-bit binary codes in the corresponding encoded information, and N is a positive integer less than the total number of physical disks; when locating the disks of the server, only Perform N rounds of physical disk read and write operations. In each round of read and write operations, read and write operations can be performed on the physical disk with the ith binary symbol of coded information being 1 at the same time, and the indicator lights corresponding to the above N rounds of read and write operations will be recorded. Based on the flicker statistics result and the preset mapping table, the installation positions of all physical disks in the server can be obtained. It can be seen that, in the embodiment of the present application, only N rounds of read and write operations (N is less than the total number of physical disks) can be performed to locate all physical disks in the server, thereby effectively reducing the time required for locating the disks of the server. It takes time.

进一步的,本申请还公开了一种服务器物理磁盘定位设备,用于对服务器中的物理磁盘进行定位,其中,每一物理磁盘的逻辑盘符均携带有唯一对应的编码信息,每一所述编码信息均为N位二进制编码,并且,每一物理磁盘上均设有N个指示灯,每一物理磁盘上的N个指示灯与相应所述编码信息中的N位二进制编码分别一一对应,N为小于物理磁盘总数的正整数;所述设备包括:Further, the present application also discloses a server physical disk locating device for locating physical disks in the server, wherein the logical drive letter of each physical disk carries unique corresponding encoding information, and each The encoded information is all N-bit binary codes, and each physical disk is provided with N indicator lights, and the N indicator lights on each physical disk are in one-to-one correspondence with the N-bit binary codes in the corresponding encoded information. , N is a positive integer smaller than the total number of physical disks; the device includes:

存储器,用于保存计算机程序;memory for storing computer programs;

处理器,用于执行所述计算机程序,以实现前述实施例公开的服务器物理磁盘定位方法。The processor is configured to execute the computer program to implement the method for locating a physical disk of a server disclosed in the foregoing embodiments.

进一步的,本申请还公开了一种计算机可读存储介质,用于保存计算机程序;其中,所述计算机程序被处理器执行时实现前述实施例公开的服务器物理磁盘定位方法。Further, the present application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the method for locating a physical disk of a server disclosed in the foregoing embodiments is implemented.

本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其它实施例的不同之处,各个实施例之间相同或相似部分互相参见即可。对于实施例公开的装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments may be referred to each other. As for the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant part can be referred to the description of the method.

结合本文中所公开的实施例描述的方法或算法的步骤可以直接用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质中。The steps of a method or algorithm described in conjunction with the embodiments disclosed herein may be directly implemented in hardware, a software module executed by a processor, or a combination of the two. A software module can be placed in random access memory (RAM), internal memory, read only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other in the technical field. in any other known form of storage medium.

以上对本申请所提供的一种服务器物理磁盘定位方法、装置、设备及介质进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。A method, apparatus, device and medium for locating a physical disk of a server provided by the present application have been described in detail above. The principles and implementations of the present application are described with specific examples. The descriptions of the above embodiments are only used for Help to understand the method of the present application and its core idea; meanwhile, for those of ordinary skill in the art, according to the idea of the present application, there will be changes in the specific implementation and application scope. In summary, the content of this specification It should not be construed as a limitation of this application.

Claims (10)

Translated fromChinese
1.一种服务器物理磁盘定位方法,其特征在于,用于对服务器中的物理磁盘进行定位,其中,每一物理磁盘的逻辑盘符均携带有唯一对应的编码信息,每一所述编码信息均为N位二进制编码,并且,每一物理磁盘上均设有N个指示灯,每一物理磁盘上的N个指示灯与相应所述编码信息中的N位二进制编码分别一一对应,N为小于物理磁盘总数的正整数;所述方法包括:1. a server physical disk positioning method, it is characterized in that, for the physical disk in the server is positioned, wherein, the logical drive letter of each physical disk all carries unique corresponding encoding information, each described encoding information They are all N-bit binary codes, and each physical disk is provided with N indicator lights, and the N indicator lights on each physical disk are in one-to-one correspondence with the N-bit binary codes in the corresponding encoded information. is a positive integer less than the total number of physical disks; the method includes:执行N轮物理磁盘读写操作;其中,在执行第i轮物理磁盘读写操作时,对所述编码信息的第i位二进制符号为1的物理磁盘同时进行读写操作;Perform N rounds of physical disk read-write operations; wherein, when performing the i-th round of physical disk read-write operations, the physical disks whose i-th binary symbol of the encoded information is 1 are simultaneously read and written operations;记录所述N轮物理磁盘读写操作中每一物理磁盘的N个指示灯的实际闪烁特征以及与实际闪烁特征对应的磁盘安装位置,得到相应的闪烁统计结果;Record the actual flickering characteristics of the N indicator lights of each physical disk in the N rounds of physical disk read-write operations and the disk installation positions corresponding to the actual flickering characteristics, and obtain corresponding flickering statistical results;根据每一物理磁盘的逻辑盘符所对应的所述编码信息,从预设映射表中确定出与每一物理磁盘的N个指示灯对应的预设闪烁特征;According to the encoding information corresponding to the logical drive letter of each physical disk, the preset flickering feature corresponding to the N indicator lights of each physical disk is determined from the preset mapping table;从所述闪烁统计结果中,查找与每一物理磁盘对应的预设闪烁特征相一致的实际闪烁特征以及相应的磁盘安装位置,并将查找到的磁盘安装位置确定为相应物理磁盘的安装位置。From the flicker statistics results, search for the actual flicker characteristic consistent with the preset flicker characteristic corresponding to each physical disk and the corresponding disk installation position, and determine the found disk installation position as the installation position of the corresponding physical disk.2.根据权利要求1所述的服务器物理磁盘定位方法,其特征在于,所述执行N轮物理磁盘读写操作,包括:2. The method for locating a physical disk of a server according to claim 1, wherein the performing N rounds of physical disk read and write operations comprises:获取每一物理磁盘的逻辑盘符的编码信息;Obtain the encoding information of the logical drive letter of each physical disk;根据每一所述编码信息,从所有物理磁盘中确定出每一轮物理磁盘读写操作对应的需要进行写入操作的物理磁盘,得到所述N轮物理磁盘读写操作的待读写磁盘统计信息;According to each of the encoded information, determine the physical disks that need to be written corresponding to each round of physical disk read and write operations from all the physical disks, and obtain the statistics of the disks to be read and written for the N rounds of physical disk read and write operations. information;根据所述待读写磁盘统计信息,自动地执行所述N轮物理磁盘读写操作。According to the statistical information of the disk to be read and written, the N rounds of physical disk read and write operations are automatically performed.3.根据权利要求1所述的服务器物理磁盘定位方法,其特征在于,所述执行N轮物理磁盘读写操作,包括:3. The server physical disk positioning method according to claim 1, wherein the performing N rounds of physical disk read and write operations comprises:获取用户通过预设读写指令接口输入的读写指令集;Obtain the read and write command set input by the user through the preset read and write command interface;根据所述读写指令集,执行所述N轮物理磁盘读写操作。According to the read and write instruction set, the N rounds of physical disk read and write operations are performed.4.根据权利要求1所述的服务器物理磁盘定位方法,其特征在于,所述记录所述N轮物理磁盘读写操作中每一物理磁盘的N个指示灯的实际闪烁特征以及与实际闪烁特征对应的磁盘安装位置,得到相应的闪烁统计结果,包括:4. The method for locating a physical disk of a server according to claim 1, wherein the actual flickering characteristics of the N indicator lights of each physical disk in the N rounds of physical disk read-write operations and the actual flickering characteristics of the recording are recorded. Corresponding disk installation location, get the corresponding flicker statistics results, including:利用预设的闪烁特征采集装置,记录所述N轮物理磁盘读写操作中每一物理磁盘的N个指示灯的实际闪烁特征;Utilize a preset flickering feature acquisition device to record the actual flickering features of the N indicator lights of each physical disk in the N rounds of physical disk read-write operations;将记录的实际闪烁特征与相应的磁盘安装位置进行绑定,得到相应的闪烁统计结果。Bind the recorded actual flicker characteristics to the corresponding disk installation positions to obtain the corresponding flicker statistical results.5.根据权利要求1所述的服务器物理磁盘定位方法,其特征在于,所述记录所述N轮物理磁盘读写操作中每一物理磁盘的N个指示灯的实际闪烁特征以及与实际闪烁特征对应的磁盘安装位置,得到相应的闪烁统计结果,包括:5. The method for locating a physical disk of a server according to claim 1, wherein the actual flickering characteristics of the N indicator lights of each physical disk in the N rounds of physical disk read-write operations and the actual flickering characteristics of the recording are recorded. Corresponding disk installation location, get the corresponding flicker statistics results, including:通过人工记录方式,记录所述N轮物理磁盘读写操作中每一物理磁盘的N个指示灯的实际闪烁特征以及与实际闪烁特征对应的磁盘安装位置,得到相应的闪烁统计结果。By manual recording, the actual flickering characteristics of the N indicators of each physical disk in the N rounds of physical disk read and write operations and the disk installation positions corresponding to the actual flickering characteristics are recorded, and corresponding flickering statistical results are obtained.6.根据权利要求1至5任一项所述的服务器物理磁盘定位方法,其特征在于,所述从预设映射表中确定出与每一物理磁盘的N个指示灯对应的预设闪烁特征之前,还包括:6. The method for locating a physical disk of a server according to any one of claims 1 to 5, wherein the preset flickering feature corresponding to the N indicator lights of each physical disk is determined from a preset mapping table Before, also included:通过表格方式,记录每一所述编码信息与相应的预设闪烁特征之间的对应关系,得到所述预设映射表。In a table manner, the corresponding relationship between each of the encoded information and the corresponding preset flickering feature is recorded to obtain the preset mapping table.7.根据权利要求1至5任一项所述的服务器物理磁盘定位方法,其特征在于,还包括:7. The method for locating a physical disk of a server according to any one of claims 1 to 5, further comprising:根据所述服务器中的物理磁盘的数量,确定每一物理磁盘的所述编码信息的位数。The number of bits of the encoded information per physical disk is determined according to the number of physical disks in the server.8.一种服务器物理磁盘定位装置,其特征在于,用于对服务器中的物理磁盘进行定位,其中,每一物理磁盘的逻辑盘符均携带有唯一对应的编码信息,每一所述编码信息均为N位二进制编码,并且,每一物理磁盘上均设有N个指示灯,每一物理磁盘上的N个指示灯与相应所述编码信息中的N位二进制编码分别一一对应,N为小于物理磁盘总数的正整数;所述装置包括:8. A server physical disk positioning device, characterized in that, for positioning the physical disk in the server, wherein the logical drive letter of each physical disk all carries unique corresponding encoding information, and each described encoding information They are all N-bit binary codes, and each physical disk is provided with N indicator lights, and the N indicator lights on each physical disk are in one-to-one correspondence with the N-bit binary codes in the corresponding encoded information. is a positive integer less than the total number of physical disks; the device includes:读写执行模块,用于执行N轮物理磁盘读写操作;其中,在执行第i轮物理磁盘读写操作时,对所述编码信息的第i位二进制符号为1的物理磁盘同时进行读写操作;The read-write execution module is used for performing N rounds of physical disk read-write operations; wherein, when performing the i-th round of physical disk read-write operations, simultaneously read and write to the physical disk whose i-th binary symbol of the encoded information is 1 operate;闪烁统计模块,用于记录所述N轮物理磁盘读写操作中每一物理磁盘的N个指示灯的实际闪烁特征以及与实际闪烁特征对应的磁盘安装位置,得到相应的闪烁统计结果;A flickering statistics module, used to record the actual flickering characteristics of the N indicator lights of each physical disk in the N rounds of physical disk read-write operations and the disk installation positions corresponding to the actual flickering characteristics, and obtain corresponding flickering statistical results;特征确定模块,用于根据每一物理磁盘的逻辑盘符所对应的所述编码信息,从预设映射表中确定出与每一物理磁盘的N个指示灯对应的预设闪烁特征;A feature determination module, configured to determine, from a preset mapping table, a preset flickering feature corresponding to the N indicator lights of each physical disk according to the encoding information corresponding to the logical drive letter of each physical disk;位置确定模块,用于从所述闪烁统计结果中,查找与每一物理磁盘对应的预设闪烁特征相一致的实际闪烁特征以及相应的磁盘安装位置,并将查找到的磁盘安装位置确定为相应物理磁盘的安装位置。A location determination module, configured to search for an actual flickering feature consistent with a preset flickering feature corresponding to each physical disk and a corresponding disk installation position from the flickering statistical results, and determine the found disk installation position as a corresponding The installation location of the physical disk.9.一种服务器物理磁盘定位设备,其特征在于,用于对服务器中的物理磁盘进行定位,其中,每一物理磁盘的逻辑盘符均携带有唯一对应的编码信息,每一所述编码信息均为N位二进制编码,并且,每一物理磁盘上均设有N个指示灯,每一物理磁盘上的N个指示灯与相应所述编码信息中的N位二进制编码分别一一对应,N为小于物理磁盘总数的正整数;所述设备包括:9. A server physical disk positioning device, characterized in that, for positioning the physical disk in the server, wherein the logical drive letter of each physical disk carries uniquely corresponding encoded information, and each described encoded information They are all N-bit binary codes, and each physical disk is provided with N indicator lights, and the N indicator lights on each physical disk are in one-to-one correspondence with the N-bit binary codes in the corresponding encoded information. is a positive integer less than the total number of physical disks; the devices include:存储器,用于保存计算机程序;memory for storing computer programs;处理器,用于执行所述计算机程序,以实现如权利要求1至7任一项所述的服务器物理磁盘定位方法。The processor is configured to execute the computer program to implement the method for locating a physical disk of a server according to any one of claims 1 to 7.10.一种计算机可读存储介质,其特征在于,用于保存计算机程序;其中,所述计算机程序被处理器执行时实现如权利要求1至7任一项所述的服务器物理磁盘定位方法。10 . A computer-readable storage medium, characterized in that it is used for storing a computer program; wherein, when the computer program is executed by a processor, the method for locating a physical disk of a server according to any one of claims 1 to 7 is implemented.
CN201910217477.8A2019-03-212019-03-21 A server physical disk positioning method, device, equipment and mediumActiveCN109947622B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201910217477.8ACN109947622B (en)2019-03-212019-03-21 A server physical disk positioning method, device, equipment and medium

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201910217477.8ACN109947622B (en)2019-03-212019-03-21 A server physical disk positioning method, device, equipment and medium

Publications (2)

Publication NumberPublication Date
CN109947622Atrue CN109947622A (en)2019-06-28
CN109947622B CN109947622B (en)2022-08-02

Family

ID=67010503

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201910217477.8AActiveCN109947622B (en)2019-03-212019-03-21 A server physical disk positioning method, device, equipment and medium

Country Status (1)

CountryLink
CN (1)CN109947622B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN112000532A (en)*2020-07-302020-11-27浪潮电子信息产业股份有限公司 Disk disorder detection method, device, equipment and system
CN113900880A (en)*2020-06-222022-01-07中兴通讯股份有限公司 Storage disk detection method, device, terminal device and storage medium
CN114741032A (en)*2022-03-312022-07-12联想(北京)有限公司 Information processing method and device

Citations (7)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101266814A (en)*2008-05-082008-09-17杭州华三通信技术有限公司Disk location method in storage system and storage system for locating disk
CN103729146A (en)*2013-12-192014-04-16浪潮(北京)电子信息产业有限公司Method and system for quickly positioning magnetic disks of mass storage systems
CN105528269A (en)*2016-01-292016-04-27浪潮电子信息产业股份有限公司Design method for detecting disorder of hard disks based on Itanium platform
CN106294084A (en)*2016-09-122017-01-04恒为科技(上海)股份有限公司A kind of monitoring hard-disk status system
CN106469103A (en)*2015-08-142017-03-01华为软件技术有限公司The maintaining method of hard disk and device
CN107015894A (en)*2016-01-282017-08-04胡敏A kind of common store hard disk localization method
WO2018071214A1 (en)*2016-10-112018-04-19Carrier CorporationDetermination of the physical location of field device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101266814A (en)*2008-05-082008-09-17杭州华三通信技术有限公司Disk location method in storage system and storage system for locating disk
CN103729146A (en)*2013-12-192014-04-16浪潮(北京)电子信息产业有限公司Method and system for quickly positioning magnetic disks of mass storage systems
CN106469103A (en)*2015-08-142017-03-01华为软件技术有限公司The maintaining method of hard disk and device
CN107015894A (en)*2016-01-282017-08-04胡敏A kind of common store hard disk localization method
CN105528269A (en)*2016-01-292016-04-27浪潮电子信息产业股份有限公司Design method for detecting disorder of hard disks based on Itanium platform
CN106294084A (en)*2016-09-122017-01-04恒为科技(上海)股份有限公司A kind of monitoring hard-disk status system
WO2018071214A1 (en)*2016-10-112018-04-19Carrier CorporationDetermination of the physical location of field device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN113900880A (en)*2020-06-222022-01-07中兴通讯股份有限公司 Storage disk detection method, device, terminal device and storage medium
CN112000532A (en)*2020-07-302020-11-27浪潮电子信息产业股份有限公司 Disk disorder detection method, device, equipment and system
CN112000532B (en)*2020-07-302022-03-22浪潮电子信息产业股份有限公司 Disk disorder detection method, device, equipment and system
CN114741032A (en)*2022-03-312022-07-12联想(北京)有限公司 Information processing method and device

Also Published As

Publication numberPublication date
CN109947622B (en)2022-08-02

Similar Documents

PublicationPublication DateTitle
CN109947622B (en) A server physical disk positioning method, device, equipment and medium
JP6422600B2 (en) Stripe mapping in memory
CN109388518A (en)data writing method
US9727244B2 (en)Expanding effective storage capacity of a data storage system while providing support for address mapping recovery
US8497787B2 (en)Systems and methods for performing efficient decoding using a hybrid decoder
CN106910528B (en)Optimization method and device for data inspection of solid state disk
JP2018085122A5 (en)
US10209891B2 (en)Methods and systems for improving flash memory flushing
US9912353B1 (en)Systems and methods for generating soft information in a flash device
CN109582488B (en)Error prevention method and related device for solid state disk
US11947819B2 (en)Method and system for testing conversion relationship between block reading and page reading in flash memory chip
US20170075934A1 (en)Method and system for handling binary large objects
US10824554B2 (en)Method and apparatus for efficiently sorting iteration with small sorting set
US12028091B2 (en)Adjustable code rates and dynamic ECC in a data storage device with write verification
CN114356218B (en)Data error correction method, device and medium of Flash memory
CN107506148B (en)Method and device for discarding virtual blocks of solid state disk
WO2015172698A1 (en)Data processing method and device
CN114153670A (en) A random testing method, device, equipment and storage medium
CN107562608B (en)Resource index importance evaluation method and device
CN107943415B (en) Method and system for finding free clusters based on FAT file system
RU2014106477A (en) METHOD AND DEVICE FOR PROCESSING INFORMATION, AND RECORDING MEDIA
US20220366937A1 (en)System and method for managing off-track read retry
US20160246670A1 (en)Error correction for non-volatile memory
CN112306382B (en)Flash memory controller, storage device and reading method thereof
CN113268404B (en)Performance analysis and optimization method and device, computer equipment and storage medium

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp