Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/samalba/buse-go
A block device in user space for Linux in Golang
https://github.com/samalba/buse-go
blockdevice golang linux nbd
Last synced: 8 days ago
JSON representation
A block device in user space for Linux in Golang
- Host: GitHub
- URL: https://github.com/samalba/buse-go
- Owner: samalba
- License: mit
- Created: 2016-12-29T01:54:18.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-10-01T00:03:03.000Z (about 7 years ago)
- Last Synced: 2024-02-14T22:33:16.261Z (9 months ago)
- Topics: blockdevice, golang, linux, nbd
- Language: Go
- Homepage:
- Size: 44.9 KB
- Stars: 52
- Watchers: 4
- Forks: 13
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-discoveries - buse-go - Linux block device in user space _(`Go`)_ (CLI Utilities)
README
# Linux block device in user space in Golang
## How to use it
Checkout the file driver_example.go for a simple in-memory block device.
Here is how to test, open a terminal:
```
go build
sudo modprobe nbd
sudo ./buse-go /dev/nbd0
```And in another terminal:
```
mkfs.ext4 /dev/nbd0
mkdir /mnt/test
mount /dev/nbd0 /mnt/test
echo it works > /mnt/test/foo
```You can check out the logs in the first terminal...
## How does it work?
It uses NBD (Network Block Device) behind the scene. A NBD server and client is automatically setup on the same machine. This project has been inspired by [BUSE in C](https://github.com/acozzette/BUSE).