[pve-devel] [PATCH v7 pve-storage 00/10] FreeNAS storage plugin
mir at datanom.net
mir at datanom.net
Tue Jun 20 22:39:52 CEST 2017
From: Michael Rasmussen <mir at datanom.net>
This patch series adds a storage plugin for FreeNAS using the FreeNAS API.
The plugin supports both Qemu and LXC VM. Features supported, see below:
VM CT
create YES YES
delete YES YES
resize (YES) (YES) Note 1
snapshot
offline YES YES
live YES "YES" (state is not saved)
backup
snapshot YES YES
standby YES YES
offline YES YES
clone
full YES YES (Unavailable in GUI)
linked YES YES (Unavailable in GUI)
Note 1: Due to a bug in the FreeNAS API live resizing has been disabled
in the plugin. See https://bugs.freenas.org/issues/24432
Since the plugin attaches disks through the local scsi subsystem via
openiscsi and therefore not uses libiscsi there should be support for
MPIO and authentication. MPIO is not tested since I don't have the
required hardware to do so. Authentication is not enabled but should be
easy to do if the requirements exists.
Changes since v6:
* Fix JSON false
* Fix bug which prevented online resize of VM and CT
* Refactor find lun id for live snapshots
* Repatch the hole series to comply with proxmox git workflow
Changes since v5:
* if ! to unless
* all helper methods now private
* remove unused includes
* remove unused code
* more descriptive variable names
* change api timeout to be in sync with the PVE API
* add loop over limit until empty resultset is returned
* fix API version check
* fix handling 409 code in create_target and create_target_group
* Remove unnecessary error handling
* Replace hardcoded max luns number with variable
* Fix error handling in freenas_create_lun method
* Write directly to file instead of using a shell to echo to file
* Fix error handling in deactivate_lun and get_active_luns
* Improve code readability and error handling in rescan_session
* Declaring variables where used in create_base
* Check if base already exists when creating base
* Improve error handling in create_base
* Fix clone_image error handling and remove unnecessary check for running base
* Remove unused variable in alloc_image
* More robust error handling in free_image
* Remove HTML code from volume_resize
* Fix error handling in shapshot rollback
* Improve code readability and error handling in activate_lun
* Improve code readability and error handling in deactivate_lun
* Replace sleep 1 with a combination of udevadm trigger udevadm settle
* Remove check of running VM and CT. relaying on parsed option running for
Qemu and handle running LXC in PVE::API2::LXC now sends running status
as part of call to volume_resize when storage id is freenas.
Changes since v4:
* regression and indentation fix
Changes since v3:
* Adds support for creating snapshot backups of LXC containers.
This more or less makes the plugin feature complete.
Only outstanding feature depends on a bug fix in the FreeNAS API
which is first scheduled for next stable release:
https://bugs.freenas.org/issues/23881 (Targeted for 11.1)
Changes since v2:
* These are internal revisions not published
Michael Rasmussen (10):
FreeNAS storage plugin. Skeleton code.
Basic FreeNAS API interaction code
Basic iscsiadm interaction code
Basic storage operations.
Refactor method to find next lun number.
Implement support for volume resize
Implement support for cloning images.
Implement support for snapshots
Implement support for linked clones.
Enable plugin in current storage system
PVE/Storage.pm | 2 +
PVE/Storage/FreeNASPlugin.pm | 1378 ++++++++++++++++++++++++++++++++++++++++++
PVE/Storage/Makefile | 2 +-
PVE/Storage/Plugin.pm | 2 +-
4 files changed, 1382 insertions(+), 2 deletions(-)
create mode 100644 PVE/Storage/FreeNASPlugin.pm
--
2.11.0
----
This mail was virus scanned and spam checked before delivery.
This mail is also DKIM signed. See header dkim-signature.
More information about the pve-devel
mailing list