-
Notifications
You must be signed in to change notification settings - Fork 21
feat(raid0): io-engine proto add pool config #134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -56,6 +56,9 @@ message CreatePoolRequest { | |
| EncryptionData data = 7; | ||
| EncryptionSecret secret = 8; | ||
| } | ||
| // The pool configuration specifying raid type and configuration if number of | ||
| // disks exceeds 1. | ||
| optional RaidConfig raid_config = 9; | ||
| } | ||
|
|
||
| // Pool metadata arguments. | ||
|
|
@@ -88,6 +91,22 @@ message ImportPoolRequest { | |
| EncryptionData data = 5; | ||
| EncryptionSecret secret = 6; | ||
| } | ||
| // The pool configuration specifying raid type and configuration if number of | ||
| // disks exceeds 1. | ||
| optional RaidConfig raid_config = 7; | ||
| } | ||
|
|
||
| // Pool raid configuration | ||
| message RaidConfig { | ||
| oneof config { | ||
| Raid0Config raid0 = 1; | ||
| } | ||
| } | ||
|
|
||
| // RAID0 configuration parameters | ||
| message Raid0Config { | ||
| // Strip size in KB (default 64) | ||
| uint32 strip_size_kb = 1; | ||
| } | ||
|
|
||
| // State of the storage pool (terminology comes from ZFS). | ||
|
|
@@ -133,6 +152,8 @@ message Pool { | |
| optional bool encrypted = 13; | ||
| // Maximum capacity upto which this pool can be expanded, in bytes. | ||
| optional uint64 max_expandable_size = 14; | ||
| // Optional RAID information if the pool is configured to use a RAID setup. | ||
| optional RaidInfo raid_info = 15; | ||
| } | ||
|
|
||
| // Pool metadata info. | ||
|
|
@@ -152,6 +173,14 @@ message PoolMetadataInfo { | |
| uint64 md_used_pages = 3; | ||
| } | ||
|
|
||
| // Pool RAID information. | ||
| message RaidInfo { | ||
| // RAID level (e.g., "raid0", "raid1", "raid5"). | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. these could be enums?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, it could be an enum. Just used a 'string' here so we don't have to modify the RPC when we want to introduce other raid types. |
||
| string level = 1; | ||
| // RAID state (e.g., "online", "configuring", "offline"). | ||
| string state = 2; | ||
| } | ||
|
|
||
| // Destroy pool arguments. | ||
| message DestroyPoolRequest { | ||
| string name = 1; // name of the pool | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any advantage to using KB instead of just bytes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In SPDK you configure 'strip_size_kb'. I used to use quantity type and bytes initially, but dealing with conversions it became a little confusing at some point. So to make it easier I opted to pass the value with the unit expected in io-engine/SPDK, while using Quantity-type in the CRD and ensure I have the conversion in one single place only.