Skip to content
This repository has been archived by the owner on Mar 26, 2020. It is now read-only.

WIP: Intelligent Volume provisioning #513

Closed
wants to merge 3 commits into from

Conversation

rishubhjain
Copy link
Contributor

Issue:#466

  • Refactoring rtalur's code to match present code structure

TODO:

  1. Requires proper directory structure and proper naming schema
  2. Modification in brick allocation algorithm


//if (len(req.Bricks) <= 0) && (req.Size > 0) {
if req.Size > 0 {
replacer := strings.NewReplacer("export", "testexport")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this piece of code meant for?

Bricks []string `json:"bricks,omitempty"`
Force bool `json:"force,omitempty"`
Options map[string]string `json:"options,omitempty"`
Size int `json:"size,omitempty"`

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this field represent the targetted size of volume like say 30GB or something?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, instead of mentioning the bricks we can directly provide size and then the bricks will be allocated.

}


cmd1 := exec.Command("pvcreate", "--metadatasize=128M", "--dataalignment=256K", "/dev/"+deviceinfo.DeviceName)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is pvcreate and vgcreate enough for making the device ready for brick usage?
We should create LV post this and using mkfs.xfs create a proper filesyatem. Finally mount the LV in some path to be used a bricks for the volumes.


func txnHeketiCreateBrick(c transaction.TxnCtx) error {

return nil

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This patch looks incomplete. Correct ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I am still working on it

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants