[go: up one dir, main page]

CN105808152B - A method of optimization RAID global metadata readwrite performance - Google Patents

A method of optimization RAID global metadata readwrite performance Download PDF

Info

Publication number
CN105808152B
CN105808152B CN201410838457.XA CN201410838457A CN105808152B CN 105808152 B CN105808152 B CN 105808152B CN 201410838457 A CN201410838457 A CN 201410838457A CN 105808152 B CN105808152 B CN 105808152B
Authority
CN
China
Prior art keywords
metadata
memory
global
copy
raid
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.)
Active
Application number
CN201410838457.XA
Other languages
Chinese (zh)
Other versions
CN105808152A (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.)
Dawning Information Industry Beijing Co Ltd
Dawning Information Industry Co Ltd
Original Assignee
Shuguang Cloud Computing Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shuguang Cloud Computing Group Co Ltd filed Critical Shuguang Cloud Computing Group Co Ltd
Priority to CN201410838457.XA priority Critical patent/CN105808152B/en
Publication of CN105808152A publication Critical patent/CN105808152A/en
Application granted granted Critical
Publication of CN105808152B publication Critical patent/CN105808152B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

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

Abstract

The present invention relates to a kind of methods for optimizing RAID global metadata readwrite performance to be added memory metadata copy, be realized the optimization of global metadata readwrite performance based on the mode of in SBB system preceding four crucial disk management global metadatas;Specially:Initialize memory metadata copy;Global metadata is directly read from memory, optimizes reading performance;Global metadata is updated, new metadata information is written in key plate, and back up the metadata of the memory metadata copy.SBB system caused by this method avoid being damaged as key plate can not read and write metadata and systemic breakdown;It has given full play to from memory read data more than the advantage fast from disk reading speed, while the readwrite performance for improving global metadata, has greatly reduced burden when system operation.

Description

A method of optimization RAID global metadata readwrite performance
Technical field
The present invention is a kind of to be related to the optimization method of computer technology, and in particular to a kind of optimization RAID global metadata read-write The method of performance.
Background technique
As high performance storage system, RAID of today (Redundant Array of Independent Disk, Raid-array) it has been obtained and is more and more widely used.Wherein, for the overall situation of the software PLC of linux system Metadata management is divided into two kinds, one is the super 1.x version metadata management of default, another kind be using ddf mode into Row management.For the metadata management of super 1.x version, the layout of metadata is by the way of as shown in figure 3, each RAID Member disk store respective metadata information in the position that it starts.
When all member disks of the RAID are all in off-line state, system can not perceive the presence of the RAID.To solve The problem, the prior art is in the RAID module of SBB disk array, using the overall situation of the metadata based on super 1.x version Way to manage.
As shown in figure 4, using the disk of first four slot position as the key plate of system, dedicated for depositing in SBB system The metadata information of RAID in place system, even if the member disk for being RAID in system is all offline, system can also be perceived at the RAID In off-line state.
However, the medium for using key plate to store as global metadata, there is also defects, are mainly manifested in following Aspect:
1) in disc array system, due to the influence of the factors such as resonance, the damage of disk is not can avoid;When first four slot The key plate of position is when all damaging, and SBB system will be unable to read-write metadata, the system of in turn resulting in can not normal use, to user with Come unnecessary trouble and loss.
2) writing mode for using global metadata, must be sequentially written in four key plates, seriously affect metadata Readwrite performance;
3) there are multiple RAID in systems, keep the operation of more new metadata more frequent, exacerbate when system is run Burden.
Summary of the invention
In order to overcome the drawbacks of the prior art, the present invention proposes a kind of side for optimizing RAID global metadata readwrite performance Method, this method avoid being damaged as key plate caused by SBB system can not read and write metadata and systemic breakdown;It gives full play to From memory read data more than the advantage fast from disk reading speed, and delay more new metadata is to preceding four key plate, without It is sequentially written in;While the readwrite performance for improving global metadata, burden when system operation is greatly reduced.
The purpose of the present invention is adopt the following technical solutions realization:
A method of optimization RAID global metadata readwrite performance, the method includes closing based in SBB system preceding four The mode of Keyboard management global metadata adds memory metadata copy, realizes the optimization of global metadata readwrite performance;
Preferably, the method for the optimization RAID global metadata readwrite performance includes the following steps:
(1) memory metadata copy is initialized;
Wherein, the detailed process for initializing the memory metadata copy includes:Step 1-1, using reserved memory Mode is allocated the memory metadata copy;The global metadata is read the memory metadata by step 1-2 in advance In copy;
(2) global metadata directly is read from memory, optimizes reading performance;
(3) global metadata is updated, and new metadata information delay is updated into preceding four key plate, optimizes the property write Energy;
(4) metadata of the memory metadata copy is backed up.
Preferably, the step 1-1 includes that after system crash, the kernel started using the scene crash finds institute State the position of memory metadata copy and preservation.
Further, the step 1-1 further includes that the kernel executes setup_arch function, and calls the execution E820_remove_range function in journey reserves the memory of global metadata total size.
Preferably, the step 1-2 includes during initializing memory metadata copy, passing through execution User space journey Sequence mdadm (the User space program of management software PLC), and by the initial of the memory metadata copy by the way of netlink Change information and is transmitted to the kernel;
After the completion of initialization, the metadata of preceding four key plate is identical, and the kernel is read in any key plate Metadata is filled to the memory metadata copy.
Preferably, in the step (3), it is described update global metadata be will be described in the new metadata information write-in In memory metadata copy, and the new metadata information is backuped to before the SBB system in four key plates;
When the events value in global metadata updates, then newest memory metadata is updated to the memory member number According in the key plate of copy and the SBB system;Otherwise, only newest memory metadata is updated to memory metadata copy.
Further, a thread is created in the kernel, for periodically updating the overall situation of the memory copy Metadata is into preceding four key plate.
Preferably, the step (4) includes under system reboot or power down condition, first passing through and calling register_ Reboot_notifier interface registers a notification interface, subsequently into kernel_restart_prepare function, calls Blocking_notifier_call_chain function executes the call back function of registration;The call back function is used for the memory member The metadata of data copy backups in SSD.
Preferably, under power blackout situation, the metadata of the memory metadata copy is backuped into SSD with the power supply of battery In.
Preferably, in the case where system crash, start the memory scene of new kernel capture at that time, modification/etc/ Kdump_pre in kdump.conf configuration file executes customized script;The customized script is described for triggering The memory metadata copy of backup.
Further, by mount order carry root file system, proc interface is set and triggers backup operation, makes to back up Memory metadata copy be saved in the designated position in SDD.
Compared with the latest prior art, excellent effect of the invention is:
By archive memory metadata copy, first number can not be read and write by avoiding the SBB system as caused by key plate damage Accordingly and systemic breakdown;It makes full use of from memory read data more than the advantage fast from disk reading speed, and need not successively incite somebody to action Preceding four key plate is written in metadata, so that the readwrite performance of global metadata is improved, bearing when greatly reducing system operation Load;Effective management to metadata in existing RAID array is realized, the user experience is improved to a certain extent.
Detailed description of the invention
The global metadata for addition memory metadata copy provided by the invention manages schematic diagram as shown in Figure 1.
The global metadata provided by the invention that pre-reads is illustrated in figure 2 to memory metadata copy flow chart.
The super1.x metadata management schematic diagram of background technique offer is provided.
The global metadata management schematic diagram of background technique offer is provided.
Specific embodiment
The present invention is described in further detail below in conjunction with the accompanying drawings.
The present invention provides a kind of method for optimizing RAID global metadata readwrite performance, and the method includes such as Fig. 1 institute Show, based on the mode of in SBB system preceding four crucial disk management global metadatas, adds memory metadata copy;
Sysuuid is for indicating whether the disk belongs to the SBB system;
Summary is for the version information of identification metadata and the metadata information of the global HotSpare disk of storage;
Specific is used to store the super 1.x metadata information of RAID member disk.
As shown in Fig. 2, the method includes the following steps:
(1) initialization memory metadata copy includes the following steps:
Step 1-1 distributes the memory metadata copy with reserved memory mode;
After system crash, the kernel started using the scene crash finds the position of the memory metadata copy And it saves.
The kernel executes setup_arch function, and calls the e820_remove_range function in the implementation procedure, The memory of reserved global metadata total size.
Step 1-2 reads the global metadata in the memory metadata copy in advance;In initialization memory metadata During copy, by executing User space program mdadm, and by the memory metadata copy by the way of netlink Initialization information is transmitted to the kernel;
After the completion of initialization, the metadata of preceding four key plate is identical, and the kernel is read in any key plate Metadata is filled to the memory metadata copy.
(2) global metadata directly is read from memory, optimizes reading performance;
(3) global metadata is updated, and new metadata information delay is updated into preceding four key plate, optimization is write Performance;
In the step (3), the global metadata that updates is that the new metadata information is written to the memory member In data copy, and the new metadata information is backuped to before the SBB system in four key plates;
When the events value in global metadata updates, then newest memory metadata is updated to the memory member number According in the key plate of copy and the SBB system;Otherwise, only newest memory metadata is updated to memory metadata copy;
A thread is created in the kernel, for periodically updating the global metadata of the memory copy to institute It states in preceding four key plate.
(4) metadata of the memory metadata copy is backed up.
The step (4) includes under system reboot or power down condition, first calling register_reboot_notifier Interface registers a notification interface, subsequently into kernel_restart_prepare function, calls blocking_ Notifier_call_chain function executes the call back function of registration;The call back function is used for the memory metadata copy Metadata backup in SSD.
Under power blackout situation, is powered with battery and backup to the metadata of the memory metadata copy in SSD.
In the case where system crash, start the memory scene of new kernel capture at that time, modification/etc/kdump.conf Kdump_pre in configuration file executes customized script;The customized script is used to trigger the memory of the backup Metadata copy.
By mount order carry root file system, proc interface is set and triggers backup operation, makes the memory member number of backup The designated position in SDD is saved according to copy.
Finally it should be noted that:The above embodiments are merely illustrative of the technical scheme of the present invention and are not intended to be limiting thereof, to the greatest extent Invention is explained in detail referring to above-described embodiment for pipe, and those of ordinary skill in the art still can be to this hair Bright specific embodiment is modified or replaced equivalently, and these without departing from spirit and scope of the invention any modification or Person's equivalent replacement, within the scope of the claims of the invention pending application.

Claims (9)

1. a kind of method for optimizing RAID global metadata readwrite performance, which is characterized in that the method includes being based on SBB system The mode of preceding four crucial disk management global metadatas, adds memory metadata copy in system;
The method includes the following steps:
(1) initialization memory metadata copy includes the following steps:
Step 1-1 distributes the memory metadata copy with reserved memory mode;
Step 1-2 reads the global metadata in the memory metadata copy in advance;
(2) global metadata directly is read from memory, optimizes reading performance;
(3) global metadata is updated, and new metadata information delay is updated into preceding four key plate, optimizes the property write Energy;
(4) metadata of the memory metadata copy is backed up.
2. the method for optimization RAID global metadata readwrite performance as described in claim 1, which is characterized in that the step 1- 1 includes, and after system crash, the kernel started using the scene crash finds the position of the memory metadata copy simultaneously It saves.
3. the method for optimization RAID global metadata readwrite performance as claimed in claim 2, which is characterized in that the step 1- 1 includes, and the kernel executes setup_arch function, and calls the e820_remove_range function in the implementation procedure, in advance Stay the memory of global metadata total size.
4. the method for optimization RAID global metadata readwrite performance as described in claim 1, which is characterized in that the step 1- 2 include, during initializing memory metadata copy, by executing User space program mdadm, and using the side of netlink The initialization information of the memory metadata copy is transmitted to kernel by formula;
After the completion of initialization, the metadata of preceding four key plate is identical, and the kernel reads first number in any key plate According to filling to the memory metadata copy.
5. the method for optimization RAID global metadata readwrite performance as described in claim 1, which is characterized in that the update is global Metadata is one thread of creation in kernel, the global metadata of memory metadata copy is periodically updated, by new member Data information is written in the memory metadata copy, and before the new metadata information is backuped to the SBB system In four key plates;
When the event object in global metadata updates, then newest memory metadata is updated to the memory metadata pair In the key plate of this and the SBB system;Otherwise, only newest memory metadata is updated to memory metadata copy.
6. the method for optimization RAID global metadata readwrite performance as described in claim 1, which is characterized in that described in the backup The metadata of memory metadata copy includes under system reboot or power down condition, first calling register_reboot_ Notifier interface registers a notification interface, subsequently into kernel_restart_prepare function, calls blocking_ Notifier_call_chain function executes the call back function of registration;The call back function is used for the memory metadata copy Metadata backup in SSD.
7. the method for optimization RAID global metadata readwrite performance as described in claim 1, which is characterized in that in power blackout situation Under, it is powered with battery and backups to the metadata of the memory metadata copy in SSD.
8. the method for optimization RAID global metadata readwrite performance as described in claim 1, which is characterized in that as system crash In the case where, start the memory scene of new kernel capture at that time, the kdump_ in modification/etc/kdump.conf configuration file Pre executes customized script;The customized script is used to trigger the memory metadata copy of the backup.
9. the method for optimization RAID global metadata readwrite performance as claimed in claim 8, which is characterized in that ordered by mount Carry root file system is enabled, setting proc interface triggers backup operation, is saved in the memory metadata copy of backup in SSD Designated position.
CN201410838457.XA 2014-12-29 2014-12-29 A method of optimization RAID global metadata readwrite performance Active CN105808152B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410838457.XA CN105808152B (en) 2014-12-29 2014-12-29 A method of optimization RAID global metadata readwrite performance

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410838457.XA CN105808152B (en) 2014-12-29 2014-12-29 A method of optimization RAID global metadata readwrite performance

Publications (2)

Publication Number Publication Date
CN105808152A CN105808152A (en) 2016-07-27
CN105808152B true CN105808152B (en) 2018-11-27

Family

ID=56980859

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410838457.XA Active CN105808152B (en) 2014-12-29 2014-12-29 A method of optimization RAID global metadata readwrite performance

Country Status (1)

Country Link
CN (1) CN105808152B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101196832A (en) * 2007-12-29 2008-06-11 北京航空航天大学 A Resource Broker for Lighting Heterogeneous Devices
CN102368268A (en) * 2011-10-25 2012-03-07 无锡城市云计算中心有限公司 Method for achieving consistency of pieces of metadata
CN102567445A (en) * 2011-10-25 2012-07-11 无锡城市云计算中心有限公司 Method for guaranteeing consistency of metadata in distributed file system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8150801B2 (en) * 2008-08-20 2012-04-03 Microsoft Corporation Recovery of a computer that includes virtual disks

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101196832A (en) * 2007-12-29 2008-06-11 北京航空航天大学 A Resource Broker for Lighting Heterogeneous Devices
CN102368268A (en) * 2011-10-25 2012-03-07 无锡城市云计算中心有限公司 Method for achieving consistency of pieces of metadata
CN102567445A (en) * 2011-10-25 2012-07-11 无锡城市云计算中心有限公司 Method for guaranteeing consistency of metadata in distributed file system

Also Published As

Publication number Publication date
CN105808152A (en) 2016-07-27

Similar Documents

Publication Publication Date Title
US8838918B2 (en) Information processing apparatus and data backup method
US9921758B2 (en) Avoiding long access latencies in redundant storage systems
TWI556104B (en) Techniques to perform power fail-safe caching without atomic metadata
US8275930B2 (en) Storage system having volatile memory and non-volatile memory
CN106354582B (en) A kind of continuous data protection method
US20120311261A1 (en) Storage system and storage control method
CN103970481A (en) Method and device for reconstructing memory array
CN112632643B (en) Method for preventing flash memory data from being lost, solid state drive controller, solid state drive
US9696922B2 (en) Storage system
CN104050056A (en) File system backup of multi-storage-medium device
CN102999564B (en) Write the method for data, device and equipment
CN103150128A (en) Implementation method of solid state drive (SSD) and disk-based reliable mixed storage system
US20140351523A1 (en) System and Method of Rebuilding READ Cache for a Rebooted Node of a Multiple-Node Storage Cluster
JP7318367B2 (en) Storage control device and storage control program
US9772782B2 (en) Non-volatile complement data cache
WO2021088367A1 (en) Data recovery method and related device
WO2014075586A1 (en) Method and device for automatically recovering storage of jbod array
CN103019623A (en) Memory disc processing method and device
US20060112221A1 (en) Method and Related Apparatus for Data Migration Utilizing Disk Arrays
CN108874312B (en) Data storage method and storage device
US20110119509A1 (en) Storage system having power saving function
CN102609224B (en) Redundant array of independent disk system and initializing method thereof
US7702864B2 (en) Apparatus, system, and method for writing stripes in parallel to unique persistent storage devices
CN110531925B (en) Data reading method and device, electronic equipment and machine-readable storage medium
CN105808152B (en) A method of optimization RAID global metadata readwrite performance

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 100193 Beijing, Haidian District, northeast Wang West Road, building 8, building 36, floor 5

Applicant after: Shuguang Cloud Computing Group Co.,Ltd.

Address before: 100193 Beijing, Haidian District, northeast Wang West Road, building 8, building 36, floor 5

Applicant before: DAWNING CLOUD COMPUTING TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20210521

Address after: 100089 building 36, courtyard 8, Dongbeiwang West Road, Haidian District, Beijing

Patentee after: Dawning Information Industry (Beijing) Co.,Ltd.

Address before: 100193 5 floor, 36 building, No. 8 Northeast Road, Haidian District, Beijing.

Patentee before: Shuguang Cloud Computing Group Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20220728

Address after: 100089 building 36, courtyard 8, Dongbeiwang West Road, Haidian District, Beijing

Patentee after: Dawning Information Industry (Beijing) Co.,Ltd.

Patentee after: DAWNING INFORMATION INDUSTRY Co.,Ltd.

Address before: 100089 building 36, courtyard 8, Dongbeiwang West Road, Haidian District, Beijing

Patentee before: Dawning Information Industry (Beijing) Co.,Ltd.