Curve文件系统空间分配方案Curve文件系统空间分配方案(基于块的方案,已实现) - 背景 - 本地文件系统空间分配相关特性 - 局部性 - 延迟分配/Allocate-on-flush - Inline file/data - 空间分配 - 整体设计 - 空间分配流程 - 特殊情况 - 空间回收 - 小文件处理 - 并发问题 - 文件系统扩容 - 接口设计 接口设计 - RPC接口 - 空间分配器接口 ## 背景 根据CurveFS方案设计(总体设计,只实现了部分),文件系统基于当前的块进行实现,所以需要设计基于块的空间分配器,用于分配并存储文件数据。 ## 本地文件系统空间分配相关特性 局部性 尽量分配连续的磁盘空间,存储文件的数据。这一特性主要是针对HDD进行的优化,降低磁盘寻道时间。 延迟分配/Allocate-on-flush 几百字节的小文件不单独分配磁盘空间,直接把数据存放到文件的元数据中。 针对上述的本地文件系统特性,Curve文件系统分配需要着重考虑局部性。 虽然Curve是一个分布式文件系统,但是单个文件系统的容量可能会比较大,如果在空间分配时,不考虑局部性,inode中记录的extent数量很多,导致文件系统元数据量很大。 假如文件系统大小为1PiB,空间分配粒度为1MiB,inode中存储的extent为三元组0 码力 | 11 页 | 159.17 KB | 1 年前3
Curve文件系统元数据管理Curve文件系统元数据管理(已实现) Inode 1、设计一个分布式文件系统需要考虑的点: • 2、其他文件系统的调研总结 • 3、各内存结构体 • 4、curve文件系统的元数据内存组织 • 4.1 inode定义: • 4.2 dentry的定义: • 4.3 内存组织 5元数据分片 • 5.1 分片方式一:inode和dentry都按照parentid分片 5.1 /B/E,指向文件/A/C • 6、curve文件系统的多文件系统的设计 ## 1、 设计一个分布式文件系统需要考虑的点: 1. 文件系统的元数据是否全缓存? 2. 元数据持久化在单独的元数据服务器上?在磁盘上?在volume上? 3. inode+dentry方式?当前curve块存储的kv方式? 4. 是否有单独的元数据管理服务器? ## 2、 其他文件系统的调研总结 |fs|中心化元数据|内存 hash扩展时大量迁移|client缓存inode→ has table (gfid)dentry→ has table (name)|inode扩展属性字段|和写数据一样|好|||写多份|overwrite 有数据不一致风险| |curve|有元数据服务器|lru cache缓存kv → has table (key parent inode + name)|segmentkv → has table (key inode + offset)|etcd|差|块设备0 码力 | 24 页 | 204.67 KB | 1 年前3
Curve文件系统元数据Proto(接口定义)curve文件系统元数据proto(代码接口定义,已实现) ## 1、 代码结构和代码目录 curve文件系统是相对于curve块设备比较独立的一块,在当前curve项目的目录下,增加一个一级目录curvefs,curvefs下有自己独立的proto\src\test。  ## 2、 文件系统proto定义 #### 2.1 mds.proto mds.proto /* * Copyright (c) 2020 NetEase Inc. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use0 码力 | 15 页 | 80.33 KB | 1 年前3
Curve文件系统元数据持久化方案设计0 码力 | 12 页 | 384.47 KB | 1 年前3
Curve Cloud Native## Curve integrate to Cloud Native ## Curve intro - Curve is an distributed storage system • High performance • Easiser operation • Cloud native • Curve is composed of two parts • Curve Block Storage storage • Curve File System (CurveFS) • CurveFS: a high performance cloud native file system (Based on CurveBS / S3 compatible Storage) ## Operator capability Level |OPERATOR CAPABILITY LEVEL|CURVE|COMMENT| uninstall/ upgrade and configure CurveBS/CurveFS through helm chart • upgrade automation • Supporting Curve Cluster provisioning in helm chart • metadata backup and recovery • MDS / ChunkServer should respect0 码力 | 9 页 | 2.85 MB | 1 年前3
Curve for CNCF Main## Curve ## Curve High performance Cloud native Distributed storage system https://www.opencurve.io/ ## Agenda • What is Curve • Use Cases • CurveBS • Key Features • Comparing to Ceph • CurveFS Roadmap ## What is Curve - Curve is an distributed storage system • Components - Curve Block Storage (CurveBS) - CurveBS: a high performance cloud native distributed block storage • Curve File System (CurveFS) file system - kubernetes Host / VM ↓ CSI / Storage Class NBD Curve Block API SSD three copies CurveBS HDD / HDD EC Curve Block API APPs  Application POD PVC Application POD PVC Application POD PVC PVC PV PV PV PV Curve Operator Curve CSI/Driver Curve Discover 












