WO2021238250A1 - 一种存储集群中存储介质变更减少重构数据的方法及系统 - Google Patents
一种存储集群中存储介质变更减少重构数据的方法及系统 Download PDFInfo
- Publication number
- WO2021238250A1 WO2021238250A1 PCT/CN2021/073325 CN2021073325W WO2021238250A1 WO 2021238250 A1 WO2021238250 A1 WO 2021238250A1 CN 2021073325 W CN2021073325 W CN 2021073325W WO 2021238250 A1 WO2021238250 A1 WO 2021238250A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- osd
- difference
- placement group
- list
- cluster
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0614—Improving the reliability of storage systems
- G06F3/0617—Improving the reliability of storage systems in relation to availability
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0614—Improving the reliability of storage systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/061—Improving I/O performance
- G06F3/0613—Improving I/O performance in relation to throughput
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0629—Configuration or reconfiguration of storage systems
- G06F3/0632—Configuration or reconfiguration of storage systems by initialisation or re-initialisation of storage systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0638—Organizing or formatting or addressing of data
- G06F3/0644—Management of space entities, e.g. partitions, extents, pools
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0646—Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
- G06F3/0647—Migration mechanisms
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/067—Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0683—Plurality of storage devices
- G06F3/0689—Disk arrays, e.g. RAID, JBOD
Definitions
- the invention belongs to the field of distributed storage technology, and in particular relates to a method and system for changing storage media in a storage cluster to reduce reconstructed data.
- OSD is the abbreviation of Object-based Storage Device.
- the device based on object storage technology is the object storage device, that is, the storage medium, which corresponds to the hard disk in the storage cluster.
- PG Placement Group
- Storage pools are the foundation of a distributed storage system.
- a storage system consists of multiple storage pools.
- a data storage mode is specified, such as a copy mode or an erasure mode.
- the corresponding placement group PG will be generated.
- the placement group PG is a virtual concept. Taking 3 copies in the copy mode as an example, in order to achieve high availability, the placement group PG is calculated separately through a certain pseudo-random algorithm
- Three OSDs are used for data storage, that is, each placement group PG has a corresponding OSD list, for example, the OSD list of a placement group PG is [6 1 11].
- the placement group PG distribution (OSD list) is calculated again through the pseudo-random algorithm, which involves replacing the hard disk.
- the placement group PG will cause data migration, but because the pseudo-random algorithm is unstable, there will be a certain number of OSD list changes in the placement group PG that does not involve changing disks, which leads to unnecessary data migration.
- the present invention provides A method and system for changing storage media in a storage cluster to reduce reconstruction data, so as to solve the above technical problems.
- the present invention provides a method for changing storage media in a storage cluster to reduce reconstructed data, which includes the following steps:
- step S2 is as follows:
- step S22 Obtain the newly distributed OSD list of the placement group PG in the cluster storage pool, and go to step S3. A recalculation of the OSD list of the placement group PG will occur when a disk change occurs.
- step S3 is as follows:
- step S4 is as follows:
- step S42 If yes, go to step S42;
- step S5 If yes, get the placement group PG with additional OSD changes, generate a difference correction table, and go to step S5;
- step S41 Delete the difference items that belong to the replacement hard disk to obtain the OSD that needs to be corrected.
- step S5 is as follows:
- the present invention provides a system for changing storage media in a storage cluster to reduce reconstructed data, including:
- the original distribution OSD list obtaining module is used to obtain the original distribution OSD list of the placement group PG in the cluster storage pool;
- the newly distributed OSD list obtaining module is used to obtain the newly distributed OSD list of the placement group PG in the cluster storage pool when a disk change occurs in the cluster storage pool;
- the difference comparison table generation module is used to calculate the difference items between the original distribution OSD list of the placement group PG and the new distribution OSD list, and generate a difference comparison table;
- the difference correction table generation module is used to traverse the difference comparison table and sequentially delete the replacement hard disks of each placement group PG difference item in the corresponding new distribution OSD list, obtain the placement group PG with additional OSD changes, and generate the difference correction table;
- the difference correction module is used to apply the difference correction table to correct the placement group PG with additional OSD changes to the original distribution.
- the newly distributed OSD list acquisition module includes:
- the disk swap judging unit is used to determine whether a disk swap occurs in the cluster storage pool
- the newly distributed OSD list obtaining unit is used to obtain the newly distributed OSD list of the placement group PG in the cluster storage pool when a disk exchange occurs in the cluster storage pool.
- the generating module of the difference comparison table includes:
- the difference item calculation unit is used to calculate and save the difference items between the original distributed OSD list of the placement group PG and the newly distributed OSD list;
- the main key setting unit is used to set the main key of the placement group PG;
- the difference comparison table generating unit is used to record the difference item field between the original distribution OSD list and the new distribution OSD list corresponding to each primary key.
- the record is in the form of osd.x->osd.y, where osd.x is the placement group PD corresponds to the hard disks in the newly distributed OSD list, and osd.y is the placement group PD corresponding to the hard disks in the original distributed OSD list, and a difference comparison table is generated.
- the difference correction table generating module includes:
- the replacement hard disk judging unit is used to traverse the difference comparison table and locate in turn and judge whether the osd.x in the difference item field corresponding to each placement group PG is a replacement hard disk;
- the difference item field deletion unit is used to delete the difference item field corresponding to the placement group PG when the osd.x in the difference item field is a replacement hard disk;
- the positioning completion judging unit of the placement group PG is used to judge whether the positioning of each placement group PG is completed;
- the difference correction table generating unit is used to obtain the placement group PG with additional OSD changes when the positioning of each placement group PG is completed, and generate a difference correction table.
- the difference correction module includes:
- the difference correction table acquisition unit is used to obtain the difference correction table
- the difference item acquisition unit caused by the additional OSD change is used to sequentially locate the difference item osd.x->osd.y caused by the additional OSD change in the difference correction table;
- the difference correction unit is used to correct the placement group PG of the additional OSD change to the original distribution, that is, change osd.x to osd.y.
- the method and system for changing the storage medium in the storage cluster to reduce the reconstruction data provided by the present invention by calculating the original distribution of the OSD list of all placement items PG in the storage cluster and the newly distributed OSD list after disk replacement, will actually cause the replacement of the hard disk
- the distribution change caused by the instability of the algorithm is corrected to the original distribution in the form of a difference correction table, thereby reducing the amount of cluster data migration and improving the availability of the cluster.
- the design principle of the present invention is reliable, the structure is simple, and it has a very wide application prospect.
- Fig. 1 is a first schematic diagram of the method flow of the present invention
- Figure 2 is a second schematic diagram of the method of the present invention.
- FIG. 3 is a schematic diagram of the system of the present invention.
- 1-Original distribution OSD list acquisition module 2-New distribution OSD list acquisition module; 2.1-Change disc judgment unit; 2.2-New distribution OSD list acquisition unit; 3-Difference comparison table generation module; 3.1-Difference item Calculation unit; 3.2-Primary key setting unit; 3.3-Difference comparison table generation unit; 4-Difference correction table generation module; 4.1-Replacement hard disk judgment unit; 4.2-Difference item field deletion unit; 4.3-Placement group PG positioning completion judgment Unit; 4.4-Difference correction table generation unit; 5-Difference correction module; 5.1-Difference correction table acquisition unit; 5.2-Difference item acquisition unit caused by additional OSD changes; 5.3-Difference correction unit.
- the present invention provides a method for changing storage media in a storage cluster to reduce reconstructed data, which includes the following steps:
- the present invention provides a method for changing storage media in a storage cluster to reduce reconstructed data, which includes the following steps:
- step S42 If yes, go to step S42;
- step S5 If yes, get the placement group PG with additional OSD changes, generate a difference correction table, and go to step S5;
- the present invention provides a system for changing storage media in a storage cluster to reduce reconstructed data, including:
- the original distribution OSD list obtaining module 1 is used to obtain the original distribution OSD list of the placement group PG in the cluster storage pool;
- the newly distributed OSD list acquisition module 2 is used to acquire the newly distributed OSD list of the placement group PG in the cluster storage pool when a disk change occurs in the cluster storage pool; the newly distributed OSD list acquisition module 2 includes:
- Disk swap judging unit 2.1 used to determine whether a disk swap occurs in the cluster storage pool
- the newly-distributed OSD list acquisition unit 2.2 is used to acquire the newly-distributed OSD list of the placement group PG in the cluster storage pool when a disk change occurs in the cluster storage pool;
- the difference comparison table generation module 3 is used to calculate the difference items between the original distribution OSD list of the placement group PG and the newly distributed OSD list, and generate a difference comparison table; the difference comparison table generation module 3 includes:
- the difference item calculation unit 3.1 is used to calculate and save the difference items between the original distributed OSD list of the placement group PG and the newly distributed OSD list;
- the main key setting unit 3.2 is used to set the placement group PG as the main key;
- the difference comparison table generating unit 3.3 is used to record the difference item field between the original distribution OSD list and the new distribution OSD list corresponding to each primary key, and the record is in the form of osd.x->osd.y, where osd.x is the placement Group PD corresponds to the hard disks in the newly distributed OSD list, and osd.y is the placement group PD corresponding to the hard disks in the original distributed OSD list to generate a difference comparison table;
- the difference correction table generation module 4 is used to traverse the difference comparison table and sequentially delete the replacement hard disks of each placement group PG difference item in the corresponding new distribution OSD list to obtain the placement group PG with additional OSD changes, and generate a difference correction table;
- the difference correction table generation module 4 includes:
- the replacement hard disk judging unit 4.1 is used to traverse the difference comparison table and locate in turn and determine whether the osd.x in the difference item field corresponding to each placement group PG is a replacement hard disk;
- the difference item field deletion unit 4.2 is used to delete the difference item field corresponding to the placement group PG when the osd.x in the difference item field is a replacement hard disk;
- the positioning completion judging unit 4.3 of the placement group PG is used to judge whether the positioning of each placement group PG is completed;
- the difference correction table generating unit 4.4 is used to obtain the placement group PG with additional OSD changes when the positioning of each placement group PG is completed, and generate a difference correction table;
- the difference correction module 5 is used to apply the difference correction table to correct the placement group PG of additional OSD changes to the original distribution; the difference correction module 5 includes:
- the difference correction table obtaining unit 5.1 is used to obtain the difference correction table
- the difference item acquisition unit 5.2 caused by the additional OSD change is used to sequentially locate the difference item osd.x->osd.y caused by the additional OSD change in the difference correction table;
- the difference correction unit 5.3 is used to correct the placement group PG of the additional OSD change to the original distribution, that is, change osd.x to osd.y.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Signal Processing For Digital Recording And Reproducing (AREA)
Abstract
一种存储集群中存储介质变更减少重构数据的方法及系统,该方法包括以下步骤:获取集群存储池中归置组PG的原始分布OSD列表(S1);当集群存储池中发生换盘时,获取集群存储池中归置组PG的新分布OSD列表(S2);计算归置组PG的原始分布OSD列表与新分布OSD列表的差异项,生成差异比对表(S3);遍历差异比对表依次删除每个归置组PG差异项在对应新分布OSD列表中的替换硬盘,得到额外OSD变化的归置组PG,生成差异纠正表(S4);应用差异纠正表,将额外OSD变化的归置组PG纠正成原始分布(S5)。该方法减少集群数据的迁移量,提升集群可用性。
Description
本申请要求于2020年05月28日提交中国专利局、申请号为202010470074.7、发明名称为“一种存储集群中存储介质变更减少重构数据的方法及系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本发明属于分布式存储技术领域,具体涉及一种存储集群中存储介质变更减少重构数据的方法及系统。
OSD,是Object-based Storage Device的简称,基于对象存储技术的设备就是对象存储设备,也就是存储介质,对应存储集群中的硬盘。
PG(Placement Group)归置组,数据分布的一种逻辑单元。
存储池是分布式存储系统的基础,一般存储系统中有多个存储池组成,存储池在创建时指定数据保存模式,比如副本模式或者纠删模式。存储池创建后会生成对应的归置组PG,归置组PG是一种虚拟概念,以副本模式中的3副本为例,为了实现高可用,归置组PG通过某种伪随机算法分别计算出3个OSD进行数据保存,即每个归置组PG都有对应的OSD列表,例如某个归置组PG的OSD列表为[6 1 11]。
在集群使用中因为某些原因(寿命,异常断电等)会导致硬盘故障,从而产生硬盘替换需求,硬盘替换后通过伪随机算法再次计算归置组PG分布(OSD列表),涉及替换硬盘的归置组PG会产生数据的迁移,但是因为伪随机算法不稳定,并未涉及换盘的归置组PG也会存在一定数量的OSD列表变更,从而导致不必要的数据迁移,集群数量越大迁移时间就越长,问题越明显,目前针对该问题并没有有效优化。
此为现有技术的不足,因此,针对现有技术中的上述缺陷,提供一种存储集群中存储介质变更减少重构数据的方法及系统,是非常有必要的。
发明内容
针对现有技术的上述硬盘替换后,因为伪随机算法不稳定,并未涉及换盘的归置组PG也会存在一定数量的OSD列表变更,从而导致不必要的数据迁移的缺陷,本发明提供一种存储集群中存储介质变更减少重构数据的方法及系统,以解决上述技术问题。
第一方面,本发明提供一种存储集群中存储介质变更减少重构数据的方法,包括如下步骤:
S1.获取集群存储池中归置组PG的原始分布OSD列表;
S2.当集群存储池中发生换盘时,获取集群存储池中归置组PG的新分布OSD列表;
S3.计算归置组PG的原始分布OSD列表与新分布OSD列表的差异项,生成差异比对表;
S4.遍历差异比对表依次删除每个归置组PG差异项在对应新分布OSD列表中的替换硬盘,得到额外OSD变化的归置组PG,生成差异纠正表;
S5.应用差异纠正表,将额外OSD变化的归置组PG纠正成原始分布。
进一步地,步骤S2具体步骤如下:
S21.判断集群存储池中是否发生换盘;
若是,进入步骤S22;
若否,返回步骤S21;
S22.获取集群存储池中归置组PG新分布OSD列表,进入步骤S3。发生换盘就会发生归置组PG的OSD列表的重新计算。
进一步地,步骤S3具体步骤如下:
S31.计算归置组PG的原始分布OSD列表与新分布OSD列表的差异项并进行保存;
S32.设定归置组PG为主键;
S33.记录每个主键对应的原始分布OSD列表与新分布OSD列表的差异项字段,记录为osd.x->osd.y的形式,其中osd.x为归置组PD对应新分布OSD列表中的硬盘,osd.y为归置组PD对应原始分布OSD列表中的硬 盘,生成差异比对表。将发生归置组PG的OSD列表重新计算的差异项通过比对找出来。
进一步地,步骤S4具体步骤如下:
S41.遍历差异比对表依次定位并判断每个归置组PG对应的差异项字段中的osd.x是否为替换的硬盘;
若是,进入步骤S42;
若否,进入步骤S43;
S42.删除该归置组PG对应的差异项字段;
S43.判断是否每个归置组PG定位完毕;
若是,得到额外OSD变化的归置组PG,生成差异纠正表,进入步骤S5;
若否,返回步骤S41。将属于替换硬盘的差异项删除,从而得到需要纠正的OSD。
进一步地,步骤S5具体步骤如下:
S51.获取差异纠正表;
S52.依次定位差异纠正表中因额外OSD变化导致的差异项osd.x->osd.y;
S53.将额外OSD变化的归置组PG纠正成原始分布,即将osd.x更改为osd.y。将需要纠正的OSD还原,从而避免了额外的数据迁移,提升硬盘可用性。
第二方面,本发明提供一种存储集群中存储介质变更减少重构数据的系统,包括:
原始分布OSD列表获取模块,用于获取集群存储池中归置组PG的原始分布OSD列表;
新分布OSD列表获取模块,用于当集群存储池中发生换盘时,获取集群存储池中归置组PG的新分布OSD列表;
差异比对表生成模块,用于计算归置组PG的原始分布OSD列表与新分布OSD列表的差异项,生成差异比对表;
差异纠正表生成模块,用于遍历差异比对表依次删除每个归置组PG 差异项在对应新分布OSD列表中的替换硬盘,得到额外OSD变化的归置组PG,生成差异纠正表;
差异纠正模块,用于应用差异纠正表,将额外OSD变化的归置组PG纠正成原始分布。
进一步地,新分布OSD列表获取模块包括:
换盘判断单元,用于判断集群存储池中是否发生换盘;
新分布OSD列表获取单元,用于当集群存储池中发生换盘时,获取集群存储池中归置组PG新分布OSD列表。
进一步地,差异比对表生成模块包括:
差异项计算单元,用于计算归置组PG的原始分布OSD列表与新分布OSD列表的差异项并进行保存;
主键设置单元,用于设定归置组PG为主键;
差异比对表生成单元,用于记录每个主键对应的原始分布OSD列表与新分布OSD列表的差异项字段,记录为osd.x->osd.y的形式,其中osd.x为归置组PD对应新分布OSD列表中的硬盘,osd.y为归置组PD对应原始分布OSD列表中的硬盘,生成差异比对表。
进一步地,差异纠正表生成模块包括:
替换硬盘判断单元,用于遍历差异比对表依次定位并判断每个归置组PG对应的差异项字段中的osd.x是否为替换的硬盘;
差异项字段删除单元,用于当差异项字段中的osd.x为替换的硬盘时,删除该归置组PG对应的差异项字段;
归置组PG定位完毕判定单元,用于判断是否每个归置组PG定位完毕;
差异纠正表生成单元,用于当每个归置组PG均定位完毕时,得到额外OSD变化的归置组PG,生成差异纠正表。
进一步地,差异纠正模块包括:
差异纠正表获取单元,用于获取差异纠正表;
额外OSD变化导致的差异项获取单元,用于依次定位差异纠正表中因额外OSD变化导致的差异项osd.x->osd.y;
差异纠正单元,用于将额外OSD变化的归置组PG纠正成原始分布, 即将osd.x更改为osd.y。
本发明的有益效果在于,
本发明提供的存储集群中存储介质变更减少重构数据的方法及系统,通过计算存储集群中所有归置项PG原始分布的OSD列表及换盘后新分布的OSD列表,将除替换硬盘真正引起分布变更的归置项PG外,因为算法不稳定导致的分布变更通过差异纠正表的形式纠正成原始分布,从而减少集群数据的迁移量,提升集群可用性。
此外,本发明设计原理可靠,结构简单,具有非常广泛的应用前景。
由此可见,本发明与现有技术相比,具有突出的实质性特点和显著的进步,其实施的有益效果也是显而易见的。
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,对于本领域普通技术人员而言,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本发明的方法流程示意图一;
图2是本发明的方法流程示意图二;
图3为本发明的系统示意图;
图中,1-原始分布OSD列表获取模块;2-新分布OSD列表获取模块;2.1-换盘判断单元;2.2-新分布OSD列表获取单元;3-差异比对表生成模块;3.1-差异项计算单元;3.2-主键设置单元;3.3-差异比对表生成单元;4-差异纠正表生成模块;4.1-替换硬盘判断单元;4.2-差异项字段删除单元;4.3-归置组PG定位完毕判定单元;4.4-差异纠正表生成单元;5-差异纠正模块;5.1-差异纠正表获取单元;5.2-额外OSD变化导致的差异项获取单元;5.3-差异纠正单元。
为了使本技术领域的人员更好地理解本发明中的技术方案,下面将结 合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。
实施例1:
如图1所示,本发明提供一种存储集群中存储介质变更减少重构数据的方法,包括如下步骤:
S1.获取集群存储池中归置组PG的原始分布OSD列表;
S2.当集群存储池中发生换盘时,获取集群存储池中归置组PG的新分布OSD列表;
S3.计算归置组PG的原始分布OSD列表与新分布OSD列表的差异项,生成差异比对表;
S4.遍历差异比对表依次删除每个归置组PG差异项在对应新分布OSD列表中的替换硬盘,得到额外OSD变化的归置组PG,生成差异纠正表;
S5.应用差异纠正表,将额外OSD变化的归置组PG纠正成原始分布。
实施例2:
如图2所示,本发明提供一种存储集群中存储介质变更减少重构数据的方法,包括如下步骤:
S1.获取集群存储池中归置组PG的原始分布OSD列表;
S2.当集群存储池中发生换盘时,获取集群存储池中归置组PG的新分布OSD列表;具体步骤如下:
S21.判断集群存储池中是否发生换盘;
若是,进入步骤S22;
若否,返回步骤S21;
S22.获取集群存储池中归置组PG新分布OSD列表,进入步骤S3;
S3.计算归置组PG的原始分布OSD列表与新分布OSD列表的差异项,生成差异比对表;具体步骤如下:
S31.计算归置组PG的原始分布OSD列表与新分布OSD列表的差异项并进行保存;
S32.设定归置组PG为主键;
S33.记录每个主键对应的原始分布OSD列表与新分布OSD列表的差异项字段,记录为osd.x->osd.y的形式,其中osd.x为归置组PD对应新分布OSD列表中的硬盘,osd.y为归置组PD对应原始分布OSD列表中的硬盘,生成差异比对表;
S4.遍历差异比对表依次删除每个归置组PG差异项在对应新分布OSD列表中的替换硬盘,得到额外OSD变化的归置组PG,生成差异纠正表;具体步骤如下:
S41.遍历差异比对表依次定位并判断每个归置组PG对应的差异项字段中的osd.x是否为替换的硬盘;
若是,进入步骤S42;
若否,进入步骤S43;
S42.删除该归置组PG对应的差异项字段;
S43.判断是否每个归置组PG定位完毕;
若是,得到额外OSD变化的归置组PG,生成差异纠正表,进入步骤S5;
若否,返回步骤S41;
S5.应用差异纠正表,将额外OSD变化的归置组PG纠正成原始分布;具体步骤如下:
S51.获取差异纠正表;
S52.依次定位差异纠正表中因额外OSD变化导致的差异项osd.x->osd.y;
S53.将额外OSD变化的归置组PG纠正成原始分布,即将osd.x更改为osd.y。
实施例3:
如图3所示,本发明提供一种存储集群中存储介质变更减少重构数据的系统,包括:
原始分布OSD列表获取模块1,用于获取集群存储池中归置组PG的原始分布OSD列表;
新分布OSD列表获取模块2,用于当集群存储池中发生换盘时,获取集群存储池中归置组PG的新分布OSD列表;新分布OSD列表获取模块2包括:
换盘判断单元2.1,用于判断集群存储池中是否发生换盘;
新分布OSD列表获取单元2.2,用于当集群存储池中发生换盘时,获取集群存储池中归置组PG新分布OSD列表;
差异比对表生成模块3,用于计算归置组PG的原始分布OSD列表与新分布OSD列表的差异项,生成差异比对表;差异比对表生成模块3包括:
差异项计算单元3.1,用于计算归置组PG的原始分布OSD列表与新分布OSD列表的差异项并进行保存;
主键设置单元3.2,用于设定归置组PG为主键;
差异比对表生成单元3.3,用于记录每个主键对应的原始分布OSD列表与新分布OSD列表的差异项字段,记录为osd.x->osd.y的形式,其中osd.x为归置组PD对应新分布OSD列表中的硬盘,osd.y为归置组PD对应原始分布OSD列表中的硬盘,生成差异比对表;
差异纠正表生成模块4,用于遍历差异比对表依次删除每个归置组PG差异项在对应新分布OSD列表中的替换硬盘,得到额外OSD变化的归置组PG,生成差异纠正表;差异纠正表生成模块4包括:
替换硬盘判断单元4.1,用于遍历差异比对表依次定位并判断每个归置组PG对应的差异项字段中的osd.x是否为替换的硬盘;
差异项字段删除单元4.2,用于当差异项字段中的osd.x为替换的硬盘时,删除该归置组PG对应的差异项字段;
归置组PG定位完毕判定单元4.3,用于判断是否每个归置组PG定位完毕;
差异纠正表生成单元4.4,用于当每个归置组PG均定位完毕时,得到额外OSD变化的归置组PG,生成差异纠正表;
差异纠正模块5,用于应用差异纠正表,将额外OSD变化的归置组PG纠正成原始分布;差异纠正模块5包括:
差异纠正表获取单元5.1,用于获取差异纠正表;
额外OSD变化导致的差异项获取单元5.2,用于依次定位差异纠正表中因额外OSD变化导致的差异项osd.x->osd.y;
差异纠正单元5.3,用于将额外OSD变化的归置组PG纠正成原始分布,即将osd.x更改为osd.y。
尽管通过参考附图并结合优选实施例的方式对本发明进行了详细描述,但本发明并不限于此。在不脱离本发明的精神和实质的前提下,本领域普通技术人员可以对本发明的实施例进行各种等效的修改或替换,而这些修改或替换都应在本发明的涵盖范围内/任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。
Claims (10)
- 一种存储集群中存储介质变更减少重构数据的方法,其特征在于,包括如下步骤:S1.获取集群存储池中归置组PG的原始分布OSD列表;S2.当集群存储池中发生换盘时,获取集群存储池中归置组PG的新分布OSD列表;S3.计算归置组PG的原始分布OSD列表与新分布OSD列表的差异项,生成差异比对表;S4.遍历差异比对表依次删除每个归置组PG差异项在对应新分布OSD列表中的替换硬盘,得到额外OSD变化的归置组PG,生成差异纠正表;S5.应用差异纠正表,将额外OSD变化的归置组PG纠正成原始分布。
- 如权利要求1所述的存储集群中存储介质变更减少重构数据的方法,其特征在于,步骤S2具体步骤如下:S21.判断集群存储池中是否发生换盘;若是,进入步骤S22;若否,返回步骤S21;S22.获取集群存储池中归置组PG新分布OSD列表,进入步骤S3。
- 如权利要求1所述的存储集群中存储介质变更减少重构数据的方法,其特征在于,步骤S3具体步骤如下:S31.计算归置组PG的原始分布OSD列表与新分布OSD列表的差异项并进行保存;S32.设定归置组PG为主键;S33.记录每个主键对应的原始分布OSD列表与新分布OSD列表的差异项字段,记录为osd.x->osd.y的形式,其中osd.x为归置组PD对应新分布OSD列表中的硬盘,osd.y为归置组PD对应原始分布OSD列表中的硬盘,生成差异比对表。
- 如权利要求3所述的存储集群中存储介质变更减少重构数据的方法及系统,其特征在于,步骤S4具体步骤如下:S41.遍历差异比对表依次定位并判断每个归置组PG对应的差异项字 段中的osd.x是否为替换的硬盘;若是,进入步骤S42;若否,进入步骤S43;S42.删除该归置组PG对应的差异项字段;S43.判断是否每个归置组PG定位完毕;若是,得到额外OSD变化的归置组PG,生成差异纠正表,进入步骤S5;若否,返回步骤S41。
- 如权利要求4所述的存储集群中存储介质变更减少重构数据的方法及系统,其特征在于,步骤S5具体步骤如下:S51.获取差异纠正表;S52.依次定位差异纠正表中因额外OSD变化导致的差异项osd.x->osd.y;S53.将额外OSD变化的归置组PG纠正成原始分布,即将osd.x更改为osd.y。
- 一种存储集群中存储介质变更减少重构数据的系统,其特征在于,包括:原始分布OSD列表获取模块(1),用于获取集群存储池中归置组PG的原始分布OSD列表;新分布OSD列表获取模块(2),用于当集群存储池中发生换盘时,获取集群存储池中归置组PG的新分布OSD列表;差异比对表生成模块(3),用于计算归置组PG的原始分布OSD列表与新分布OSD列表的差异项,生成差异比对表;差异纠正表生成模块(4),用于遍历差异比对表依次删除每个归置组PG差异项在对应新分布OSD列表中的替换硬盘,得到额外OSD变化的归置组PG,生成差异纠正表;差异纠正模块(5),用于应用差异纠正表,将额外OSD变化的归置组PG纠正成原始分布。
- 如权利要求6所述的存储集群中存储介质变更减少重构数据的系统, 其特征在于,新分布OSD列表获取模块(2)包括:换盘判断单元(2.1),用于判断集群存储池中是否发生换盘;新分布OSD列表获取单元(2.2),用于当集群存储池中发生换盘时,获取集群存储池中归置组PG新分布OSD列表。
- 如权利要求6所述的存储集群中存储介质变更减少重构数据的系统,其特征在于,差异比对表生成模块(3)包括:差异项计算单元(3.1),用于计算归置组PG的原始分布OSD列表与新分布OSD列表的差异项并进行保存;主键设置单元(3.2),用于设定归置组PG为主键;差异比对表生成单元(3.3),用于记录每个主键对应的原始分布OSD列表与新分布OSD列表的差异项字段,记录为osd.x->osd.y的形式,其中osd.x为归置组PD对应新分布OSD列表中的硬盘,osd.y为归置组PD对应原始分布OSD列表中的硬盘,生成差异比对表。
- 如权利要求6所述的存储集群中存储介质变更减少重构数据的系统,其特征在于,差异纠正表生成模块(4)包括:替换硬盘判断单元(4.1),用于遍历差异比对表依次定位并判断每个归置组PG对应的差异项字段中的osd.x是否为替换的硬盘;差异项字段删除单元(4.2),用于当差异项字段中的osd.x为替换的硬盘时,删除该归置组PG对应的差异项字段;归置组PG定位完毕判定单元(4.3),用于判断是否每个归置组PG定位完毕;差异纠正表生成单元(4.4),用于当每个归置组PG均定位完毕时,得到额外OSD变化的归置组PG,生成差异纠正表。
- 如权利要求6所述的存储集群中存储介质变更减少重构数据的系统,其特征在于,差异纠正模块(5)包括:差异纠正表获取单元(5.1),用于获取差异纠正表;额外OSD变化导致的差异项获取单元(5.2),用于依次定位差异纠正表中因额外OSD变化导致的差异项osd.x->osd.y;差异纠正单元(5.3),用于将额外OSD变化的归置组PG纠正成原始 分布,即将osd.x更改为osd.y。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US17/927,828 US20230195323A1 (en) | 2020-05-28 | 2021-01-22 | Method and system for reducing reconstructed data by means of changing storage mediums in storage cluster |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010470074.7A CN111752483B (zh) | 2020-05-28 | 2020-05-28 | 一种存储集群中存储介质变更减少重构数据的方法及系统 |
CN202010470074.7 | 2020-05-28 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021238250A1 true WO2021238250A1 (zh) | 2021-12-02 |
Family
ID=72673998
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2021/073325 WO2021238250A1 (zh) | 2020-05-28 | 2021-01-22 | 一种存储集群中存储介质变更减少重构数据的方法及系统 |
Country Status (3)
Country | Link |
---|---|
US (1) | US20230195323A1 (zh) |
CN (1) | CN111752483B (zh) |
WO (1) | WO2021238250A1 (zh) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111708486B (zh) * | 2020-05-24 | 2023-01-06 | 苏州浪潮智能科技有限公司 | 一种主放置组均衡优化的方法、系统、设备及介质 |
CN111752483B (zh) * | 2020-05-28 | 2022-07-22 | 苏州浪潮智能科技有限公司 | 一种存储集群中存储介质变更减少重构数据的方法及系统 |
CN112269532B (zh) * | 2020-10-15 | 2022-07-29 | 苏州浪潮智能科技有限公司 | 一种分布式存储集群重构进度的统计方法、系统及装置 |
CN112486731B (zh) * | 2020-11-03 | 2023-01-10 | 苏州浪潮智能科技有限公司 | 一种还原放置组分布的方法、装置、设备、产品 |
CN113126925B (zh) * | 2021-04-21 | 2022-08-02 | 山东英信计算机技术有限公司 | 一种成员列表确定方法、装置、设备及可读存储介质 |
CN114138181B (zh) * | 2021-10-24 | 2024-06-11 | 郑州浪潮数据技术有限公司 | 一种绑定池放置组选主的方法、装置、设备及可读介质 |
CN114546265B (zh) * | 2022-01-29 | 2023-08-11 | 苏州浪潮智能科技有限公司 | 一种快速容量均衡的方法、系统、设备和存储介质 |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20160378364A1 (en) * | 2015-06-23 | 2016-12-29 | Western Digital Technologies, Inc. | Data management for object based storage |
CN108509157A (zh) * | 2018-04-13 | 2018-09-07 | 郑州云海信息技术有限公司 | 一种应用于分布式文件系统的数据均衡方法及装置 |
CN109002264A (zh) * | 2018-07-24 | 2018-12-14 | 郑州云海信息技术有限公司 | 一种基于系统扩容确定数据分布的方法和装置 |
CN109284220A (zh) * | 2018-10-12 | 2019-01-29 | 深信服科技股份有限公司 | 集群故障恢复时长估算方法、装置、设备及存储介质 |
CN109614276A (zh) * | 2018-11-28 | 2019-04-12 | 平安科技(深圳)有限公司 | 故障处理方法、装置、分布式存储系统和存储介质 |
CN110515724A (zh) * | 2019-08-13 | 2019-11-29 | 新华三大数据技术有限公司 | 资源配置方法、装置、监视器及机器可读存储介质 |
CN111190775A (zh) * | 2019-12-30 | 2020-05-22 | 浪潮电子信息产业股份有限公司 | 一种osd更换方法、系统、设备及计算机可读存储介质 |
CN111752483A (zh) * | 2020-05-28 | 2020-10-09 | 苏州浪潮智能科技有限公司 | 一种存储集群中存储介质变更减少重构数据的方法及系统 |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5685676B2 (ja) * | 2011-08-01 | 2015-03-18 | 株式会社日立製作所 | 計算機システム及びデータ管理方法 |
CN109344143A (zh) * | 2018-10-25 | 2019-02-15 | 电子科技大学成都学院 | 一种基于Ceph的分布式集群数据迁移优化方法 |
CN110222013B (zh) * | 2019-06-11 | 2023-05-12 | 深信服科技股份有限公司 | 一种集群存储容量确定的方法、系统、设备及存储介质 |
-
2020
- 2020-05-28 CN CN202010470074.7A patent/CN111752483B/zh active Active
-
2021
- 2021-01-22 WO PCT/CN2021/073325 patent/WO2021238250A1/zh active Application Filing
- 2021-01-22 US US17/927,828 patent/US20230195323A1/en not_active Abandoned
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20160378364A1 (en) * | 2015-06-23 | 2016-12-29 | Western Digital Technologies, Inc. | Data management for object based storage |
CN108509157A (zh) * | 2018-04-13 | 2018-09-07 | 郑州云海信息技术有限公司 | 一种应用于分布式文件系统的数据均衡方法及装置 |
CN109002264A (zh) * | 2018-07-24 | 2018-12-14 | 郑州云海信息技术有限公司 | 一种基于系统扩容确定数据分布的方法和装置 |
CN109284220A (zh) * | 2018-10-12 | 2019-01-29 | 深信服科技股份有限公司 | 集群故障恢复时长估算方法、装置、设备及存储介质 |
CN109614276A (zh) * | 2018-11-28 | 2019-04-12 | 平安科技(深圳)有限公司 | 故障处理方法、装置、分布式存储系统和存储介质 |
CN110515724A (zh) * | 2019-08-13 | 2019-11-29 | 新华三大数据技术有限公司 | 资源配置方法、装置、监视器及机器可读存储介质 |
CN111190775A (zh) * | 2019-12-30 | 2020-05-22 | 浪潮电子信息产业股份有限公司 | 一种osd更换方法、系统、设备及计算机可读存储介质 |
CN111752483A (zh) * | 2020-05-28 | 2020-10-09 | 苏州浪潮智能科技有限公司 | 一种存储集群中存储介质变更减少重构数据的方法及系统 |
Also Published As
Publication number | Publication date |
---|---|
US20230195323A1 (en) | 2023-06-22 |
CN111752483A (zh) | 2020-10-09 |
CN111752483B (zh) | 2022-07-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021238250A1 (zh) | 一种存储集群中存储介质变更减少重构数据的方法及系统 | |
US8307159B2 (en) | System and method for providing performance-enhanced rebuild of a solid-state drive (SSD) in a solid-state drive hard disk drive (SSD HDD) redundant array of inexpensive disks 1 (RAID 1) pair | |
US7120826B2 (en) | Partial mirroring during expansion thereby eliminating the need to track the progress of stripes updated during expansion | |
CN102024016B (zh) | 一种分布式文件系统快速数据恢复的方法 | |
CN101976175B (zh) | 一种水平型分组并行集中校验的磁盘阵列的构建方法 | |
JP2016530637A (ja) | Raidパリティストライプ再構成 | |
CN104850598A (zh) | 一种实时数据库备份恢复方法 | |
US20090313617A1 (en) | Method for Updating Control Program of Physical Storage Device in Storage Virtualization System and Storage Virtualization Controller and System Thereof | |
US8225035B2 (en) | Systems and methods for operating a disk drive | |
CN103929609B (zh) | 一种录像回放方法和装置 | |
US20110016260A1 (en) | Managing backup device metadata in a high availability disk subsystem | |
CN111858189B (zh) | 对存储盘离线的处理 | |
CN105302667A (zh) | 基于集群架构的高可靠性数据备份与恢复方法 | |
CN104615381B (zh) | 一种视频监控系统的磁盘冗余阵列 | |
WO2021072917A1 (zh) | 一种raid的写洞保护方法、系统及存储介质 | |
CN105224891A (zh) | 磁盘光盘融合数据安全存储方法、系统及装置 | |
CN101625586A (zh) | 一种管理存储设备节能的方法、设备和计算机 | |
CN104572374B (zh) | 存储的处理方法、装置和存储设备 | |
CN105930099A (zh) | 一种消除局部并行中小写操作的双盘容错盘阵列 | |
JP2006285527A (ja) | ストレージ装置およびプログラム。 | |
CN101976179A (zh) | 一种垂直型分组并行分布校验的磁盘阵列的构建方法 | |
CN110309012B (zh) | 一种数据处理方法及其装置 | |
US10409527B1 (en) | Method and apparatus for raid virtual pooling | |
US20090177676A1 (en) | Apparatus, system, and method for storing and retrieving compressed data | |
CN109885263B (zh) | 面向可重组raid的多目标快速重构方法 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 21814634 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 21814634 Country of ref document: EP Kind code of ref document: A1 |