Qcow2 shared DS and non-persistent images

Hi all, I was setup FS Qcow2 datastore using gfs2 filesystem. This filesystem I mounted to /var/lib/one/datastores/108 on every compute node by pacemaker.

In /var/lib/one is mounted NFS from Opennebula frontend.

When I use persistent image, all is ok. Problem is with non-persistent images. They are created in system DS id 0. System DS has just 20GB, so after while I cant deploy more VMs with this error:

Cannot schedule VM, there is no suitable system ds.

So I look into qcow ds config and see that CLONE_TARGET = SYSTEM which cannot be changed in sunstone.

I open oned.conf and edited Qcow2 TM to set CLONE_TARGET = SELF, them update din frontend also and force synced hosts.

After this, problem about no suitable ds dissapeared, so I can deploy new VMs. BUT…

non-persistant images are still creating in system ds. Any ideas?

[oneadmin@engine1 ~]$ onedatastore list
  ID NAME                SIZE AVAIL CLUSTER      IMAGES TYPE DS      TM      STAT
   0 system               19G 36%   feldhost          0 sys  -       shared  on  
   1 default              19G 36%   feldhost          4 img  fs      shared  on  
   2 files                19G 36%   feldhost          2 fil  fs      ssh     on  
 104 images              2.4T 29%   feldhost         29 img  lvm     lvm     on  
 106 raid10              2.7T 63%   feldhost          0 img  lvm     lvm     on  
 108 gfs              1023.9G 100%  feldhost          2 img  fs      qcow2   on  
[oneadmin@engine1 ~]$ onedatastore show 108
DATASTORE 108 INFORMATION                                                       
ID             : 108                 
NAME           : gfs                 
USER           : feldsam             
GROUP          : oneadmin            
CLUSTER        : feldhost            
TYPE           : IMAGE               
DS_MAD         : fs                  
TM_MAD         : qcow2               
BASE PATH      : /var/lib/one/datastores/108
DISK_TYPE      : FILE                
STATE          : READY               

DATASTORE CAPACITY                                                              
TOTAL:         : 1023.9G             
FREE:          : 1020.6G             
USED:          : 3.3G                
LIMIT:         : -                   

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

DATASTORE TEMPLATE                                                              
BASE_PATH="/var/lib/one/datastores/"
BRIDGE_LIST="node1 node2 node3"
CLONE_TARGET="SELF"
DISK_TYPE="FILE"
DS_MAD="fs"
LN_TARGET="NONE"
STAGING_DIR="/var/lib/one/datastores/108/tmp"
TM_MAD="qcow2"
TYPE="IMAGE_DS"
[root@node1 ~]# df -h
192.168.2.50:/var/lib/one        19G   13G  6.9G  64% /var/lib/one
/dev/mapper/vg--raid10-gfsTest  1.0T  3.4G 1021G   1% /var/lib/one/datastores/108

Thank you.

Hi,

From the oned.conf file:

The configuration for each driver is defined in TM_MAD_CONF. These
values are used when creating a new datastore and should not be modified
since they define the datastore behavior.

To change the driver behaviour you would need to change the driver files.

Hello, thank you for reply. I was all time looking into “Administration documentation”, where is nothing about multiple system datastores… In “User documentation” I found, that I can add second SYSTEM_DS or redefine existing SYSTEM_DS. So I completly removed NFS, made oneadmin user loginable on compute nodes, mounted GFS2 to /var/lib/one/datastores and copied data from frontend. On frontend removed everything under /var/lib/one/datastores/* and restarted oned. Them changed IMAGE_DS and FILE_DS by adding BRIDGE_LIST and it is working fine :slight_smile:

   0 system           1023.9G 99%   feldhost          0 sys  -       shared  on  
   1 default          1023.9G 99%   feldhost          5 img  fs      qcow2   on  
   2 files            1023.9G 99%   feldhost          2 fil  fs      shared  on  
DATASTORE 0 INFORMATION                                                         
ID             : 0                   
NAME           : system              
USER           : oneadmin            
GROUP          : oneadmin            
CLUSTER        : feldhost            
TYPE           : SYSTEM              
DS_MAD         : -                   
TM_MAD         : shared              
BASE PATH      : /var/lib/one/datastores/0
DISK_TYPE      : FILE                
STATE          : READY               

DATASTORE CAPACITY                                                              
TOTAL:         : 1023.9G             
FREE:          : 1013.1G             
USED:          : 10.8G               
LIMIT:         : -                   

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

DATASTORE TEMPLATE                                                              
BASE_PATH="/var/lib/one/datastores/"
SHARED="YES"
TM_MAD="shared"
TYPE="SYSTEM_DS"
DATASTORE 1 INFORMATION                                                         
ID             : 1                   
NAME           : default             
USER           : oneadmin            
GROUP          : oneadmin            
CLUSTER        : feldhost            
TYPE           : IMAGE               
DS_MAD         : fs                  
TM_MAD         : qcow2               
BASE PATH      : /var/lib/one/datastores/1
DISK_TYPE      : FILE                
STATE          : READY               

DATASTORE CAPACITY                                                              
TOTAL:         : 1023.9G             
FREE:          : 1013.1G             
USED:          : 10.8G               
LIMIT:         : -                   

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

DATASTORE TEMPLATE                                                              
BASE_PATH="/var/lib/one/datastores/"
BRIDGE_LIST="node1 node2 node3"
CLONE_TARGET="SYSTEM"
DISK_TYPE="FILE"
DS_MAD="fs"
LN_TARGET="NONE"
TM_MAD="qcow2"
TYPE="IMAGE_DS"
DATASTORE 2 INFORMATION                                                         
ID             : 2                   
NAME           : files               
USER           : oneadmin            
GROUP          : oneadmin            
CLUSTER        : feldhost            
TYPE           : FILE                
DS_MAD         : fs                  
TM_MAD         : shared              
BASE PATH      : /var/lib/one/datastores/2
DISK_TYPE      : FILE                
STATE          : READY               

DATASTORE CAPACITY                                                              
TOTAL:         : 1023.9G             
FREE:          : 1013.1G             
USED:          : 10.8G               
LIMIT:         : -                   

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

DATASTORE TEMPLATE                                                              
BASE_PATH="/var/lib/one/datastores/"
BRIDGE_LIST="node1 node2 node3"
CLONE_TARGET="SYSTEM"
DS_MAD="fs"
LN_TARGET="NONE"
TM_MAD="shared"
TYPE="FILE_DS"