Skip to content

feat(storcli2): logical volume create and delete#69

Open
g-carre wants to merge 3 commits into
improvement/storcli2-cache-jbod-setterfrom
feature/storcli2-lv-manager-create-delete
Open

feat(storcli2): logical volume create and delete#69
g-carre wants to merge 3 commits into
improvement/storcli2-cache-jbod-setterfrom
feature/storcli2-lv-manager-create-delete

Conversation

@g-carre

@g-carre g-carre commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Implements the create/delete part of ports.LogicalVolumesManager on the storcli2/perccli2 logical-volume manager (ARTESCA-17647).

  • CreateLV — fills the request drives through the physical-drive getter, validates the RAID creation, formats a single-enclosure drives=e:s,... list (rejecting multi-enclosure requests), issues add vd with the bare RAID-level and cache tokens, and rediscovers the new volume by its physical-drive set.
  • DeleteLV — issues /cx/vx delete and surfaces the in-JSON failure payload.
  • The manager now also takes a PhysicalDrivesGetter; command verbs follow the storcli2 command map documented in DESIGN.md.

Testing

go build, go vet, gofmt, and the package test suite pass. New tests cover the create happy path, command-failure, multi-enclosure rejection, and a table-driven delete (success / invalid VD / nonexistent VD).

Note: This PR targets improvement/storcli2-cache-jbod-setter (its base), not main.

Issue: ARTESCA-17647

🤖 Generated with Claude Code

g-carre and others added 3 commits June 16, 2026 17:05
Implement the storcli2/perccli2 write path for ARTESCA-17649:

- SetLVCacheOptions on the logicalvolumemanager StorCLI2: diffs current vs
  desired and emits only the changed rdcache/wrcache flags as separate "set"
  commands (storcli2 rejects the combined syntax and dropped the IO policy).
- EnableJBOD / DisableJBOD on the physicaldrivegetter StorCLI2 via
  "set jbod" / "set uconf" (storcli's "delete jbod" no longer parses).

Both surface in-JSON failures through storcli2.Decode regardless of exit code.
Widen the shared envelope's DetailedStatus.ErrCd to "any": storcli2 reports it
as an int on failure and the string "-" on success, mirroring PID/VD.

Issue: ARTESCA-17649

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Implement the create/delete part of ports.LogicalVolumesManager on the
storcli2/perccli2 logical-volume manager:

- CreateLV fills the request drives through the physical-drive getter,
  validates the RAID creation, formats a single-enclosure "drives=e:s,..."
  list (rejecting multi-enclosure requests), issues "add vd" with the bare
  RAID-level and cache tokens, and rediscovers the new volume by its
  physical-drive set.
- DeleteLV issues "/cx/vx delete" and surfaces the in-JSON failure payload.

The manager now also takes a PhysicalDrivesGetter; command verbs follow the
storcli2 command map documented in DESIGN.md.

Issue: ARTESCA-17647
@g-carre g-carre requested a review from a team as a code owner June 25, 2026 09:11
@g-carre g-carre force-pushed the improvement/storcli2-cache-jbod-setter branch from 185c909 to b218449 Compare June 30, 2026 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant