[ https://issues.apache.org/jira/browse/CLOUDSTACK-4381?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sanjeev N closed CLOUDSTACK-4381. --------------------------------- Closing based on the comments from Edison. > [Object_store_Refactor] All the snapshots are full snapshots even though they > are created from same volume > ----------------------------------------------------------------------------------------------------------- > > Key: CLOUDSTACK-4381 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4381 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Snapshot, Storage Controller, XenServer > Affects Versions: 4.2.0 > Environment: Latest build from ACS 4.2 branch > Storage: S3 for secondary, NFS for staging and primary storage > Cluster: XenServer > Reporter: Sanjeev N > Assignee: edison su > Priority: Critical > Fix For: 4.2.0 > > Attachments: cloud.dmp, management-server.log.2013-08-16.gz, > management-server.rar > > > All the snapshots are full snapshots even though they are created from same > volume > Steps to Reproduce: > ================ > 1.Bring up CS with Xencluster using S3 for secondary, NFS for staging and > primary storage > 2.Set the Snapshot.delta.max as 3 > 3.Restart the Management Server > 3.Deploy a VM from the default Linux Template along with a data disk. > 4.Log into the VM and create a file on the ROOT disk with content in it. > 5.Create a Snapshot of the ROOT disk. > 6.Repeat Steps 4 and 5 at least six times > 7.Step 6 will generate at least two 'chains' of Snapshots on the Secondary > Storage. > Result: > ===== > All the snapshots are full snapshots. All of them have same size in DB. > Observations: > =========== > Even though snapshots table shows the size same for all the incremental > snapshots, on S3 they have actual size. > Following is the snapshots size on S3: > [root@RIAK-56 ~]# s3cmd ls --recursive s3://imagestore/snapshots/2/3 | sort > 2013-08-16 12:34 1765089792 > s3://imagestore/snapshots/2/3/c7c6c043-f30b-42af-994c-9926b0e1b9fd.vhd > 2013-08-17 06:10 506446336 > s3://imagestore/snapshots/2/3/f18557e2-aedf-48b2-9a30-0dd7a08cfc97.vhd > 2013-08-17 06:19 54678016 > s3://imagestore/snapshots/2/3/d2556bb4-2915-420e-9d79-3d705ba60925.vhd > 2013-08-17 06:26 1893265920 > s3://imagestore/snapshots/2/3/e937082b-fb1d-4728-9d49-0ef4e97d3a26.vhd > 2013-08-17 07:27 81994240 > s3://imagestore/snapshots/2/3/d92f18dd-98e4-4df3-aa93-36787df4fef9.vhd > From the above output we can say that 4th snasphot is a full snapshot because > snapshot.delta.max was set to 3 > since usage_event table takes snpashot size from snapshots table user would > be charged with more than actual usage. So snapshots table should store > actual size of the snapshot . > mysql> select id,type,resource_id,resource_name,size from usage_event where > resource_id in (2,6,7,8,9); > +----+-----------------+-------------+-------------------------------+-------------+ > | id | type | resource_id | resource_name | size > | > +----+-----------------+-------------+-------------------------------+-------------+ > | 8 | SNAPSHOT.CREATE | 2 | vm1-xen_ROOT-3_20130816122936 | > 21474836480 | > | 9 | VOLUME.CREATE | 6 | ROOT-5 | > 374730926 | > | 14 | VOLUME.CREATE | 7 | test | > 5368709120 | > | 17 | SNAPSHOT.CREATE | 6 | vm1-xen_ROOT-3_20130817060711 | > 21474836480 | > | 18 | SNAPSHOT.CREATE | 7 | vm1-xen_ROOT-3_20130817061632 | > 21474836480 | > | 19 | SNAPSHOT.CREATE | 8 | vm1-xen_ROOT-3_20130817062141 | > 21474836480 | > | 20 | SNAPSHOT.CREATE | 9 | vm1-xen_ROOT-3_20130817072508 | > 21474836480 | > +----+-----------------+-------------+-------------------------------+-------------+ > Attaching management server log file and cloud DB -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira