TWI416319B - Boot method for computer system using redundant array of independent disks - Google Patents
Boot method for computer system using redundant array of independent disks Download PDFInfo
- Publication number
- TWI416319B TWI416319B TW98144981A TW98144981A TWI416319B TW I416319 B TWI416319 B TW I416319B TW 98144981 A TW98144981 A TW 98144981A TW 98144981 A TW98144981 A TW 98144981A TW I416319 B TWI416319 B TW I416319B
- Authority
- TW
- Taiwan
- Prior art keywords
- computer system
- hard disk
- data
- hard
- hard disks
- Prior art date
Links
Landscapes
- Stored Programmes (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
本發明係指一種使用獨立磁碟備援陣列之電腦系統的開機方法,尤指一種根據電腦系統之硬碟屬性資料進行開機程序的方法。The present invention relates to a booting method of a computer system using an independent disk backup array, and more particularly to a method for booting a program according to hard disk attribute data of a computer system.
獨立磁碟備援陣列(Redundant Array of Independent Disks,RAID)是一種管理資料儲存空間的技術,可以軟體或硬體達成,其不僅將多個小容量的硬碟整合為一大容量的硬碟,並且提供資料保護的功能。RAID技術廣泛應用於需要多個硬碟的電腦系統中,如網路連結式儲存(Network Attached Storage,NAS)系統。RAID分為不同等級,如RAID-0、RAID-1、RAID-5、RAID-6等。RAID-0稱為等量模式,係將電腦系統中的每一硬碟切割為等量的區塊,於每一硬碟中取固定大小的區塊組成一資料卷軸(Data Volume),當有資料欲儲存於電腦系統時,RAID-0根據電腦系統中硬碟的數量,將資料分段寫入資料卷軸。由於資料平均分散於多個硬碟,使用RAID-0時的資料傳輸速率以硬碟的數量倍增。RAID-0沒有備份功能,當電腦系統中任何一個硬碟無法使用,所有的資料都會丟失。RAID-1稱為鏡射模式,係在寫入資料至電腦系統之主硬碟的同時,也寫入相同資料至鏡射硬碟。RAID-1所進行的完整備份動作,使得主硬碟損壞時,鏡射硬碟能夠代替主硬碟的工作。Redundant Array of Independent Disks (RAID) is a technology for managing data storage space. It can be achieved by software or hardware. It not only integrates multiple small-capacity hard disks into a large-capacity hard disk. And provide data protection features. RAID technology is widely used in computer systems that require multiple hard drives, such as Network Attached Storage (NAS) systems. RAID is divided into different levels, such as RAID-0, RAID-1, RAID-5, RAID-6, and so on. RAID-0 is called equal-volume mode. It cuts each hard disk in the computer system into equal blocks, and takes a fixed-size block in each hard disk to form a data volume. When the data is to be stored in the computer system, RAID-0 writes the data segment to the data reel according to the number of hard disks in the computer system. Since the data is spread over multiple hard disks on average, the data transfer rate when using RAID-0 is doubled by the number of hard disks. RAID-0 has no backup function. When any hard disk in the computer system is unavailable, all data will be lost. RAID-1 is called the mirror mode. It writes the data to the main hard disk of the computer system and also writes the same data to the mirrored hard disk. The full backup operation performed by RAID-1 makes the mirrored hard disk replace the work of the main hard disk when the main hard disk is damaged.
NAS系統是一種透過網路提供不同電腦系統間進行檔案存取及管理的儲存設備。由於資料存放在NAS系統而非網路伺服器中,使用資料存取服務的時間不受到網路伺服器的電源關閉所限制,並且檔案資料也更容易管理。以NAS系統為例,習知NAS系統使用軟體方式的RAID-1管理NAS系統中的作業系統資料,然而,當使用二個均以RAID-1管理的NAS系統A與B時,若使用者將NAS系統B的一個硬碟取下,放置到NAS系統A時,NAS系統A無法辨認出新增的硬碟是來自於自身以外的NAS系統,且由於RAID-1的鏡射特性,NAS系統A中存放的作業系統資料與新增之NAS系統B的硬碟中存放的作業系統資料可能會相互干擾,相關描述可以第1圖及第2圖表示。The NAS system is a storage device that provides file access and management between different computer systems through the network. Since the data is stored on the NAS system rather than the web server, the time to use the data access service is not limited by the power off of the web server, and the file data is easier to manage. Taking the NAS system as an example, the conventional NAS system uses the software RAID-1 to manage the operating system data in the NAS system. However, when using two NAS systems A and B managed by RAID-1, if the user When a hard disk of NAS system B is removed and placed on NAS system A, NAS system A cannot recognize that the newly added hard disk is from a NAS system other than itself, and because of the mirroring characteristics of RAID-1, NAS system A The operating system data stored in the system and the operating system data stored in the hard disk of the newly added NAS system B may interfere with each other. The related descriptions can be shown in Figures 1 and 2.
在第1圖及第2圖中,NAS系統A、B可分別容納四個硬碟,斜線區域表示NAS系統B的硬碟作業系統區塊,格狀區域表示NAS系統A的硬碟作業系統區塊。第1圖描述一硬碟10(於圖式中僅描述其作業系統區塊)由NAS系統B取下,放置到NAS系統A,並且NAS系統A使用新增之硬碟10作為開機硬碟,此時儲存於硬碟10之NAS系統B的作業系統資料複寫(Copy)至NAS系統A的所有作業系統區塊;換言之,NAS系統A的作業系統資料被NAS系統B的作業系統資料同步。如此一來,NAS系統A中除硬碟10以外的其它硬碟,將因為作業系統資料與硬碟不匹配而無法完成開機程序。第2圖描述硬碟10由NAS系統B取下,放置到NAS系統A,並且NAS系統A使用自身的硬碟作為開機硬碟,此時NAS系統A的硬碟的作業系統資料複寫至硬碟10的作業系統區塊;換言之,硬碟10原本儲存之NAS系統B的作業系統資料,被NAS系統A的作業系統資料同步。在第2圖的情形下,若使用者取出硬碟10再放回NAS系統B,儲存於硬碟10之NAS系統A的作業系統資料,可能會複寫至NAS系統B中其它硬碟的作業系統區塊,導致作業系統資料與硬碟不匹配,無法完成開機程序。In the first and second figures, the NAS systems A and B can respectively accommodate four hard disks, the shaded area indicates the hard disk operating system block of the NAS system B, and the latticed area indicates the hard disk operating system area of the NAS system A. Piece. Figure 1 depicts a hard disk 10 (only the operating system block is depicted in the figure) removed by NAS system B, placed into NAS system A, and NAS system A uses the newly added hard disk 10 as the bootable hard disk. At this time, the operating system data of the NAS system B stored in the hard disk 10 is copied to all the operating system blocks of the NAS system A; in other words, the operating system data of the NAS system A is synchronized by the operating system data of the NAS system B. As a result, the hard disk other than the hard disk 10 in the NAS system A will not be able to complete the booting process because the operating system data does not match the hard disk. Figure 2 depicts that the hard disk 10 is removed by the NAS system B, placed on the NAS system A, and the NAS system A uses its own hard disk as the bootable hard disk. At this time, the operating system data of the hard disk of the NAS system A is overwritten to the hard disk. The operating system block of 10; in other words, the operating system data of the NAS system B originally stored in the hard disk 10 is synchronized by the operating system data of the NAS system A. In the case of FIG. 2, if the user removes the hard disk 10 and puts it back into the NAS system B, the operating system data of the NAS system A stored in the hard disk 10 may be overwritten to the operating system of other hard disks in the NAS system B. The block causes the operating system data to not match the hard disk and cannot complete the boot process.
此外,由於RAID-0是將資料均分儲存於所有硬碟,無備份功能,當NAS系統在其中一個硬碟未鎖緊的情形下進行開機程序,正常安裝之硬碟的作業系統資料會隨開機程序而被更新,而未鎖緊的硬碟將無法被辨識。之後,即使將鬆脫的硬碟鎖緊並再次開機,由於此硬碟的作業系統資料與其它正常安裝之硬碟的作業系統資料已不相同,導致NAS系統無法辨識此硬碟,NAS系統所有的資料卷軸等於是損毀狀態。In addition, since RAID-0 stores the data equally on all hard disks, there is no backup function. When the NAS system starts the booting process when one of the hard disks is not locked, the operating system data of the normally installed hard disk will follow. The boot program is updated, and the un-locked hard drive will not be recognized. After that, even if the loose hard disk is locked and turned on again, the operating system data of the hard disk is different from the operating system data of other normally installed hard disks, so that the NAS system cannot recognize the hard disk, and all the NAS systems The data scroll is equal to the damage status.
簡言之,若二個皆使用RAID-1的NAS系統之間發生硬碟抽換的動作,RAID-1的鏡射特性可能造成二個NAS系統中的作業系統資料相互複寫,使得NAS系統無法辨認其中部分硬碟而無法完成開機程序;另一方面,若NAS系統在有硬碟未正常連接的情形下進行開機程序,根據RAID-0所產生的資料卷軸可能會損毀,即使重新鎖緊硬碟,使用者也無法存取資料卷軸。上述問題可能發生在所有使用RAID技術的電腦系統上,降低了電腦系統使用硬碟的穩定性。In short, if the hard disk swapping action occurs between two NAS systems using RAID-1, the mirroring characteristics of RAID-1 may cause the operating system data in the two NAS systems to rewrite each other, making the NAS system unable to Identifying some of the hard disks and not completing the boot process; on the other hand, if the NAS system is booting without a hard disk connected properly, the data spool generated according to RAID-0 may be damaged, even if the hard drive is re-locked. The disc cannot be accessed by the user. The above problems may occur on all computer systems that use RAID technology, which reduces the stability of the computer system using hard disks.
因此,本發明之主要目的即在於提供一種用於使用獨立磁碟備援陣列管理硬碟之電腦系統的開機方法。Accordingly, it is a primary object of the present invention to provide a booting method for a computer system for managing a hard disk using an independent disk backup array.
本發明揭露一種用於使用獨立磁碟備援陣列管理硬碟之電腦系統的開機方法,包含有檢查目前設於電腦系統中的第一數量個硬碟其中一硬碟所儲存之識別碼,是否為電腦系統所記錄的複數個識別碼之一,複數個識別碼彼此相異,對應於電腦系統所有可使用之硬碟;以及於確認硬碟所儲存之識別碼為電腦系統所記錄的複數個識別碼之一後,進行一識別碼更新程序,以更新該電腦系統所記錄的複數個識別碼及第一數量個硬碟所儲存之第一數量個識別碼。The invention discloses a booting method for a computer system for managing a hard disk using an independent disk backup array, which comprises checking an identification code stored by one of the first number of hard disks currently set in the computer system, One of a plurality of identification codes recorded by the computer system, the plurality of identification codes being different from each other, corresponding to all available hard disks of the computer system; and confirming that the identification code stored on the hard disk is a plurality of files recorded by the computer system After one of the identification codes, an identification code update procedure is performed to update the plurality of identification codes recorded by the computer system and the first number of identification codes stored by the first number of hard disks.
本發明用於使用獨立磁碟備援陣列(Redundant Array of Independent Disks,RAID)技術並具有可抽換式硬碟之電腦系統,例如網路連結式儲存(Network Attached Storage,NAS)系統,後文所述之硬碟皆為可抽換式硬碟之簡稱。本發明定義一硬碟元資料(Metadata),用來做為電腦系統硬碟之屬性資料及相關資訊,並根據硬碟元資料進行電腦系統的開機程序,以避免習知技術因電腦系統無法辨認硬碟而導致開機程序失敗或資料卷軸損毀的問題。The present invention is applied to a computer system using a Redundant Array of Independent Disks (RAID) technology and having a removable hard disk, such as a Network Attached Storage (NAS) system. The hard disk is an abbreviation of a removable hard disk. The present invention defines a hard disk metadata (Metadata), which is used as a property data and related information of a computer system hard disk, and performs a booting process of a computer system according to the hard disk metadata to prevent the conventional technology from being incapable of being recognized by the computer system. A problem with a hard disk that causes the boot process to fail or the data spool to be corrupted.
請參考第3圖,第3圖為本發明實施例一硬碟元資料之示意圖。第3圖之硬碟元資料的格式為一連續字串,依序包含識別(Identifier,ID)資料、數量(Assembly Number,AN)資料及時間(Data Counter,DC)資料。其中,ID資料用來表示硬碟的識別碼,用以辨認一硬碟為電腦系統自身的硬碟或是外來硬碟,可為硬碟的媒體存取控制層(Medium Access Control,MAC)位址、由32個16進位數字所組成的通用唯一識別碼(Universally Unique Identifier,UUID)或其它隨機產生的長字串,只要能夠使每一硬碟之ID資料具有唯一性即可。AN資料為目前電腦系統中包含使用者專用之資料卷軸(Data Volume)的硬碟數量。DC資料則是有關作業系統寫入硬碟之先後順序的時間資訊,以避免時間設定變更後無法判斷作業系統資料新舊的狀況。DC資料於每次電腦系統開機或有硬碟加入電腦系統時改變,DC資料之值在本發明一實施例中以一遞增形式表現;DC資料之值越大,表示硬碟所儲存之作業系統資料越新。在此請注意,第3圖之硬碟元資料僅為本發明之一實施例,於本發明其它實施例中,ID資料、AN資料及DC資料的順序可作其它安排,且ID、AN及DC資料的長度不限,可視需要設計。此外,電腦系統在硬碟上建立硬碟元資料時,亦可將ID資料、AN資料及DC資料存放在不連續的記憶體區塊。而為了避免硬碟出現故障區塊(Bad Block)導致電腦系統無法順利完成開機,本發明在儲存硬碟元資料時,同步儲存一備份硬碟元資料,當硬碟元資料變更時,備份硬碟元資料亦將一併更新。Please refer to FIG. 3, which is a schematic diagram of a hard disk element data according to an embodiment of the present invention. The format of the hard disk meta-data in FIG. 3 is a continuous string, which includes identification (Identifier, ID) data, quantity (AN) data, and time (Data Counter, DC) data. The ID data is used to indicate the hard disk identification code, and is used to identify a hard disk as a hard disk or a foreign hard disk of the computer system, and can be a medium access control (MAC) bit of the hard disk. Address, Universally Unique Identifier (UUID) consisting of 32 hexadecimal digits or other randomly generated long string, as long as the ID data of each hard disk can be unique. The AN data is the number of hard disks in the current computer system that contain user-specific Data Volumes. The DC data is the time information about the order in which the operating system writes to the hard disk, so as to avoid the situation in which the operating system data cannot be judged after the time setting is changed. The DC data is changed every time the computer system is turned on or when a hard disk is added to the computer system. The value of the DC data is expressed in an incremental form in an embodiment of the present invention; the larger the value of the DC data, indicates the operating system stored in the hard disk. The newer the information. Please note that the hard disk meta-data in FIG. 3 is only one embodiment of the present invention. In other embodiments of the present invention, the order of ID data, AN data, and DC data may be arranged in other arrangements, and ID, AN, and The length of the DC data is not limited and can be designed as needed. In addition, when the computer system establishes the hard disk metadata on the hard disk, the ID data, the AN data, and the DC data may also be stored in the discontinuous memory block. In order to avoid the failure of the hard disk to cause the computer system to successfully complete the boot, the present invention simultaneously stores a backup hard disk meta data when storing the hard disk metadata, and when the hard disk metadata changes, the backup hard The disc metadata will also be updated.
請參考第4圖,第4圖為本發明實施例用於以獨立磁碟備援陣列管理硬碟之電腦系統之一流程40之示意圖,流程40為電腦系統的開機流程,其中揭示了電腦系統如何建立及使用硬碟元資料,電腦系統中可設置一個以上的硬碟。流程40包含有以下步驟:步驟400:開始。Please refer to FIG. 4, which is a schematic diagram of a process 40 for managing a hard disk in an independent disk backup array according to an embodiment of the present invention. The process 40 is a boot process of a computer system, which discloses a computer system. How to create and use hard disk metadata, more than one hard disk can be set in the computer system. The process 40 includes the following steps: Step 400: Start.
步驟402:判斷系統初始化是否已完成。若是,進行步驟410;若否,進行步驟404。Step 402: Determine whether system initialization has been completed. If yes, proceed to step 410; if no, proceed to step 404.
步驟404:建立每一硬碟之硬碟元資料。Step 404: Create hard disk meta data for each hard disk.
步驟406:判斷系統初始化是否成功進行。若是,回到步驟400;若否,進行步驟408。Step 406: Determine whether the system initialization is successful. If yes, go back to step 400; if no, go to step 408.
步驟408:產生一第一提示訊息,以告知系統初始化失敗。Step 408: Generate a first prompt message to inform the system that the initialization failed.
步驟410:檢查目前設於電腦系統之一硬碟所儲存之識別碼是否為電腦系統所記錄的識別碼之一。若是,進行步驟414;若否,進行步驟412。Step 410: Check whether the identification code currently stored in one of the hard disks of the computer system is one of the identification codes recorded by the computer system. If yes, go to step 414; if no, go to step 412.
步驟412:禁止該硬碟做為開機硬碟;回到步驟410,對另一硬碟進行檢查。Step 412: Disabling the hard disk as a bootable hard disk; returning to step 410, checking another hard disk.
步驟414:檢查該硬碟所儲存之作業系統資料的時間資訊,是否為電腦系統中所有硬碟所儲存之作業系統資料的時間資訊中最新的。若是,進行步驟416;若否,進行步驟412。Step 414: Check whether the time information of the operating system data stored in the hard disk is the latest in the time information of the operating system data stored in all the hard disks in the computer system. If yes, go to step 416; if no, go to step 412.
步驟416:檢查每一硬碟所儲存之包含使用者專用之資料卷軸的硬碟數量是否與電腦系統正在使用的硬碟數量相等,以產生一第一檢查結果,以及檢查每一硬碟所儲存之包含使用者專用之資料卷軸的硬碟數量是否皆相等,以產生一第二檢查結果。若第一及第二檢查結果皆顯示相等,進行步驟420;若任一檢查結果顯示不相等,進行步驟418。Step 416: Check whether the number of hard disks stored in each hard disk containing the user-specific data reel is equal to the number of hard disks being used by the computer system to generate a first inspection result, and check each hard disk storage. Whether the number of hard disks containing the user-specific data reels is equal to produce a second check result. If the first and second check results are all equal, step 420 is performed; if any of the check results are not equal, step 418 is performed.
步驟418:產生一第二提示訊息,以告知資料卷軸可能損毀。Step 418: A second prompt message is generated to inform the data reel that the damage may be damaged.
步驟420:結束。Step 420: End.
步驟402至步驟408之系統初始化動作的目的,在於讓全新尚未使用的電腦系統也能使用流程40。系統初始化僅進行一次,其中步驟404用來建立目前於電腦系統中每一硬碟的硬碟元資料,包含ID資料、AN資料及DC資料。在硬碟上建立硬碟元資料的同時,電腦系統將各個硬碟的ID資料記錄於電腦系統之主機板上的非揮發性記憶體,例如NAND型快閃記憶體。電腦系統所記錄之ID資料的數量與電腦系統曾經使用過多少個硬碟有關,不僅只記錄目前設於電腦系統之硬碟的ID資料。The purpose of the system initialization actions of steps 402 through 408 is to enable the process 40 to be used by new, unused computer systems. The system initialization is performed only once. Step 404 is used to establish the hard disk metadata of each hard disk currently in the computer system, including ID data, AN data and DC data. While the hard disk metadata is being created on the hard disk, the computer system records the ID data of each hard disk in a non-volatile memory on the motherboard of the computer system, such as a NAND flash memory. The number of ID data recorded by the computer system is related to how many hard disks have been used in the computer system. Not only the ID data of the hard disk currently set in the computer system is recorded.
由於進行初始化的電腦系統尚未使用,因此AN資料的初始值為0,DC資料亦有一初始值。若電腦系統成功地初始化,電腦系統進行步驟410,檢查一硬碟H所儲存的ID資料是否為電腦系統所記錄的多個ID資料之一。若初始化失敗,電腦系統產生提示訊息,告知使用者系統初始化失敗。使用者得知初始化失敗後,可將電腦系統重新格式化,並再次進行流程40。由於使用者得知初始化失敗後的後續步驟非本發明主要保護的範圍,在此不詳述。以另一角度而言,若確知電腦系統已經初始化完成並且建立了硬碟元資料,電腦系統可忽略步驟402至步驟408之系統初始化動作,直接由步驟410開始執行流程40。Since the computer system for initialization has not been used, the initial value of the AN data is 0, and the DC data also has an initial value. If the computer system is successfully initialized, the computer system proceeds to step 410 to check whether the ID data stored in a hard disk H is one of a plurality of ID data recorded by the computer system. If the initialization fails, the computer system generates a prompt message to inform the user that the system initialization failed. After the user knows that the initialization has failed, the computer system can be reformatted and process 40 is performed again. Since the user knows that the subsequent steps after the initialization failure are not the scope of the main protection of the present invention, they will not be described in detail herein. In another aspect, if it is determined that the computer system has been initialized and the hard disk metadata is created, the computer system can ignore the system initialization actions from step 402 to step 408, and the process 40 is directly executed from step 410.
當電腦系統進行步驟410,檢查發現硬碟H所儲存的ID資料不是電腦系統所記錄的ID資料之一,可知硬碟H非自身的硬碟,因為硬碟H的硬碟元資料不是由電腦系統所建立。換言之,硬碟H是來自他處(可能是其它電腦系統)之硬碟,於是電腦系統進行步驟412,禁止硬碟H作為開機硬碟。如此一來,如第1圖所示其它電腦系統的作業系統資料複寫至電腦系統自身硬碟的作業系統區塊之問題不會發生,電腦系統的開機程序能繼續進行。當電腦系統得知硬碟H非自身的硬碟後,便回到步驟410,繼續檢查其它硬碟的ID資料,以提高辨認開機硬碟的效率。When the computer system performs step 410, it is found that the ID data stored in the hard disk H is not one of the ID data recorded by the computer system. It can be seen that the hard disk H is not its own hard disk, because the hard disk metadata of the hard disk H is not by the computer. The system is established. In other words, the hard disk H is a hard disk from another place (possibly other computer system), and the computer system proceeds to step 412 to prohibit the hard disk H as a bootable hard disk. As a result, the problem of rewriting the operating system data of other computer systems to the operating system block of the hard disk of the computer system as shown in FIG. 1 does not occur, and the booting process of the computer system can continue. When the computer system knows that the hard disk H is not its own hard disk, it returns to step 410 to continue checking the ID data of other hard disks to improve the efficiency of identifying the boot disk.
另一方面,當電腦系統檢查發現硬碟H所儲存的ID資料為電腦系統所記錄的ID資料之一,可知硬碟H為電腦系統自身的硬碟,但不表示硬碟H一定能做為開機硬碟。電腦系統須進行步驟414,檢查硬碟H所儲存之作業系統資料的時間資訊,是否為電腦系統中所有硬碟所儲存之作業系統資料的時間資訊中最新的;換言之,即檢查硬碟H所儲存之DC資料之值,是否為電腦系統中所有硬碟所儲存之DC資料之值中的最大值。若電腦系統檢查得知硬碟H所儲存之DC資料之值為所有硬碟所儲存之DC資料之值中的最大值,表示電腦系統若以硬碟H做為開機硬碟,能夠開機成功,此時電腦系統進行步驟416。若電腦系統檢查得知硬碟H所儲存之DC資料之值不是最大值,電腦系統進行步驟412,禁止硬碟H做為開機硬碟,並且繼續檢查其它硬碟的ID資料。On the other hand, when the computer system checks that the ID data stored in the hard disk H is one of the ID data recorded by the computer system, it can be seen that the hard disk H is the hard disk of the computer system itself, but does not mean that the hard disk H can be used as Boot the hard drive. The computer system shall perform step 414 to check the time information of the operating system data stored in the hard disk H, whether it is the latest in the time information of the operating system data stored in all the hard disks in the computer system; in other words, check the hard disk H The value of the stored DC data is the maximum of the values of the DC data stored on all hard disks in the computer system. If the computer system checks that the value of the DC data stored in the hard disk H is the maximum value of the DC data stored on all the hard disks, it means that the computer system can boot successfully if the hard disk H is used as the bootable hard disk. At this point, the computer system proceeds to step 416. If the computer system checks that the value of the DC data stored in the hard disk H is not the maximum value, the computer system performs step 412, prohibits the hard disk H as the bootable hard disk, and continues to check the ID data of the other hard disk.
舉例來說,假設電腦系統包含硬碟H在內共有4個硬碟,當電腦系統檢查得知硬碟H所儲存之DC資料之值為100,其它硬碟所儲存之DC資料之值為100、100、60,表示硬碟H具有最新的作業系統資料,可做為開機硬碟。相對地,當硬碟H所儲存之DC資料之值為60,其它硬碟所儲存之DC資料之值皆為100,可知硬碟H所儲存的作業系統資料比其它硬碟所儲存的作業系統資料更老舊,可能是久未使用,因此電腦系統禁止硬碟H做為開機硬碟,避免舊作業系統資料複寫至具有最新作業系統資料之硬碟。For example, if the computer system contains a hard disk H, there are 4 hard disks. When the computer system checks that the value of the DC data stored in the hard disk H is 100, the value of the DC data stored on other hard disks is 100. , 100, 60, means that the hard disk H has the latest operating system data, which can be used as a bootable hard disk. In contrast, when the value of the DC data stored in the hard disk H is 60, and the value of the DC data stored in the other hard disk is 100, it can be seen that the operating system data stored in the hard disk H is higher than the operating system stored in other hard disks. The data is older and may not be used for a long time. Therefore, the computer system prohibits the hard disk H as a bootable hard disk, and prevents the old operating system data from being overwritten to the hard disk with the latest operating system data.
步驟410、步驟412及步驟414可歸納為一步驟:根據硬碟元資料所攜帶之硬碟識別碼及作業系統資料的時間資訊,尋找可用來開機的硬碟。在每一硬碟進行ID資料檢查或DC資料檢查之後,電腦系統進行步驟416,檢查每一硬碟的AN資料,即目前電腦系統中包含使用者專用之資料卷軸的硬碟數量。請注意,使用者不一定會使用目前設於電腦系統中的全部硬碟來建立資料卷軸,因此包含使用者專用之資料卷軸的硬碟數量,與電腦系統中全部硬碟的數量不一定相等。Steps 410, 412, and 414 can be summarized as a step of finding a hard disk that can be used for booting based on the hard disk identification code carried by the hard disk metadata and the time information of the operating system data. After performing ID data check or DC data check on each hard disk, the computer system proceeds to step 416 to check the AN data of each hard disk, that is, the number of hard disks containing the user-specific data scroll in the current computer system. Please note that the user does not necessarily use the entire hard disk currently set in the computer system to create a data reel. Therefore, the number of hard disks containing the user-specific data reel is not necessarily equal to the total number of hard disks in the computer system.
AN資料檢查分為兩部分,其一是檢查每一硬碟所儲存之AN資料之值是否與電腦系統正在使用的硬碟數量相等;其二是檢查每一硬碟所儲存之AN資料之值是否彼此相等。步驟416可避免電腦系統在有硬碟鬆脫的情形下進行開機程序,導致資料卷軸損毀之問題。若步驟416產生的第一及第二檢查結果皆顯示相等,表示電腦系統成功地開機,此時電腦系統結束流程40。若步驟416產生的任何一個檢查結果顯示不相等,電腦系統根據步驟418,產生提示訊息,告知使用者資料卷軸可能損毀。The AN data check is divided into two parts. One is to check whether the value of the AN data stored on each hard disk is equal to the number of hard disks being used by the computer system. The second is to check the value of the AN data stored on each hard disk. Are they equal to each other? Step 416 can prevent the computer system from starting the program when the hard disk is loose, resulting in the destruction of the data reel. If the first and second check results generated in step 416 are all equal, indicating that the computer system is successfully powered on, the computer system ends the process 40. If any of the check results produced in step 416 are not equal, the computer system generates a prompt message in accordance with step 418 to inform the user that the data scroll may be corrupted.
舉例來說,當硬碟H及其它硬碟所儲存之AN資料之值皆為4,並且電腦系統中正在使用的硬碟數量也為4,表示電腦系統的硬碟皆安裝妥當,流程40完成後資料卷軸可順利使用,不會損毀。相對地,當硬碟H及其它硬碟所儲存之AN資料之值皆為4,但電腦系統中正在使用的硬碟數量為3,表示電腦系統中可能有一個硬碟鬆脫,使用者由提示訊息得知資料卷軸可能損毀。在此情形下,使用者可關閉電腦系統的電源以確認所有硬碟是否安裝妥當,也可忽略提示訊息,命令電腦系統完成開機程序。由於使用者所選擇進行的動作不屬於本發明主要保護的範圍,於第4圖中不詳述。此外請注意,當電腦系統完成系統初始化之後有硬碟加入,新增的硬碟中可能沒有硬碟元資料,或是有硬碟元資料但AN資料的值為0,此時電腦系統不會對新增的硬碟進行步驟416之AN資料檢查。新增的硬碟將於流程40完成後,向電腦系統進行註冊成為電腦系統可使用之硬碟,以取得更新之硬碟元資料。For example, when the value of the AN data stored on the hard disk H and other hard disks is 4, and the number of hard disks being used in the computer system is also 4, it means that the hard disk of the computer system is properly installed, and the process 40 is completed. The post-reel can be used smoothly without damage. In contrast, when the value of AN data stored on hard disk H and other hard disks is 4, the number of hard disks being used in the computer system is 3, indicating that there may be a hard disk in the computer system. A message indicates that the data reel may be damaged. In this case, the user can turn off the power of the computer system to confirm whether all the hard disks are properly installed, or ignore the prompt message and command the computer system to complete the booting process. Since the action selected by the user does not fall within the scope of the main protection of the present invention, it will not be described in detail in FIG. In addition, please note that when the computer system completes the system initialization, there is a hard disk to join, the new hard disk may not have hard disk metadata, or there is hard disk metadata but the value of AN data is 0, then the computer system will not Perform the AN data check in step 416 on the newly added hard disk. After the completion of the process 40, the newly added hard disk will be registered with the computer system to become a hard disk that can be used by the computer system to obtain updated hard disk metadata.
簡言之,流程40分為三部分,如第4圖中虛線所分示。第一部分包含步驟402至步驟408,為系統初始化程序,電腦系統於初始化時在每一硬碟上建立硬碟元資料。第二部分包含步驟410至步驟414,為作業系統資料保護程序,其中電腦系統將根據硬碟元資料中的ID資料及DC資料,分辨出哪些硬碟可或不可做為開機硬碟,避免因為獨立磁碟備援陣列RAID-1的鏡射特性,導致硬碟之作業系統區塊被錯誤地覆寫而無法完成開機程序。第三部分包含步驟416及步驟418,為使用者資料保護程序,電腦系統將檢查每一硬碟所儲存之AN資料,避免電腦系統在有硬碟未正常連接的情形下進行開機程序,造成獨立磁碟備援陣列RAID-0所產生之資料卷軸損毀。In short, the process 40 is divided into three parts, as indicated by the dashed lines in Figure 4. The first part includes steps 402 to 408. For the system initialization program, the computer system establishes hard disk metadata on each hard disk during initialization. The second part includes steps 410 to 414, which are operating system data protection programs, wherein the computer system will distinguish which hard disks may or may not be used as boot disks according to the ID data and DC data in the hard disk metadata. The mirroring feature of the independent disk backup array RAID-1 causes the operating system block of the hard disk to be incorrectly overwritten and the boot process cannot be completed. The third part includes steps 416 and 418. For the user data protection program, the computer system checks the AN data stored on each hard disk to prevent the computer system from booting when the hard disk is not properly connected. The data spool generated by the disk backup array RAID-0 is corrupted.
請注意,流程40為本發明之最佳實施例,本領域具通常知識者當可據以做不同之變化及修飾。舉例來說,以流程40中的系統初始化程序搭配作業系統資料保護程序做為另一開機流程,能夠單獨保護作業系統資料;或者,以流程40中的系統初始化程序搭配使用者資料保護程序做為另一開機流程,能夠單獨保護使用者資料。此外,本發明其它實施例亦可僅進行ID資料及DC資料檢查,或僅進行ID資料檢查及AN資料檢查。It should be noted that the process 40 is a preferred embodiment of the present invention, and those skilled in the art can make various changes and modifications. For example, the system initialization program in the process 40 is combined with the operating system data protection program as another boot process, and the operating system data can be separately protected; or the system initialization program in the process 40 is matched with the user data protection program as Another boot process can protect user data separately. In addition, other embodiments of the present invention may perform only ID data and DC data inspection, or only ID data inspection and AN data inspection.
本發明進一步提供ID資料、DC資料及AN資料的更新流程,這些流程可接著於第4圖之流程40之後進行,讓電腦系統於特定時刻能即時更新硬碟元資料,以加強電腦系統之資料保護功能。請參考第5圖,第5圖為本發明實施例一流程50之示意圖,流程50用於更新ID資料。流程50包含有以下步驟:步驟500:開始。The present invention further provides an update process of the ID data, the DC data, and the AN data. The processes may be performed after the process 40 of FIG. 4, so that the computer system can instantly update the hard disk metadata at a specific time to enhance the data of the computer system. Protective function. Please refer to FIG. 5. FIG. 5 is a schematic diagram of a process 50 according to an embodiment of the present invention. The process 50 is used to update ID data. The process 50 includes the following steps: Step 500: Start.
步驟502:偵測開機程序是否完成。若是,進行步驟512;若否,繼續步驟502。Step 502: Detect whether the booting process is completed. If yes, go to step 512; if no, continue to step 502.
步驟504:偵測關機程序是否開始。若是,進行步驟512;若否,繼續步驟504。Step 504: Detect whether the shutdown program starts. If yes, go to step 512; if no, continue to step 504.
步驟506:偵測是否有任何硬碟在開機程序完成後的運作狀態下,自電腦系統中移除。若是,進行步驟512;若否,繼續步驟506。Step 506: Detect whether any hard disk is removed from the computer system under the operating state after the booting process is completed. If yes, go to step 512; if no, continue to step 506.
步驟508:偵測是否有任何硬碟在電腦系統之開機程序完成後的運作狀態下,加入電腦系統。若是,進行步驟510;若否,繼續步驟508。Step 508: Detect whether any hard disk is added to the computer system under the operating state after the startup process of the computer system is completed. If yes, proceed to step 510; if no, proceed to step 508.
步驟510:判斷新增之硬碟是否須註冊成為電腦系統可使用的硬碟。若是,進行步驟512;若否,進行步驟516。Step 510: Determine whether the newly added hard disk needs to be registered as a hard disk usable by the computer system. If yes, go to step 512; if no, go to step 516.
步驟512:更新儲存於電腦系統之非揮發性記憶體中的所有ID資料。Step 512: Update all ID data stored in the non-volatile memory of the computer system.
步驟514:將電腦系統設定給各個硬碟使用的ID資料,寫入各個硬碟。Step 514: Set the computer system to the ID data used by each hard disk and write to each hard disk.
步驟516:不變更ID資料。Step 516: Do not change the ID data.
步驟502及步驟504是針對硬碟可能在電腦系統電源關閉時進行冷插拔(Cold Swap)所做的步驟。步驟506及步驟508是針對硬碟可能在電腦系統之開機程序完成後的運作狀態下進行熱插拔(Hot Swap)所做的步驟。當電腦系統根據步驟502偵測到開機程序完成,或根據步驟504偵測到關機程序已開始,或根據步驟506偵測到有硬碟在電腦系統的運作狀態下被移除時,電腦系統進行步驟512及步驟514之ID資料更新。Steps 502 and 504 are steps for the hard disk to be cold swapped when the computer system is powered off. Steps 506 and 508 are steps for the hot swap of the hard disk in the operating state after the booting process of the computer system is completed. When the computer system detects that the booting process is completed according to step 502, or detects that the shutdown process has started according to step 504, or detects that a hard disk is removed under the operating state of the computer system according to step 506, the computer system performs The ID data of step 512 and step 514 is updated.
根據步驟512,電腦系統更新主機板中非揮發性記憶體所儲存的所有ID資料,讓電腦系統所記錄的每一ID資料的值與其先前的值不相同。根據步驟514,電腦系統從重新設定完畢的ID資料中,取部分ID資料寫入目前於電腦系統中相對應的各硬碟。由於電腦系統可能偵測到硬碟的新增或移除,相對於原本的ID資料的數量,電腦系統由非揮發性記憶體所取出之ID資料的數量可能會增加或減少。舉例來說,假設電腦系統中儲存了10個ID資料且原本設置有4個硬碟,當電腦系統根據步驟506偵測到有一硬碟被移除,此時電腦系統中設置的硬碟數量由4個減少為3個,因此,電腦系統根據步驟514,由10個ID資料中取出3個ID資料寫入相對應的3個硬碟。According to step 512, the computer system updates all the ID data stored in the non-volatile memory in the motherboard, so that the value of each ID data recorded by the computer system is different from the previous value. According to step 514, the computer system retrieves part of the ID data from the reset ID data into the corresponding hard disks currently in the computer system. Since the computer system may detect the addition or removal of the hard disk, the number of ID data extracted by the computer system from the non-volatile memory may increase or decrease relative to the original ID data. For example, suppose that the computer system stores 10 ID data and originally has 4 hard disks. When the computer system detects that a hard disk is removed according to step 506, the number of hard disks set in the computer system is determined by The number of 4 is reduced to three. Therefore, according to step 514, the computer system extracts three ID data from 10 ID data and writes the corresponding three hard disks.
另一方面,當電腦系統根據步驟508,偵測到有硬碟在電腦系統的運作狀態下加入電腦系統時,電腦系統根據步驟510,依來自使用者的指示訊息判斷新增的硬碟是否須註冊成為電腦系統可使用的硬碟。若新增的硬碟必須註冊,電腦系統進行步驟512及步驟514之ID資料更新,如前所述,因此電腦系統之非揮發性記憶體中儲存的所有ID資料、原有硬碟及新增之硬碟所儲存的ID資料皆會更新。若新增的硬碟不須註冊,電腦系統進行步驟516,不變更電腦系統之非揮發性記憶體中儲存的所有ID資料,也不變更原有硬碟所儲存的ID資料。在電腦系統處於運作狀態下,由於硬碟可能多次熱插拔,因此步驟506、步驟508及後續對應之步驟可多次進行。On the other hand, when the computer system detects that a hard disk is added to the computer system under the operating state of the computer system according to step 508, the computer system determines whether the newly added hard disk is necessary according to the instruction message from the user according to step 510. Register as a hard drive that can be used by computer systems. If the newly added hard disk must be registered, the computer system performs the ID data update of steps 512 and 514. As described above, all ID data, original hard disks and new ones stored in the non-volatile memory of the computer system are added. The ID data stored on the hard drive will be updated. If the newly added hard disk does not need to be registered, the computer system proceeds to step 516, does not change all the ID data stored in the non-volatile memory of the computer system, and does not change the ID data stored in the original hard disk. When the computer system is in operation, since the hard disk may be hot swapped multiple times, steps 506, 508, and subsequent steps may be performed multiple times.
通過流程50,電腦系統能夠在進行前述流程40時,根據ID資料精確辨認出硬碟所儲存之作業系統資料的新舊,進而禁止具有舊作業系統資料的硬碟做為開機硬碟,加強了電腦系統對於作業系統資料的保護功能。請注意,流程50為更新ID資料之最佳實施例,本領域具通常知識者當可根據流程50做不同的變化及修飾。舉例來說,若電腦系統的規格設定為禁止硬碟進行熱插拔,則不須執行之步驟506及步驟508。Through the process 50, the computer system can accurately identify the old and new operating system data stored on the hard disk according to the ID data, and then prohibit the hard disk with the old operating system data as the bootable hard disk, and strengthen the operation. The protection function of the computer system for the operating system data. Please note that the process 50 is a preferred embodiment for updating the ID data, and those skilled in the art can make various changes and modifications according to the process 50. For example, if the specification of the computer system is set to prohibit the hot swap of the hard disk, step 506 and step 508 need not be performed.
請參考第6圖,第6圖為本發明實施例一流程60之示意圖,流程60用於更新DC資料。流程60包含有以下步驟:步驟600:開始。Please refer to FIG. 6. FIG. 6 is a schematic diagram of a process 60 according to an embodiment of the present invention. The process 60 is used to update DC data. The process 60 includes the following steps: Step 600: Start.
步驟602:偵測開機程序是否完成。若是,進行步驟610;若否,繼續步驟602。Step 602: Detect whether the booting process is completed. If yes, go to step 610; if no, continue to step 602.
步驟604:偵測是否有任何硬碟在電腦系統之開機程序完成後的運作狀態下,自電腦系統中移除。若是,進行步驟610;若否,繼續步驟604。Step 604: Detect whether any hard disk is removed from the computer system under the operating state of the computer system after the booting process is completed. If yes, go to step 610; if no, continue to step 604.
步驟606:偵測是否有任何硬碟在電腦系統之開機程序完成後的運作狀態下,加入電腦系統。若是,進行步驟608;若否,繼續步驟606。Step 606: Detect whether any hard disk is added to the computer system under the operating state after the startup process of the computer system is completed. If yes, go to step 608; if no, continue to step 606.
步驟608:判斷新增之硬碟是否須註冊成為電腦系統可使用的硬碟。若是,進行步驟610;若否,進行步驟614。Step 608: Determine whether the newly added hard disk needs to be registered as a hard disk usable by the computer system. If yes, go to step 610; if no, go to step 614.
步驟610:取得電腦系統中所有硬碟所儲存的DC資料之值中的一最大值。Step 610: Obtain a maximum value of the values of the DC data stored on all the hard disks in the computer system.
步驟612:將該最大值與一差值相加,產生一加法結果,並將該加法結果寫入電腦系統中所有硬碟。Step 612: adding the maximum value to a difference value, generating an addition result, and writing the addition result to all hard disks in the computer system.
步驟614:不變更DC資料。Step 614: Do not change the DC data.
當電腦系統根據步驟602偵測到開機程序完成,或根據步驟604偵測到一硬碟在電腦系統的運作狀態下被移除時,電腦系統進行步驟610及步驟612,取得其中所有硬碟所儲存的DC資料中的最大值TMAX ,將最大值TMAX 與一差值Δt相加,並且將加法結果(TMAX +Δt)寫入目前電腦系統所有硬碟中儲存DC資料的位置,以更新目前所有硬碟所儲存之DC資料。移除之硬碟的DC資料必然不會被更新。差值Δt可等於1,亦可為其它正整數值。When the computer system detects that the booting process is completed according to step 602, or detects that a hard disk is removed in the operating state of the computer system according to step 604, the computer system performs steps 610 and 612 to obtain all the hard disks therein. The maximum value T MAX in the stored DC data is added to the maximum value T MAX and a difference Δt, and the addition result (T MAX +Δt) is written to the position of the DC data stored in all the hard disks of the current computer system to update DC data currently stored on all hard drives. The DC data of the removed hard drive will not be updated. The difference Δt can be equal to 1, and can also be other positive integer values.
當電腦系統根據步驟606,偵測到一硬碟在電腦系統的運作狀態下加入電腦系統時,電腦系統根據步驟608,依來自使用者的指示訊息判斷新增的硬碟是否須註冊成為電腦系統可使用的硬碟。若新增的硬碟必須註冊,電腦系統進行步驟610及步驟612之DC資料更新;若新增的硬碟不須註冊,電腦系統進行步驟614,不變更目前電腦系統中所有硬碟所儲存之DC資料。When the computer system detects that a hard disk is added to the computer system under the operating state of the computer system according to step 606, the computer system determines, according to the instruction message from the user, whether the newly added hard disk needs to be registered as a computer system according to step 608. A hard disk that can be used. If the newly added hard disk has to be registered, the computer system performs the DC data update in steps 610 and 612; if the newly added hard disk does not need to be registered, the computer system proceeds to step 614 without changing the storage of all the hard disks in the current computer system. DC data.
請參考第7圖,第7圖為本發明實施例一流程70之示意圖,流程70用於更新AN資料。流程70包含有以下步驟:步驟700:開始。Please refer to FIG. 7. FIG. 7 is a schematic diagram of a process 70 according to an embodiment of the present invention. The process 70 is used to update AN data. The process 70 includes the following steps: Step 700: Start.
步驟702:判斷使用者專用之資料卷軸是否成功建立。若是,進行步驟704;若否,進行步驟718。Step 702: Determine whether the user-specific material reel is successfully established. If yes, go to step 704; if no, go to step 718.
步驟704:計算包含使用者專用之資料卷軸的硬碟數量,即AN資料。Step 704: Calculate the number of hard disks including the user-specific data reel, that is, AN data.
步驟706:將AN資料寫入包含使用者專用之資料卷軸的硬碟。Step 706: Write the AN data to a hard disk containing a user-specific data reel.
步驟708:偵測是否有任何硬碟在電腦系統之開機程序完成後的運作狀態下,自電腦系統中移除。若是,進行步驟712;若否,繼續步驟708。Step 708: Detect whether any hard disk is removed from the computer system under the operation state of the computer system after the booting process is completed. If yes, go to step 712; if no, continue to step 708.
步驟710:偵測是否有任何硬碟在電腦系統之開機程序完成後的運作狀態下,加入電腦系統。若是,進行步驟714;若否,繼續步驟710。Step 710: Detect whether any hard disk is added to the computer system under the operating state after the startup process of the computer system is completed. If yes, go to step 714; if no, continue to step 710.
步驟712:檢查是否移除之硬碟包含使用者專用之資料卷軸。若是,進行步驟720;若否,進行步驟718。Step 712: Check if the removed hard disk contains a user-specific data scroll. If yes, go to step 720; if no, go to step 718.
步驟714:判斷新增之硬碟是否須註冊成為電腦系統的硬碟。若是,進行步驟716;若否,進行步驟718。Step 714: Determine whether the newly added hard disk needs to be registered as a hard disk of the computer system. If yes, go to step 716; if no, go to step 718.
步驟716:將AN資料之初始值寫入新增之硬碟。Step 716: Write the initial value of the AN data to the newly added hard disk.
步驟718:不變更AN資料。Step 718: The AN data is not changed.
步驟720:取得目前電腦系統中AN資料之值。Step 720: Obtain the value of the AN data in the current computer system.
步驟722:將取得之AN資料之值減1,產生一減法結果,並將該減法結果寫入包含使用者專用之資料卷軸的硬碟。Step 722: Subtracting the obtained AN data by one, generating a subtraction result, and writing the subtraction result to a hard disk containing a user-specific data reel.
由於電腦系統每次開機完成時,使用者皆有可能改變資料卷軸設定,因此在流程70中,電腦系統先根據步驟702判斷使用者專用之資料卷軸是否成功建立。若判斷使用者專用之資料卷軸建立失敗,電腦系統不會變更AN資料,AN資料維持在上一次電腦系統關機前的值。若判斷使用者專用之資料卷軸成功建立,電腦系統進行步驟704及步驟706,計算AN資料,並將計算所得之AN資料之值寫入包含使用者專用之資料卷軸的硬碟。舉例來說,假設電腦系統最多可容納5個硬碟而目前只有4個硬碟H1~H4設置於其中,並且使用者以硬碟H1、H3、H4建立資料卷軸,此時電腦系統計算得AN資料之值為3,將AN=3寫入硬碟H1、H3、H4。Since the computer system may change the data reel setting every time the computer system is turned on, in the process 70, the computer system first determines, according to step 702, whether the user-specific material reel is successfully established. If it is determined that the user-specific data scrolling fails to be established, the computer system does not change the AN data, and the AN data maintains the value before the last computer system shutdown. If it is determined that the user-specific data reel is successfully established, the computer system performs steps 704 and 706 to calculate the AN data, and writes the calculated value of the AN data to the hard disk containing the user-specific data reel. For example, suppose the computer system can hold up to 5 hard disks and currently only 4 hard disks H1 to H4 are set in it, and the user creates a data reel with hard disks H1, H3, and H4. At this time, the computer system calculates AN. The value of the data is 3, and AN=3 is written to the hard disks H1, H3, and H4.
步驟708及步驟710為同時進行之步驟,在開機程序完成後的運作狀態下,電腦系統持續偵測有無硬碟加入或自電腦系統中移除。當電腦系統根據步驟708,偵測到一硬碟自電腦系統中移除時,電腦系統後續將進行步驟712、718、720、722。詳細來說,電腦系統進一步檢查是否在移除之硬碟中包含了使用者專用之資料卷軸,若移除之硬碟沒有包含資料卷軸,表示此硬碟移除不會影響目前使用的資料卷軸,此時電腦系統不變更AN資料。若移除之硬碟包含了資料卷軸,電腦系統取得目前電腦系統中的AN資料之值並將AN資料之值減1,產生一減法結果,接著將減法結果寫入包含使用者專用之資料卷軸的硬碟。以前述例子來說,若被移除的是硬碟H2,AN資料不會變更;若被移除的是硬碟H1,取得之AN資料之值仍為3,電腦系統將取得之AN資料之值減1,並將AN=2寫入硬碟H3及H4。Steps 708 and 710 are simultaneous steps. After the startup process is completed, the computer system continuously detects whether a hard disk is added or removed from the computer system. When the computer system detects that a hard disk has been removed from the computer system in accordance with step 708, the computer system will subsequently perform steps 712, 718, 720, 722. In detail, the computer system further checks whether the removed hard disk contains a user-specific data reel. If the removed hard disk does not contain a data reel, it indicates that the removal of the hard disk does not affect the currently used data reel. At this time, the computer system does not change the AN data. If the removed hard disk contains a data reel, the computer system obtains the value of the AN data in the current computer system and decrements the value of the AN data by one to generate a subtraction result, and then writes the subtraction result into a user-specific data reel. Hard drive. In the above example, if the hard disk H2 is removed, the AN data will not be changed; if the hard disk H1 is removed, the value of the acquired AN data is still 3, and the AN data obtained by the computer system will be obtained. The value is decremented by 1, and AN=2 is written to hard disks H3 and H4.
當電腦系統根據步驟710,偵測到一硬碟加入電腦系統時,電腦系統後續將進行步驟714、716、718。詳細來說,電腦系統依使用者的指示訊息,判斷新增的硬碟是否須註冊成為電腦系統的硬碟,若新增的硬碟必須註冊,電腦系統將AN資料之初始值0寫入新增之硬碟。新增之硬碟不會立刻使用,而是等待下一次電腦系統進行開機程序(例如流程40)完成後,由使用者決定是否要使用新增之硬碟建立資料卷軸。若新增的硬碟不須註冊,電腦系統不會變更AN資料。When the computer system detects that a hard disk is added to the computer system according to step 710, the computer system will subsequently perform steps 714, 716, and 718. In detail, the computer system determines whether the newly added hard disk needs to be registered as a hard disk of the computer system according to the user's instruction message. If the newly added hard disk must be registered, the computer system writes the initial value of the AN data to the new one. Add a hard drive. The newly added hard disk will not be used immediately, but will wait for the next computer system to start the booting process (for example, process 40), and then the user decides whether to use the newly added hard disk to create a data scroll. If the new hard disk does not need to be registered, the computer system will not change the AN data.
通過流程50、60及70對於硬碟元資料的即時更新,電腦系統得以在進行流程40時,使用能精確分辨硬碟所儲存之作業系統資料之新舊程度的ID資料、DC資料及AN資料,完成開機程序,不僅使作業系統資料得到最佳保護,也避免因硬碟未妥當安裝所造成的資料卷軸損毀,大幅提升了電腦系統的穩定性。Through the instant update of the hard disk metadata through the processes 50, 60 and 70, the computer system can use the ID data, the DC data and the AN data which can accurately distinguish the old and the old operating system data stored in the hard disk during the process 40. The completion of the boot process not only ensures the best protection of the operating system data, but also avoids the destruction of the data reel caused by the improper installation of the hard disk, which greatly improves the stability of the computer system.
在習知技術中,若同樣以獨立磁碟備援陣列RAID-1管理作業系統資料的電腦系統之間發生硬碟交換的動作時,RAID-1的鏡射特性可能導致電腦系統之間的作業系統資料相互複寫,使電腦系統無法辨識硬碟而不能完成開機程序;若電腦系統以RAID-0管理使用者資料,在電腦系統中有硬碟未正常連接的情形下進行開機程序,資料卷軸可能損毀,導致無法存取使用者資料。相較之下,當電腦系統根據本發明所定義之硬碟元資料進行本發明之開機流程,並且以資料更新流程輔助開機流程時,電腦系統能夠精確分辨出哪些硬碟禁止做為開機硬碟,避免硬碟之作業系統區塊被錯誤地覆寫而無法完成開機程序,同時能提醒使用者注意硬碟是否未安裝妥當,進而避免資料卷軸損毀。In the prior art, if a hard disk exchange operation occurs between computer systems that manage operating system data by the independent disk backup array RAID-1, the mirroring characteristics of RAID-1 may cause work between computer systems. The system data is duplicated, so that the computer system cannot recognize the hard disk and cannot complete the booting process; if the computer system manages the user data with RAID-0, the booting process may be performed in the case where the hard disk is not properly connected in the computer system, and the data reel may be Damaged, resulting in inaccessible user data. In contrast, when the computer system performs the boot process of the present invention according to the hard disk metadata defined in the present invention, and the data update process assists the boot process, the computer system can accurately distinguish which hard disks are prohibited as boot disks. The operating system block of the hard disk is prevented from being incorrectly overwritten and the booting process cannot be completed. At the same time, the user can be reminded whether the hard disk is not properly installed, thereby preventing the data scroll from being damaged.
綜上所述,本發明避免電腦系統因使用RAID-1及RAID-0管理硬碟而導致的問題,大幅提升了電腦系統的穩定性,硬碟中的作業系統資料及使用者資料也得到最佳保護。In summary, the present invention avoids the problems caused by the use of RAID-1 and RAID-0 to manage the hard disk in the computer system, greatly improves the stability of the computer system, and the operating system data and user data in the hard disk are also the most. Good protection.
以上所述僅為本發明之較佳實施例,凡依本發明申請專利範圍所做之均等變化與修飾,皆應屬本發明之涵蓋範圍。The above are only the preferred embodiments of the present invention, and all changes and modifications made to the scope of the present invention should be within the scope of the present invention.
10...硬碟10. . . Hard disk
第1圖及第2圖為習知二個NAS系統中的作業系統資料相互干擾之示意圖。Figures 1 and 2 are schematic diagrams of mutual interference of operating system data in two known NAS systems.
第3圖為本發明實施例一硬碟元資料之示意圖。FIG. 3 is a schematic diagram of a hard disk element data according to an embodiment of the present invention.
第4圖為本發明實施例用於電腦系統之一開機流程之示意圖。FIG. 4 is a schematic diagram of a booting process for a computer system according to an embodiment of the present invention.
第5圖為本發明實施例用來更新硬碟所儲存之識別碼之一流程之示意圖。FIG. 5 is a schematic diagram of a process for updating an identifier stored in a hard disk according to an embodiment of the present invention.
第6圖為本發明實施例用來更新硬碟所儲存之作業系統資料的時間資訊之一流程之示意圖。FIG. 6 is a schematic diagram showing a flow of time information for updating operating system data stored in a hard disk according to an embodiment of the present invention.
第7圖為本發明實施例用來更新包含使用者專用之資料卷軸的硬碟數量之一流程之示意圖。FIG. 7 is a schematic diagram of a process for updating the number of hard disks including a user-specific data reel according to an embodiment of the present invention.
Claims (22)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW98144981A TWI416319B (en) | 2009-12-25 | 2009-12-25 | Boot method for computer system using redundant array of independent disks |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW98144981A TWI416319B (en) | 2009-12-25 | 2009-12-25 | Boot method for computer system using redundant array of independent disks |
Publications (2)
Publication Number | Publication Date |
---|---|
TW201122800A TW201122800A (en) | 2011-07-01 |
TWI416319B true TWI416319B (en) | 2013-11-21 |
Family
ID=45046351
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW98144981A TWI416319B (en) | 2009-12-25 | 2009-12-25 | Boot method for computer system using redundant array of independent disks |
Country Status (1)
Country | Link |
---|---|
TW (1) | TWI416319B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI675368B (en) * | 2018-02-21 | 2019-10-21 | 神雲科技股份有限公司 | Control method of starting multiple hard disk |
CN110333904B (en) * | 2018-03-29 | 2022-07-12 | 佛山市顺德区顺达电脑厂有限公司 | Multi-hard-disk starting control method |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6823450B2 (en) * | 2001-05-11 | 2004-11-23 | International Business Machines Corporation | Mechanism for eliminating need for flash memory in software RAID |
TWI225596B (en) * | 2003-12-15 | 2004-12-21 | Promise Technology Inc | RAID and conversion thereof |
US6976187B2 (en) * | 2001-11-08 | 2005-12-13 | Broadcom Corporation | Rebuilding redundant disk arrays using distributed hot spare space |
TWI293146B (en) * | 2005-12-15 | 2008-02-01 | Inventec Corp | |
TWI310132B (en) * | 2006-07-28 | 2009-05-21 | Inventec Corp |
-
2009
- 2009-12-25 TW TW98144981A patent/TWI416319B/en active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6823450B2 (en) * | 2001-05-11 | 2004-11-23 | International Business Machines Corporation | Mechanism for eliminating need for flash memory in software RAID |
US6976187B2 (en) * | 2001-11-08 | 2005-12-13 | Broadcom Corporation | Rebuilding redundant disk arrays using distributed hot spare space |
TWI225596B (en) * | 2003-12-15 | 2004-12-21 | Promise Technology Inc | RAID and conversion thereof |
TWI293146B (en) * | 2005-12-15 | 2008-02-01 | Inventec Corp | |
TWI310132B (en) * | 2006-07-28 | 2009-05-21 | Inventec Corp |
Also Published As
Publication number | Publication date |
---|---|
TW201122800A (en) | 2011-07-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8117409B2 (en) | Method and apparatus for backup and restore in a dynamic chunk allocation storage system | |
JP5909264B2 (en) | Secure recovery apparatus and method | |
TWI545434B (en) | Non-volatile memory system and method for using the same | |
US6990611B2 (en) | Recovering data from arrays of storage devices after certain failures | |
US7509530B2 (en) | Method and system for use in restoring an active partition | |
US7444360B2 (en) | Method, system, and program for storing and using metadata in multiple storage locations | |
US7921301B2 (en) | Method and apparatus for obscuring data on removable storage devices | |
JP6064608B2 (en) | Storage device, backup program, and backup method | |
US20070150651A1 (en) | Method for dynamically exposing backup and restore volumes | |
JP6850331B2 (en) | How to upgrade firmware in a multi-node storage system | |
WO2014132373A1 (en) | Storage system and memory device fault recovery method | |
JP2007293864A (en) | Compatibility enforcement in clustered computing system | |
TWI493341B (en) | Memory storage device and repairing method thereof | |
TWI416319B (en) | Boot method for computer system using redundant array of independent disks | |
JP4905510B2 (en) | Storage control device and data recovery method for storage device | |
JP2005107839A (en) | Array controller and disk array rebuilding method | |
JP2005506632A (en) | Security device for mass storage devices | |
JP2009059444A (en) | Information processing device and information processing method | |
JP3967073B2 (en) | RAID controller | |
JP2006018594A (en) | Information processor | |
TWI847664B (en) | Computer system | |
CN102117213B (en) | Starting method of computer system using redundancy array of independent disks | |
JP3798773B2 (en) | Disk control apparatus and consistency recovery method for redundant logical disk drive | |
JP2023119785A (en) | Computer and data mismatch determination method | |
US20100161925A1 (en) | Information processing apparatus, information processing method, and computer-readable recording medium having an information processing program |