Go implementation of nvmetcli - a tool for managing NVMe Target configuration via configfs.
This is a Go port of the original Python nvmetcli project, providing the same functionality with improved performance and a single static binary.
Repository: https://github.com/Djarvur/go-nvmetcli
Note: This Go port was created with assistance from AI (Cursor AI Assistant).
-
Create and manage NVMe Target subsystems
-
Configure namespaces, ports, and hosts
-
Save and restore configuration to/from JSON files
-
Interactive shell for configuration management
-
Non-interactive commands for scripting
go install github.com/Djarvur/go-nvmetcli/cmd/nvmetcli@latestOr build from source:
git clone https://github.com/Djarvur/go-nvmetcli
cd go-nvmetcli
go build -o nvmetcli ./cmd/nvmetcli-
Go 1.21 or later
-
Linux kernel with NVMe Target support (nvmet module)
-
Root privileges (for accessing
/sys/kernel/config/nvmet)
go-nvmetcli/ ├── cmd/ │ └── nvmetcli/ # Main executable │ └── main.go ├── internal/ │ └── nvmet/ # Library code │ ├── nvme.go # Core configfs operations │ ├── subsystem.go # Subsystem management │ ├── namespace.go # Namespace management │ ├── port.go # Port management │ ├── host.go # Host management │ ├── referral.go # Referral management │ ├── shell.go # Interactive shell │ └── *_test.go # Tests └── go.mod