dop251 / buse

Linux userspace virtual block device in Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Linux userspace virtual block device in Go

The idea is similar to FUSE but works for block devices. It uses nbd over a unix socket.

Usage scenario

package main

import (
    "github.com/dop251/buse"
    "github.com/dop251/nbd"
)

// Implement your custom driver as nbd.Driver.
var driver nbd.Driver = ....

dev := buse.NewDevice("/dev/nbd0", size, driver)
dev.Run()
// The device will become available as /dev/nbd0

About

Linux userspace virtual block device in Go

License:MIT License


Languages

Language:Go 100.0%