Qcow2 image snapshots are fully copied instead of copy-on-write (NFS Shared datastore)

In our ONE installation, while I expect snapshots to take space only when the base image file is modified, they actually take the full space of the base image from snapshot creation time.

This wastes both time and disk space, and defeats the whole purpose of using QCOW2 images over RAW images.

Well, Copy On Write should only copy … when you write :slight_smile:

Any clues what in my settings is causing that ?

$ oneimage show 432
IMAGE 432 INFORMATION                                                           
ID             : 432                 
NAME           : img-XXX-01N
USER           : oneadmin            
GROUP          : oneadmin            
DATASTORE      : DSXXX  
TYPE           : DATABLOCK           
REGISTER TIME  : 03/28 00:14:26      
PERSISTENT     : Yes                 
SOURCE         : /var/lib/one/datastores/105/IIIIIIIII
FSTYPE         : qcow2               
SIZE           : 20G                 
STATE          : used                
RUNNING_VMS    : 1                   

PERMISSIONS                                                                     
OWNER          : um-                 
GROUP          : ---                 
OTHER          : ---                 

IMAGE SNAPSHOTS                                                                 
AC  ID PARENT            DATE SIZE     NAME                                 
=>   0     -1  03/31 06:53:50 20G      SSSSSSSS\

IMAGE TEMPLATE                                                                  
DEV_PREFIX="vd"
DRIVER="qcow2"

VIRTUAL MACHINES

    ID USER     GROUP    NAME            STAT UCPU    UMEM HOST             TIME
  3992 oneadmin oneadmin VVVVVVVVVV runn 2.82      6G NNN-r999-0   5d 18h37
$ 

Both the image file :

/var/lib/one/datastores/105/IIIIIIIII

and the snapshot file :

/var/lib/one/datastores/105/IIIIIIIII.snap/0

have equal (du) size at 21 GB.

Possible causes I can think of, appreciate any guidance where it could go wrong :

  1. Because I use NFS Shared datastore type which does not support QCOW2 image snapshot COW format ?
  2. Because my version is too old (OpenNebula 5.2.1) , the bug was fixed already ?
  3. Because the bug/feature is still there ?
  4. Because I use the wrong (default) settings for KVM cache=writethrough/none (see Snapshot issue) ?

Appreciate any suggestions how to fix this.