[pve-devel] [PATCH 4/9] vm_start : attach loop devices for non rootfs mountpoint
Alexandre DERUMIER
aderumier at odiso.com
Mon Aug 17 10:57:43 CEST 2015
>>I currently use $scfg->{path} to test for filesystem based storages
>>(that also works with glusterfs).
>>But you need to exclude volumes with format 'subvol'. See code inside
>>PVE::LXC::update_lxc_config(
Oh, ok. I'll fix this.
(Sorry I don't have zfs on my dev server currently)
----- Mail original -----
De: "dietmar" <dietmar at proxmox.com>
À: "aderumier" <aderumier at odiso.com>, "pve-devel" <pve-devel at pve.proxmox.com>
Envoyé: Lundi 17 Août 2015 10:52:08
Objet: Re: [pve-devel] [PATCH 4/9] vm_start : attach loop devices for non rootfs mountpoint
comments inline
On 08/16/2015 07:43 PM, Alexandre Derumier wrote:
> Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
> ---
> src/PVE/API2/LXC.pm | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm
> index 7eb0afb..870da69 100644
> --- a/src/PVE/API2/LXC.pm
> +++ b/src/PVE/API2/LXC.pm
> @@ -1007,7 +1007,16 @@ __PACKAGE__->register_method({
>
> PVE::LXC::foreach_mountpoint($conf, sub {
> my ($ms, $mountpoint) = @_;
> - PVE::Storage::activate_volumes($storage_cfg, [$mountpoint->{volume}]);
> +
> + my $volid = $mountpoint->{volume};
> + PVE::Storage::activate_volumes($storage_cfg, [$volid]);
> +
> + my ($storage, $volname) = PVE::Storage::parse_volume_id($volid);
> + my $scfg = PVE::Storage::storage_config($storage_cfg, $storage);
> + if($ms ne 'rootfs' && ($scfg->{type} eq 'dir' || $scfg->{type} eq 'nfs')) {
I currently use $scfg->{path} to test for filesystem based storages
(that also works with glusterfs).
But you need to exclude volumes with format 'subvol'. See code inside
PVE::LXC::update_lxc_config()
More information about the pve-devel
mailing list