TWI744692B - Hard disk examination method and system of the same - Google Patents

Hard disk examination method and system of the same Download PDF

Info

Publication number
TWI744692B
TWI744692B TW108132797A TW108132797A TWI744692B TW I744692 B TWI744692 B TW I744692B TW 108132797 A TW108132797 A TW 108132797A TW 108132797 A TW108132797 A TW 108132797A TW I744692 B TWI744692 B TW I744692B
Authority
TW
Taiwan
Prior art keywords
hard disk
detection device
test
tested
detection
Prior art date
Application number
TW108132797A
Other languages
Chinese (zh)
Other versions
TW202111532A (en
Inventor
黃之麒
蘇柏伍
施純豪
Original Assignee
英業達股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 英業達股份有限公司 filed Critical 英業達股份有限公司
Priority to TW108132797A priority Critical patent/TWI744692B/en
Publication of TW202111532A publication Critical patent/TW202111532A/en
Application granted granted Critical
Publication of TWI744692B publication Critical patent/TWI744692B/en

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

A hard disk examination method, adapted to an examination device to execute hot swapping examination on a hard disk and a testing host computer. The method includes controlling a signal connecting port of the hard disk to be disconnected from an insertion slot of the testing host computer by the examination device, executing a first hard disk confirmation process to determine whether the testing host computer detects the hard disk, connecting the signal connecting port to the insertion slot and controlling the testing host computer to execute a second hard disk confirmation process to determine whether the testing host computer detects the hard disk when the examination device determines the testing host computer does not detect the hard disk, controlling the examination device to increase an examination number by one unit and determines whether the updated examination number equals to a predetermined number when the testing host computer detects the hard disk, controlling the examination device to output an examination completed signal when the updated examination number equals to the predetermined number.

Description

硬碟檢測方法及硬碟檢測系統Hard disk detection method and hard disk detection system

本發明係關於一種硬碟檢測方法及執行此方法的硬碟檢測系統,特別係關於一種對待測硬碟執行熱插拔檢測的硬碟檢測方法及系統。The present invention relates to a hard disk detection method and a hard disk detection system for performing the method, and more particularly to a hard disk detection method and system for performing hot plug detection on the hard disk to be tested.

在進行硬碟檢測時,最常見的技術就是以人為手動的熱插拔(Hot Swapping或Hot Plugging),並且在每個插拔的期間皆要間隔準確的時間,以達到快速熱插拔或慢速熱插拔的需求。一般而言,熱插拔包含:快速熱插拔、慢速熱插拔及I/O (Input/Output)慢速插拔,不論是何種插拔檢測技術,在每一次插拔之間都需間隔相對應的時間間隔,且需重覆相同的動作至少10次。When performing hard disk inspection, the most common technique is to use manual hot swapping (Hot Swapping or Hot Plugging), and an accurate time interval is required during each insertion and removal period to achieve fast hot swap or slow The need for fast hot swapping. Generally speaking, hot swap includes: fast hot swap, slow hot swap and I/O (Input/Output) slow swap. Regardless of the plug detection technology, it will The corresponding time interval needs to be separated, and the same action needs to be repeated at least 10 times.

因此在以上討論的熱插拔類型中,不論是哪一種插拔方式皆需要很長的時間及不中斷的人力,且因熱插拔皆為重複性的動作,更因此容易造成人員操作錯誤或計時錯誤。Therefore, in the hot plugging types discussed above, no matter which plugging method is used, a long time and uninterrupted manpower are required, and because hot plugging is a repetitive action, it is more likely to cause personnel operation errors or Timing error.

鑒於上述,本發明提供一種以滿足上述需求的硬碟檢測方法。In view of the above, the present invention provides a hard disk inspection method that meets the above requirements.

依據本發明一實施例的一種硬碟檢測方法,適用於一檢測裝置以執行一待測硬碟及一測試主機的熱插拔檢測,該方法包含:以該檢測裝置控制該待測硬碟的一訊號連接埠與該測試主機的一硬碟插槽呈斷開,並執行一第一硬碟確認程序以判斷該測試主機是否偵測得該待測硬碟;當該檢測裝置於該第一硬碟確認程序判斷該測試主機未偵測得該待測硬碟時,以該檢測裝置控制該訊號連接埠連接該硬碟插槽,並控制該測試主機執行一第二硬碟確認程序,以判斷該測試主機是否偵測得該待測硬碟;當該檢測裝置於該第二硬碟確認程序判斷該測試主機偵測得該待測硬碟時,以該檢測裝置將一檢測次數加一以更新該檢測次數,並判斷更新後的該檢測次數是否等於一預設次數;當更新後的該檢測次數等於該預設次數,該檢測裝置輸出一完成訊號;當更新後的該檢測次數小於該預設次數,再次以該檢測裝置控制該訊號連接埠與該硬碟插槽呈斷開;以及當該檢測裝置於該第一硬碟確認程序判斷該測試主機偵測得該待測硬碟,或於該第二硬碟確認程序判斷該測試主機未偵測得該待測硬碟,該檢測裝置執行一通報程序。A hard disk detection method according to an embodiment of the present invention is suitable for a detection device to perform hot plug detection of a hard disk under test and a test host. The method includes: controlling the hard disk under test with the detection device A signal port is disconnected from a hard disk slot of the test host, and a first hard disk confirmation procedure is executed to determine whether the test host detects the hard disk under test; when the detection device is in the first hard disk When the hard disk confirmation program determines that the test host has not detected the hard disk under test, the detection device controls the signal port to connect to the hard disk slot, and controls the test host to execute a second hard disk confirmation process to Determine whether the test host detects the hard disk under test; when the test device determines that the test host detects the hard disk under test in the second hard disk confirmation program, the test device adds one to the number of times of testing To update the number of detections and determine whether the updated number of detections is equal to a preset number; when the updated number of detections is equal to the preset number, the detection device outputs a completion signal; when the updated number of detections is less than For the preset number of times, the detection device controls the signal port to disconnect from the hard disk slot again; and when the detection device is in the first hard disk confirmation program, it is determined that the test host detects the hard disk under test , Or if the second hard disk confirmation process determines that the test host does not detect the hard disk under test, the detection device executes a notification process.

依據本發明一實施例的一種硬碟檢測系統,適用於對一待測硬碟進行熱插拔檢測,該系統包含:一測試主機,設有一硬碟插槽,該測試主機對該待測硬碟執行一第一硬碟確認程序及一第二硬碟確認程序,以判斷該測試主機是否偵測得該待測硬碟;以及一檢測裝置,包含:一控制電路,電性連接該測試主機以控制該測試主機執行該第一硬碟確認程序及該第二硬碟確認程序,且該控制電路輸出一拔出指令及一插入指令;以及一致動機構,電性連接該控制電路,以依據該拔出指令及該插入指令控制該待測硬碟的一訊號連接埠與該硬碟插槽之間的連接;其中該檢測裝置依據該第一硬碟確認程序及該第二硬碟確認程序的判斷結果選擇性地執行一通報程序。A hard disk inspection system according to an embodiment of the present invention is suitable for hot-plugging and unplugging a hard disk under test. The system includes: a test host provided with a hard disk slot; The disk executes a first hard disk confirmation procedure and a second hard disk confirmation procedure to determine whether the test host detects the hard disk under test; and a detection device including: a control circuit electrically connected to the test host To control the test host to execute the first hard disk confirming program and the second hard disk confirming program, and the control circuit outputs an unplug command and an insert command; and an actuation mechanism, electrically connected to the control circuit, according to The unplug command and the insert command control the connection between a signal port of the hard disk to be tested and the hard disk slot; wherein the detection device is based on the first hard disk confirming procedure and the second hard disk confirming procedure The result of the judgment selectively executes a notification procedure.

藉由上述實施內容,本發明透過以檢測裝置控制待測硬碟在測試主機進行熱插拔檢測,並執行硬碟確認程序,以避免人為的操作錯誤或計時錯誤。Based on the above-mentioned implementation content, the present invention controls the hot-plug detection of the hard disk under test in the test host by the detection device, and executes the hard disk confirmation procedure to avoid man-made operation errors or timing errors.

以上之關於本揭露內容之說明及以下之實施方式之說明係用以示範與解釋本發明之精神與原理,並且提供本發明之專利申請範圍更進一步之解釋。The above description of the disclosure and the following description of the embodiments are used to demonstrate and explain the spirit and principle of the present invention, and to provide a further explanation of the scope of the patent application of the present invention.

以下在實施方式中詳細敘述本發明之詳細特徵以及優點,其內容足以使任何熟習相關技藝者了解本發明之技術內容並據以實施,且根據本說明書所揭露之內容、申請專利範圍及圖式,任何熟習相關技藝者可輕易地理解本發明相關之目的及優點。以下之實施例係進一步詳細說明本發明之觀點,但非以任何觀點限制本發明之範疇。The detailed features and advantages of the present invention will be described in detail in the following embodiments. The content is sufficient to enable anyone familiar with the relevant art to understand the technical content of the present invention and implement it accordingly, and according to the content disclosed in this specification, the scope of patent application and the drawings. Anyone who is familiar with relevant skills can easily understand the purpose and advantages of the present invention. The following examples further illustrate the viewpoints of the present invention in detail, but do not limit the scope of the present invention by any viewpoint.

請參考圖1,圖1係依據本發明一實施例所繪示的硬碟檢測系統的方塊示意圖。Please refer to FIG. 1. FIG. 1 is a block diagram of a hard disk inspection system according to an embodiment of the present invention.

本發明所揭示的硬碟檢測系統適用於對待測硬碟3進行熱插拔檢測,且硬碟檢測系統包含檢測裝置1及測試主機2,且測試主機2電性連接檢測裝置1。其中,檢測裝置1更包含控制電路11及致動機構12。The hard disk detection system disclosed in the present invention is suitable for hot plug detection of the hard disk 3 to be tested, and the hard disk detection system includes a detection device 1 and a test host 2, and the test host 2 is electrically connected to the detection device 1. Among them, the detection device 1 further includes a control circuit 11 and an actuation mechanism 12.

請繼續參考圖1,本發明揭示的硬碟檢測系統的測試主機2設有硬碟插槽20。測試主機2由檢測裝置1控制以對待測硬碟3執行第一硬碟確認程序及第二硬碟確認程序,以判斷測試主機2是否偵測得待測硬碟3,且檢測裝置1依據第一硬碟確認程序及第二硬碟確認程序的判斷結果選擇性地執行通報程序。其中測試主機2可以例如是可程式化控制器U90,然本發明不以此為限。Please continue to refer to FIG. 1, the test host 2 of the hard disk inspection system disclosed in the present invention is provided with a hard disk slot 20. The test host 2 is controlled by the detection device 1 to execute the first hard disk confirmation procedure and the second hard disk confirmation procedure to determine whether the test host 2 detects the hard disk 3 under test, and the detection device 1 performs the first hard disk confirmation procedure and the second hard disk confirmation procedure. The judgment result of a hard disk confirming procedure and a second hard disk confirming procedure is selectively executed in a notification procedure. The test host 2 may be, for example, a programmable controller U90, but the present invention is not limited to this.

詳細來說,第一確認程序包含以檢測裝置1的控制電路11控制測試主機2執行列出裝置指令以產生一裝置列表,並判斷裝置列表是否存在新增的硬碟;換句話說,在測試主機2執行列出裝置指令產生的裝置列表中,若有新增硬碟,則表示待測硬碟3仍位在硬碟插槽20內(可能的情況為待測硬碟3的訊號連接埠31仍至少部分連接硬碟插槽20),若在裝置列表中無新增硬碟,則表示待測硬碟3已被從硬碟插槽20拔出。In detail, the first confirmation procedure includes the control circuit 11 of the detection device 1 controlling the test host 2 to execute a device list command to generate a device list, and determine whether there is a newly added hard disk in the device list; in other words, in the test In the device list generated by the host 2 executing the list device command, if there is a new hard drive, it means that the hard drive 3 under test is still in the hard drive slot 20 (the signal port of the hard drive under test 3 if possible 31 is still at least partially connected to the hard drive slot 20). If there is no new hard drive in the device list, it means that the hard drive 3 to be tested has been removed from the hard drive slot 20.

而第二硬碟確認程序亦會執行如第一硬碟確認程序的列出裝置指令,故不再於此贅述,惟若測試主機2執行列出裝置指令而產生的裝置列表有新增硬碟時,則第二硬碟確認程序更可以包含以測試主機2判斷新增的硬碟的序號是否與待測硬碟3的序號一致。此外,除了判斷序號是否一致之外,第二硬碟確認程序又可以包含以測試主機2判斷新增的硬碟的內容資訊是否與待測硬碟3的內容資訊一致,當測試主機2判斷新增的硬碟的序號及內容資訊與待測硬碟3的序號及內容資訊一致,則表示與硬碟插槽20連接的硬碟確實即為待測硬碟3。此述的內容資訊可以是待測硬碟3的型號或其他軟硬體資訊,例如韌體版本等,然本發明不以此為限。And the second hard disk confirmation procedure will also execute the list device command as the first hard disk confirmation procedure, so I won’t repeat it here, but if the test host 2 executes the device list command, there is a new hard disk in the device list At this time, the second hard disk confirmation procedure may further include using the test host 2 to determine whether the serial number of the newly added hard disk is consistent with the serial number of the hard disk 3 to be tested. In addition, in addition to judging whether the serial numbers are consistent, the second hard disk confirmation procedure can also include using the test host 2 to determine whether the content information of the newly added hard disk is consistent with the content information of the hard disk to be tested 3. The serial number and content information of the added hard drive are consistent with the serial number and content information of the hard drive 3 under test, which means that the hard drive connected to the hard drive slot 20 is indeed the hard drive 3 under test. The content information described herein may be the model of the hard disk 3 to be tested or other software and hardware information, such as firmware version, etc., but the present invention is not limited thereto.

請繼續參考圖1,控制電路11電性連接測試主機2以控制測試主機2執行第一硬碟確認程序及第二硬碟確認程序,控制電路11輸出拔出指令及插入指令給致動機構12,致動機構12依據拔出指令及插入指令控制待測硬碟3的訊號連接埠31與硬碟插槽20之間的連接關係。更詳細而言,控制電路11控制致動機構12將待測硬碟3從硬碟插槽20拔出,或是控制致動機構12將待測硬碟3插入硬碟插槽20,其中,控制電路11可以是微控制器(Microcontroller)或是其他具有計數功能的控制器(Controller),然本發明不以此為限。Please continue to refer to FIG. 1, the control circuit 11 is electrically connected to the test host 2 to control the test host 2 to execute the first hard disk confirmation procedure and the second hard disk confirmation procedure, and the control circuit 11 outputs the unplug command and the insert command to the actuating mechanism 12 , The actuating mechanism 12 controls the connection relationship between the signal port 31 of the hard disk under test 3 and the hard disk slot 20 according to the unplugging command and the inserting command. In more detail, the control circuit 11 controls the actuating mechanism 12 to pull out the hard disk to be tested 3 from the hard disk slot 20, or controls the actuating mechanism 12 to insert the hard disk 3 to be tested into the hard disk slot 20, wherein, The control circuit 11 may be a microcontroller (Microcontroller) or other controllers with a counting function, but the present invention is not limited to this.

請繼續參考圖1,致動機構12電性連接控致電路11,致動機構12依據控制電路11輸出的拔出指令及插入指令控制待測硬碟3的訊號連接埠31與硬碟插槽20之間的連接。舉例而言,當致動機構12接收到拔出指令時,致動機構12將待測硬碟3從硬碟插槽20拔出;當致動機構12接收到插入指令時,致動機構12將待測硬碟3插入硬碟插槽20。致動機構12可以包含樹莓派(Raspberry Pi)及由樹莓派控制/致動用於抓取及移動待測硬碟3的治具。Please continue to refer to FIG. 1, the actuating mechanism 12 is electrically connected to the actuating circuit 11, and the actuating mechanism 12 controls the signal connection port 31 and the hard disk slot of the hard disk under test 3 according to the unplug and insert commands output by the control circuit 11 The connection between 20. For example, when the actuating mechanism 12 receives an unplugging instruction, the actuating mechanism 12 pulls the hard disk to be tested 3 out of the hard disk slot 20; when the actuating mechanism 12 receives an inserting instruction, the actuating mechanism 12 Insert the hard drive 3 to be tested into the hard drive slot 20. The actuating mechanism 12 may include a Raspberry Pi and a jig controlled/actuated by the Raspberry Pi for grabbing and moving the hard disk 3 under test.

其中,上述的拔出指令及插入指令可以是Python程式語言指令,而樹莓派控制治具的實施方式可以是由樹莓派控制連接於治具的繼電器、步進馬達及伺服馬達等,由樹莓派控制繼電器的電流走向,進而由繼電器控制馬達以帶動待測硬碟做上下插拔的動作,以實現熱拔插檢測中的拔出指令及插入指令,然本發明不以此為限。Among them, the above-mentioned unplug and insert commands can be Python programming language commands, and the Raspberry Pi control fixture can be controlled by the Raspberry Pi to control the relays, stepping motors, and servo motors connected to the fixture. The current direction of the relay is controlled by the relay, and then the motor is controlled by the relay to drive the hard disk to be tested to perform up and down plugging actions to realize the pull-out instruction and the plug-in instruction in the hot plug detection, but the present invention is not limited to this.

請參考圖2,圖2係依據本發明一實施例所繪示的硬碟檢測方法的流程圖。本實施例適用於以如圖1所揭露的硬碟檢測系統對待測硬碟3執行熱插拔檢測。Please refer to FIG. 2, which is a flowchart of a hard disk detection method according to an embodiment of the present invention. This embodiment is suitable for using the hard disk detection system as disclosed in FIG. 1 to perform hot plug detection on the hard disk 3 to be tested.

請一併參考圖1及圖2,本實施例揭露的硬碟檢測方法包含於步驟S02中,檢測裝置1的控制電路11控制致動機構12,以控制待測硬碟3的訊號連接埠31與測試主機2的硬碟插槽呈斷開,並由測試主機2於步驟S04執行第一硬碟確認程序以判斷測試主機2是否測得待測硬碟3。其中,在步驟S02之前,可以以控制電路11控制致動機構12鎖固待測硬碟3。Please refer to FIGS. 1 and 2 together. The hard disk detection method disclosed in this embodiment includes step S02. The control circuit 11 of the detection device 1 controls the actuation mechanism 12 to control the signal connection port 31 of the hard disk 3 under test. The hard disk slot of the test host 2 is disconnected, and the test host 2 executes the first hard disk confirmation procedure in step S04 to determine whether the test host 2 has tested the hard disk 3 under test. Wherein, before step S02, the control circuit 11 may be used to control the actuation mechanism 12 to lock the hard disk 3 to be tested.

接續上述,當測試主機2判斷測得待測硬碟3,則表示待測硬碟3可能本身存在異常,檢測裝置1在步驟S06執行通報程序。其中通報程序包含:檢測裝置1輸出錯誤訊號到顯示螢幕或其他終端裝置,錯誤訊號亦可以被輸出到雲端的錯誤日誌等。此外,通報程序亦可以是由檢測裝置1記錄錯誤事件之後,再輸出錯誤記錄。然而,本發明的通報程序並不以上述實現方式為限。Following the above, when the test host 2 determines that the hard disk 3 to be tested is measured, it means that the hard disk 3 to be tested may have an abnormality in itself, and the detection device 1 executes the notification procedure in step S06. The notification procedure includes: the detection device 1 outputs an error signal to the display screen or other terminal devices, and the error signal can also be output to an error log in the cloud. In addition, the notification procedure may also be to output the error record after the detection device 1 records the error event. However, the notification procedure of the present invention is not limited to the foregoing implementation manner.

請接續上述,若測試主機2未測得待測硬碟3,則表示待測硬碟3已確實從硬碟插槽30拔出,則檢測裝置1的控制電路11控制致動機構12,以在步驟S08控制待測硬碟3的訊號連接埠31連接到硬碟插槽20。Please continue the above. If the test host 2 does not test the hard disk 3 to be tested, it means that the hard disk 3 to be tested has indeed been pulled out from the hard disk slot 30, and the control circuit 11 of the detection device 1 controls the actuation mechanism 12 to In step S08, the signal port 31 of the hard disk under test 3 is controlled to be connected to the hard disk slot 20.

當待測硬碟3的訊號連接埠31連接到硬碟插槽20時,測試主機2在步驟S10執行第二硬碟確認程序,以判斷測試主機2是否偵測得到待測硬碟3。When the signal port 31 of the hard disk under test 3 is connected to the hard disk slot 20, the test host 2 executes a second hard disk confirmation procedure in step S10 to determine whether the test host 2 has detected the hard disk 3 under test.

為了更詳細解釋本實施例,請一併參考步驟S10及S12。當測試主機2偵測得到待測硬碟3時,表示待測硬碟3已被插入硬碟插槽20,則檢測裝置1的控制電路11於步驟S12中將檢測次數加一以更新檢測次數。詳細而言,檢測次數為在待測硬碟3執行第二硬碟確認程序的次數(簡單而言,檢測次數亦可以是待測硬碟3在熱插拔檢測期間被插入硬碟插槽20的次數)。In order to explain this embodiment in more detail, please refer to steps S10 and S12 together. When the test host 2 detects the hard disk 3 to be tested, it means that the hard disk 3 to be tested has been inserted into the hard disk slot 20, and the control circuit 11 of the detection device 1 adds one to the number of inspections in step S12 to update the number of inspections . In detail, the number of detections is the number of times that the second hard disk confirmation process is executed on the hard disk under test 3 (in short, the number of detections can also be the number of times the hard disk under test 3 is inserted into the hard disk slot 20 during the hot plug detection period. The number of times).

請接續上述步驟S10及S12,並一併參考步驟S06’,當測試主機2未偵測得到待測硬碟3時,則表示待測硬碟3可能本身存在異常,故檢測裝置1在步驟S06’執行通報程序。此述的通報程序除了可以是如上述的輸出錯誤訊號之外,亦可以是在輸出錯誤訊號後停止此硬碟檢測方法,然通報程序也可以是由檢測裝置1記錄錯誤事件之後,在步驟S12將檢測次數加一以更新檢測次數。Please continue the above steps S10 and S12, and refer to step S06' together. When the test host 2 does not detect the hard disk 3 to be tested, it means that the hard disk 3 to be tested may have an abnormality, so the detection device 1 is in step S06 'Perform notification procedures. In addition to outputting the error signal as described above, the notification procedure described here can also be to stop the hard disk detection method after the error signal is output. Add one to the number of detections to update the number of detections.

請參考步驟S14,當更新完檢測次數時,控制電路11判斷更新後的檢測次數是否等於預設次數,其中預設次數可以依據檢測需求而不同,在實務上,預設次數較佳是50次,然本發明不以此為限。Please refer to step S14. When the detection times are updated, the control circuit 11 determines whether the updated detection times are equal to the preset times. The preset times can be different according to the detection requirements. In practice, the preset times are preferably 50 times. However, the present invention is not limited to this.

當控制電路11判斷更新後的檢測次數不等於(即小於)預設次數時,則檢測裝置1的控制電路11再次於步驟S02控制待測硬碟3與硬碟插槽20呈斷開,並接續執行前述的後續步驟;反之,當檢測次數等於預設次數時,檢測裝置1的控制電路11於步驟S16輸出完成訊號到顯示螢幕或其他終端裝置等,然本發明不以此為限。When the control circuit 11 determines that the updated detection times are not equal to (that is, less than) the preset times, the control circuit 11 of the detection device 1 again controls the hard disk under test 3 to be disconnected from the hard disk slot 20 in step S02, and Continue to perform the aforementioned subsequent steps; otherwise, when the number of detections is equal to the preset number, the control circuit 11 of the detection device 1 outputs a completion signal to the display screen or other terminal devices in step S16, but the invention is not limited to this.

請參考圖3,圖3係依據本發明的圖2的實施例所繪示的另一硬碟檢測方法的流程圖。圖3的步驟S02到S14執行方法類似於圖2之流程圖,故不再於此贅述,惟不同處為圖3在執行步驟S02之前更執行步驟S01,另一不同處為圖3的步驟S14若判斷結果為否,則接續執行步驟S01。Please refer to FIG. 3, which is a flowchart of another hard disk detection method depicted in the embodiment of FIG. 2 according to the present invention. The execution method of steps S02 to S14 in FIG. 3 is similar to the flowchart in FIG. 2, so it will not be repeated here. The only difference is that step S01 is executed before step S02 is executed in FIG. 3, and the other difference is step S14 in FIG. If the judgment result is no, then step S01 is executed continuously.

更詳細來說,圖3的步驟S01係在執行圖2之步驟S02之前執行,檢測裝置1的控制電路11控制致動機構12,將待測硬碟3的訊號連接埠31連接於硬碟插槽20,並對待測硬碟3執行壓力測試。其中,壓力測試包含控制電路11控制待測硬碟3對具有特定碼組大小(Block Size)的讀寫檔連續讀寫並持續一預設時間,其中碼組大小的值可以因不同測試需求或不同的儲存裝置而不同,其中碼組大小的值可以是1K、2K、4K或8K等,然本發明不以此為限。此述的連續讀寫例如是循序讀(Sequential Reads)、循序寫(Sequential Writes)、隨機讀(Random Reads)、隨機寫(Random Writes)、循序讀寫(Mixed Sequential Reads and Writes)以及隨機讀寫(Mixed Random Reads and Writes)等,而預設時間可以依據測試需求而不同,在實務上預設時間較佳為10秒鐘,然本發明不以此為限。舉例而言,若在待測硬碟3上執行I/O慢速插拔檢測,則待測硬碟可以在執行檔案寫入大小(即碼組大小)為4K的壓力測試後執行步驟S02至步驟S14(即進行待測硬碟3的插拔作動),且每次的壓力測試皆持續10秒。此外,在步驟S14中,當控制電路11判斷檢測次數小於預設次數時,亦可以接續回到圖3的步驟S01執行壓力測試。In more detail, step S01 in FIG. 3 is executed before step S02 in FIG. 2 is executed. The control circuit 11 of the detection device 1 controls the actuation mechanism 12 to connect the signal connection port 31 of the hard disk under test 3 to the hard disk plug Slot 20, and perform a pressure test on the hard disk 3 to be tested. The stress test includes the control circuit 11 controlling the hard disk under test 3 to continuously read and write the read and write files with a specific block size for a preset time. The value of the block size can be determined by different test requirements or It differs for different storage devices, where the value of the code group size can be 1K, 2K, 4K, or 8K, etc., but the present invention is not limited to this. The sequential reads and writes mentioned here are, for example, Sequential Reads, Sequential Writes, Random Reads, Random Writes, Mixed Sequential Reads and Writes, and Random Reads and Writes. (Mixed Random Reads and Writes), etc., and the preset time can be different according to test requirements. In practice, the preset time is preferably 10 seconds, but the present invention is not limited to this. For example, if the I/O slow insertion/removal test is performed on the hard disk under test 3, the hard disk under test can perform steps S02 to S02 after performing a stress test with a file write size (ie, block size) of 4K. Step S14 (ie, perform the insertion/removal action of the hard disk 3 to be tested), and each pressure test lasts for 10 seconds. In addition, in step S14, when the control circuit 11 determines that the number of detections is less than the preset number of times, it can also continue to return to step S01 in FIG. 3 to perform the pressure test.

藉由上述內容,本發明的一或多個實施例所提出之硬碟檢測方法以及硬碟檢測系統,可以藉由檢測裝置控制待測硬碟於測試主機進行熱插拔檢測,並進行第一硬碟確認程序及第二硬碟確認程序產生裝置列表,並據以判斷待測硬碟是否確實從待測插槽拔出或插入,此外,第二硬碟確認程序更可以包含依據測試主機產生的裝置列表判斷在待測插槽內的硬碟是否即為待測硬碟,以即時判斷待測硬碟係插入其對應的待測插槽。Based on the above content, the hard disk detection method and hard disk detection system provided by one or more embodiments of the present invention can control the hard disk under test to perform hot plug detection on the test host through the detection device, and perform the first The hard disk confirmation procedure and the second hard disk confirmation procedure generate a device list and determine whether the hard disk to be tested is indeed removed or inserted from the slot to be tested. In addition, the second hard disk confirmation procedure can also include generation based on the test host In the device list, determine whether the hard disk in the slot to be tested is the hard disk to be tested, so as to determine in real time whether the hard disk to be tested is inserted into its corresponding slot to be tested.

且本發明具有記錄檢測次數的機制,因此當檢測次數未達預設次數時,本發明的硬碟檢測系統便會重覆執行插拔檢測,直到檢測次數等於預設次數,作為完成熱插拔檢測的判斷標準。此外,本發明揭示的通報程序亦可以讓測試人員即時監控熱插拔的測試情形。Moreover, the present invention has a mechanism for recording the number of inspections. Therefore, when the number of inspections does not reach the preset number of times, the hard disk inspection system of the present invention will repeatedly perform the plug-in inspection until the number of inspections is equal to the preset number of times, as the completion of hot-plugging. Judgment criteria for testing. In addition, the notification procedure disclosed in the present invention can also allow testers to monitor the hot-plug test situation in real time.

本發明揭露的硬碟檢測方法及硬碟檢測系統可以用於快速熱插拔、慢速熱插拔或是I/O慢速插拔等常見的硬碟插拔檢測,然本發明不以此為限。此外,本發明揭示的實施例是以單顆待測硬碟為示例,然本發明亦可以應用於對複數待測硬碟(實務上例如為5個待測硬碟)同時做熱插拔檢測,並且在對該複數待測硬碟執行完熱插拔檢測後,檢測裝置接續對下一排的複數待測硬碟執行熱插拔檢測,故本發明不以單個待測硬碟為限。The hard disk detection method and the hard disk detection system disclosed in the present invention can be used for common hard disk plug-in detection such as fast hot plug, slow hot plug or I/O slow plug, but the present invention does not use this Is limited. In addition, the disclosed embodiment of the present invention takes a single hard disk to be tested as an example, but the present invention can also be applied to simultaneously perform hot plug detection on a plurality of hard disks to be tested (in practice, for example, 5 hard disks to be tested) And after performing hot plug detection on the plurality of hard disks to be tested, the detection device continues to perform hot plug detection on the plurality of hard disks to be tested in the next row, so the present invention is not limited to a single hard disk to be tested.

綜上所述,本發明揭露硬碟檢測方法及硬碟檢測系統係以機器及電腦裝置操作,故可以避免人為的操作錯誤或計時錯誤,且相較於人力更能維持每一次測試的精準度。In summary, the present invention discloses that the hard disk detection method and the hard disk detection system are operated by machines and computer devices, so human operation errors or timing errors can be avoided, and the accuracy of each test can be maintained better than that of humans. .

雖然本發明以前述之實施例揭露如上,然其並非用以限定本發明。在不脫離本發明之精神和範圍內,所為之更動與潤飾,均屬本發明之專利保護範圍。關於本發明所界定之保護範圍請參考所附之申請專利範圍。Although the present invention is disclosed in the foregoing embodiments, it is not intended to limit the present invention. All changes and modifications made without departing from the spirit and scope of the present invention fall within the scope of the patent protection of the present invention. For the scope of protection defined by the present invention, please refer to the attached scope of patent application.

1:檢測裝置 11:控制電路 12:致動機構 2:測試主機 20:硬碟插槽 3:待測硬碟 31:訊號連接埠1: Detection device 11: Control circuit 12: Actuation mechanism 2: Test host 20: hard drive slot 3: Hard drive to be tested 31: Signal port

圖1係依據本發明一實施例所繪示的硬碟檢測系統的方塊示意圖。 圖2係依據本發明一實施例所繪示的硬碟檢測方法的流程圖。 圖3係依據本發明的圖2的實施例所繪示的另一硬碟檢測方法的流程圖。FIG. 1 is a block diagram of a hard disk inspection system according to an embodiment of the invention. FIG. 2 is a flowchart of a hard disk detection method according to an embodiment of the invention. FIG. 3 is a flowchart of another hard disk detection method depicted in the embodiment of FIG. 2 according to the present invention.

1:檢測裝置1: Detection device

11:控制電路11: Control circuit

12:致動機構12: Actuation mechanism

2:測試主機2: Test host

20:硬碟插槽20: hard drive slot

3:待測硬碟3: Hard drive to be tested

31:訊號連接埠31: Signal port

Claims (10)

一種硬碟檢測方法,適用於一檢測裝置以執行一待測硬碟及一測試主機的熱插拔檢測,該方法包含:以該檢測裝置控制該待測硬碟的一訊號連接埠與該測試主機的一硬碟插槽呈斷開,並執行一第一硬碟確認程序以判斷該測試主機是否偵測得該待測硬碟;當該檢測裝置於該第一硬碟確認程序判斷該測試主機未偵測得該待測硬碟時,以該檢測裝置控制該訊號連接埠連接該硬碟插槽,並控制該測試主機執行一第二硬碟確認程序,以判斷該測試主機是否偵測得該待測硬碟;當該檢測裝置於該第二硬碟確認程序判斷該測試主機偵測得該待測硬碟時,以該檢測裝置將一檢測次數加一以更新該檢測次數,並判斷更新後的該檢測次數是否等於一預設次數;當更新後的該檢測次數等於該預設次數,該檢測裝置輸出一完成訊號;當更新後的該檢測次數小於該預設次數,再次以該檢測裝置控制該訊號連接埠與該硬碟插槽呈斷開;以及當該檢測裝置於該第一硬碟確認程序判斷該測試主機偵測得該待測硬碟,或於該第二硬碟確認程序判斷該測試主機未偵測得該待測硬碟,該檢測裝置執行一通報程序。A hard disk detection method is suitable for a detection device to perform hot plug detection of a hard disk to be tested and a test host. The method includes: controlling a signal connection port of the hard disk to be tested and the test with the detection device A hard disk slot of the host is disconnected, and a first hard disk confirmation process is executed to determine whether the test host detects the hard disk under test; when the detection device is in the first hard disk confirmation process, the test is determined When the host does not detect the hard disk under test, use the detection device to control the signal port to connect to the hard disk slot, and control the test host to execute a second hard disk confirmation process to determine whether the test host detects Obtain the hard disk to be tested; when the detection device determines that the test host detects the hard disk to be tested in the second hard disk confirmation program, the detection device adds one to the number of detections to update the number of detections, and Determine whether the updated number of detections is equal to a preset number; when the updated number of detections is equal to the preset number, the detection device outputs a completion signal; when the updated number of detections is less than the preset number, repeat The detection device controls the signal port to be disconnected from the hard disk slot; and when the detection device is in the first hard disk confirmation program, it is determined that the test host detects the hard disk under test or the second hard disk The disk confirmation process determines that the test host has not detected the hard disk to be tested, and the detection device executes a notification process. 如請求項1所述的硬碟檢測方法,其中該第一硬碟確認程序包含:以該檢測裝置控制該測試主機執行一列出裝置指令以產生一裝置列表,並判斷該裝置列表是否新增一硬碟。The hard disk detection method according to claim 1, wherein the first hard disk confirmation procedure includes: controlling the test host to execute a list device command with the detection device to generate a device list, and determine whether the device list is newly added A hard drive. 如請求項1所述的硬碟檢測方法,其中該第二硬碟確認程序包含:以該檢測裝置控制該測試主機執行一列出裝置指令以產生一裝置列表,並判斷該裝置列表是否新增一硬碟。The hard disk detection method according to claim 1, wherein the second hard disk confirmation procedure includes: controlling the test host to execute a list device command with the detection device to generate a device list, and determine whether the device list is newly added A hard drive. 如請求項3所述的硬碟檢測方法,其中該第二硬碟確認程序更包含:判斷新增的該硬碟的序號是否與該待測硬碟的序號一致。The hard disk detection method according to claim 3, wherein the second hard disk confirmation procedure further includes: determining whether the serial number of the newly added hard disk is consistent with the serial number of the hard disk to be tested. 如請求項4所述的硬碟檢測方法,其中該第二硬碟確認程序更包含:判斷新增的該硬碟的內容資訊是否與該待測硬碟的內容資訊一致。The hard disk detection method according to claim 4, wherein the second hard disk confirmation procedure further includes: determining whether the content information of the newly added hard disk is consistent with the content information of the hard disk to be tested. 如請求項1所述的硬碟檢測方法,其中該通報程序包含:以該檢測裝置輸出一錯誤訊號。The hard disk detection method according to claim 1, wherein the notification procedure includes: outputting an error signal by the detection device. 如請求項1所述的硬碟檢測方法,其中該通報程序包含:以該檢測裝置記錄一錯誤事件後,將該檢測次數加一以更新該檢測次數,並判斷更新後的該檢測次數是否等於該預設次數。The hard disk detection method according to claim 1, wherein the notification procedure includes: after an error event is recorded by the detection device, the detection frequency is increased by one to update the detection frequency, and it is determined whether the updated detection frequency is equal to The preset number of times. 如請求項1所述的硬碟檢測方法,其中在以該檢測裝置控制該訊號連接埠與該硬碟插槽呈斷開之前,該硬碟檢測方法更包括:以該檢測裝置控制該訊號連接埠連接該硬碟插槽,並對該待測硬碟執行一壓力測試。The hard disk detection method according to claim 1, wherein before the detection device is used to control the signal connection port to be disconnected from the hard disk slot, the hard disk detection method further includes: controlling the signal connection with the detection device The port is connected to the hard disk slot, and a pressure test is performed on the hard disk to be tested. 如請求項8所述的方法,其中該壓力測試包含以該檢測裝置控制該待測硬碟對具有特定碼組大小的一讀寫檔連續讀寫並持續一預設時間。The method according to claim 8, wherein the stress test includes controlling the hard disk to be tested to continuously read and write to a read and write file having a specific code group size by the detection device for a predetermined time. 一種硬碟檢測系統,適用於對一待測硬碟進行熱插拔檢測,該系統包含:一測試主機,設有一硬碟插槽,該測試主機對該待測硬碟執行一第一硬碟確認程序及一第二硬碟確認程序,以判斷該測試主機是否偵測得該待測硬碟;以及一檢測裝置,包含:        一控制電路,電性連接該測試主機以控制該測試主機執行該第一硬碟確認程序及該第二硬碟確認程序,且該控制電路輸出一拔出指令及一插入指令;以及        一致動機構,電性連接該控制電路,以依據該拔出指令及該插入指令控制該待測硬碟的一訊號連接埠與該硬碟插槽之間的連接; 其中該檢測裝置依據該第一硬碟確認程序及該第二硬碟確認程序的判斷結果選擇性地執行一通報程序。A hard disk detection system is suitable for hot-plugging detection of a hard disk to be tested. The system includes: a test host with a hard disk slot, and the test host executes a first hard disk on the hard disk to be tested A confirmation program and a second hard disk confirmation program to determine whether the test host detects the hard disk under test; and a detection device, including: a control circuit electrically connected to the test host to control the test host to execute the test The first hard disk confirming program and the second hard disk confirming program, and the control circuit outputs an unplugging instruction and an inserting instruction; and the actuation mechanism is electrically connected to the control circuit to follow the unplugging instruction and the insert Command controls the connection between a signal port of the hard disk to be tested and the hard disk slot; wherein the detection device selectively executes according to the judgment results of the first hard disk confirming procedure and the second hard disk confirming procedure 1. Notification procedure.
TW108132797A 2019-09-11 2019-09-11 Hard disk examination method and system of the same TWI744692B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW108132797A TWI744692B (en) 2019-09-11 2019-09-11 Hard disk examination method and system of the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW108132797A TWI744692B (en) 2019-09-11 2019-09-11 Hard disk examination method and system of the same

Publications (2)

Publication Number Publication Date
TW202111532A TW202111532A (en) 2021-03-16
TWI744692B true TWI744692B (en) 2021-11-01

Family

ID=76035698

Family Applications (1)

Application Number Title Priority Date Filing Date
TW108132797A TWI744692B (en) 2019-09-11 2019-09-11 Hard disk examination method and system of the same

Country Status (1)

Country Link
TW (1) TWI744692B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103885868A (en) * 2014-04-16 2014-06-25 福州瑞芯微电子有限公司 Testing system and device for simulating USB hot plugging process
CN105843720A (en) * 2016-05-12 2016-08-10 浪潮电子信息产业股份有限公司 Method and device for testing hot-plug stability of hard disks
CN108009062A (en) * 2017-12-14 2018-05-08 郑州云海信息技术有限公司 A kind of enterprise-level SSD system power failures function test method, apparatus and system
TWI670722B (en) * 2018-03-02 2019-09-01 大陸商深圳市時創意電子有限公司 Batch automatic test method for solid state disk and batch automatic test device for solid state disk

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103885868A (en) * 2014-04-16 2014-06-25 福州瑞芯微电子有限公司 Testing system and device for simulating USB hot plugging process
CN105843720A (en) * 2016-05-12 2016-08-10 浪潮电子信息产业股份有限公司 Method and device for testing hot-plug stability of hard disks
CN108009062A (en) * 2017-12-14 2018-05-08 郑州云海信息技术有限公司 A kind of enterprise-level SSD system power failures function test method, apparatus and system
TWI670722B (en) * 2018-03-02 2019-09-01 大陸商深圳市時創意電子有限公司 Batch automatic test method for solid state disk and batch automatic test device for solid state disk

Also Published As

Publication number Publication date
TW202111532A (en) 2021-03-16

Similar Documents

Publication Publication Date Title
JPS6120816B2 (en)
CN110502374A (en) The traffic capture debugging tool of the basic reason of equipment fault when identification is tested automatically
Paunović et al. A methodology for testing complex professional electronic systems
US10037255B2 (en) Device, method and program for performing system testing
WO2024098753A1 (en) Abnormality detection method, apparatus and system, and host device and storage medium
TWI759719B (en) Flash memory controller and method used in flash memory controller
US9400311B1 (en) Method and system of collective failure diagnosis for multiple electronic circuits
TW201317593A (en) Testing device capable of simulating plugging and unplugging actions and testing method thereof
CN111324502A (en) Batch test system and method thereof
TWI744692B (en) Hard disk examination method and system of the same
US10768852B2 (en) Batch automatic test method for solid state disks and batch automatic test device for solid state disks
JP6768119B2 (en) Abnormality test signal channel detection method in automated test equipment
TWI685791B (en) Method of generating bios-change record
CN112463464A (en) Hard disk detection method and hard disk detection system
CN111221684B (en) Detection method of server
CN114356677B (en) NVMe SSD hot plug test method, device, equipment and storage medium
US20090235278A1 (en) Method for tracking and/or verifying message passing in a simulation environment
CN109800172B (en) System and method for positioning embedded processor crash based on EJTAG interface
JP4630797B2 (en) Control rod drive time measuring device and its calibration method, diagnostic method and correction method
TWI427299B (en) High - pressure multi - point test equipment and method with main and auxiliary steps
CN116627739A (en) I2C controller detection method and device, switch and storage medium
CN113094221B (en) Fault injection method, device, computer equipment and readable storage medium
RU2802712C1 (en) Method for diagnostics of complex of testing built-in software of electronic devices
IES980293A2 (en) An electronic test system for microprocessor based boards
JP7343197B2 (en) Information processing device, information processing system, information processing method and program