feat: add S3-compatible object storage backend - #131
Merged
Merged
Conversation
Add a new backend store that enables iSCSI targets backed by S3-compatible object storage (AWS S3, MinIO, Ceph RGW, etc.). The implementation uses a chunked storage strategy where the virtual block device is divided into fixed-size chunks (default 4 MiB), each stored as an independent S3 object. This enables efficient random read/write access on top of object storage. Key features: - Chunked storage with configurable chunk size - Sparse device support (unwritten chunks treated as zeros) - Concurrent multi-chunk I/O via errgroup - Per-chunk locking for safe read-modify-write - AWS SDK v2 with default credential chain - In-process gofakes3 test server (no Docker needed) - 12 unit tests + 2 integration tests Also updates CI workflow to run S3 backend tests and updates README with S3 backend documentation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
New files:
pkg/scsi/backingstore/s3store/s3store.go- Core S3 backend implementationpkg/scsi/backingstore/s3store/s3store_test.go- 12 unit tests with in-memory fake S3 clientpkg/scsi/backingstore/s3store/integration_test.go- 2 integration tests using gofakes3examples/config-s3.json- Example S3 backend configurationModified files:
pkg/api/types.go- AddBackendConfigfield toSCSILufor backend-specific configpkg/config/config.go- Add S3 configuration fields (endpoint, region, chunk size, etc.)pkg/scsi/lun.go- Thread config to backend, adds3to known backend typespkg/scsi/backingstore/common.go- Adds3to path parsercmd/daemon.go- Register S3 backend store.github/workflows/gotgt.yml- Add S3 backend test stepREADME.md- Document S3 backend features and configurationgo.mod/go.sum- Add AWS SDK v2 and gofakes3 dependenciesTest plan
go build ./...succeedsgofmtverification passes🤖 Generated with Claude Code