[one-users] persistent size of persistent images?

knawnd at gmail.com knawnd at gmail.com
Mon Nov 19 05:54:00 PST 2012


Hi!

I am using OpenNebula 3.8.1 with OpenVZ hypervisor support enabled. I noticed that the value of the 
corresponding persistent image parameter is not changed even if actual size of the file has changed.

$ oneimage list|grep persistent
ID USER GROUP      NAME            DATASTORE     SIZE TYPE PER STAT RVMS
4 oneadmin   oneadmin   test persistent default       172M OS   Yes used    1

$ oneimage show 4|egrep "SOURCE|PATH|SIZE"
SOURCE         : /var/lib/one/datastores/1/6900190977e9afc6d9290b8aef16f768
PATH           : /var/lib/one/datastores/1/2b0ad99f99eaa99458769eb53951b685
SIZE           : 172M

The image with ID 4 was created as clone of the image with ID 1 by 'oneimage clone' command. The 
image with ID 1 has a size 172MB:
$ oneimage show 1|egrep "SOURCE|PATH|SIZE"
SOURCE         : /var/lib/one/datastores/1/2b0ad99f99eaa99458769eb53951b685
PATH           : /tmp/sl-6-x86_64.tar.gz
SIZE           : 172M

and that corresponds to its real size on the file system:
$ ll -h /var/lib/one/datastores/1/2b0ad99f99eaa99458769eb53951b685
-rw-rw---- 1 oneadmin oneadmin 172M Oct  3 17:51 
/var/lib/one/datastores/1/2b0ad99f99eaa99458769eb53951b685

The real size of modified and saved persistent image with ID 4 has changed on FS:
$ ll -h /var/lib/one/datastores/1/6900190977e9afc6d9290b8aef16f768
-rw-rw---- 1 oneadmin oneadmin 181M Nov 16 15:41 
/var/lib/one/datastores/1/6900190977e9afc6d9290b8aef16f768

but 'oneimage list' and 'oneimage show' still show the same size equals to the size of initial image 
with ID 1:
$ oneimage list|egrep "^   1|4"
    1 oneadmin   oneadmin   SL 6.3 x86_64   default       172M OS No rdy     0
    4 oneadmin   oneadmin   test persistent default       172M OS Yes used    1

So I wonder if someone observes the same behavior and someone does then if it is bug?

Regards,
Nikolay.


More information about the Users mailing list