]> git.proxmox.com Git - pve-storage.git/commit
Add support for custom storage plugins
authorDmitry Petuhov <mityapetuhov@gmail.com>
Fri, 26 Aug 2016 13:06:33 +0000 (16:06 +0300)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Fri, 26 Aug 2016 13:44:49 +0000 (15:44 +0200)
commit4dee23d305be8a59b6538d2a9206f98c87a3b041
tree4dedcf40fc1c0687e62e2dcfccd611b9536bd87f
parentc2c8789dc836e00d071adaee436a4c76c9493088
Add support for custom storage plugins

PVE team cannot support specialized vendor-specific storage
plugins because of lack of hardware. But we can allow users to
add own plugins for their storages without need to rewrite any
PVE code and thus ease PVE updates to them.

Idea of this patch is to add folder /usr/share/perl5/PVE/Storage/Custom
where user can place his plugins and PVE will automatically load
them on start or warn if it could not and continue. Maybe we could
even load all plugins (except PVE::Storage::Plugin itself) this way,
because current storage plugins are not really plugins, if they
need to be explicitly loaded in PVE code :-).

Custom plugins MUST have api() method returning version for which
it was designed. If API changes from PVE side, module is just not
being registered and warnig message is printed do log, so user have
to update module. Until module update, corresponding storage will
just disappear from PVE, so it shall not impose any data damage
because of API change.

This approach works (with some limitations) if plugin works in
generic PVE way: full control of volumes lifecycle. And will not
currently work for custom plugins like iSCSI, which needs to select
pre-existing volumes. Maybe someone will add more flexible way to
pve-manager to select input elements for storage plugins to target
this.

Currently tested with my NetApp plugin.

Signed-off-by: Dmitry Petuhov <mityapetuhov@gmail.com>
PVE/Storage.pm