A library written in go to manipulate a harddrive. I added also a wrapper to create luks or lvm container. You cann create a lvm container in a luks Encrypted container or visa versa.
- go get github.com/FloydZ/hddgo
- go get github.com/pivotal-golang/bytefmt
- go get github.com/c9s/goprocinfo/linux
- go get github.com/op/go-logging
You´ll find some examples in hddmain
- Harddrive{}
- Partition{}
- LUKS{}
- PhysicalVolume{}
- VolumeGroup{}
- LogicalVolume{}
- You can create Cachepool
- You can move Physical Volumes
- You can create Snapshots
- You can create Filesystem with parted
- Create a Partition: (h *Harddrive) CreateNewPartition(size string) (Partition, error)
- Create a LUKS: (p *Partition) CreateLuksContainer(pwfile string) (LUKS, error)
- Create a PhysicalVolume: (p *Partition) CreateNewPhysicalVolume()(error)
- Create a VolumeGroup: (p *PhysicalVolume) CreateVolumeGroup(name string) (error)
- Create a LogicalVolume: (v *VolumeGroup) CreateLogicalVolume(name string, size string) (error)