Skip to content
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

[Curveadm] Specify blocksize when mounting the curvebs volume by target #150

Closed
cw123 opened this issue Nov 4, 2022 · 1 comment
Closed
Assignees
Labels
good first issue Good for newcomers

Comments

@cw123
Copy link

cw123 commented Nov 4, 2022

When using curveadm to mount the curvebs volume by target, add a parameter to specify the default block size of the volume.

blocksize can be specified by the --blocksize parameter when adding luns to tgtadm.

使用curveadm通过target的方式挂载curvebs 卷的时候,添加一个参数,可以指定卷默认的block size。

blocksize可以在tgtadm 添加lun的时候,通过--blocksize 参数指定。

The corresponding code is in curveadm:

对应的代码在curveadm的:

https://github.com/opencurve/curveadm/blob/master/internal/task/scripts/target.go。

for example:

举个例子:

tgtadm --lld iscsi \
     --tid ${g_tid} \
     --lun 1 \
     --bstype curve \
    --backing-store ${g_image} \
    --blocksize 4096   # add blocksize here

Require:

  1. The blocksize is consistent with the global.alignment.commonVolume of client.conf. curveadm reads the global.alignment.commonVolume field of client.conf and sets blocksize.
  2. Perform a simple check on this field, which must be an integer multiple of 512.

要求:

  1. blocksize 和client.conf的 global.alignment.commonVolume 保持一致。curveadm读取client.conf的global.alignment.commonVolume字段,设置blocksize。
  2. 对这个字段进行简单校验,必须为512的整数倍。
@mfordjody
Copy link
Contributor

mfordjody commented Nov 16, 2022

assign me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants