[go: up one dir, main page]

CN1641610A - Hard disk replacement control management method for network storage system - Google Patents

Hard disk replacement control management method for network storage system Download PDF

Info

Publication number
CN1641610A
CN1641610A CN 200410001421 CN200410001421A CN1641610A CN 1641610 A CN1641610 A CN 1641610A CN 200410001421 CN200410001421 CN 200410001421 CN 200410001421 A CN200410001421 A CN 200410001421A CN 1641610 A CN1641610 A CN 1641610A
Authority
CN
China
Prior art keywords
hard disk
management method
flag data
changed
file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN 200410001421
Other languages
Chinese (zh)
Other versions
CN100561451C (en
Inventor
刘文涵
陈玄同
王福利
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inventec Corp
Original Assignee
Inventec Corp
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 Inventec Corp filed Critical Inventec Corp
Priority to CNB2004100014212A priority Critical patent/CN100561451C/en
Publication of CN1641610A publication Critical patent/CN1641610A/en
Application granted granted Critical
Publication of CN100561451C publication Critical patent/CN100561451C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A hard disk replacement control management method for network storage system, which uses the record of hard disk label data as the basis of hard disk plug management to facilitate the replacement of hard disk, firstly records the label data capable of identifying hard disk in hard disk, and records the label data in the information file of the network storage system, and detects the actions of system start and hard disk replacement, and reads the label data of hard disk and compares with the corresponding data in the system file to determine the usability of hard disk.

Description

用于网络储存系统的硬盘更换控制管理方法Hard disk replacement control management method for network storage system

技术领域technical field

本发明涉及一种数据储存系统中的硬盘控制管理方法,特别是关于一种用于网络储存系统的硬盘更换控制管理方法。The invention relates to a hard disk control and management method in a data storage system, in particular to a hard disk replacement control and management method for a network storage system.

背景技术Background technique

目前,市场上的磁盘储存主要有三种模式:CAS内容寻址储存、NAS网络附连储存或网络附加储存和SAN储存局域网络,后两种是网络环境下的主要选择。At present, there are three main modes of disk storage on the market: CAS content addressable storage, NAS network attached storage or network attached storage, and SAN storage local area network. The latter two are the main choices in the network environment.

在经历过计算机运算能力和网络联通能力的两次快速发展后,目前人们对网络的需求不再满足于连通能力,而是更为强大的信息管理能力。随着越来越多的关键信息转化为数字形式并储存在可管理的介质中,网络对于储存和管理信息的能力产生了新的需求。可以这样说:网络是否具有高的效率,取决于其数据储存和管理的能力。在网络储存决定网络结构的今天,IT行业已经从PC、网络步入了以储存为核心的时代。After two rapid developments in computer computing power and network connectivity, people's demand for the network is no longer satisfied with connectivity, but more powerful information management capabilities. As more and more critical information is converted into digital form and stored in manageable media, new demands are placed on the network's ability to store and manage information. It can be said that whether the network has high efficiency depends on its data storage and management capabilities. Today, when network storage determines the network structure, the IT industry has entered the era of storage as the core from PC and network.

目前,许多NAS系统均支持抽屉式硬盘盒设计,以方便硬盘的更换和插拔。高级的系统支持热插拔(HotPlug)功能,即系统运行时更换硬盘。简单一些的系统只支持关机后更换硬盘,即冷插拔。At present, many NAS systems support the design of drawer-type hard disk boxes to facilitate the replacement and insertion of hard disks. The advanced system supports Hot Plug (HotPlug) function, that is, the hard disk can be replaced while the system is running. Simpler systems only support hard disk replacement after shutdown, that is, cold swap.

频繁的更换硬盘带来了硬盘识别的困难。在LINUX环境下SCSI接口的硬盘在插拔时会造成其它在线硬盘的识别设备名发生改变,造成了访问路径变化。这样又进一步增大了硬盘识别的难度。Frequent hard disk replacement brings difficulties in hard disk identification. In the LINUX environment, when a hard disk with SCSI interface is inserted or removed, the identification device name of other online hard disks will change, resulting in a change in the access path. This further increases the difficulty of hard disk identification.

为了解决以上问题,曾前后推出过不同的解决方案,但都没有彻底解决问题,例如,一些基于Linux开发的NAS操作系统,如Guardgen OS,支持硬盘的热插拔。在插拔硬盘前必须使用软件中的硬盘移除功能从系统中移除相应的硬盘逻辑信息,然后再手工拔出硬盘。这样系统就能够记录硬盘的每一次插拔情况,系统再作相应的处理。但这样做的缺点是不支持硬盘冷插拔,即在关机后更换硬盘,则系统不能正确识别和处理。In order to solve the above problems, different solutions have been introduced before and after, but they have not completely solved the problem. For example, some NAS operating systems developed based on Linux, such as Guardgen OS, support hot swapping of hard disks. Before plugging and unplugging the hard disk, you must use the hard disk removal function in the software to remove the corresponding hard disk logical information from the system, and then manually pull out the hard disk. In this way, the system can record each insertion and removal of the hard disk, and then the system will perform corresponding processing. But the disadvantage of this is that it does not support hard disk cold swap, that is, if the hard disk is replaced after shutdown, the system cannot correctly identify and handle it.

另有一些支持硬盘冷插拔的技术,其是记录系统中每块硬盘的分区结构数据,同时记录每个分区文件系统的序列号。当系统开机时检测这些信息,如果发生变化,则认为硬盘已经更换,然后系统作相应的处理,以适应硬盘数量的变化和SCSI硬盘识别设备名的变更。因为此方案是为台式机系统设计的,而NAS系统上所有相同容量的硬盘分区结构都相同,并且不在硬盘分区上直接创建文件系统,因此无法取得文件系统的序列号,所以这种方案并不适合在NAS系统中作为识别硬盘的方法。There are also some technologies that support hard disk cold plugging, which record the partition structure data of each hard disk in the system, and record the serial number of the file system of each partition at the same time. When the system starts to detect these information, if there is a change, it will be considered that the hard disk has been replaced, and then the system will deal with it accordingly to adapt to the change of the number of hard disks and the name of the SCSI hard disk identification device. Because this solution is designed for desktop systems, and all hard disk partitions of the same capacity on the NAS system have the same structure, and the file system is not directly created on the hard disk partition, so the serial number of the file system cannot be obtained, so this solution does not work. It is suitable as a method for identifying hard drives in NAS systems.

因此,如何对网络储存系统中的硬盘更换进行有效的控制管理,并同时支持硬盘的冷热插拔操作,已经成为急待解决的问题。Therefore, how to effectively control and manage the replacement of the hard disk in the network storage system, and at the same time support the hot and cold plug operation of the hard disk, has become an urgent problem to be solved.

发明内容Contents of the invention

本发明为解决上述问题而提供一种用于网络储存系统的硬盘更换控制管理方法,对网络储存系统中的硬盘更换进行有效的控制管理,同时支持硬盘的冷热插拔操作,并能保持硬盘的唯一访问路径。In order to solve the above problems, the present invention provides a hard disk replacement control and management method for a network storage system, which effectively controls and manages hard disk replacement in the network storage system, supports hot and cold plugging operations of hard disks, and can maintain hard disk unique access path.

本发明提供一种用于网络储存系统的硬盘更换控制管理方法,通过硬盘标记数据的记录而作为硬盘插拔管理的依据,以方便硬盘的更换,该方法首先在硬盘中记录可标识硬盘的标记数据,并在该网络储存系统中的信息文件中对应记录该标记数据,同时检测系统启动及硬盘更换的动作,检测到这些动作后则读取硬盘的标记数据并与系统文件中的相应数据进行对比,以确定硬盘的可用性。The invention provides a hard disk replacement control management method for a network storage system. The recording of hard disk label data is used as a basis for hard disk plug-in management to facilitate hard disk replacement. The method first records a mark that can identify the hard disk in the hard disk data, and correspondingly record the tag data in the information file in the network storage system, and at the same time detect the actions of system startup and hard disk replacement, after detecting these actions, read the tag data of the hard disk and compare it with the corresponding data in the system file Compare to determine the availability of the hard disk.

本发明通过在硬盘的隐含扇区记录标记数据的方法来识别硬盘的可用性,同时支持硬盘的热插拔和冷插拔,并通过这些数据使硬盘在插拔时能够保证硬盘的访问路径不发生变化。The present invention identifies the usability of the hard disk by recording mark data in the implicit sector of the hard disk, and supports hot and cold plugging of the hard disk at the same time, and through these data, the access path of the hard disk can be ensured when the hard disk is plugged and unplugged. change.

附图说明Description of drawings

图1为本发明的用于网络储存系统的硬盘更换控制管理方法流程图;FIG. 1 is a flowchart of a hard disk replacement control management method for a network storage system according to the present invention;

图2为本发明所提供的硬盘标记数据储存位置示意图;FIG. 2 is a schematic diagram of storage locations of hard disk tag data provided by the present invention;

图3为本发明所提供的不可用硬盘初始化过程示意图;FIG. 3 is a schematic diagram of an initialization process of an unavailable hard disk provided by the present invention;

图4为本发明所提供的冷插拔操作处理流程示意图;Fig. 4 is a schematic diagram of the processing flow of the cold plug operation provided by the present invention;

图5为本发明所提供的热插拔操作处理流程示意图;及FIG. 5 is a schematic diagram of a hot swap operation processing flow provided by the present invention; and

图6A~图6C为本发明所提供的硬盘唯一访问路径处理示意图。6A to 6C are schematic diagrams of processing the unique access path of the hard disk provided by the present invention.

其中,附图标记说明如下:Wherein, the reference signs are explained as follows:

步骤101在硬盘中记录可标识硬盘的标记数据Step 101 records the tag data that can identify the hard disk in the hard disk

步骤102在该网络储存系统中的信息文件中对应记录该标记数据Step 102 correspondingly records the mark data in the information file in the network storage system

步骤103检测系统启动及硬盘更换的动作Step 103 detects the actions of system startup and hard disk replacement

步骤104读取硬盘的标记数据并与系统文件中的相应数据进行对比,以确定硬盘的可用性Step 104 reads the marking data of the hard disk and compares it with the corresponding data in the system file to determine the availability of the hard disk

步骤301删除该硬盘中的所有数据并按照系统要求重新分区Step 301 deletes all data in the hard disk and repartitions according to system requirements

步骤302读取该硬盘的硬件信息并生成硬盘标记数据Step 302 reads the hardware information of the hard disk and generates hard disk label data

步骤303将该硬盘标记数据写入硬盘隐含扇区以及系统信息文件中Step 303 Write the hard disk mark data into the hidden sector of the hard disk and the system information file

步骤304在该系统文件中将该硬盘记录为可用状态Step 304 records the hard disk as an available state in the system file

步骤305建立硬盘唯一访问路径与硬盘识别设备名之间的链接Step 305 establishes the link between the unique access path of the hard disk and the identification device name of the hard disk

步骤401系统读取记录在硬盘隐含扇区的标记数据,并对标记数据的有效性进行校验Step 401: the system reads the tag data recorded in the hidden sector of the hard disk, and checks the validity of the tag data

步骤402将数据与存储信息文件中记录的硬盘标记数据相比较Step 402 compares the data with the hard disk tag data recorded in the storage information file

步骤403判断标记数据对比是否相同Step 403 judges whether the tag data comparison is the same

步骤404如果比较结果相同,则认为硬盘是系统关机前的硬盘,没有发生冷插拔变化,是系统可用的硬盘In step 404, if the comparison results are the same, it is considered that the hard disk is the hard disk before the system shuts down, and no cold swap changes have taken place, and it is a hard disk available to the system

步骤405否则认为硬盘已经发生改变,是系统不可用硬盘Step 405 otherwise considers that the hard disk has changed, and the hard disk is unavailable for the system

步骤501系统检测到硬盘拔出的信息Step 501 The system detects the information that the hard disk is pulled out

步骤502系统删除存储信息文件中的相应硬盘标记数据信息Step 502 system deletes the corresponding hard disk mark data information in the storage information file

步骤503当用户在拔出硬盘的位置重新插入硬盘时Step 503 When the user reinserts the hard disk at the position where the hard disk was pulled out

步骤504辨识为不可用硬盘Step 504 identifies the hard disk as unavailable

具体实施方式Detailed ways

如图1所示,为本发明的用于网络储存系统的硬盘更换控制管理方法流程图,首先在硬盘中记录可标识硬盘的标记数据(步骤101);在该网络储存系统中的信息文件中对应记录该标记数据(步骤102);同时检测系统启动及硬盘更换的动作(步骤103);读取硬盘的标记数据并与系统文件中的相应数据进行对比,以确定硬盘的可用性(步骤104)。As shown in Figure 1, it is the flow chart of the hard disk replacement control management method for the network storage system of the present invention, first record the tag data (step 101) that can identify the hard disk in the hard disk; in the information file in the network storage system Correspondingly record this mark data (step 102); Detect system startup and the action of hard disk replacement simultaneously (step 103); Read the mark data of hard disk and compare with the corresponding data in the system file, to determine the usability of hard disk (step 104) .

其中该硬盘标记数据记录于硬盘不使用的隐含扇区,隐含扇区是指硬盘主引导扇区(MBR)后面扇区号小于磁头数的n个系统不使用的扇区。目前的硬盘的磁头数均大于16,因此至少有15个扇区可以作为硬盘标记数据储存位置使用。因此,如图2所示,可以使用硬盘主引导扇区后面的第一个扇区作为硬盘标记数据储存位置。同时,在NAS系统的储存信息文件中可以同时保存每一块硬盘的标记数据,系统就可以通过比较两份硬盘标记数据的内容来识别硬盘及位置是否发生变化。其中当检测到系统启动的动作或在系统运行过程中检测到插入硬盘的动作后,如果所读取的硬盘标记数据与系统文件中的记录相同,则辨识其为可用;如果所读取的硬盘标记数据与系统文件中的记录不同,则辨识其为不可用。Wherein the hard disk mark data is recorded in the unused hidden sector of the hard disk, and the hidden sector refers to n unused sectors of the system whose sector number is smaller than the number of magnetic heads behind the master boot sector (MBR) of the hard disk. The number of magnetic heads of the current hard disk is greater than 16, so at least 15 sectors can be used as storage locations for hard disk label data. Therefore, as shown in FIG. 2 , the first sector after the master boot sector of the hard disk can be used as the hard disk mark data storage location. At the same time, the tag data of each hard disk can be saved in the storage information file of the NAS system at the same time, and the system can identify whether the hard disk and its location have changed by comparing the contents of the two hard disk tag data. Among them, when the action of system startup or the action of inserting the hard disk is detected during the operation of the system, if the read hard disk tag data is the same as the record in the system file, it will be identified as usable; if the read hard disk If the flag data differs from the record in the system file, it is recognized as unavailable.

当系统运行过程中如果检测到拔出硬盘的动作,则从系统文件中删除所拔出的硬盘的标记数据。If the action of pulling out the hard disk is detected during system operation, the tag data of the pulled out hard disk is deleted from the system file.

其中该系统信息文件中还记录有每一硬盘的唯一访问路径,并与硬盘设备名建立链接。当检测到系统启动的动作或于系统运行过程中检测到插入硬盘的动作后,根据该硬盘标记数据建立硬盘唯一访问路径与硬盘设备名之间的链接;而当系统运行过程中检测到拔出硬盘的动作时,则删除该硬盘唯一访问路径与该硬盘设备名之间的链接。The system information file also records the unique access path of each hard disk, and establishes a link with the hard disk device name. When the action of system startup or the action of inserting the hard disk is detected during system operation, a link between the unique access path of the hard disk and the name of the hard disk device is established according to the hard disk tag data; When the operation of the hard disk is disabled, the link between the unique access path of the hard disk and the device name of the hard disk is deleted.

如果辨识该硬盘为不可用时,则需要调用系统的硬盘初始化功能,如图3所示,首先删除该硬盘中的所有数据并按照系统要求重新分区(步骤301);然后读取该硬盘的硬件信息并生成硬盘标记数据(步骤302);将该硬盘标记数据写入硬盘隐含扇区以及系统信息文件中(步骤303);在该系统文件中将该硬盘记录为可用状态(步骤304);最后建立硬盘唯一访问路径与硬盘识别设备名之间的链接(步骤305)。If this hard disk is identified as being unavailable, then the hard disk initialization function of the system needs to be invoked, as shown in Figure 3, first delete all data in the hard disk and repartition according to system requirements (step 301); then read the hardware information of the hard disk And generate hard disk marking data (step 302); This hard disk marking data is written in hard disk hidden sector and system information file (step 303); This hard disk is recorded as usable state (step 304) in this system file; Finally Establish a link between the unique access path of the hard disk and the identification device name of the hard disk (step 305).

该硬盘标记数据可以记录以下系统信息及硬盘信息:The hard disk mark data can record the following system information and hard disk information:

NAS序列号:NAS出厂时设定的系统唯一标志号码,每台NAS的序列号不会重复,系统通过读取此标记识别不同的NAS;NAS serial number: The unique identification number of the system set by the NAS factory. The serial number of each NAS will not be repeated. The system can identify different NAS by reading this identification;

硬盘序列号:硬盘出厂时设定的唯一标志号码,由于长度限制,此号码可能重复;Hard disk serial number: the unique identification number set when the hard disk leaves the factory, due to length limitations, this number may be repeated;

硬盘型号:硬盘出厂时设定的型号标志码,同一型号的硬盘此标志码相同,硬盘序列号和硬盘型号不用作硬盘的唯一标识信息,但正常读取此信息表示硬盘控制器和系统BIOS基本正常,否则系统可能存在硬件故障;Hard disk model: The model code set when the hard disk leaves the factory. The hard disk of the same model has the same code. The hard disk serial number and hard disk model are not used as the unique identification information of the hard disk, but normal reading of this information indicates that the hard disk controller and system BIOS are basically Normal, otherwise there may be a hardware failure in the system;

硬盘通用唯一标识符(Universal Unique Identifier,UUID):其是为了解决硬盘的唯一标识问题,硬盘UUID是由软件生成的由128个字母和数字组成的随机号码,此号码由专用的算法生成,可以保证任何一台NAS的任何一块硬盘的UUID不重复;Hard disk Universal Unique Identifier (UUID): It is to solve the unique identification problem of the hard disk. The hard disk UUID is a random number composed of 128 letters and numbers generated by software. This number is generated by a special algorithm and can be Ensure that the UUID of any hard disk of any NAS is not repeated;

硬盘安装位置:IDE硬盘记录IDE接口号和硬盘主从位置,SCSI硬盘记录Channel、ID、LUN等硬盘接口信息,这些信息在硬盘插拔时以及安装位置改变时会发生变化。Hard disk installation location: IDE hard disk records IDE interface number and hard disk master-slave position, SCSI hard disk records hard disk interface information such as Channel, ID, LUN, etc., and these information will change when the hard disk is plugged in or removed or the installation location changes.

对于硬盘冷插拔操作后可用性的识别过程,如图4所示,当系统重新开机时,系统读取记录在硬盘隐含扇区的标记数据,并对标记数据的有效性进行校验(步骤401);校验通过后将数据与存储信息文件中记录的硬盘标记数据相比较(步骤402);判断标记数据对比结果是否相同(步骤403);如果比较结果相同,则认为硬盘是系统关机前的硬盘,没有发生冷插拔变化,是系统可用的硬盘(步骤404);否则认为硬盘已经发生改变,是系统不可用硬盘(步骤405),必须使用NAS系统的硬盘初始化功能对硬盘作初始化处理后才能继续使用。For the identification process of usability after the hard disk cold plug operation, as shown in Figure 4, when the system is restarted, the system reads the mark data recorded in the hidden sector of the hard disk, and checks the validity of the mark data (step 401); After the verification is passed, the data is compared with the hard disk tag data recorded in the storage information file (step 402); whether the judgment tag data comparison result is the same (step 403); if the comparison result is the same, then it is considered that the hard disk is before the system shutdown If there is no cold swap change, it is a hard disk available to the system (step 404); otherwise, it is considered that the hard disk has changed and it is a hard disk that is not available to the system (step 405), and the hard disk initialization function of the NAS system must be used to initialize the hard disk before continuing to use it.

对于硬盘热插拔操作后可用性的识别过程,如图5所示,当系统运行过程中拔出硬盘时,首先由系统检测到硬盘拔出的信息(步骤501);然后系统删除存储信息文件中的相应硬盘标记数据信息(步骤502),表示此硬盘无法继续使用;当用户在拔出硬盘的位置重新插入硬盘时(步骤503),由于存储信息文件中无此硬盘的标记数据,因此辨识为不可用硬盘(步骤504),此硬盘无法被使用,必须使用NAS系统的硬盘初始化功能对硬盘作初始化处理后才能继续使用。For the identification process of availability after the hard disk hot plug operation, as shown in Figure 5, when the hard disk is pulled out during the system operation, at first the information that the hard disk is pulled out is detected by the system (step 501); then the system deletes the information in the storage information file The corresponding hard disk mark data information (step 502), represents that this hard disk can not continue to use; Unusable hard disk (step 504), the hard disk cannot be used, and the hard disk must be initialized with the hard disk initialization function of the NAS system before it can be used again.

硬盘初始化是指在更换硬盘后系统认为硬盘不可用时,用户调用系统的硬盘初始化功能,标示硬盘为可用的过程。在此过程中,系统首先将硬盘原有数据删除,按照NAS系统要求重新分区,然后读取NAS序列号、硬盘型号、硬盘序列号等硬件信息,然后调用专用算法产生硬盘UUID,将这些信息组成硬盘标记数据。写入硬盘隐含扇区和储存信息文件。在储存信息文件中将硬盘记录改写为可用状态,最后建立硬盘唯一访问路径与硬盘识别设备名之间的链接。这样NAS系统才开始使用此硬盘。Hard disk initialization refers to the process that the user invokes the hard disk initialization function of the system to mark the hard disk as usable when the system considers the hard disk unusable after replacing the hard disk. During this process, the system first deletes the original data of the hard disk, repartitions according to the requirements of the NAS system, and then reads hardware information such as the NAS serial number, hard disk model, and hard disk serial number, and then calls a special algorithm to generate the hard disk UUID, and combines these information into Hard disk label data. Write hard disk hidden sectors and storage information files. In the storage information file, the hard disk record is rewritten into an available state, and finally the link between the unique access path of the hard disk and the identification device name of the hard disk is established. In this way, the NAS system starts to use this hard disk.

因为NAS在Linux系统下的SCSI硬盘的硬盘识别设备名是顺序排列的,在增加或减少硬盘时,硬盘识别设备名会重新排列,如果不进行处理,硬盘的访问路径会随之变化。因此,本发明在系统中会为每一块硬盘都建立一个唯一访问路径,其与硬盘识别设备名不同,当硬盘不存在时,此访问路径无法使用,但不会被其它硬盘占用。如果硬盘存在,则建立硬盘唯一访问路径与硬盘识别设备名之间的链接,使NAS系统访问硬盘唯一访问路径和访问硬盘识别设备名效果相同。当SCSI硬盘识别设备名因硬盘增加或减少发生变化时,本系统重新建立硬盘唯一访问路径与硬盘识别设备名之间的链接,保证硬盘的访问路径不变。Because the hard disk identification device names of the SCSI hard disks of the NAS under the Linux system are arranged sequentially, when adding or reducing hard disks, the hard disk identification device names will be rearranged. If no processing is performed, the access path of the hard disk will change accordingly. Therefore, the present invention will establish a unique access path for each hard disk in the system, which is different from the hard disk identification device name. When the hard disk does not exist, this access path cannot be used, but it will not be occupied by other hard disks. If the hard disk exists, establish a link between the unique access path of the hard disk and the identification device name of the hard disk, so that the effect of the NAS system accessing the unique access path of the hard disk and the identification device name of the hard disk is the same. When the name of the SCSI hard disk identification device changes due to the increase or decrease of hard disks, the system re-establishes the link between the unique access path of the hard disk and the identification device name of the hard disk to ensure that the access path of the hard disk remains unchanged.

如图6A所示,假设系统可支持4块SCSI硬盘,Linux系统将存在的硬盘设备名顺序排列为:/dev/sda;/dev/sdb;/dev/sdc;/dev/sdd。本发明为每一硬盘建立一唯一访问路径(其与设备名不同):/dev/shda;/dev/shdb;/dev/shdc;/dev/shdd识别硬盘,正常的对应关系为:     硬盘1     /dev/shda     /dev/sda     硬盘2     /dev/shdb     /dev/sdb     硬盘3     /dev/shdc     /dev/sdc     硬盘4     /dev/shdd     /dev/sdd As shown in FIG. 6A , assuming that the system can support 4 SCSI hard disks, the Linux system arranges the device names of the existing hard disks in order: /dev/sda; /dev/sdb; /dev/sdc; /dev/sdd. The present invention sets up a unique access path (it is different from equipment name) for each hard disk: /dev/shda; HDD 1 /dev/shda /dev/sda HDD 2 /dev/shdb /dev/sdb HDD 3 /dev/shdc /dev/sdc HDD 4 /dev/shdd /dev/sdd

当系统启动时,如果硬盘3未插入,如图6B所示,则Linux系统是将已存在的硬盘的设备名顺序排列,此时本发明读取硬盘标记的“硬盘安装位置”数据,根据硬盘安装位置建立硬盘唯一访问路径与硬盘的设备名之间的链接,其对应关系为:     硬盘1     /dev/shda     /dev/sda     硬盘2     /dev/shdb     /dev/sdb     硬盘3     /dev/shdc     空     硬盘4     /dev/shdd     /dev/sdc When the system starts, if the hard disk 3 is not inserted, as shown in Figure 6B, then the Linux system arranges the device names of the existing hard disks in sequence. The installation location establishes a link between the unique access path of the hard disk and the device name of the hard disk. The corresponding relationship is: HDD 1 /dev/shda /dev/sda HDD 2 /dev/shdb /dev/sdb HDD 3 /dev/shdc null HDD 4 /dev/shdd /dev/sdc

如果在系统运行过程中插入硬盘3时,如图6C所示,硬盘3的设备名被Linux系统识别为/dev/sdd。本发明读取硬盘标记的“硬盘安装位置”数据,根据硬盘安装位置建立硬盘唯一访问路径与硬盘的设备名之间的链接,其对应关系为:     硬盘1     /dev/shda     /dev/sda     硬盘2     /dev/shdb     /dev/sdb If the hard disk 3 is inserted during system operation, as shown in FIG. 6C , the device name of the hard disk 3 is recognized by the Linux system as /dev/sdd. The present invention reads the "hard disk installation location" data marked on the hard disk, and establishes a link between the unique access path of the hard disk and the device name of the hard disk according to the installation location of the hard disk. The corresponding relationship is: HDD 1 /dev/shda /dev/sda HDD 2 /dev/shdb /dev/sdb

    硬盘3 Hard disk 3     /dev/shdc /dev/shdc     /dev/sdd /dev/sdd     硬盘4 Hard disk 4     /dev/shdd /dev/shdd     /dev/sdc /dev/sdc

如在系统运行过程中拔出硬盘2时,硬盘2的设备名/dev/sdb无法访问,导致硬盘唯一访问路径/dev/shdb无法访问,此时系统可以不作处理。For example, when the hard disk 2 is pulled out while the system is running, the device name /dev/sdb of the hard disk 2 cannot be accessed, resulting in the inaccessibility of the only access path /dev/shdb of the hard disk. At this time, the system does not need to handle it.

以上所述,仅为本发明其中的较佳实施例,并非用来限定本发明的实施范围;凡依本发明申请专利范围在不脱离本发明的精神和范围内所作的均等变化与修饰,均应属于本发明专利权利要求书所要求保护的范围内。The above are only preferred embodiments of the present invention, and are not intended to limit the scope of the present invention; all equivalent changes and modifications made within the scope of the patent application for the present invention without departing from the spirit and scope of the present invention are all It should belong to the scope of protection required by the patent claims of the present invention.

Claims (9)

1, a kind of hard disk that is used for network storing system is changed the control and management method, is the foundation that plug is managed as hard disk by the record of hard disk flag data, and to make things convenient for the replacing of hard disk, wherein this method comprises:
Record can identify the flag data of hard disk in hard disk;
This flag data of corresponding record in the message file in this network storing system;
The action that detection system starts and hard disk is changed; And
Read the flag data of hard disk and compare, to determine the availability of hard disk with corresponding data in the system file.
2, the hard disk that is used for network storing system as claimed in claim 1 is changed the control and management method, and wherein this hard disk flag data is recorded in the obsolete implicit sector of hard disk.
3, the hard disk that is used for network storing system as claimed in claim 1 is changed the control and management method, and wherein this flag data comprises: the network storing system sequence number; The hard disk sequence number; The hard disk model; The hard disk universal unique identifier; Position of installing hard disk.
4, the hard disk that is used for network storing system as claimed in claim 1 is changed the control and management method, wherein detect this hard disk changes when moving to the insertion hard disk when the action that detects system start-up or in system's operational process, if the hard disk flag data that is read is identical with record in the system file, then identification its be available; If the hard disk flag data that is read is different with the record in the system file, then identification its be unavailable.
5, the hard disk that is used for network storing system as claimed in claim 1 is changed the control and management method, wherein change action when extracting hard disk, also comprise the step of from system file, deleting the flag data of the hard disk of being extracted when detecting this hard disk in system's operational process.
6, the hard disk that is used for network storing system as claimed in claim 1 is changed the control and management method, wherein also records unique access path of each hard disk in this system information file, and links with the foundation of hard disc apparatus name.
7, the hard disk that is used for network storing system as claimed in claim 1 is changed the control and management method, after wherein this determines the step of hard disk availability, if this hard disk of identification is unavailable, then also comprises the steps:
Delete in this hard disk all data and according to system requirements subregion again;
Read the hardware information of this hard disk and generate the hard disk flag data;
This hard disk flag data is write in implicit sector of hard disk and the system information file;
In this system file, be upstate with this hard disk recording; And
Set up linking between the unique access path of hard disk and the hard disk identification equipment name.
8, the hard disk that is used for network storing system as claimed in claim 1 is changed the control and management method, wherein detect this hard disk and change action when inserting hard disk, also comprise according to this hard disk flag data and set up the step that links between the unique access path of hard disk and the hard disc apparatus name when the action that detects system start-up or in system's operational process.
9, the hard disk that is used for network storing system as claimed in claim 1 is changed the control and management method, wherein change action when extracting hard disk, also comprise and delete linking between the unique access path of this hard disk and this hard disc apparatus name when detecting this hard disk in system's operational process.
CNB2004100014212A 2004-01-08 2004-01-08 Hard disk replacement control management method for network storage system Expired - Fee Related CN100561451C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2004100014212A CN100561451C (en) 2004-01-08 2004-01-08 Hard disk replacement control management method for network storage system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2004100014212A CN100561451C (en) 2004-01-08 2004-01-08 Hard disk replacement control management method for network storage system

Publications (2)

Publication Number Publication Date
CN1641610A true CN1641610A (en) 2005-07-20
CN100561451C CN100561451C (en) 2009-11-18

Family

ID=34867107

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2004100014212A Expired - Fee Related CN100561451C (en) 2004-01-08 2004-01-08 Hard disk replacement control management method for network storage system

Country Status (1)

Country Link
CN (1) CN100561451C (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102326141A (en) * 2011-08-08 2012-01-18 华为技术有限公司 Processing method and apparatus for raid configuration information and raid controller
CN102622315A (en) * 2012-02-24 2012-08-01 华为技术有限公司 Method, device and system for controlling disc visiting
CN102902627A (en) * 2011-07-28 2013-01-30 比亚迪股份有限公司 Memory identifying method of data recorder
CN104035728A (en) * 2014-03-31 2014-09-10 深圳英飞拓科技股份有限公司 Hard disk hot plug handling method, device and node
US9081912B2 (en) 2011-11-24 2015-07-14 Huawei Technologies Co., Ltd. Method and apparatus for node hot-swapping
CN105353983A (en) * 2015-11-03 2016-02-24 山东超越数控电子有限公司 Method and apparatus for identifying disk information in RAID
CN105893282A (en) * 2015-01-04 2016-08-24 伊姆西公司 Hard disk moving recognizing method and system
CN106527960A (en) * 2015-09-14 2017-03-22 中兴通讯股份有限公司 Management method for multi-memory disk loads, device, document system and memory network system
CN107291593A (en) * 2017-06-29 2017-10-24 郑州云海信息技术有限公司 The replacing options and device of failed disk in a kind of RAID system
CN110737925A (en) * 2019-08-31 2020-01-31 苏州浪潮智能科技有限公司 storage system hard disk protection method and device
WO2020107403A1 (en) * 2018-11-30 2020-06-04 唐山曹妃甸联城科技有限公司 Disk access control method, apparatus and system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5277615A (en) * 1992-09-24 1994-01-11 Compaq Computer Corporation Apparatus for removably supporting a plurality of hot plug-connected hard disk drives
US5673172A (en) * 1996-01-05 1997-09-30 Compaq Computer Corporation Apparatus for electromagnetic interference and electrostatic discharge shielding of hot plug-connected hard disk drives
US5986880A (en) * 1997-06-16 1999-11-16 Compaq Computer Corporation Electronic apparatus having I/O board with cable-free redundant adapter cards thereon
CN1459691A (en) * 2002-05-24 2003-12-03 英业达股份有限公司 Hard disk hot plug protection device

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102902627B (en) * 2011-07-28 2015-12-09 比亚迪股份有限公司 A kind of memory identification method of datalogger
CN102902627A (en) * 2011-07-28 2013-01-30 比亚迪股份有限公司 Memory identifying method of data recorder
WO2012119375A1 (en) * 2011-08-08 2012-09-13 华为技术有限公司 Method and device for processing raid configuration information, and raid controller
CN102326141A (en) * 2011-08-08 2012-01-18 华为技术有限公司 Processing method and apparatus for raid configuration information and raid controller
US9081912B2 (en) 2011-11-24 2015-07-14 Huawei Technologies Co., Ltd. Method and apparatus for node hot-swapping
WO2013123758A1 (en) * 2012-02-24 2013-08-29 华为技术有限公司 Disk access control method, device and system
CN102622315B (en) * 2012-02-24 2014-08-13 华为技术有限公司 Method, device and system for controlling disc visiting
CN102622315A (en) * 2012-02-24 2012-08-01 华为技术有限公司 Method, device and system for controlling disc visiting
CN104035728A (en) * 2014-03-31 2014-09-10 深圳英飞拓科技股份有限公司 Hard disk hot plug handling method, device and node
CN105893282A (en) * 2015-01-04 2016-08-24 伊姆西公司 Hard disk moving recognizing method and system
CN105893282B (en) * 2015-01-04 2019-11-12 伊姆西公司 Hard disk mobile identification method and system
CN106527960A (en) * 2015-09-14 2017-03-22 中兴通讯股份有限公司 Management method for multi-memory disk loads, device, document system and memory network system
WO2017045545A1 (en) * 2015-09-14 2017-03-23 中兴通讯股份有限公司 Method and apparatus for managing loads of multiple storage disks, file system, and storage network system
CN106527960B (en) * 2015-09-14 2021-04-02 中兴通讯股份有限公司 Multi-storage-disk load management method and device, file system and storage network system
CN105353983A (en) * 2015-11-03 2016-02-24 山东超越数控电子有限公司 Method and apparatus for identifying disk information in RAID
CN107291593A (en) * 2017-06-29 2017-10-24 郑州云海信息技术有限公司 The replacing options and device of failed disk in a kind of RAID system
WO2020107403A1 (en) * 2018-11-30 2020-06-04 唐山曹妃甸联城科技有限公司 Disk access control method, apparatus and system
CN110737925A (en) * 2019-08-31 2020-01-31 苏州浪潮智能科技有限公司 storage system hard disk protection method and device

Also Published As

Publication number Publication date
CN100561451C (en) 2009-11-18

Similar Documents

Publication Publication Date Title
US8924664B2 (en) Logical object deletion
US9880759B2 (en) Metadata for data storage array
US20060277225A1 (en) Converting file system metadata structure while the file system remains available
US20070283114A1 (en) Method and system for dividing a hard disk drive into multiple host access spaces
CN1726472A (en) Pre-configured backup DVD-RWS
CN1822004A (en) System and method for using a file system to automatically backup a file as a generational file
CN101930372A (en) Program updating system and method
CN110806911B (en) Cloud desktop management and control method, device and system
CN1641610A (en) Hard disk replacement control management method for network storage system
US20090228654A1 (en) Media Cartridge Resident Auto-Sensing/Loading Archive Software
CN102135932A (en) Monitoring system and monitoring method thereof
CN105824572A (en) Disk storage space managing method, apparatus and storage device
CN101681237A (en) Encryption device, encryption method, and encryption program
CN1188793C (en) File managing device and method for portable equipment
WO2008022567A1 (en) Flash memory body storing mechanism with data restoring function
CN101281452A (en) Automatic hard disk reconstruction method
JP4225378B2 (en) Replication apparatus, replication method, replication program, block identification information acquisition program, and recording medium
CN101051283A (en) Hard disk data backup system and method
CN102262589B (en) Application server for realizing copying of hard disc driver and method
CN101645048B (en) Method for realizing computer virtualized evidence obtaining
CN115098038A (en) Method, device and medium for binding mounted directory
TWI461904B (en) Recovery method and device for linux using fat file system
EP2266032B1 (en) Improved input/output control and efficiency in an encrypted file system
CN101739308A (en) Method for generating mapping file and storage system thereof
CN1395246A (en) Method for implementing virtual image optical disk and and its system hardware structure

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20091118

Termination date: 20110108