[pve-devel] applied: [PATCH container] Add cifs as allowed storage type.

Thomas Lamprecht t.lamprecht at proxmox.com
Tue May 8 10:05:45 CEST 2018


Am 05/08/2018 um 09:27 AM schrieb Wolfgang Link:
> ---
>   src/PVE/LXC.pm | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm
> index de3c91f..4f9674d 100644
> --- a/src/PVE/LXC.pm
> +++ b/src/PVE/LXC.pm
> @@ -1348,7 +1348,7 @@ sub alloc_disk {
>   
>       eval {
>   	my $do_format = 0;
> -	if ($scfg->{type} eq 'dir' || $scfg->{type} eq 'nfs') {
> +	if ($scfg->{type} eq 'dir' || $scfg->{type} eq 'nfs' || $scfg->{type} eq 'cifs' ) {
>   	    if ($size_kb > 0) {
>   		$volid = PVE::Storage::vdisk_alloc($storecfg, $storage, $vmid, 'raw',
>   						   undef, $size_kb);
> 

applied, but the surrounding code looks like something which could be
abstracted over the storage plugin classes, or at least refactored so 
that not that much hardcoded storage stuff is here in the container
package, but hey we do not get a new storage every day...
Also, at the current moment I actually prefer your approach, looks like
definitively less breakage possibilities, thanks :)




More information about the pve-devel mailing list