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

[feature] support SPDK #136

Closed
caiwenzh opened this issue May 17, 2022 · 6 comments
Closed

[feature] support SPDK #136

caiwenzh opened this issue May 17, 2022 · 6 comments

Comments

@caiwenzh
Copy link
Contributor

caiwenzh commented May 17, 2022

Why you need it?

vhost-user-blk/scsi. is a high efficient way to transport data for virtual environments. Open-local currently doesn't support vhost-user-blk/scsi.

How it could be?

The Storage Performance Development Kit (SPDK) can provide vhost support. To support vhost-user-blk/scsi in open-local node CSI driver should communicate with SPDK. Following is a brief description :

.  NodeStageVolume / NodeUnStageVolume
    n/a
.  NodePublishVolume
    -  Create bdev
        # scripts/rpc.py bdev_aio_create <path_to_host_block_dev> <bdev_name>
        # scripts/rpc.py bdev_lvol_create_lvstore <bdev_name> <lvs_name >
        # scripts/rpc.py bdev_lvol_create  <lvol_name> <size> -l <lvs_name>
    -  Create vhost device
        # scripts/rpc.py vhost_create_blk_controller --cpumask 0x1 vhostblk0 <bdev_name>
        # mknod /var/run/kata-containers/vhost-user/block/devices/vhostblk0 b 241 0
        # mount --bind [...] /var/run/kata-containers/vhost-user/block/devices/vhostblk0 <target_path>
.  NodeUnPublishVolume
       # umount <target_path>
       # scripts/rpc.py bdev_lvol_delete  <lvol_name>
       # rm /var/run/kata-containers/vhost-user/block/devices/vhostblk0

besides, we need add a field in nlsc and nls to indicate if the storage is provided by SPDK.

image

Other related information

@caiwenzh caiwenzh changed the title support SPDK [feature] support SPDK May 23, 2022
@jiangliu
Copy link

It's a great idea to enable spdk for vm based container runtimes. BTW, does it work for native runC container runtime?

@caiwenzh
Copy link
Contributor Author

It's a great idea to enable spdk for vm based container runtimes. BTW, does it work for native runC container runtime?
No. we only introduce SPDK vhost currently, so it doesn't support runC.

@caiwenzh
Copy link
Contributor Author

SPDK also support network storage (iSCSI and NVME-oF). Need it to be supported?

@jiangliu
Copy link

SPDK also support network storage (iSCSI and NVME-oF). Need it to be supported?

NVME-OF is great,especially with ns support. We could do much things funny with NVME ns.

@jiangliu
Copy link

It's a great idea to enable spdk for vm based container runtimes. BTW, does it work for native runC container runtime?
No. we only introduce SPDK vhost currently, so it doesn't support runC.

Thanks for explanation, that makes sense.

@TheBeatles1994
Copy link
Collaborator

fixed by #153

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

No branches or pull requests

3 participants