Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/meln1k/foundationdb-block-device
Replicated Block Device backed by FoundationDB
https://github.com/meln1k/foundationdb-block-device
blockdevice foundationdb software-defined-storage storage
Last synced: about 2 months ago
JSON representation
Replicated Block Device backed by FoundationDB
- Host: GitHub
- URL: https://github.com/meln1k/foundationdb-block-device
- Owner: meln1k
- License: apache-2.0
- Created: 2019-01-26T16:40:38.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-12-16T15:39:57.000Z (about 3 years ago)
- Last Synced: 2024-10-15T23:09:10.406Z (2 months ago)
- Topics: blockdevice, foundationdb, software-defined-storage, storage
- Language: Go
- Homepage:
- Size: 133 KB
- Stars: 38
- Watchers: 5
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-foundationdb - FoundationDB Block Device
README
# FoundationDB Block Device
Replicated Block Device backed by FoundationDB## What is this
This is an implementation of a block device in userspace which uses FoundationDB as a backend.
It provides a replicated block device for non-replicated workloads so they
can benefit from transparent block-level replication and enhanced fault tolerance.Inspired by [spullara/nbd](https://github.com/spullara/nbd)
## Is it fast?
I did a small benchmark using a FoundationDB cluster of 2 nodes (linux running on macbooks with SSDs,
not tuned for FDB at all).
FIO benchmark on 1GB file resulted in 10K random read/write IOPS in 4KB blocks and the latency was below 10ms (direct io was used).
While doing sequential reads it was able to saturate 1Gbit network link.Postrgres running in virtualbox showed 900 TPS on TPC-B pgbench workload with a database of size 1g.
## How does it work with concurrent volume mounts?
Currently there is a mechanism which relies on lease tokens and fdb transactions to transactionally
transfer ownership to the new client and discard any in-flight write requests from the old one.## Current status
It's an early version. There are several important featues which are not implemented yet
(such as IOPS limits and volume size estimation) but it works and it's relatively fast!## How to use
Commands are documented in the CLI:
```
$ ./fdbbd --help
NAME:
fdbbd - block device using FoundationDB as a backend.
Our motto: still more performant and reliable than EBSUSAGE:
fdbbd [global options] command [command options] [arguments...]VERSION:
0.1.0COMMANDS:
create Create a new volume
list List all volumes
attach Attach the volume
delete Delete the volume
help, h Shows a list of commands or help for one commandGLOBAL OPTIONS:
--help, -h show help
--version, -v print the version
```## Getting started
1. Set up a FoundationDB cluster.
2. Build the driver:
```sh
sh build.sh
```
3. Create a new volume:
```sh
$ ./fdbbd create --size 1GB myvolume
```
4. If `nbd` kernel module is not loaded, load it:
```sh
$ sudo modprobe nbd
```
5. Attach the volume to the system:
```sh
sudo ./fdbbd attach --bpt 4 myvolume /dev/nbd0
```
6. Create a directory to mount the volume:
```sh
mkdir nbdmount
```
7. Create a file system on your block device. XFS is a good option:
```sh
sudo mkfs.xfs /dev/nbd0
```
8. Mount the attached volume:
```sh
sudo mount /dev/nbd0 nbdmount/
```
9. Done! You have a replicated volume!## What's inside
This project uses Network Block Device kernel module underneath. A unix pipe is used to talk to a kernel,
and then driver translates NBD protocol into FoundationDB calls.## Roadmap
There are a few features planned in future releases, ordered by importance:1. Bulk insert support via batch transactions
2. IOPS isolation
3. CSI implementation
4. Snapshots
5. Volume size estimation (using roaring bitmaps or similar)
6. Client-side encryption
7. Control panel