[pve-devel] FreeNAS plugin: Status
datanom.net
mir at datanom.net
Fri Jun 9 15:47:51 CEST 2017
On 2017-06-09 10:03, Fabian Grünbichler wrote:
>
> only allowing offline resizing is not possible on a storage plugin
> level
> for raw volumes and containers - see PVE::API2::LXC.pm resize_vm API
> end
> point and the comment there. you either need to wait for the FreeNAS
> bug
> fix or special case your storage type in the container code (you can
> probably guess which variant we prefer ;))
>
I agree. But my best guess is that this will not be fixed in current
old-stable (9.10.x) since current stable (10.x) has been discontinued
and all efforts are directed at releasing the next stable (11.x) as soon
as possible. 11.x also brings enhancements and new features to the API.
Giving users the choice of resizing disks though only offline is better
than no choice at all?
> PVE::Storage::volume_resize's running parameter is used to return early
> if Qemu is supposed to do the actual resizing (this is not documented
> very well, I know) as opposed to just rescanning for the new size.
>
> as an example, the base plugin (PVE::Storage::Plugin) has the following
> in its volume_resize method:
>
Adding a check to the storage plugins volume_resize method whether
running is true or not seems to be sufficient. Eg
die "some info" if $running. So there does not need to be any changes in
QemuServer or LXC code at all.
PS. I have just found out that full clones are done outside of the
storage plugins which is ok. For the FreeNAS plugin it is a problem
though since the clone_disk method in QemuServer calls activate_volumes
before cloning - this is as it should, but it does not call
deactivate_volumes when finished which leaves attached LUN's on the
host.
Should I create some kind of timer based functions which performs
clean-up of attached LUN's for offline VM/CT?
eg.
For all exposed LUN's
my ($vmid, $volname) = get_vmid($lun);
my $run = PVE::QemuServer::check_running($vmid);
if (!$run) {
$run = PVE::LXC::check_running($vmid);
}
$class->deactivate_volume($storeid, $scfg, $volname) unless $run;
--
Hilsen/Regards
Michael Rasmussen
Get my public GnuPG keys:
michael <at> rasmussen <dot> cc
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xD3C9A00E
mir <at> datanom <dot> net
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE501F51C
mir <at> miras <dot> org
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE3E80917
--------------------------------------------------------------
----
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