TWI446177B - System and method for testing sas hard disks under efi environment - Google Patents
System and method for testing sas hard disks under efi environment Download PDFInfo
- Publication number
- TWI446177B TWI446177B TW99146781A TW99146781A TWI446177B TW I446177 B TWI446177 B TW I446177B TW 99146781 A TW99146781 A TW 99146781A TW 99146781 A TW99146781 A TW 99146781A TW I446177 B TWI446177 B TW I446177B
- Authority
- TW
- Taiwan
- Prior art keywords
- sas
- connector
- hard disk
- backplane
- sas hard
- Prior art date
Links
- 238000012360 testing method Methods 0.000 title claims description 103
- 238000000034 method Methods 0.000 title claims description 16
- 238000012545 processing Methods 0.000 claims description 12
- 238000011990 functional testing Methods 0.000 claims description 10
- 238000004891 communication Methods 0.000 claims description 9
- 238000010998 test method Methods 0.000 claims description 5
- 238000000638 solvent extraction Methods 0.000 claims 2
- 238000005192 partition Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 4
- 230000002159 abnormal effect Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Landscapes
- Debugging And Monitoring (AREA)
Description
本發明涉及一種硬碟測試系統及方法,特別是關於一種EFI環境下SAS硬碟測試系統及方法。The present invention relates to a hard disk test system and method, and more particularly to a SAS hard disk test system and method in an EFI environment.
EFI(extensible firmware interface,可擴展固件介面),是英代爾推出的一種在未來的類PC的電腦系統中替代BIOS的升級方案。其中,在EFI環境下可以實現對SAS(serial attached SCSI,串列連接小型電腦系統介面)背板所連接的SAS硬碟的功能測試。一般來說,SAS背板包括有多個連接器,可以同時連接多個SAS硬碟。當對所述多個SAS硬碟進行測試時,若測試失敗,無法立即知道是哪一個SAS硬碟測試失敗,需要測試人員去分析和查找測試失敗的SAS硬碟。這種測試方法浪費了測試時間,且降低了測試的效率。EFI (extensible firmware interface) is an upgrade solution that Intel has introduced to replace the BIOS in future PC-like computer systems. Among them, the functional test of the SAS hard disk connected to the SAS (serial attached SCSI) serial backplane can be realized in the EFI environment. In general, the SAS backplane includes multiple connectors that can be connected to multiple SAS hard drives at the same time. When testing the plurality of SAS hard disks, if the test fails, it is impossible to immediately know which SAS hard disk test failed, and the tester is required to analyze and find the SAS hard disk that failed the test. This test method wastes test time and reduces the efficiency of the test.
鑒於以上內容,有必要提供一種EFI環境下SAS硬碟測試系統及方法,可以在SAS背板上的連接器所連接的SAS硬碟測試失敗時,顯示該測試失敗的SAS硬碟所連接的連接器的編號。In view of the above, it is necessary to provide a SAS hard disk test system and method in an EFI environment, which can display the connection connected to the failed SAS hard disk when the SAS hard disk test connected to the connector on the SAS backplane fails. The number of the device.
一種EFI環境下SAS硬碟測試系統,運行於主機中,該主機包括SAS背板,該SAS背板包括多個與待測SAS硬碟連接的連接器,該系統包括:參數獲取模組,用於獲取SAS背板上每一個連接器的編號,及每一個連接器對應的SCSI位址,並建立所述每一個連接器的編號與每一個SCSI位址的對應關係;文檔創建模快,用於創建一個文檔,將所述SAS背板上每一個連接器的編號,每一個連接器對應的SCSI位址,及所述每一個連接器的編號與每一個SCSI位址的對應關係儲存至該文檔中;測試模組,用於對SAS背板上的連接器所連接的SAS硬碟進行測試;處理模組,用於對SAS背板上的連接器所連接的SAS硬碟的功能測試失敗時,獲取測試失敗的SAS硬碟對應的SCSI位址,根據該SCSI位址從所述文件中讀取該SCSI位址對應的連接器的編號,該讀取的連接器編號對應的連接器所連接的SAS硬碟,即為測試失敗的SAS硬碟。A SAS hard disk test system in an EFI environment, running in a host, the host includes a SAS backplane, and the SAS backplane includes a plurality of connectors connected to the SAS hard disk to be tested, the system includes: a parameter acquisition module, Obtaining the number of each connector on the SAS backplane, and the corresponding SCSI address of each connector, and establishing the correspondence between the number of each connector and each SCSI address; the document creation mode is fast, For creating a document, storing the number of each connector on the SAS backplane, the SCSI address corresponding to each connector, and the correspondence between the number of each connector and each SCSI address to In this document, the test module is used to test the SAS hard disk connected to the connector on the SAS backplane; the processing module is used to test the function of the SAS hard disk connected to the connector on the SAS backplane. If the SCSI address corresponding to the failed SAS hard disk is obtained, the number of the connector corresponding to the SCSI address is read from the file according to the SCSI address, and the connector corresponding to the read connector number is The connected SAS hard drive is Test failed SAS hard drive.
一種EFI環境下SAS硬碟測試方法,該方法應用於主機中,該主機包括SAS背板,該SAS背板包括多個與待測SAS硬碟連接的連接器,該方法包括如下步驟:獲取SAS背板上每一個連接器的編號,及每一個連接器對應的SCSI位址,並建立所述每一個連接器的編號與每一個SCSI位址的對應關係;創建一個文檔,將所述SAS背板上每一個連接器的編號,每一個連接器對應的SCSI位址,及所述每一個連接器的編號與每一個SCSI位址的對應關係儲存至該文檔中;對SAS背板上的連接器所連接的SAS硬碟進行測試;當對SAS背板上的連接器所連接的SAS硬碟的測試失敗時,獲取測試失敗的SAS硬碟對應的SCSI位址;根據該SCSI位址從所述文件中讀取該SCSI位址對應的連接器的編號,該讀取的連接器編號對應的連接器所連接的SAS硬碟,即為測試失敗的SAS硬碟。A method for testing a SAS hard disk in an EFI environment, the method is applied to a host, the host includes a SAS backplane, and the SAS backplane includes a plurality of connectors connected to the SAS hard disk to be tested, and the method includes the following steps: acquiring SAS The number of each connector on the backplane, and the corresponding SCSI address of each connector, and establish the correspondence between the number of each connector and each SCSI address; create a document to back the SAS The number of each connector on the board, the SCSI address of each connector, and the correspondence between the number of each connector and each SCSI address are stored in the document; the connection to the SAS backplane The SAS hard disk connected to the device is tested; when the test of the SAS hard disk connected to the connector on the SAS backplane fails, the SCSI address corresponding to the failed SAS hard disk is obtained; according to the SCSI address The number of the connector corresponding to the SCSI address is read in the file, and the SAS hard disk connected to the connector corresponding to the read connector number is the SAS hard disk that fails the test.
相較於習知技術,本發明所述的EFI環境下SAS硬碟測試系統及方法,可以在SAS背板上的連接器所連接的SAS硬碟測試失敗時,顯示該測試失敗的SAS硬碟所連接的連接器的編號,節省了測試時間,提高了測試效率。Compared with the prior art, the SAS hard disk test system and method in the EFI environment of the present invention can display the failed SAS hard disk when the SAS hard disk test connected to the connector on the SAS backplane fails. The number of connected connectors saves test time and improves test efficiency.
參閱圖1所示,係本發明EFI環境下SAS硬碟測試系統較佳實施方式的運行環境示意圖。在本實施方式中,SAS硬碟測試系統10安裝並運行於EFI環境下的主機1中,該主機1與顯示裝置2連接。該主機1還包括SAS(serial attached SCSI,串列連接小型電腦系統介面)背板11,該SAS背板11包括多個用於連接待測SAS硬碟的連接器(圖中僅示出2個),例如:第一連接器12,第二連接器13,其中,第一連接器12和第一SAS硬碟14連接,第二連接器13和第二SAS硬碟15連接。該主機1還顯示裝置2連接。所述的主機1可以為桌上型電子電腦(PC)、筆記本電腦(Notebook)、伺服器(Server)及其它電子計算裝置。所述顯示裝置2用於提供圖形化用戶介面(Graphic User Interface,GUI),根據SAS硬碟測試系統10的測試結果進行相應的顯示。Referring to FIG. 1 , it is a schematic diagram of an operating environment of a preferred embodiment of a SAS hard disk test system in an EFI environment according to the present invention. In the present embodiment, the SAS hard disk test system 10 is installed and operated in the host 1 in an EFI environment, and the host 1 is connected to the display device 2. The host 1 further includes a SAS (serial attached SCSI) backplane 11 including a plurality of connectors for connecting the SAS hard disks to be tested (only two are shown in the figure) For example, the first connector 12, the second connector 13, wherein the first connector 12 is connected to the first SAS hard disk 14, and the second connector 13 is connected to the second SAS hard disk 15. The host 1 also displays the connection of the device 2. The host 1 can be a desktop electronic computer (PC), a notebook (Notebook), a server (Server), and other electronic computing devices. The display device 2 is configured to provide a graphical user interface (GUI) and perform corresponding display according to the test result of the SAS hard disk test system 10.
參閱圖2所示,係本發明SAS硬碟測試系統10的功能模組示意圖。在本實施方式中,所述的SAS硬碟測試系統10包括參數獲取模組100、文檔創建模組101、測試模組102、提示模組103及處理模組104。本發明所稱的模組是完成特定功能的主機程式段,比程式更適合於描述軟體在主機中的執行過程。因此本發明以下對軟體都用模組加以描述。所述的主機1還包括儲存器16和處理器17,SAS硬碟測試系統10可以儲存於儲存器16中,也可以安裝於主機1的作業系統中,並能夠被處理器17執行。Referring to FIG. 2, it is a schematic diagram of functional modules of the SAS hard disk test system 10 of the present invention. In the embodiment, the SAS hard disk test system 10 includes a parameter acquisition module 100, a document creation module 101, a test module 102, a prompt module 103, and a processing module 104. The module referred to in the present invention is a host program segment for performing a specific function, and is more suitable for describing the execution process of the software in the host than the program. Therefore, the following description of the software for the soft body is described. The host 1 further includes a storage unit 16 and a processor 17. The SAS hard disk testing system 10 can be stored in the storage unit 16, or can be installed in the operating system of the host 1 and can be executed by the processor 17.
參數獲取模組100用於獲取SAS(serial attached SCSI,串列連接小型電腦系統介面)背板11上每一個連接器的編號,及每一個連接器對應的SCSI(small computer system interface,小型電腦系統介面)位址,並建立所述每一個連接器的編號與每一個SCSI位址的對應關係。其中,SAS背板11上每一個連接器都有一個唯一的編號,例如:第一連接器12的編號為J1,第二連接器13的編號為J2。SAS背板11上每一個連接器連接的SAS硬碟在EFI環境下都分配有一個SCSI位址,例如:第一SAS硬碟14的SCSI位址為SCSI(0x1,0x0),第二SAS硬碟15的SCSI位址為SCSI(0x2,0x0),該SCSI位址是唯一的且固定的,不會因為連接器連接不同的SAS硬碟而改變。其中,每一個連接器的編號與該連接器所連接的SAS硬碟的SCSI位址相對應,例如:J1對應於SCSI(0x1,0x0),J2對應於SCSI(0x2,0x0)。The parameter acquisition module 100 is configured to obtain the number of each connector on the backplane 11 of the SAS (serial attached SCSI) interface, and the SCSI (small computer system interface) of each connector. Interface) address, and establish the correspondence between the number of each connector and each SCSI address. Each connector on the SAS backplane 11 has a unique number. For example, the first connector 12 is numbered J1 and the second connector 13 is numbered J2. The SAS hard disk connected to each connector on the SAS backplane 11 is assigned a SCSI address in the EFI environment. For example, the SCSI address of the first SAS hard disk 14 is SCSI (0x1, 0x0), and the second SAS is hard. The SCSI address of the disk 15 is SCSI (0x2, 0x0). The SCSI address is unique and fixed and will not change because the connector is connected to a different SAS hard disk. The number of each connector corresponds to the SCSI address of the SAS hard disk to which the connector is connected. For example, J1 corresponds to SCSI (0x1, 0x0), and J2 corresponds to SCSI (0x2, 0x0).
文檔創建模組101用於創建一個文檔,將所述SAS背板11上每一個連接器的編號,每一個連接器對應的SCSI位址,及所述每一個連接器的編號與每一個SCSI位址的對應關係儲存至該文檔中。所述文檔可以是INI文檔。The document creation module 101 is configured to create a document, the number of each connector on the SAS backplane 11, the SCSI address corresponding to each connector, and the number of each connector and each SCSI bit. The correspondence of the addresses is stored in the document. The document can be an INI document.
測試模組102用於判斷是否開始對SAS背板11上的連接器所連接的SAS硬碟進行測試,當開始對SAS背板11上的連接器所連接的SAS硬碟進行測試時,測試SAS背板11上的連接器是否與所連接的SAS硬碟正常通信。首先,測試模組102獲取SAS背板11上的連接器當前所連接的SAS硬碟的SCSI位址列表。然後,測試模組102將所獲取的SCSI位址列表中的SCSI位址和文檔中所儲存的SCSI位址進行比對。若所獲取的SCSI位址列表中的SCSI位址和文檔中所儲存的SCSI位址相同,則判斷SAS背板11上的連接器和需要測試的SAS硬碟正常通信;若所獲取的SCSI位址列表中的SCSI位址和文檔中所儲存的SCSI位址不相同,則判斷SAS背板11上的連接器和某一個或多個需要測試的SAS硬碟不能正常通信,例如:SAS背板11上的連接器和某一個或多個需要測試的SAS硬碟接觸不良。The test module 102 is configured to determine whether to start testing the SAS hard disk connected to the connector on the SAS backplane 11 and test the SAS when testing the SAS hard disk connected to the connector on the SAS backplane 11 Whether the connector on the backplane 11 is in normal communication with the connected SAS hard disk. First, the test module 102 obtains a list of SCSI addresses of the SAS hard disks to which the connector on the SAS backplane 11 is currently connected. The test module 102 then compares the SCSI address in the obtained SCSI address list with the SCSI address stored in the document. If the SCSI address in the obtained SCSI address list is the same as the SCSI address stored in the document, it is determined that the connector on the SAS backplane 11 and the SAS hard disk to be tested are in normal communication; if the obtained SCSI bit is obtained If the SCSI address in the address list is different from the SCSI address stored in the document, it is determined that the connector on the SAS backplane 11 and one or more SAS hard disks to be tested cannot communicate normally, for example: SAS backplane The connector on 11 has poor contact with one or more SAS hard disks that need to be tested.
提示模組103用於當SAS背板11上的連接器與所連接的SAS硬碟不能正常通信時,提示用戶測試失敗。處理模組104用於獲取不能和SAS背板11上的連接器正常通信的SAS硬碟對應的SCSI位址,根據該SCSI位址從文檔讀取該SCSI位址對應的連接器的編號,該讀取的連接器編號對應的連接器所連接的SAS硬碟,即為測試失敗的SAS硬碟,並將該測試失敗的SAS硬碟所連接的連接器的編號顯示在顯示裝置2上,以供用戶查閱。所述不能和SAS背板11上的連接器正常通信的SAS硬碟包括:存在於所述文件中但不存在於所述SCSI地址列表中的SCSI位址對應的SAS硬碟。The prompting module 103 is configured to prompt the user to fail the test when the connector on the SAS backplane 11 fails to communicate with the connected SAS hard disk. The processing module 104 is configured to obtain a SCSI address corresponding to the SAS hard disk that cannot communicate with the connector on the SAS backplane 11 , and read the number of the connector corresponding to the SCSI address from the document according to the SCSI address, The SAS hard disk to which the connector corresponding to the connector number is read is the SAS hard disk that failed the test, and the number of the connector to which the failed SAS hard disk is connected is displayed on the display device 2 to For users to check. The SAS hard disk that cannot communicate normally with the connector on the SAS backplane 11 includes: a SAS hard disk corresponding to a SCSI address that exists in the file but does not exist in the SCSI address list.
測試模組102用於當SAS背板11上的連接器與所連接的SAS硬碟正常通信時,對SAS背板11上的連接器所連接的SAS硬碟依次進行功能測試,並判斷測試是否成功。在本實施方式中,所述SAS硬碟的功能測試包括對SAS硬碟的分區功能、寫入資料的功能及讀取資料的功能的測試。當SAS硬碟的分區功能、寫入資料的功能及讀取資料的功能都正常時,判斷對SAS硬碟的功能測試成功;當SAS硬碟的分區功能、寫入資料的功能及讀取資料的功能全部或者部分不正常時,判斷對SAS硬碟的功能測試失敗。The test module 102 is configured to perform a functional test on the SAS hard disk connected to the connector on the SAS backplane 11 when the connector on the SAS backplane 11 is in normal communication with the connected SAS hard disk, and determine whether the test is performed. success. In this embodiment, the functional test of the SAS hard disk includes testing the partition function of the SAS hard disk, the function of writing data, and the function of reading data. When the partition function of the SAS hard disk, the function of writing data, and the function of reading data are normal, it is judged that the function test of the SAS hard disk is successful; when the partition function of the SAS hard disk, the function of writing data, and reading data When all or part of the function is abnormal, it is judged that the function test of the SAS hard disk fails.
所述提示模組103還用於當對SAS背板11上的連接器所連接的SAS硬碟的功能測試成功時,提示用戶測試成功。The prompt module 103 is further configured to prompt the user to test successfully when the function test of the SAS hard disk connected to the connector on the SAS backplane 11 is successful.
所述處理模組104用於當對SAS背板11上的連接器所連接的SAS硬碟的功能測試不成功時,獲取測試失敗的SAS硬碟對應的SCSI位址,根據該SCSI位址從文檔讀取該SCSI位址對應的連接器的編號,該讀取的連接器編號對應的連接器所連接的SAS硬碟,即為測試失敗的SAS硬碟,並將該測試失敗的SAS硬碟所連接的連接器的編號顯示在顯示裝置2上,以供用戶查閱。例如:獲取的測試失敗的SAS硬碟對應的SCSI位址為SCSI(0x2,0x0),在文檔中J2對應於SCSI(0x2,0x0),因此,處理模組104從文檔中讀取連接器的編號J2,將J2顯示於顯示裝置2上。The processing module 104 is configured to obtain a SCSI address corresponding to the failed SAS hard disk when the function test of the SAS hard disk connected to the connector on the SAS backplane 11 is unsuccessful, according to the SCSI address The document reads the number of the connector corresponding to the SCSI address, the SAS hard disk to which the connector corresponding to the read connector number is connected, that is, the SAS hard disk that failed the test, and the SAS hard disk that failed the test. The number of the connected connector is displayed on the display device 2 for viewing by the user. For example, the obtained SCSI address corresponding to the failed SAS hard disk is SCSI (0x2, 0x0), and J2 corresponds to SCSI (0x2, 0x0) in the document, so the processing module 104 reads the connector from the document. No. J2, J2 is displayed on the display device 2.
參閱圖3所示,係本發明EFI環境下SAS硬碟測試方法較佳實施方式的流程圖。步驟S10,參數獲取模組100獲取SAS(serial attached SCSI,串列連接小型電腦系統介面)背板11上每一個連接器的編號,及每一個連接器對應的SCSI(small computer system interface,小型電腦系統介面)位址,並建立所述每一個連接器的編號與每一個SCSI位址的對應關係。Referring to FIG. 3, it is a flowchart of a preferred embodiment of a SAS hard disk test method in the EFI environment of the present invention. In step S10, the parameter acquisition module 100 acquires the number of each connector on the backplane 11 of the SAS (serial attached SCSI) interface, and the SCSI (small computer system interface) of each connector. System interface) address, and establish the correspondence between the number of each connector and each SCSI address.
步驟S11,文檔創建模組101創建一個文檔,將所述SAS背板11上每一個連接器的編號,每一個連接器對應的SCSI位址,及所述每一個連接器的編號與每一個SCSI位址的對應關係儲存至該文檔中。Step S11, the document creation module 101 creates a document, the number of each connector on the SAS backplane 11, the SCSI address corresponding to each connector, and the number of each connector and each SCSI. The correspondence of the addresses is stored in the document.
步驟S12,測試模組102判斷是否開始對SAS背板11上的連接器所連接的SAS硬碟進行測試。In step S12, the test module 102 determines whether to start testing the SAS hard disk connected to the connector on the SAS backplane 11.
步驟S13,當開始對SAS背板11上的連接器所連接的SAS硬碟進行測試時,測試模組102測試SAS背板11上的連接器是否與所連接的SAS硬碟正常通信。首先,測試模組102獲取SAS背板11上的連接器當前所連接的SAS硬碟的SCSI位址列表。然後,測試模組102將所獲取的SCSI位址列表中的SCSI位址和文檔中所儲存的SCSI位址進行比對。若所獲取的SCSI位址列表中的SCSI位址和文檔中所儲存的SCSI位址相同,則判斷SAS背板11上的連接器和需要測試的SAS硬碟正常通信;若所獲取的SCSI位址列表中的SCSI位址和文檔中所儲存的SCSI位址不相同,則判斷SAS背板11上的連接器和某一個或多個需要測試的SAS硬碟不能正常通信,例如:SAS背板11上的連接器和某一個或多個需要測試的SAS硬碟接觸不良。In step S13, when testing of the SAS hard disk connected to the connector on the SAS backplane 11 is started, the test module 102 tests whether the connector on the SAS backplane 11 is in normal communication with the connected SAS hard disk. First, the test module 102 obtains a list of SCSI addresses of the SAS hard disks to which the connector on the SAS backplane 11 is currently connected. The test module 102 then compares the SCSI address in the obtained SCSI address list with the SCSI address stored in the document. If the SCSI address in the obtained SCSI address list is the same as the SCSI address stored in the document, it is determined that the connector on the SAS backplane 11 and the SAS hard disk to be tested are in normal communication; if the obtained SCSI bit is obtained If the SCSI address in the address list is different from the SCSI address stored in the document, it is determined that the connector on the SAS backplane 11 and one or more SAS hard disks to be tested cannot communicate normally, for example: SAS backplane The connector on 11 has poor contact with one or more SAS hard disks that need to be tested.
當測試SAS背板11上的連接器與所連接的SAS硬碟不能正常通信時,至步驟S17,提示模組103提示用戶測試失敗,然後轉至步驟S18,處理模組104獲取不能和SAS背板11上的連接器正常通信的SAS硬碟對應的SCSI位址,根據該SCSI位址從文檔讀取該SCSI位址對應的連接器的編號,該讀取的連接器編號對應的連接器所連接的SAS硬碟,即為測試失敗的SAS硬碟。所述不能和SAS背板11上的連接器正常通信的SAS硬碟包括:存在於所述文件中但不存在於所述SCSI地址列表中的SCSI位址對應的SAS硬碟。步驟S19,處理模組104將所述測試失敗的SAS硬碟所連接的連接器的編號顯示在顯示裝置2上,以供用戶查閱When the connector on the SAS backplane 11 is not in normal communication with the connected SAS hard disk, the prompting module 103 prompts the user to fail the test, and then proceeds to step S18, and the processing module 104 acquires the back of the SAS. The SCSI address corresponding to the SAS hard disk that the connector on the board 11 normally communicates reads, according to the SCSI address, the number of the connector corresponding to the SCSI address is read from the document, and the connector number corresponding to the read connector number is The connected SAS hard disk is the SAS hard disk that failed the test. The SAS hard disk that cannot communicate normally with the connector on the SAS backplane 11 includes: a SAS hard disk corresponding to a SCSI address that exists in the file but does not exist in the SCSI address list. In step S19, the processing module 104 displays the number of the connector connected to the failed SAS hard disk on the display device 2 for the user to view.
當測試SAS背板11上的連接器與所連接的SAS硬碟正常通信時,步驟S14,測試模組102對SAS背板11上的連接器所連接的SAS硬碟依次進行功能測試。步驟S15,測試模組102判斷對所述SAS硬碟的功能測試是否成功。在本實施方式中,所述SAS硬碟的功能測試包括對SAS硬碟的分區功能、寫入資料的功能及讀取資料的功能的測試。當SAS硬碟的分區功能、寫入資料的功能及讀取資料的功能都正常時,判斷對SAS硬碟的功能測試成功;當SAS硬碟的分區功能、寫入資料的功能及讀取資料的功能全部或者部分不正常時,判斷對SAS硬碟的功能測試失敗。步驟S17,當對SAS背板11上的連接器所連接的SAS硬碟的功能測試成功時,提示模組103提示用戶測試成功,並結束流程。步驟S18,當對SAS背板11上的連接器所連接的SAS硬碟的功能測試不成功時,提示模組103提示用戶測試失敗。處理模組104獲取測試失敗的SAS硬碟對應的SCSI位址,根據該SCSI位址從文檔讀取該SCSI位址對應的連接器的編號,該讀取的連接器編號對應的連接器所連接的SAS硬碟,即為測試失敗的SAS硬碟。步驟S19,處理模組104將所述測試失敗的SAS硬碟所連接的連接器的編號顯示在顯示裝置2上,以供用戶查閱。When the connector on the test SAS backplane 11 is in normal communication with the connected SAS hard disk, in step S14, the test module 102 sequentially performs a functional test on the SAS hard disk connected to the connector on the SAS backplane 11. In step S15, the test module 102 determines whether the functional test of the SAS hard disk is successful. In this embodiment, the functional test of the SAS hard disk includes testing the partition function of the SAS hard disk, the function of writing data, and the function of reading data. When the partition function of the SAS hard disk, the function of writing data, and the function of reading data are normal, it is judged that the function test of the SAS hard disk is successful; when the partition function of the SAS hard disk, the function of writing data, and reading data When all or part of the function is abnormal, it is judged that the function test of the SAS hard disk fails. In step S17, when the function test of the SAS hard disk connected to the connector on the SAS backplane 11 is successful, the prompting module 103 prompts the user to successfully test and ends the process. In step S18, when the function test of the SAS hard disk connected to the connector on the SAS backplane 11 is unsuccessful, the prompting module 103 prompts the user to fail the test. The processing module 104 obtains the SCSI address corresponding to the failed SAS hard disk, and reads the number of the connector corresponding to the SCSI address from the document according to the SCSI address, and the connector corresponding to the read connector number is connected. The SAS hard drive is the SAS hard drive that failed the test. In step S19, the processing module 104 displays the number of the connector to which the SAS hard disk that failed the test is displayed on the display device 2 for the user to consult.
綜上所述,本發明符合發明專利要件,爰依法提出專利申請。惟,以上所述者僅為本發明之較佳實施方式,本發明之範圍並不以上述實施方式為限,舉凡熟悉本案技藝之人士援依本發明之精神所作之等效修飾或變化,皆應涵蓋於以下申請專利範圍內。In summary, the present invention complies with the requirements of the invention patent and submits a patent application according to law. However, the above description is only the preferred embodiment of the present invention, and the scope of the present invention is not limited to the above-described embodiments, and equivalent modifications or variations made by those skilled in the art in light of the spirit of the present invention are It should be covered by the following patent application.
1...主機1. . . Host
10...SAS硬碟測試系統10. . . SAS hard disk test system
11...SAS背板11. . . SAS backplane
12...第一連接器12. . . First connector
13...第二連接器13. . . Second connector
14...第一SAS硬碟14. . . First SAS hard drive
15...第二SAS硬碟15. . . Second SAS hard drive
16...儲存器16. . . Storage
17...處理器17. . . processor
100...參數獲取模組100. . . Parameter acquisition module
101...文檔創建模組101. . . Document creation module
102...測試模組102. . . Test module
103...提示模組103. . . Prompt module
104...處理模組104. . . Processing module
2...顯示裝置2. . . Display device
圖1係本發明EFI環境下SAS硬碟測試系統較佳實施方式的運行環境示意圖。1 is a schematic diagram of an operating environment of a preferred embodiment of a SAS hard disk test system in an EFI environment according to the present invention.
圖2係圖1中SAS硬碟測試系統系統的功能模組示意圖。2 is a schematic diagram of functional modules of the SAS hard disk test system system of FIG.
圖3係本發明EFI環境下SAS硬碟測試方法較佳實施方式的流程圖。3 is a flow chart of a preferred embodiment of a SAS hard disk test method in the EFI environment of the present invention.
1...主機1. . . Host
10...硬碟測試系統10. . . Hard disk test system
16...儲存器16. . . Storage
17...處理器17. . . processor
100...參數獲取模組100. . . Parameter acquisition module
101...文檔創建模組101. . . Document creation module
102...測試模組102. . . Test module
103...提示模組103. . . Prompt module
104...處理模組104. . . Processing module
Claims (10)
參數獲取模組,用於獲取SAS背板上每一個連接器的編號,及每一個連接器對應的SCSI位址,並建立所述每一個連接器的編號與每一個SCSI位址的對應關係;
文檔創建模快,用於創建一個文檔,將所述SAS背板上每一個連接器的編號,每一個連接器對應的SCSI位址,及所述每一個連接器的編號與每一個SCSI位址的對應關係儲存至該文檔中;
測試模組,用於對SAS背板上的連接器所連接的SAS硬碟進行測試;
處理模組,用於對SAS背板上的連接器所連接的SAS硬碟的測試失敗時,獲取測試失敗的SAS硬碟對應的SCSI位址,根據該SCSI位址從所述文件中讀取該SCSI位址對應的連接器的編號,該讀取的連接器編號對應的連接器所連接的SAS硬碟,即為測試失敗的SAS硬碟。A SAS hard disk test system in an EFI environment, running in a host, the host includes a SAS backplane, and the SAS backplane includes a plurality of connectors connected to the SAS hard disk to be tested, and the system includes:
a parameter obtaining module, configured to obtain a number of each connector on the SAS backplane, and a corresponding SCSI address of each connector, and establish a correspondence between each connector number and each SCSI address;
The document creation module is used to create a document, the number of each connector on the SAS backplane, the SCSI address of each connector, and the number of each connector and each SCSI bit. The correspondence of the address is stored in the document;
a test module for testing a SAS hard disk connected to a connector on the SAS backplane;
The processing module is configured to obtain a SCSI address corresponding to the failed SAS hard disk when the test of the SAS hard disk connected to the connector on the SAS backplane fails, and read from the file according to the SCSI address The SCSI address corresponds to the number of the connector, and the SAS hard disk to which the connector corresponding to the read connector number is connected is the SAS hard disk that failed the test.
獲取SAS背板上的連接器當前所連接的SAS硬碟的SCSI位址列表;
將所獲取的SCSI位址列表中的SCSI位址和文檔中所儲存的SCSI位址進行比對;
若所獲取的SCSI位址列表中的SCSI位址和文檔中所儲存的SCSI位址相同,則判斷SAS背板上的連接器和需要測試的SAS硬碟正常通信;
若所獲取的SCSI位址列表中的SCSI位址和文檔中所儲存的SCSI位址不相同,則判斷SAS背板上的連接器和需要測試的SAS硬碟不能正常通信,所述不能和SAS背板上的連接器正常通信的SAS硬碟包括:存在於所述文件中但不存在於所述SCSI地址列表中的SCSI位址對應的SAS硬碟。The SAS hard disk test system in the EFI environment as described in claim 3, wherein the test for whether the connector on the SAS backplane normally communicates with the connected SAS hard disk includes:
Get the SCSI address list of the SAS hard disk to which the connector on the SAS backplane is currently connected;
Comparing the SCSI address in the obtained SCSI address list with the SCSI address stored in the document;
If the SCSI address in the obtained SCSI address list is the same as the SCSI address stored in the document, it is determined that the connector on the SAS backplane and the SAS hard disk to be tested are in normal communication;
If the SCSI address in the obtained SCSI address list is different from the SCSI address stored in the document, it is determined that the connector on the SAS backplane and the SAS hard disk to be tested cannot communicate normally, and the SAS cannot be communicated with SAS. The SAS hard disk in which the connector on the backplane normally communicates includes: a SAS hard disk corresponding to a SCSI address existing in the file but not present in the SCSI address list.
獲取SAS背板上每一個連接器的編號,及每一個連接器對應的SCSI位址,並建立所述每一個連接器的編號與每一個SCSI位址的對應關係;
創建一個文檔,將所述SAS背板上每一個連接器的編號,每一個連接器對應的SCSI位址,及所述每一個連接器的編號與每一個SCSI位址的對應關係儲存至該文檔中;
對SAS背板上的連接器所連接的SAS硬碟進行測試;
當對SAS背板上的連接器所連接的SAS硬碟的測試失敗時,獲取測試失敗的SAS硬碟對應的SCSI位址;
根據該SCSI位址從所述文件中讀取該SCSI位址對應的連接器的編號,該讀取的連接器編號對應的連接器所連接的SAS硬碟,即為測試失敗的SAS硬碟。A method for testing a SAS hard disk in an EFI environment, the method is applied to a host, the host includes a SAS backplane, and the SAS backplane includes a plurality of connectors connected to the SAS hard disk to be tested, and the method includes the following steps:
Obtaining the number of each connector on the SAS backplane, and the SCSI address corresponding to each connector, and establishing a correspondence between the number of each connector and each SCSI address;
Create a document, store the number of each connector on the SAS backplane, the corresponding SCSI address of each connector, and the corresponding relationship between each connector number and each SCSI address to the document. in;
Test the SAS hard drive connected to the connector on the SAS backplane;
When the test of the SAS hard disk connected to the connector on the SAS backplane fails, the SCSI address corresponding to the failed SAS hard disk is obtained;
The number of the connector corresponding to the SCSI address is read from the file according to the SCSI address, and the SAS hard disk connected to the connector corresponding to the read connector number is a SAS hard disk that fails the test.
當對SAS背板上的連接器所連接的SAS硬碟測試失敗時,提示用戶測試失敗;
當對SAS背板上的連接器所連接的SAS硬碟測試成功時,提示用戶測試成功。The method for testing a SAS hard disk in an EFI environment as described in claim 6 of the patent application, wherein the method further comprises the steps of:
When the SAS hard disk test connected to the connector on the SAS backplane fails, the user is prompted to fail the test;
When the SAS hard disk connected to the connector on the SAS backplane is successfully tested, the user is prompted to test successfully.
獲取SAS背板上的連接器當前所連接的SAS硬碟的SCSI位址列表;
將所獲取的SCSI位址列表中的SCSI位址和文檔中所儲存的SCSI位址進行比對;
若所獲取的SCSI位址列表中的SCSI位址和文檔中所儲存的SCSI位址相同,則判斷SAS背板上的連接器和需要測試的SAS硬碟正常通信;
若所獲取的SCSI位址列表中的SCSI位址和文檔中所儲存的SCSI位址不相同,則判斷SAS背板上的連接器和需要測試的SAS硬碟不能正常通信,所述不能和SAS背板上的連接器正常通信的SAS硬碟包括:存在於所述文件中但不存在於所述SCSI地址列表中的SCSI位址對應的SAS硬碟。The method for testing a SAS hard disk in an EFI environment as described in claim 8, wherein the step of testing whether the connector on the SAS backplane communicates normally with the connected SAS hard disk includes:
Get the SCSI address list of the SAS hard disk to which the connector on the SAS backplane is currently connected;
Comparing the SCSI address in the obtained SCSI address list with the SCSI address stored in the document;
If the SCSI address in the obtained SCSI address list is the same as the SCSI address stored in the document, it is determined that the connector on the SAS backplane and the SAS hard disk to be tested are in normal communication;
If the SCSI address in the obtained SCSI address list is different from the SCSI address stored in the document, it is determined that the connector on the SAS backplane and the SAS hard disk to be tested cannot communicate normally, and the SAS cannot be communicated with SAS. The SAS hard disk in which the connector on the backplane normally communicates includes: a SAS hard disk corresponding to a SCSI address existing in the file but not present in the SCSI address list.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| TW99146781A TWI446177B (en) | 2010-12-30 | 2010-12-30 | System and method for testing sas hard disks under efi environment |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| TW99146781A TWI446177B (en) | 2010-12-30 | 2010-12-30 | System and method for testing sas hard disks under efi environment |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| TW201227310A TW201227310A (en) | 2012-07-01 |
| TWI446177B true TWI446177B (en) | 2014-07-21 |
Family
ID=46933183
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| TW99146781A TWI446177B (en) | 2010-12-30 | 2010-12-30 | System and method for testing sas hard disks under efi environment |
Country Status (1)
| Country | Link |
|---|---|
| TW (1) | TWI446177B (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| TWI599888B (en) * | 2016-10-24 | 2017-09-21 | 緯創資通股份有限公司 | Server system and method for detecting transmission mode of server system |
-
2010
- 2010-12-30 TW TW99146781A patent/TWI446177B/en not_active IP Right Cessation
Also Published As
| Publication number | Publication date |
|---|---|
| TW201227310A (en) | 2012-07-01 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US8874953B2 (en) | System and method of cloud testing and remote monitoring for integrated circuit components in system validation | |
| US8954805B2 (en) | Computer booting method and computer system | |
| US20130268744A1 (en) | Method for detecting hardware | |
| US20170075676A1 (en) | Rack server device firmware update using network switch | |
| CN1049730A (en) | Apparatus and method for loading basic input/output system from floppy disk in personal computer system | |
| US20070168571A1 (en) | System and method for automatic enforcement of firmware revisions in SCSI/SAS/FC systems | |
| CN110162435A (en) | A kind of server PXE starting test method, system, terminal and storage medium | |
| US20170286097A1 (en) | Method to prevent operating system digital product key activation failures | |
| CN1848094A (en) | Apparatus and method for testing computer system | |
| CN102567151A (en) | SAS (serial attached SCSI (small computer system interface)) hard disc test system and method under EFI (extensible firmware interface) environment | |
| US20140164845A1 (en) | Host computer and method for testing sas expanders | |
| US6625728B1 (en) | Method and apparatus for locating and displaying a defective component in a data processing system during a system startup using location and progress codes associated with the component | |
| CN100524241C (en) | Multi-operating system platform integration test method | |
| TWI446177B (en) | System and method for testing sas hard disks under efi environment | |
| US7246038B2 (en) | Method, system, and article of manufacture for running diagnostics related to a device | |
| US9087040B2 (en) | Method and apparatus for performing host based diagnostics using a service processor | |
| CN1477511A (en) | Device with BIOS updating and detecting functions | |
| CN111241013B (en) | Method and system for realizing NVMe equipment configuration based on pooling | |
| EP3223133A1 (en) | Method for setting redundant array of independent disks | |
| CN110765022B (en) | Method, device, computer equipment and storage medium for automatically testing sample sending SSD | |
| CN109918239B (en) | Computer device, diagnostic method, and non-transitory computer-readable storage medium | |
| US8756409B2 (en) | System, method and computer program product for retrieving data at boot time | |
| US20080127229A1 (en) | Multiple interface standard support for redundant array of independent disks | |
| CN107368322B (en) | A method and device for adjusting the boot sequence of a hard disk under an operating system | |
| US12511129B2 (en) | Information handling system with display panel crack and distortion detection |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| MM4A | Annulment or lapse of patent due to non-payment of fees |