Skip to content

[curve tool]: implement create volume command #2031

Closed
@cw123

Description

@cw123

Describe the feature you'd like:

we'd like to support create command in curve tool

create is one of the commands to create one volume.

  • The implementation of the old tool is here:

https://github.com/opencurve/curve/blob/master/src/tools/namespace_tool_core.cpp#L63

  • The old command input and out put:
create : create file, file length unit is GB

$ curve_ops_tool create --example
Example:
curve_ops_tool create -mdsAddr=127.0.0.1:6666 -fileName=/test -userName=test -password=123 -fileLength=20‬

  • The new command we want:
curve bs create --filename /curvebs-file-name --username username --filelength the_length_num_of_volume [--password password] 

If command sucess, print success.
If command failed, print failed, and the fail reason.

Teachability, Documentation, Adoption, Migration Strategy:

Refer to tool develop guide to get start, and paste the result of the command in pr.

Build compilation environment:https://github.com/opencurve/curve/blob/master/docs/cn/build_and_run.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions