https://github.com/nak3/go-lvm
WIP: go-lvm is a go library to call liblvm API based on python-lvm
https://github.com/nak3/go-lvm
golang library lvm storage
Last synced: about 1 year ago
JSON representation
WIP: go-lvm is a go library to call liblvm API based on python-lvm
- Host: GitHub
- URL: https://github.com/nak3/go-lvm
- Owner: nak3
- Created: 2017-10-02T03:55:33.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-10-11T12:41:26.000Z (over 8 years ago)
- Last Synced: 2025-03-25T01:43:31.671Z (over 1 year ago)
- Topics: golang, library, lvm, storage
- Language: Go
- Homepage: https://godoc.org/github.com/nak3/go-lvm
- Size: 32.2 KB
- Stars: 21
- Watchers: 2
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
go-lvm
=======================================================================
[](https://godoc.org/github.com/nak3/go-lvm)
[](https://travis-ci.org/nak3/go-lvm)
[](https://goreportcard.com/report/github.com/nak3/go-lvm)
### Overview
go-lvm is a go library to call liblvm API based on python-lvm developed in [LVM2](https://sourceware.org/lvm2/).
### Usage
Please refer to [go-doc](https://godoc.org/github.com/nak3/go-lvm#example-LvObject--Createremove).
### Test run
Let's create a available volume group and create and delete a LV.
#### step-1. set up a free VG
~~~
sudo dd if=/dev/zero of=disk.img bs=1G count=1
export LOOP=`sudo losetup -f`
sudo losetup $LOOP disk.img
sudo vgcreate vg-targetd $LOOP
~~~
#### step-2. Run an example script
~~~
go run cmd/example.go
~~~