TW201106345A - System and method for testing hard disks under extensible firmware interface - Google Patents

System and method for testing hard disks under extensible firmware interface Download PDF

Info

Publication number
TW201106345A
TW201106345A TW98126654A TW98126654A TW201106345A TW 201106345 A TW201106345 A TW 201106345A TW 98126654 A TW98126654 A TW 98126654A TW 98126654 A TW98126654 A TW 98126654A TW 201106345 A TW201106345 A TW 201106345A
Authority
TW
Taiwan
Prior art keywords
test
hard disk
document
read
control code
Prior art date
Application number
TW98126654A
Other languages
Chinese (zh)
Other versions
TWI447712B (en
Inventor
Ge-Xin Zeng
Original Assignee
Hon Hai Prec Ind 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 Hon Hai Prec Ind Co Ltd filed Critical Hon Hai Prec Ind Co Ltd
Priority to TW098126654A priority Critical patent/TWI447712B/en
Publication of TW201106345A publication Critical patent/TW201106345A/en
Application granted granted Critical
Publication of TWI447712B publication Critical patent/TWI447712B/en

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The present invention provides a method for testing hard disks under extensible firmware interface. The method includes: (a) obtaining a device path which can be recognized by the extensible firmware interface from a device tree; (b) obtaining a handle corresponding to the device path; (c) searching a handle of a father code of a code that the device path belongs to; (d) detecting if there are any obtained handles in step (b) are the same as the handle of the father code, if there are any obtained handles in step (b) are the same as the handle of the father code, the procedure goes to step (e), if there is no obtained handle in step (b) is the same as the handle of the father code, the procedure goes to step (f); (e) obtaining a handle of a code which is a father code of the code having the same handle, and the procedure returns to step (b); (f) obtaining a number of the last obtained handles; (g) searching the device paths according to the last obtained handles, the device paths are types of the testing hard devices.

Description

201106345 六、發明說明: 【發明所屬之技術領威】 [0001] 本發明涉及一種硬碟測試方法,尤其涉及一種可擴展固 件介面下的硬磔測試方法。 【先前4支術】 [0002] 硬碟為電腦的主要部件’其性能的好壞直接影響整個電 腦的性能,因此硬碟的性能測試是決定硬碟性能好壞的 關鍵環節。在玎擴展固件介面(Extensible Firmware201106345 VI. Description of the Invention: [Technical Leadership of the Invention] [0001] The present invention relates to a hard disk test method, and more particularly to a hard test method under an expandable firmware interface. [The previous four techniques] [0002] The hard disk is the main part of the computer's performance directly affects the performance of the entire computer, so the performance test of the hard disk is the key to determine the performance of the hard disk. In the extended firmware interface (Extensible Firmware

Interface,EFI)出現以則,主機板生產商對主機板讀 寫硬碟性能的測試主要是在DOS下或者Windows或者 Linux下進行,在這些作業系統下進行測試,需要對測試 時間進行一定的限制,而且在進行硬碟的塊設備的讀寫 測試時,需要避開作業系統所在的區域進行,増加了測 試難度,降低了測試效率。 【發明内容】 [〇〇〇3] 鑒於以上内容,有必要提接丄種可擴姑固件介面下的硬 碟測試方法,實現在EFI下對硬碟性能的測試。 [0004] —種可擴展固件介面下硬碟的測試方法,該方法包括: (a)獲取硬碟設備樹中所有可擴展固件介面能夠識別的 設備路徑;(b)根據所獲取的設備路徑獲取所述設備路 徑所對應的控制碼;(c)查找每一個設備路徑所在結點 的父結點,並獲取所述父結點資訊中的控制碼;(d)判 斷步驟(b)所獲取的控制碼中是否存在與步驟(c)所 獲取的父結點資訊中的控制碼相同的控制碼,若步驟(b )所獲取的控制碼中存在與步驟(c)所獲取的父結點資 098126654 表單編號A0101 第4頁/共20頁 0982045671-0 201106345 訊中的控制碼相同的控制碼,則進入步驟(e),若步驟 (b)所獲取的控制碼中不存與步驟(c)所獲取的父結 點資訊中的控制碼相同的控制碼,則進入梦驟(f);( e)獲取所述相同控制碼所在結點的父結點資訊中的控制 碼’並轉至步驟(d) ; (f)查看最終得到的控制碼數 量,該控制碼數量即為待測硬碟的數量;及(g)根據最 終得到的控制碼找到對應的設備路徑,所述設備路徑即 為待測硬碟的型號。 ❹ [0005] [0006] Ο 相較於習知技術,所述可擴展固件介面下的硬碟測試方 法’利用EFI的特性,實現在短時間内主機板讀寫硬碟性 能的測試’提高工作效率^ 【實施方式】 如圖1所示,係本發明可擴展固件介面下的硬碟測試方法 較佳實施例之運行環境圖。硬碟性能測試系統100運行於 儲存設備1中,該儲存設備1可以為u盤,移動硬碟等。該 儲存设備1透過USB介面連接於主機2,該主機2透過讀取 該儲存設備1中的麥蝶性能測試:系統10 0對待測硬碟3進行 測試。本較佳實施例中,該待測硬碟3可以為一個,也可 以為多個。每個待測硬碟3包括多個塊設備及文檔系統, 母個塊設備是可獨立讀寫的。每個待測硬碟3分別可用— 個設備樹來表示,設備樹的根結點表示該待測硬碟3,葉 子結點表示該待測硬碟3的塊設備及文檔系統。本較佳實 施例中’每個待測硬碟3至少包括2個格式化後的分區, 假設格式化的分區分別為分區C和分區d,其中分區c為文 稽配置表(File Allocation Table 32,FAT32)系 098126654 表單編號A0101 第5頁/共20頁 0982045671-0 201106345 、’先刀區D為New Techn〇1〇gy FUe加^^抓系 、’充)所述FAT32系統用於測試硬碟文檔系統的讀寫性能 及塊設備的讀寫性能,所述NTFS系統用於測試塊設備的 貝寫f生月b本發明可擴展固件介面下的硬碟測試包括三 個部分的測試:待測硬碟3資訊的測試,待測硬碟3的塊 設備的測試及待測硬碟3的文檔系統的測試。 [0007] 浚圖2所示為待測硬碟3的設備樹之示意圖。該設備樹的 每個葉子結絲示-個塊設備或者__個文射、統,每個 結點資訊包括設備路徑(Device path)和控制碼(Interface, EFI), the motherboard manufacturer's test of the hard disk performance of the motherboard is mainly under DOS or Windows or Linux. Testing under these operating systems requires certain restrictions on the test time. Moreover, when performing the read/write test of the block device of the hard disk, it is necessary to avoid the area where the operating system is located, which increases the test difficulty and reduces the test efficiency. [Summary of the Invention] [〇〇〇3] In view of the above, it is necessary to provide a hard disk test method under the expandable firmware interface to test the performance of the hard disk under EFI. [0004] A method for testing a hard disk under an extensible firmware interface, the method comprising: (a) obtaining a device path recognizable by all extensible firmware interfaces in a hard disk device tree; and (b) obtaining according to the acquired device path a control code corresponding to the device path; (c) finding a parent node of a node where each device path is located, and acquiring a control code in the parent node information; (d) determining step (b) Whether there is a control code in the control code that is the same as the control code in the parent node information acquired in step (c), and if the control code acquired in step (b) has the parent node obtained in step (c) 098126654 Form No. A0101 Page 4 of 20 0982045671-0 201106345 The control code with the same control code enters step (e). If the control code obtained in step (b) does not exist, step (c) The obtained control code with the same control code in the parent node information enters the dream (f); (e) acquires the control code in the parent node information of the node where the same control code is located, and proceeds to the step (d); (f) view the number of control codes finally obtained, Number of the test system is the number of code Drive; and (g) to find the path of the device according to the control code corresponding to the final obtained, i.e. the path of the device under test Drive models. 0005 [0005] [0006] Compared to the prior art, the hard disk test method under the extensible firmware interface 'utilizes the characteristics of EFI to realize the test of hard disk performance of the host board in a short time' Efficiency ^ Embodiments As shown in FIG. 1, it is an operating environment diagram of a preferred embodiment of a hard disk test method under the extensible firmware interface of the present invention. The hard disk performance test system 100 operates in the storage device 1, which may be a USB disk, a mobile hard disk, or the like. The storage device 1 is connected to the host 2 via a USB interface. The host 2 tests the tussock performance test in the storage device 1: the system 10 0 tests the hard disk 3 to be tested. In the preferred embodiment, the hard disk 3 to be tested may be one or more. Each hard disk to be tested 3 includes a plurality of block devices and a file system, and the parent block devices are independently readable and writable. Each hard disk to be tested 3 can be represented by a device tree. The root node of the device tree indicates the hard disk 3 to be tested, and the leaf node indicates the block device and the file system of the hard disk 3 to be tested. In the preferred embodiment, each hard disk 3 to be tested includes at least two formatted partitions. It is assumed that the formatted partitions are partition C and partition d, respectively, and partition c is a file allocation table (File Allocation Table 32). , FAT32) Department 098126654 Form No. A0101 Page 5 / Total 20 pages 0982045671-0 201106345, 'First knife area D is New Techn〇1〇gy FUe plus ^^ Grab system, 'charged' The FAT32 system is used to test hard The read and write performance of the disc file system and the read and write performance of the block device, the NTFS system is used to test the block device, and the hard disk test under the scalable firmware interface of the invention includes three parts of the test: Test the hard disk 3 information, test the block device of the hard disk 3 to be tested, and test the file system of the hard disk 3 to be tested. [0007] FIG. 2 is a schematic diagram of a device tree of the hard disk 3 to be tested. Each leaf of the device tree shows a block device or a __ text, system, and each node information includes a device path and a control code (

Handle) ’該設備路徑表笨該塊設箭或古文檔系統的路 徑,控制碼表示該設備路徑對應的控制碼^如圖2所示的 设備樹中包括兩個待測硬碟,該兩個待測硬碟的型號分 別為.Hitachi HDT725025VLA380和ST38021 5AS,本 發明透過該設備樹找出每個待測硬碟3中的所有塊設備和 文檔系統,再透過這些塊設備和文檔系統查找到該待測 硬碟3的資訊,該待測硬碟3的資訊包秸待測硬碟3的數量 ’每個待測硬碟3的廠商,介面類型及固件(firmware 〇 )版本等。例如:標注201所指向的結點信息為:[17〇] FAT File System ’該結點表示的是文檔系統,其中, “FAT File System”表示該結點的設備路徑,“17〇 ”表示該設備路徑所對應的控制碼。標注202所指向的結 點信息為:[171] PciRoot (0x0)/Pci ( OxlF, 0x5)/ATA ( Primary, Master , 0x0 )/HD (2, MBR,0xl9EFDlA8, 0xl40249A, 0xC80343F),該結 點表示的是塊設備,其中,“Pci Root (〇x〇)/pci ( 098126654 表單編號A0101 第6頁/共20頁 0982045671-0 201106345 [0008] [0009] Ο [0010] [0011] Ο [0012] [0013] 098126654 0982045671-0Handle) 'The device path table is stupid. The block has the path of the arrow or the ancient document system. The control code indicates the control code corresponding to the path of the device. ^ The device tree shown in Figure 2 includes two hard disks to be tested. The models of the hard disk to be tested are respectively .Hitachi HDT725025VLA380 and ST38021 5AS, and the present invention finds all the block devices and file systems in each hard disk 3 to be tested through the device tree, and then finds through these block devices and the file system. The information of the hard disk 3 to be tested, the information packet of the hard disk 3 to be tested, the number of hard disks 3 to be tested, the manufacturer of each hard disk 3 to be tested, the interface type and firmware (firmware version), and the like. For example, the node information pointed to by the label 201 is: [17〇] FAT File System 'This node represents the file system, where "FAT File System" indicates the device path of the node, and "17〇" indicates the The control code corresponding to the device path. The node information pointed to by the label 202 is: [171] PciRoot (0x0)/Pci (OxlF, 0x5)/ATA (Primary, Master, 0x0)/HD (2, MBR, 0xl9EFDlA8, 0xl40249A, 0xC80343F), the node Indicates a block device, where "Pci Root (〇x〇)/pci ( 098126654 Form No. A0101 Page 6 / Total 20 Page 0982045671-0 201106345 [0008] [0009] Ο [0010] [0011] Ο [0012 [0013] 098126654 0982045671-0

OxlF, 0χ5)/ΑΤΑ ( Primary, Master , 〇x〇 )/HD (2, MBR, 0xl9EFDlA8, 0xl40249A, 0xC80343F)M 表示該結點的設備路徑,“171”表示該設備路徑所對應 的控制碼。 如圖3所示,係本發明可擴展固件介面下的硬碟資訊的測 試方法較佳實施例之流程圖。 步驟S30,硬碟性能測試系統1〇〇獲取設備樹中所有EFI 能夠識別的設備路徑。如圖2所示,EFI能夠識別的設備 路徑包括:標注201、202 ' 203 ' 204、301、302、303 所對應的結點資訊中的設備路徑。 步驟S31 ’根據所獲取的設箭路徑獲取該設備路徑所對應 的控制碼。 - - 步驟S32 ’查找所獲取的設備路徑所在转點的父結點,並 獲取該父結點資訊中的控制碼。例如,如圖2所示,標注 203指向的結點的父結點的控制碼為171 ’標注2〇4指向 的結點的父結點的控剌碼為171,標注3〇3指向的結點的 父結點的控制碼為175。 步驟S33,判斷步驟S31所獲取的控制碼中是否存在與所 獲取的父結點資訊中的控制碼相同的控制碼。若步驟 所獲取的控制碼中存在與所獲取的父結點資訊中的控制 碼相同的控制碼,則進入步驟S34。若步驟S31所獲取的 控制碼中不存在與所獲取的父結點資訊中的控制碼相同 的控制碼,則進入步驟S35 » 步驟S34,獲取所述相同控制碼所在結點的父結點資吨中 表單編號A0101 第7頁/共20頁 201106345 的控制碼,並轉至步驟S33。例如圖2中,標注203和標注 204所指向的結點的父結點的控制碼為171,與步驟S31 中獲取的標注202所指向結點的控制碼相同,及標注303 所指向的結點的父結點的控制碼為1 7 5,與步驟S 31中獲 取的標注3 0 2所指向結點的控制碼相同,則再繼續查找控 制碼171及控制碼175所在結點的父結點資訊中的控制碼 ,得到的控制碼為16Ε及16F,轉至步驟S33,步驟S31所 獲取的控制碼中不存在該控制碼16Ε及16F,則進入步驟 S35 。 [0014] 步驟S35,查看最終得到的控制碼數量,該控制碼數量即 為待測硬碟3的數量。如圖2所示,最終得到的控制碼為 :16E與16F,即待測硬碟3的數量為2。 [0015] 步驟S36,根據該最終得到的控制碼找到對應的設備路徑 ,該設備路徑即為該待測硬碟3的型號,從該型號中獲取 該待測硬碟3的資訊。例如,控制碼16E為一個待測硬碟3 的控制碼,該控制碼對應的設備路徑為Hitachi I jOxlF, 0χ5)/ΑΤΑ (Primary, Master, 〇x〇)/HD (2, MBR, 0xl9EFDlA8, 0xl40249A, 0xC80343F) M indicates the device path of the node, and “171” indicates the control code corresponding to the device path. As shown in FIG. 3, it is a flowchart of a preferred embodiment of a method for testing hard disk information under the extensible firmware interface of the present invention. In step S30, the hard disk performance test system 1 obtains the device path that all EFIs can recognize in the device tree. As shown in FIG. 2, the device path that the EFI can identify includes the device path in the node information corresponding to the labels 201, 202 '203' 204, 301, 302, and 303. Step S31' acquires a control code corresponding to the device path according to the acquired set arrow path. - - Step S32 ' Find the parent node of the transferred point where the obtained device path is located, and obtain the control code in the parent node information. For example, as shown in FIG. 2, the control code of the parent node of the node pointed to by the label 203 is 171 'The control code of the parent node of the node pointed to by 2〇4 is 171, and the knot pointed to by 3〇3 The control code for the parent node of the point is 175. Step S33, it is judged whether there is a control code identical to the control code in the acquired parent node information in the control code acquired in step S31. If there is a control code identical to the control code in the acquired parent node information in the control code acquired in the step, the process proceeds to step S34. If there is no control code in the control code acquired in step S31 that is the same as the control code in the acquired parent node information, proceed to step S35 » step S34 to obtain the parent node of the node where the same control code is located. The control code of the form number A0101 on page 7 of 20 pages 201106345 is passed, and the process goes to step S33. For example, in FIG. 2, the control code of the parent node of the node pointed to by the label 203 and the label 204 is 171, which is the same as the control code of the node pointed to by the label 202 obtained in step S31, and the node pointed to by the label 303. The control code of the parent node is 175, which is the same as the control code of the node pointed to by the label 3 0 2 obtained in step S 31, and then continues to search for the parent node of the node where the control code 171 and the control code 175 are located. The control code in the information, the obtained control code is 16Ε and 16F, and the process goes to step S33. If the control code 16Ε and 16F are not present in the control code acquired in step S31, the process proceeds to step S35. [0014] Step S35, the number of control codes finally obtained is checked, and the number of the control codes is the number of hard disks 3 to be tested. As shown in FIG. 2, the finally obtained control codes are: 16E and 16F, that is, the number of hard disks 3 to be tested is 2. [0015] Step S36: Find a corresponding device path according to the finally obtained control code, where the device path is the model of the hard disk 3 to be tested, and the information of the hard disk 3 to be tested is obtained from the model. For example, the control code 16E is a control code of the hard disk 3 to be tested, and the device path corresponding to the control code is Hitachi I j

HDT725025VLA380,即為該待測硬碟3的型號,從該型 %J 號中可得知該待測硬碟3的資訊為:廠商:Hitachi,容 量大小:250G,介面類型為SATAII 8M。 [0016] 如圖4所示,係本發明可擴展固件介面下的硬碟塊設備的 測試方法較佳實施例之流程圖。 [0017] 步驟S40,將EFI下識別的待測硬碟3的每個塊設備分成多 個小塊,該小塊的數量可由測試人員自行設置,本較佳 實施例中,每個小塊可以同時進行測試,也可以按照先 098126654 表單編號A0101 第8頁/共20頁 0982045671-0 201106345 [0018] ❹ [0019] ❹ [0020] [0021] [0022] [0023] 098126654 後順序進行測試’該先後順序可由測試人員自行設定。 每個小塊的大小必須是512位元組的整數倍。例如,假設 每個塊設備大小為TotalSize MB,每個塊設備被分成N 個小塊,則每個小塊的大小為TotalSize*1〇24;)(1()24/N 位元組。 步驟S41,於每個小塊中劃分一個測試空間,該測試空間 用於小塊的讀寫測試。該測試空間的大小必須是5丨2位元 組的整數倍。本較佳實施例中,該測試空間為每個小塊 的最前面的位元組。例如’若K塊的大小為l〇MB, 該小塊的測試㈣為1M ’職小塊的職空間為該小塊 的最前面的1G24位元組。若分成的小塊數量大,測試的 位元組大,則測試的時間長,待判硬碟3的測試面較大。 若刀成的J塊數量小’測試的位元組小,則測試的時間 短,待測硬碟3的測試錄,卜若每個械的測試空間等 於每個小塊的大小,則表希測試整個待測硬碟3。 步驟S42,將每個測試_⑽本儲存的資料儲存到該測 試空間所在小塊的緩衝區内,:該緩衝區即為該小塊的記 憶體。 步驟S43,往測試空間内寫人測試資料。 步_,讀出測試空間内的資料。 步驟S45 ’ _該讀出的f料是否與寫人的測試資料相同 。右相同’進人步驟S46。若不相同,進人步驟S47。 步驟S46 ’提示該小塊讀寫測試成功,並將儲存到緩衝區 的資料恢復儲存到該測試空間内。 0982045671-0 201106345 [0024] 步驟S47,提示該小塊讀寫測試失敗。 [0025] 如圖5所示,係本發明可擴展固件介面下的硬碟文檔系統 空閒空間讀寫的測試方法較佳實施例之流程圖。 [0026] 步驟S50,列舉出待測硬碟3在EF I下支援的所有文檔系統 分區。本較佳實施例中,可根據設備樹得出該待測硬碟3 在EFI下支援的文檔系統分區。所述文檔系統分區可以同 時測試,也可以按照先後順序測試,該先後順序可以由 測試人員自行設定。 [0027] 步驟S51,將標準文檔複製到每個文檔系統分區的空閒空 間内,該標準文檔可複製多份以填滿該文檔系統分區的 空閒空間。該標準文檔包括標準文檔的内容及該標準文 檔的屬性,該標準文檔的屬性包括該標準文檔的大小, EFI下複製該標準文檔所需要的標準時間等。 [0028] 步驟S52,讀出每個文檔系統分區内的文檔。, [0029] 步驟S53,比較讀出的文檔與複製到每個文檔系統分區内 的標準文檔是否相同。若相同,則進入步驟S54。若不相 同,則進入步驟S56。 [0030] 步驟S54,判斷讀出文檔的時間是否正常。根據該標準文 檔屬性中的該標準文檔在EF I下複製的標準時間來判斷讀 出該文檔的時間是否正常。若讀出文檔的時間正常,進 入步驟S55。若讀出文檔的時間不正常,進入步驟S56。 [0031] 步驟S55,提示用戶該文檔系統分區測試成功。 [0032] 步驟S56,提示用戶該文檔系統分區測試失敗。 098126654 表單編號A0101 第10頁/共20頁 0982045671-0 201106345 [0033] 最後所應說明的是,以上實施例僅用以說明本發明的技 術方案而非限制,儘管參照以上較佳實施例對本發明進 行了詳細說明,本領域的普通技術人員應當理解,可以 對本發明的技術方案進行修改或等同替換,而不脫離本 發明技術方案的精神和範圍。 【圖式簡單說明】 [0034] 圖1係本發明可擴展固件介面下的硬碟測試方法較佳實施 例之運行環境圖。 〇 [0035] 圖2係待測硬碟3的設備樹之示意圖。 [0036] 圖3係本發明可擴展固件介面下的硬碟資訊的測試方法較 佳實施例之流程圖。 [0037] 圖4係本發明可擴展固件介面下的硬碟塊設備的測試方法 較佳實施例之流程圖。 [0038] 圖5係本發明可擴展固件介面下的硬碟文檔系統空閒空間 讀寫的測試方法較佳實施例之流程圖。 【主要元件符號說明】 [0039] 儲存設備1 [0040]主機 2 [0041] 待測硬碟3 [0042] 硬碟性能測試系統100 [0043] 獲取設備樹中所有可擴展固件介面下能夠識別的設備路 徑S30 098126654 表單編號A0101 第11頁/共20頁 0982045671-0 201106345 [0044] 獲取所述設備路徑對應的控制碼S31 [0045] 查找每一個獲取的設備路徑所在結點的父結點,並獲取 所述父結點資訊中的控制碼S32 [0046] 步驟S31所獲取的控制碼中是否存在所獲取的父結點資訊 中控制碼相同的控制碼? S33 [0047] 獲取所述相同控制碼所在結點的父結點資訊中的控制碼 S34 [0048] 查看最終得到的控制碼數量S35 [0049] 根據該最終得到的控制碼找到對應的設備路徑S 3 6 098126654 表單編號A0101 第12頁/共20頁 0982045671-0The HDT725025VLA380 is the model of the hard disk 3 to be tested. The information of the hard disk 3 to be tested is known from the model: J: Manufacturer: Hitachi, capacity: 250G, interface type is SATAII 8M. [0016] As shown in FIG. 4, it is a flowchart of a preferred embodiment of a test method for a hard disk block device in the scalable firmware interface of the present invention. [0017] Step S40, each block device of the hard disk 3 to be tested identified by the EFI is divided into a plurality of small blocks, and the number of the small blocks can be set by the tester. In the preferred embodiment, each small block can be At the same time, the test can also be carried out according to the first 098126654 form number A0101 page 8 / total 20 pages 0982045671-0 201106345 [0018] ❹ [0020] [0021] [0022] [0023] 098126654 after the test in sequence The order can be set by the tester. The size of each tile must be an integer multiple of 512 bytes. For example, suppose each block device size is TotalSize MB, and each block device is divided into N small blocks, and the size of each small block is TotalSize*1〇24;)(1()24/N bytes. Steps S41, a test space is divided in each small block, and the test space is used for reading and writing of small blocks. The size of the test space must be an integer multiple of 5 丨 2 bytes. In the preferred embodiment, The test space is the first byte of each tile. For example, if the size of the K block is l〇MB, the test of the small block (4) is 1M. The job space of the small block is the front of the small block. 1G24 byte. If the number of small blocks is large, the test byte is large, the test time is long, and the test surface of the hard disk 3 is large. If the number of J blocks is small, the test bit is small. If the group is small, the test time is short, and the test record of the hard disk 3 to be tested, if the test space of each device is equal to the size of each small block, then the test is to test the entire hard disk to be tested 3. Step S42, will be Test _ (10) The stored data is stored in the buffer of the small block in the test space: the buffer is the record of the small block Step S43, write the test data in the test space. Step _, read the data in the test space. Step S45 ' _ Whether the f material read is the same as the test data of the writer. Step S46. If not, proceed to step S47. Step S46' prompts that the small block read/write test is successful, and restores the data stored in the buffer to the test space. 0982045671-0 201106345 [0024] Step S47, The small block read/write test fails. [0025] As shown in FIG. 5, it is a flowchart of a preferred embodiment of a test method for reading and writing free space of a hard disk file system in the scalable firmware interface of the present invention. S50, enumerating all the file system partitions supported by the hard disk 3 under the EF I. In the preferred embodiment, the file system partition supported by the hard disk 3 to be tested under the EFI can be obtained according to the device tree. The document system partitions can be tested at the same time, or can be tested in sequence, and the sequence can be set by the tester. [0027] Step S51, copying the standard documents into the free space of each document system partition, The standard document can be copied in multiple copies to fill the free space of the document system partition. The standard document includes the content of the standard document and the attributes of the standard document, the attributes of the standard document include the size of the standard document, and the standard document is copied under EFI. The required standard time, etc. [0028] Step S52, reading out the documents in each document system partition. [0029] Step S53, comparing the read documents with the standard documents copied to each document system partition. If they are the same, the process proceeds to step S54. If they are not the same, the process proceeds to step S56. [0030] In step S54, it is determined whether the time for reading the document is normal. The time at which the document is read is judged to be normal according to the standard time in which the standard document in the standard document attribute is copied under EF I. If the time for reading the document is normal, the flow proceeds to step S55. If the time for reading the document is not normal, the process proceeds to step S56. [0031] Step S55, prompting the user that the document system partition test is successful. [0032] Step S56, prompting the user that the document system partition test fails. 098126654 Form No. A0101 Page 10 of 20 0982045671-0 201106345 [0033] It should be noted that the above embodiments are merely illustrative of the technical solutions of the present invention and are not limiting, although the present invention is described with reference to the above preferred embodiments. The detailed description of the technical solutions of the present invention may be made without departing from the spirit and scope of the technical solutions of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS [0034] FIG. 1 is a diagram showing an operational environment of a preferred embodiment of a hard disk test method in an extensible firmware interface of the present invention. [0035] FIG. 2 is a schematic diagram of a device tree of a hard disk 3 to be tested. 3 is a flow chart of a preferred embodiment of a method for testing hard disk information under the extensible firmware interface of the present invention. 4 is a flow chart of a preferred embodiment of a method for testing a hard disk block device in an extensible firmware interface of the present invention. 5 is a flow chart of a preferred embodiment of a test method for reading and writing free space of a hard disk file system in the scalable firmware interface of the present invention. [Main Component Symbol Description] [0040] Storage Device 1 [0040] Host 2 [0041] Hard Disk to Be Tested 3 [0042] Hard Disk Performance Test System 100 [0043] Acquires all the expandable firmware interfaces in the device tree that can be recognized Device path S30 098126654 Form number A0101 Page 11 / Total 20 pages 0982045671-0 201106345 [0044] Obtain the control code corresponding to the device path S31 [0045] Find the parent node of the node where each acquired device path is located, and Obtaining the control code S32 in the parent node information. [0046] Is there a control code with the same control code in the acquired parent node information in the control code obtained in step S31? S33. The control code S34 in the parent node information of the node where the same control code is located is obtained. [0048] The number of control codes finally obtained is S35. [0049] The corresponding device path S is found according to the finally obtained control code. 3 6 098126654 Form No. A0101 Page 12 of 20 0982045671-0

Claims (1)

201106345 七、申請專利範圍: 該方法包括步驟 種可擴展固件介面下的硬碟測試方法 (a) 獲取硬碟設備樹令所有可擴展固件介面能夠識別的 設備路徑; (b) 根據所獲取的設備路徑獲取所述設備路徑所對應的 控制碼; ^ 、(c)查找每_個設備路徑所在結料父結點,並獲取所 〇 述父結點資訊中的控制碼; 所獲取的控制竭中是否存在與所獲取 獲取的控制瑪中存同的控制碼:若步驟⑴所 同的控制碼,則進 ^ 獲取的 乂結點資訊中的控制碼相 制碼中不存與所獲取的驟’若步驟(b)所獲取的控 碼,則進入步驟(f)·、又〜點資訊中的控制碼相同的控制 (e)獲取所述相同控制 ❾ 制碼,並轉至步部(d)碍所在結點的父結點資訊中的控 ⑴查看最終得到他 測硬碟的數量;及 ’該控制碼數量即為待 (g)根據最終得到的 2 設備路徑即為待測硬碟的型號至'對應的設備路經,所述 ㈣請專利範圍第1項所H 試方法,該方法還包括步驟:從戶展固件介面下的硬碟測 中得到待測硬碟的資旬 所獲取的待蜊硬碟的蜇號 碟容量大小’及介面^ 型該待測硬碟的資訊包括廠商,硬 098126654 表單編號 A0101 » ^ 0982045671 第13頁/共20頁 201106345 3 .如申請專利範圍第1項所述之可擴展固件介面下的硬碟測 試方法,所述設備樹的每個結點表示一個塊設備或者一個 文檔系統。 4 .如申請專利範圍第3項所述之可擴展固件介面下的硬碟測 試方法,該方法還包括塊設備的測試步驟,所述塊設備的 測試步驟包括: 將可擴展固件介面下識別的待測硬碟的每個塊設備分成數 個小塊; 於每個小塊中劃分一個測試空間; 將每個測試空間内原本儲存的資料儲存到測試空間所在小 塊的緩衝區内; 往測試空間内寫入測試資料; 讀出測試空間内的資料; 當讀出的資料與寫入的測試資料相同時,提示該小塊讀寫 測試成功,並將儲存到緩衝區的資料恢復儲存到該測試空 間内;及 當讀出的資料與寫入的測試資料不同時,提示該小塊讀寫 測試失敗。 5 .如申請專利範圍第4項所述之可擴展固件介面下的硬碟測 試方法,所述每個小塊的大小是512位元組的整數倍。 6 .如申請專利範圍第4項所述之可擴展固件介面下的硬碟測 試方法,所述測試空間的大小是512位元組的整數倍,且 該測試空間為每個小塊的最前面的位元組。 7 .如申請專利範圍第3所述之可擴展固件介面下的硬碟測試 方法,該方法還包括文檔系統空閒空間的讀寫測試步驟, 所述文檔系統空閒空間的讀寫測試步驟包括: 098126654 表單編號A0101 第14頁/共20頁 0982045671-0 201106345 列舉出待測硬碟在可擴展固件介面下支援的所有文檔系統 分區, 將標準文檔複製到每個文檔系統分區的空閒空間内; 讀出每個文檔系統分區内的文檔; 若讀出的文檔與複製到每個文檔系統分區内的標來文檔不 同,則提示該文檔系統分區空閒空間的讀寫測試失敗; 若讀出的文檔與複製到每個文檔系統分區内的標準文檔相 同,則判斷所述讀出文檔的時間是否正常; Ο 若讀出文檔的時間正常,則提示該文檔系統分區空閒空間 的讀寫測試成功;及 若讀出文檔的時間不正常,則提示該文檔系統分區空閒空 間的讀寫測試失敗。 如申請專利範圍第7所述之可擴展固件介面下的硬碟測試 方法,所述標準文檔包括標準文檔的内容及該標準文檔的 屬性,該標準文檔的屬性包括該標準文檔的大小、可擴展 固件介面下複製該標準文檔所需要的標準時間。 ❹ 如申請專利範圍第8所述之可擴展固件介面下的硬碟測試 方法,所述讀出文檔的時間正常是指讀出該文檔的時間與 複製該標準文檔所需要的標準時間一致。 098126654 表單編號Α0101 第15頁/共20頁 0982045671-0201106345 VII. Patent Application Scope: This method includes steps to test the hard disk under the extensible firmware interface. (a) Obtain the device path of the hard disk device tree so that all the extensible firmware interfaces can recognize; (b) According to the acquired device The path acquires a control code corresponding to the path of the device; ^, (c) finds a parent node of each of the device paths, and obtains a control code in the parent node information; Whether there is a control code stored in the control horse acquired by the acquired acquisition: if the control code is the same as the step (1), the control code phase code in the 乂 node information acquired does not exist and the acquired step If the control code obtained in the step (b) is entered, the control (e) entering the step (f)·and the point information is the same control (e), and the same control code is obtained, and the step (d) is transferred to the step (d). Control the control in the parent node information of the node (1) to see the number of hard disks that are finally measured; and 'the number of control codes is to wait (g) according to the final 2 device path is the model of the hard disk to be tested To the corresponding device road According to the above-mentioned (4), the H test method of the first item of the patent scope, the method further includes the steps of: obtaining the hard disk to be picked up by the hard disk of the hard disk to be tested from the hard disk test under the firmware interface of the household exhibition. No. of disk capacity size and interface type The information of the hard disk to be tested includes the manufacturer, hard 098126654 Form No. A0101 » ^ 0982045671 Page 13 of 20 201106345 3. Extensible firmware as described in claim 1 A hard disk test method under the interface, where each node of the device tree represents a block device or a file system. 4. The method for testing a hard disk in an extensible firmware interface according to claim 3, further comprising a test step of the block device, wherein the step of testing the block device comprises: identifying the device under the extensible firmware interface Each block device of the hard disk to be tested is divided into several small blocks; one test space is divided in each small block; the originally stored data in each test space is stored in a buffer of the small block in the test space; Write the test data in the space; read the data in the test space; when the read data is the same as the written test data, the small block read/write test is successful, and the data stored in the buffer is restored and stored Within the test space; and when the read data is different from the written test data, the small block read/write test fails. 5. A hard disk test method in an extensible firmware interface as described in claim 4, wherein the size of each tile is an integer multiple of 512 bytes. 6. The hard disk test method according to the extensible firmware interface described in claim 4, wherein the size of the test space is an integer multiple of 512 bytes, and the test space is the front of each small block. The byte. 7. The method for testing a hard disk in an extensible firmware interface according to claim 3, further comprising: a read/write test step of a free space of the file system, wherein the read and write test steps of the free space of the file system include: 098126654 Form No. A0101 Page 14 of 20 0982045671-0 201106345 List all the document system partitions supported by the hard disk under the Extensible Firmware Interface, copy the standard documents into the free space of each file system partition; Read a document within each document system partition; if the read document is different from the marked document copied into each document system partition, the read/write test indicating that the document system partition free space fails; if the read document and copy If the standard document in each file system partition is the same, it is judged whether the time for reading the document is normal; Ο if the time for reading the document is normal, the read/write test of the free space of the document system partition is successful; and if the reading is successful; If the time of the document is not normal, the read/write test of the free space of the document system partition is failed. A hard disk test method in an extensible firmware interface according to claim 7, wherein the standard document includes a content of a standard document and an attribute of the standard document, and the attribute of the standard document includes a size of the standard document and is expandable. The standard time required to copy the standard document under the firmware interface. ❹ For example, in the hard disk test method under the extensible firmware interface described in claim 8, the normal reading of the document means that the time for reading the document is the same as the standard time required for copying the standard document. 098126654 Form NumberΑ0101 Page 15/Total 20 Page 0982045671-0
TW098126654A 2009-08-10 2009-08-10 System and method for testing hard disks under extensible firmware interface TWI447712B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW098126654A TWI447712B (en) 2009-08-10 2009-08-10 System and method for testing hard disks under extensible firmware interface

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW098126654A TWI447712B (en) 2009-08-10 2009-08-10 System and method for testing hard disks under extensible firmware interface

Publications (2)

Publication Number Publication Date
TW201106345A true TW201106345A (en) 2011-02-16
TWI447712B TWI447712B (en) 2014-08-01

Family

ID=44814316

Family Applications (1)

Application Number Title Priority Date Filing Date
TW098126654A TWI447712B (en) 2009-08-10 2009-08-10 System and method for testing hard disks under extensible firmware interface

Country Status (1)

Country Link
TW (1) TWI447712B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI461906B (en) * 2011-09-09 2014-11-21 Hon Hai Prec Ind Co Ltd Method for analyzing the data of hard discs

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6889340B1 (en) * 2000-10-13 2005-05-03 Phoenix Technologies Ltd. Use of extra firmware flash ROM space as a diagnostic drive
US7546487B2 (en) * 2005-09-15 2009-06-09 Intel Corporation OS and firmware coordinated error handling using transparent firmware intercept and firmware services
TWI311706B (en) * 2006-12-07 2009-07-01 Inventec Corporatio Method for testing hard disk of extensible firmware interface
US7676707B2 (en) * 2007-10-30 2010-03-09 Inventec Corporation Device and method for testing SAS channels

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI461906B (en) * 2011-09-09 2014-11-21 Hon Hai Prec Ind Co Ltd Method for analyzing the data of hard discs

Also Published As

Publication number Publication date
TWI447712B (en) 2014-08-01

Similar Documents

Publication Publication Date Title
US8074038B2 (en) Converting luns into files or files into luns in real time
US8612700B1 (en) Method and system of performing block level duplications of cataloged backup data
US8751768B2 (en) Data storage reclamation systems and methods
US8082229B2 (en) Methods for backing up a database
US7822595B2 (en) Systems and methods for selectively copying embedded data files
US7730358B2 (en) Stress testing method of file system
JP5538970B2 (en) Information processing apparatus, data processing method, and program
JP2014513338A5 (en) Method, computer readable storage medium and system for optimal compression of a virtual disk
US20110099324A1 (en) Flash memory storage system and flash memory controller and data processing method thereof
CN108089951A (en) Acceleration data in storage system are recovered
TW201205288A (en) Data protecting method, memory controller and portable memory storage device
EP1720109A2 (en) Apparatus and method for storing and managing additional data in file system
US8499006B2 (en) Data migration system and data migration method
CN105468482B (en) Hard disk position identification and fault diagnosis method and server equipment thereof
CN111309586B (en) Command testing method and device and storage medium thereof
CN101963931A (en) Hard disk testing method under extensible firmware interface
CN102750213A (en) Disc detecting and processing method and detecting and processing system
TW201106345A (en) System and method for testing hard disks under extensible firmware interface
KR20110023580A (en) The method and system for recovering data
CN113836152B (en) High-efficiency data consistency verification method, device and storage medium
Guo et al. Data recovery function testing for digital forensic tools
JP5629438B2 (en) File management apparatus and control method thereof
KR101365430B1 (en) Apparatus for state detecting of flash memory in solid state drive tester
US20240281333A1 (en) Method and apparatus for recovering deleted data on low flash memory formatted with ubifs
CN103700388A (en) File recording apparatus, file system management method, file recovery method, and changer drive

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees