CN109960460B - 一种分布式存储系统 - Google Patents

一种分布式存储系统 Download PDF

Info

Publication number
CN109960460B
CN109960460B CN201711426419.3A CN201711426419A CN109960460B CN 109960460 B CN109960460 B CN 109960460B CN 201711426419 A CN201711426419 A CN 201711426419A CN 109960460 B CN109960460 B CN 109960460B
Authority
CN
China
Prior art keywords
module
file
storage
blocknode
data
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
CN201711426419.3A
Other languages
English (en)
Other versions
CN109960460A (zh
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.)
Shanghai Shengxiao Cloud Computing Technology Co ltd
Original Assignee
Shanghai Shengxiao Cloud Computing Technology 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 Shanghai Shengxiao Cloud Computing Technology Co ltd filed Critical Shanghai Shengxiao Cloud Computing Technology Co ltd
Priority to CN201711426419.3A priority Critical patent/CN109960460B/zh
Publication of CN109960460A publication Critical patent/CN109960460A/zh
Application granted granted Critical
Publication of CN109960460B publication Critical patent/CN109960460B/zh
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/064Management of blocks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0643Management of files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0662Virtualisation aspects
    • G06F3/0667Virtualisation aspects at data level, e.g. file, record or object virtualisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]

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)

Abstract

本发明涉及一种分布式存储系统,由Master模块,Client模块,BlockNode模块,Zookeeper cluster模块组成。Master模块是系统的核心模块,主要负责用户业务逻辑处理,存储资源管理调度,数据多备管理控制等等。Client模块主要负责在宿主机上对存储模块的管理操作。BlockNode模块主要负责对存储介质的管理。系统架构在文件系统之上,借助文件为存储介质。BlockNode模块实现对存储服务器上的存储空间管理,Zookeeper cluster模块主要负责整个系统集群信息一致性同步。整个系统实现了对存储的虚拟化管理,提供了可靠,高效,灵活的数据存储和数据访问,满足了用户对存储的需求。

Description

一种分布式存储系统
技术领域
本发明涉及一种计算机存储系统,尤其涉及一种分布式存储系统。
背景技术
随着计算机技术发展,特别是云概念的提出,计算机物理存储方式和存储容量,以及存储的访问方式都发生了巨大变化,原有的存储系统已经不能,所以提出了分布式存储系统实现(EBS)概念。分布式存储系统需要在提供海量存储空间的同时,实现数据的多备存储,提升数据可靠性。同时,分布式存储系统需要提供高IO性能来应对多租户同时读写的性能保障。分布式存储系统拥有独立的生命周期,提供灵活的挂载方式,使数据可以在不同虚拟主机间进行切换访问。
发明内容
针对上述问题,本发明涉及一种分布式存储系统,由Master模块,Client模块,BlockNode模块,Zookeeper cluster模块组成。Master模块是系统的核心模块,主要负责用户业务逻辑处理,存储资源管理调度,数据多备管理控制等等。Client模块主要负责在宿主机上对存储模块的管理操作,包括存储设备的挂载,卸载,存储设备和物理设备的映射等等,同时提供数据通道的功能,用户对数据的访问通过网络传输到Client模块,在通过Client模块实现对具体设备的读写,实现存储访问的虚拟化。BlockNode模块主要负责对存储介质的管理。系统架构在文件系统之上,借助文件为存储介质。BlockNode模块实现对存储服务器上的存储空间管理,将存储空间通过文件的形式进行划分,用户数据通过调度存储在文件上,实现存储的虚拟化。Zookeeper cluster模块主要负责整个系统集群信息一致性同步。
包括BlockNode模块数据文件的创建:创建BlockNode模块的节点,BlockNode模块节点在初始化的同时在硬盘创建大于一个以1G为单位的文件。文件的文件名以数字为编号,从1开始直到n结束;在每块硬盘上创建一个bitmap文件,文件名为volume.bm,bitmap文件数据的前8个字节记录BlockNode模块的空间大小,后面的n个位用来标志这些创建的文件是否被使用;Bitmap文件保存在各个硬盘的根目录下。
包括卷标的元数据的管理:为每个卷标创建一个元数据文件,以blockID.vol命名,记录卷标的版本号和其对应的文件。在卷标创建分配块时,通过查询bitmap位图,来查找没有使用的文件;卷标对应的文件分散在不同的硬盘。
卷标(volume)的元数据文件保存在/root/BlockNode模块/目录下,bitmap文件分别保存在各自硬盘的根目录,所述BlockNode模块启动时读取所述元数据文件,然后在内存中组织这些数据。
包括Queue数据存储到硬盘的格式:Queue的数据结构分两种类型:volumeID.jou存储描述Queue的结构体,volume.jdata存储块的数据。每n个Queue项目存一对这样类型的文件,以自然数序列作为后缀名。
当内存不足时所述Queue写入硬盘,并在所述Queue的header里将在所述硬盘中的Queue的数目修改,写入所述硬盘的更新序列按序列号从小到大进行排列。
当发送线程被唤醒后,根据Queue in disk字段是否为零,判断是否需要从硬盘中读取Queue项目项。在当前的发送的Queue的更新序列号大于硬盘上保存的某一文件的Queue项目序列号的时候,将此volumeID.joun和volumeID.jdatan删除并释放磁盘空间。
还包括BlockNode模块节点和用户Client模块端的读命令和写命令交互;BlockNode模块节点和Master模块node之间的命令交互;BlockNode模块之间的操作。
本发明技术方案实现的有益效果:
整个系统实现了对存储的虚拟化管理,提供了可靠,高效,灵活的数据存储和数据访问,满足了用户对存储的需求。
附图说明
图1是本发明一种分布式存储系统的架构图。
具体实施方式
下面结合附图和具体实施例,进一步阐述本发明,本发明实施例仅用以说明本发明的技术方案而非限制本发明的保护范围。
如图1,本发明涉及一种分布式存储系统,由Master模块,Client模块,BlockNode模块,Zookeeper cluster模块组成。Master模块是系统的核心模块,主要负责用户业务逻辑处理,存储资源管理调度,数据多备管理控制等等。Client模块主要负责在宿主机上对存储模块的管理操作,包括存储设备的挂载,卸载,存储设备和物理设备的映射等等,同时提供数据通道的功能,用户对数据的访问通过网络传输到Client模块,在通过Client模块实现对具体设备的读写,实现存储访问的虚拟化。BlockNode模块主要负责对存储介质的管理。系统架构在文件系统之上,借助文件为存储介质。BlockNode模块实现对存储服务器上的存储空间管理,将存储空间通过文件的形式进行划分,用户数据通过调度存储在文件上,实现存储的虚拟化。Zookeeper cluster模块主要负责整个系统集群信息一致性同步。
包括BlockNode模块数据文件的创建:创建BlockNode模块的节点,BlockNode模块节点在初始化的同时在硬盘创建大于一个以10G为单位的文件。文件的文件名以数字为编号,从1开始直到n结束;在每块硬盘上创建一个bitmap文件,文件名为volume.bm,bitmap文件数据的前8个字节记录BlockNode模块的空间大小,后面的n个位用来标志这些创建的文件是否被使用;Bitmap文件保存在各个硬盘的根目录下。
包括卷标的元数据的管理:为每个卷标创建一个元数据文件,以blockID.vol命名,以记录这个卷标的版本号和其对应的文件。在卷标创建分配块时,通过查询bitmap位图,来查找没有使用的文件,同时应尽量使得此卷标对应的文件分散到不同的硬盘,从而保证读写的并发性,为以后优化工作作好准备。这个元数据文件在disk上按如下格式组织:
Figure BDA0001523893000000041
卷标的元数据文件保存在/root/BlockNode模块/目录下,bitmap文件则分别保存在各自硬盘的根目录,BlockNode模块启动时读取这些元数据文件,然后在内存中组织这些数据。具体的数据结构和各个字段的含义见后面的结构体,可根据volumeID组织一个hash表来加快查找。
包括Queue数据存储到硬盘的格式:Queue的数据结构分两种类型:volumeID.jou存储描述Queue的结构体,volume.jdata存储块的数据。每n个Queue项目存一对这样类型的文件,以自然数序列作为后缀名。
当内存不足时所述Queue写入硬盘,并在所述Queue的header里将在所述硬盘中的Queue的数目修改,写入所述硬盘的更新序列按序列号从小到大进行排列。
当发送线程被唤醒后,根据Queue in disk字段是否为零,判断是否需要从硬盘中读取Queue项目项。在当前的发送的Queue的更新序列号大于硬盘上保存的某一文件的Queue项目序列号的时候,将此volumeID.joun和volumeID.jdatan删除并释放磁盘空间。
还包括BlockNode模块节点和用户Client模块端的读命令和写命令交互;BlockNode模块节点和Master模块node之间的命令交互,包括:分配空间的命令、删除空间的命令、确认主从副本的命令、Detach的命令处理、Sync命令上行汇报命令;BlockNode模块之间的操作:获取副本版本号、更新数据命令、Detach时主从通信、Copy快照。

Claims (6)

1.一种分布式存储系统,其特征在于由Master模块,Client模块,BlockNode模块,Zookeeper cluster模块组成;
所述Master模块负责用户业务逻辑处理,存储资源管理调度,数据多备管理控制;
所述Client模块负责在宿主机上对存储模块的管理操作,包括存储设备的挂载,卸载,存储设备和物理设备的映射,同时提供数据通道;用户对数据的访问通过网络传输到所述Client模块,再通过所述Client模块实现对具体设备的读写;
所述BlockNode模块负责对存储介质的管理,所述BlockNode模块实现对存储服务器上的存储空间管理,将所述存储空间通过文件的形式进行划分,用户数据通过调度存储在文件上;
所述Zookeeper cluster模块负责整个系统集群信息一致性同步;以及
卷标的元数据管理:为每个所述卷标创建一个元数据文件,以blockID.vol命名,记录所述卷标的版本号和其对应的文件;在所述卷标创建分配块时,通过查询bitmap位图,来查找没有使用的文件;所述卷标对应的文件分散在不同的硬盘;
所述卷标的元数据文件保存在/root/BlockNode模块/目录下,bitmap文件分别保存在各自硬盘的根目录,所述BlockNode模块启动时读取所述元数据文件,然后在内存中组织所述数据。
2.根据权利要求1所述的分布式存储系统,其特征在于包括所述BlockNode模块数据文件的创建:创建所述BlockNode模块的节点,所述BlockNode模块节点在初始化的同时在硬盘创建大于一个以1G为单位的文件;所述文件的文件名以数字为编号,从1开始直到n结束;
在每块硬盘上创建一个bitmap文件,文件名为volume.bm,所述bitmap文件数据的前8个字节记录所述BlockNode模块的空间大小,后面的n个位用来标志这些创建的文件是否被使用;所述bitmap文件保存在各个硬盘的根目录下。
3.根据权利要求1所述的分布式存储系统,其特征在于包括Queue数据存储到硬盘的格式:所述Queue的数据结构分两种类型:volumeID.jou存储描述所述Queue的结构体,volume.jdata存储块的数据;每n个Queue项目存一对这样类型的文件,以自然数序列作为后缀名。
4.根据权利要求3所述的分布式存储系统,其特征在于当内存不足时所述Queue写入硬盘,并在所述Queue的header里将在所述硬盘中的Queue的数目修改,写入所述硬盘的更新序列按序列号从小到大进行排列。
5.根据权利要求3所述的分布式存储系统,其特征在于当发送线程被唤醒后,根据Queue in disk字段是否为零,判断是否需要从硬盘中读取Queue项目项;在当前的发送的Queue的更新序列号大于硬盘上保存的文件的Queue项目序列号时,将volumeID.joun和volumeID.jdatan删除并释放磁盘空间。
6.根据权利要求1所述的分布式存储系统,其特征在于包括所述BlockNode模块节点和用户Client模块端的读命令和写命令交互;所述BlockNode模块节点和所述Master模块node之间的命令交互;所述BlockNode模块之间的操作。
CN201711426419.3A 2017-12-25 2017-12-25 一种分布式存储系统 Active CN109960460B (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711426419.3A CN109960460B (zh) 2017-12-25 2017-12-25 一种分布式存储系统

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711426419.3A CN109960460B (zh) 2017-12-25 2017-12-25 一种分布式存储系统

Publications (2)

Publication Number Publication Date
CN109960460A CN109960460A (zh) 2019-07-02
CN109960460B true CN109960460B (zh) 2022-02-25

Family

ID=67021521

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711426419.3A Active CN109960460B (zh) 2017-12-25 2017-12-25 一种分布式存储系统

Country Status (1)

Country Link
CN (1) CN109960460B (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111142644A (zh) * 2019-12-31 2020-05-12 苏州浪潮智能科技有限公司 一种硬盘运行控制方法、装置及相关组件

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103180852A (zh) * 2012-08-09 2013-06-26 华为技术有限公司 分布式数据处理方法及装置
CN103905537A (zh) * 2014-03-20 2014-07-02 冶金自动化研究设计院 分布式环境下管理工业实时数据存储的系统

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE60131900T2 (de) * 2000-10-26 2008-12-04 Flood, James C. jun., Portland Verfahren und system zur verwaltung von verteilten inhalten und verwandten metadaten
US7409494B2 (en) * 2004-04-30 2008-08-05 Network Appliance, Inc. Extension of write anywhere file system layout
US8725986B1 (en) * 2008-04-18 2014-05-13 Netapp, Inc. System and method for volume block number to disk block number mapping

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103180852A (zh) * 2012-08-09 2013-06-26 华为技术有限公司 分布式数据处理方法及装置
CN103905537A (zh) * 2014-03-20 2014-07-02 冶金自动化研究设计院 分布式环境下管理工业实时数据存储的系统

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
MapReduce环境中基于列存储的一种高效的星型连接方法;祝海通;《中国优秀博硕士学位论文全文数据库(硕士)信息科技辑》;20130315;全文 *
PaceMaker: When ZooKeeper Arteries Get Clogged in Storm Clusters;Sanket Chintapalli;《 2016 IEEE 9th International Conference on Cloud Computing (CLOUD)》;20170119;全文 *

Also Published As

Publication number Publication date
CN109960460A (zh) 2019-07-02

Similar Documents

Publication Publication Date Title
US7849282B2 (en) Filesystem building method
CN101997918B (zh) 异构san环境中的海量存储资源按需分配的实现方法
AU2013403132B2 (en) Data storage method, data storage apparatus, and storage device
CN102467408B (zh) 一种虚拟机数据的访问方法和设备
US10725666B2 (en) Memory-based on-demand data page generation
US20060047926A1 (en) Managing multiple snapshot copies of data
EP2534571B1 (en) Method and system for dynamically replicating data within a distributed storage system
CN103514249A (zh) 一种数据自精简方法和系统及存储装置
CN111881107B (zh) 支持多文件系统挂载的分布式存储方法
US20190199794A1 (en) Efficient replication of changes to a byte-addressable persistent memory over a network
CN103501319A (zh) 一种低延迟的面向小文件的分布式存储系统
US8984011B1 (en) Page object caching for variably sized access control lists in data storage systems
US8386741B2 (en) Method and apparatus for optimizing data allocation
CN103473258A (zh) 云存储文件系统
WO2001042985A2 (en) Sharing data between operating systems
CN114564339A (zh) 一种磁盘镜像文件跨平台迁移方法及系统
CN111435286B (zh) 一种数据存储方法、装置和系统
CN109960460B (zh) 一种分布式存储系统
US20210103400A1 (en) Storage system and data migration method
US8918621B1 (en) Block address isolation for file systems
EP3367259B1 (en) Method and device for reading and writing video data in nas device
US11586353B2 (en) Optimized access to high-speed storage device
US5802557A (en) System and method for caching information in a digital data storage subsystem
CN114490540A (zh) 数据存储方法、介质、装置和计算设备
CN109343928B (zh) 虚拟化集群中虚拟机的虚拟内存文件重定向方法及其系统

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A Distributed Storage System

Effective date of registration: 20230703

Granted publication date: 20220225

Pledgee: Bank of Jiangsu Co.,Ltd. Shanghai Nanhui sub branch

Pledgor: SHANGHAI SHENGXIAO CLOUD COMPUTING TECHNOLOGY Co.,Ltd.

Registration number: Y2023310000339