-
Notifications
You must be signed in to change notification settings - Fork 28
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
Support for ZFS zvols #36
Comments
This is an interesting request. I can see the benefit for folks that utilize ZFS. However, for this to be integrated with targetd I believe the following would need to be considered.
With all that being satisfied, I don't believe there would be any objections to adding this functionality to targetd, PR(s) welcomed. |
A good way to handle the first matter would be to simply have two options in the config file: the existing block_pools, which would always refer to LVM volumes, and a new option, zfs_datasets - referring to ZFS datasets where one could create ZFS volumes. That does raise the question of what to do if both block_pools and zfs_datasets are set, though. If one uses python's subprocess library one can interface with zfs-utils over command line, so that also deals with the second issue - and since it's in the standard library that adds no install or runtime dependencies, you'd simply have ZFS on Linux as an optional dependency for running in ZFS "mode", so to speak. |
Refers to open-iscsi#36 This adds support for using ZFS datasets as backend pools in targetd. To be compatible with current setups it adds new zfs_block_pools to config file. It allows to use ZFS alongside LVM, as well as any of them separately. It is only dependant on 'zfs' command and python standard library. Also works without it when ZFS pools are not set. Added separate Dockerfile with zfs package to also support that kind of deployment. Volume management commands were moved to different modules in backends directory, block.py now only contains iscsi code and dispatches volume management commands to proper module.
Refers to open-iscsi#36 This adds support for using ZFS datasets as backend pools in targetd. To be compatible with current setups it adds new zfs_block_pools to config file. It allows to use ZFS alongside LVM, as well as any of them separately. It is only dependant on 'zfs' command and python standard library. Also works without it when ZFS pools are not set. Added separate Dockerfile with zfs package to also support that kind of deployment. Volume management commands were moved to different modules in backends directory, block.py now only contains iscsi code and dispatches volume management commands to proper module. Copy method remains to be implemented, although should not be hard using ZFS snapshots.
Refers to open-iscsi#36 This adds support for using ZFS datasets as backend pools in targetd. To be compatible with current setups it adds new zfs_block_pools to config file. It allows to use ZFS alongside LVM, as well as any of them separately. It is only dependant on 'zfs' command and python standard library. Also works without it when ZFS pools are not set. Added separate Dockerfile with zfs package to also support that kind of deployment. Volume management commands were moved to different modules in backends directory, block.py now only contains iscsi code and dispatches volume management commands to proper module. Copy method remains to be implemented, although should not be hard using ZFS snapshots.
Refers to open-iscsi#36 This adds support for using ZFS datasets as backend pools in targetd. To be compatible with current setups it adds new zfs_block_pools to config file. It allows to use ZFS alongside LVM, as well as any of them separately. It is only dependant on 'zfs' command and python standard library. Also works without it when ZFS pools are not set. Added separate Dockerfile with zfs package to also support that kind of deployment. Volume management commands were moved to different modules in backends directory, block.py now only contains iscsi code and dispatches volume management commands to proper module. Copy method remains to be implemented, although should not be hard using ZFS snapshots.
Resolved with #42 |
It would be nice to support ZFS volumes in addition to LVM logical volumes.
This would allow for using ZFS on Linux as a storage provider for kubernetes, through the kubernetes targetd provisioner https://github.com/kubernetes-incubator/external-storage/tree/master/iscsi/targetd
FreeNAS has its own APIs that another kubernetes provisioner uses for a zvol+iscsi storage provisioner, but nothing similar exists for ZFS on Linux as of yet.
As ZFS volumes are still block devices, it should be possible to interact with them just like one interacts with LVM logical volumes as far as iSCSI is concerned.
Interacting with a ZFS storage pool from python could be done with the native zfs-utils shell commands (using the -H flag for scripting mode for the commands that support it) or through a python ZFS library like pyzfs https://github.com/ClusterHQ/pyzfs or pyzfscmds https://github.com/johnramsden/pyzfscmds
The text was updated successfully, but these errors were encountered: