Repository navigation
Conversation
- one pool over the drives; layouts none / mirror(copies) / parity(p); backend chosen per layout - drives with roles and verbs; pool with state (as /v1/disks/raid), protection, members, verbs - plan → preview → apply: intent → plan (steps, commands, effects, disks erased, text to type); apply re-plans from a fresh look, runs only when unchanged, as a job - spec only, not wired into codegen; implemented by ReCasaNix's recasanix-storage (btrfs, md)
|
Thanks for putting this in the open as a draft, and for the matching Pool tab in CasaOS-UI#69. I have read both and the spec. A first reaction, nothing decided on our side yet. What LocalStorage does today, so we compare the same thing: md only, through mdadm, no btrfs. Where your verbs line up: Three things I would like your view on:
Since the Pool tab only appears when |
|
Thanks for the review, and sorry for the wait. Answers: 1. One pool or several →
2. RAID 10 →
3.
Your next RAID steps
|
…several backends - pools[] with id; intents name their pool; top-level verbs (create-pool) - layout.stripe: speed only (RAID 10 / RAID 0), kind stays the protection - delete-pool, restore-layout verbs; pool.problem - the spec is a contract: LocalStorage = reference implementation
Draft — proposal for discussion; implemented and tested on ReCasaNix.
api/storage/openapi.yaml: a backend-neutral storage layer API (/v2/storage), what CasaOS-UI's Pool tab (draft PR) talks to.none·mirror(copies) ·parity(p); the service picks the backend per layout (ReCasaNix: btrfs; parity → md with btrfs on top) and names itGET /v2/storage: pool (state as/v1/disks/raid, protection now, members,verbs), drives (role: system, member, free, small, foreign, busy;verbs), layouts, jobsGET /layouts?disks=: capacity / protection per layout on chosen free drivesPOST /plans(intent) → plan: steps, exact commands, effects (capacity, protection before → after, disks erased),confirmtext; 409 with the reasonPOST /plans/{id}/apply{confirm}→ re-plans from a fresh look, runs only when unchanged (409 stale), as a job; 400 wrong confirmationreplace-disk/remove-disk)