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

Restore partial configuration #202

Open
rbicelli opened this issue Oct 22, 2023 · 0 comments
Open

Restore partial configuration #202

rbicelli opened this issue Oct 22, 2023 · 0 comments

Comments

@rbicelli
Copy link

rbicelli commented Oct 22, 2023

Hello,
Is there a way to backup-restore partial configuration of a target?

I am adapting the Pacemaker resource agent in order to achieve support for ZFS-over-iscsi in an HA scenario, and I'd want to run multiple iSCSI targets on different hosts.
ZFS over iSCSI creates an ssh tunnel then creates zfs filesystems/snapshots with its logic and leverage targetcli for creating and deleting backstores/LUNs.

My resource agent is supposed to work under a zfs vol and has this workflow:

  • when resource is stopped it uses targetcli to save the configuration under '$zvol/.targetcli/$target_iqn_namewith commandtargetcli saveconfig "${OCF_RESKEY_zvol_mount}/.targetcli/${OCF_RESKEY_iqn}.save"`
  • when resource is started on another node it uses targetcli for loading configuration on '$zvol/.targetcli/$target_iqn_name with command targetcli restoreconfig "${OCF_RESKEY_zvol_mount}/.targetcli/${OCF_RESKEY_iqn}.save"

This works well in a scenario where an iSCSI daemon is floating between hosts. But when you want to keep an iSCSI daemon per host, in order to distribute the load, that strategy isn't feasible.

So, I'm looking for a solution like:

targetcli restoreconfig "${OCF_RESKEY_zvol_mount}/.targetcli/${OCF_RESKEY_iqn}.save" -target ${OCF_RESKEY_iqn}

in which targetcli restores target, backstores, LUNs and relevant parameters of the target.

Is that feature available/worth of developing?

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

1 participant