[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-8921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15953468#comment-15953468
 ] 

ASF GitHub Bot commented on CLOUDSTACK-8921:
--------------------------------------------

Github user jayakarteek commented on the issue:

    https://github.com/apache/cloudstack/pull/899
  
    @yvsubhash 
    
    Tested the changes, tests LGTM.
    
    below are the results
    root@MgmtServerNitesh:/mnt/jayant/snapshots/2/120# ls -l
    total 1142048
    -rw-r-----+ 1 root root 1168306688 Apr  3 18:13 
9c340447-5ff9-49f3-875e-1dbbcf63ccf9.vhd
    
    mysql> select * from snapshot_store_ref;
    
+----+----------+-------------+---------------------+--------------+--------+------------+-------------+---------------+--------------------+----------------------------------------------------------+-----------+--------------+---------+---------------------+-----------+
    | id | store_id | snapshot_id | created             | last_updated | job_id 
| store_role | size        | physical_size | parent_snapshot_id | install_path  
                                           | state     | update_count | ref_cnt 
| updated             | volume_id |
    
+----+----------+-------------+---------------------+--------------+--------+------------+-------------+---------------+--------------------+----------------------------------------------------------+-----------+--------------+---------+---------------------+-----------+
     |       0 | 2017-04-03 12:53:16 |       120 |
    | 12 |        6 |           6 | 2017-04-03 12:53:17 | NULL         | NULL   
| Image      |  5368709120 |    1168306688 |                  0 | 
snapshots/2/120/9c340447-5ff9-49f3-875e-1dbbcf63ccf9.vhd | Ready     |          
  2 |       0 
    
    



> snapshot_store_ref table should store actual size of back snapshot in 
> secondary storage
> ---------------------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-8921
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8921
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>          Components: Snapshot, Usage
>    Affects Versions: 4.5.2
>         Environment: Hypervisor: Xen Server
> Hypervisor Version: 6.2 + SP1 
>            Reporter: subhash yedugundla
>
> CCP is storing physical-utilisation of the snapshot in physical_size column 
> of the table "snapshot_store_ref". That was fixed as part of 
> https://issues.apache.org/jira/browse/CLOUDSTACK-7842.
> From DB:
> =====================
> mysql> select * from snapshot_store_ref where id=586 \G;
> id: 586
> store_id: 1
> snapshot_id: 305
> created: 2015-06-15 06:06:22
> last_updated: NULL
> job_id: NULL
> store_role: Image
> size: 5368709120
> physical_size: 13312 ---> This is the size we are storing in the DB
> parent_snapshot_id: 0
> install_path: snapshots/2/233/e8d888a5-41c0-4a17-b1b7-f9a6fd50c0d3
> state: Ready
> update_count: 2
> ref_cnt: 0
> updated: 2015-06-15 06:06:36
> volume_id: 233
> 1 row in set (0.00 sec)
>  From File System:
> =====================
> [root@kirangoleta2 233]# ls -lh
> total 2.1M
> -rw-r--r--. 1 root root 2.1M Jun 15 11:36 
> e8d888a5-41c0-4a17-b1b7-f9a6fd50c0d3.vhd ---> Physical file size
> 3. From Xen Server:
> =====================
> xe vdi-list name-label=newtest_ROOT-203_20150615060620 params=all
> uuid ( RO) : 74a4185e-74fe-4cec-875b-060572cc675d
> name-label ( RW): newtest_ROOT-203_20150615060620
> name-description ( RW):
> is-a-snapshot ( RO): true
> snapshot-of ( RO): 02789581-7bfc-45bd-8e59-c35515d2b605
> snapshots ( RO):
> snapshot-time ( RO): 20150615T06:09:29Z
> allowed-operations (SRO): forget; generate_config; update; resize; destroy; 
> clone; copy; snapshot
> current-operations (SRO):
> sr-uuid ( RO): 73ff08fb-b341-c71c-e2c7-be6c8d395126
> sr-name-label ( RO): 347c06fb-f7dd-3613-aa82-db5b82181d77
> vbd-uuids (SRO):
> crashdump-uuids (SRO):
> virtual-size ( RO): 5368709120
> physical-utilisation ( RO): 14848 ---> This is the size xen server reports as 
> consumed
> location ( RO): 74a4185e-74fe-4cec-875b-060572cc675d
> type ( RO): User
> sharable ( RO): false
> read-only ( RO): false
> storage-lock ( RO): false
> managed ( RO): true
> parent ( RO): <not in database>
> missing ( RO): false
> other-config (MRW): content_id: ad6423f7-e2c3-7ea4-be8d-573ad155511e
> xenstore-data (MRO):
> sm-config (MRO): vhd-parent: 73a33517-e9c5-48c6-89e7-70e37905a74a
> on-boot ( RW): persist
> allow-caching ( RW): false
> metadata-latest ( RO): false
> metadata-of-pool ( RO): <not in database>
> tags (SRW):
> I see that we are storing the physical-utilisation reported by xen server.
> Interesting I see that ACS stores the physical file size in case of VMWare 
> environment,
> EXPECTED BEHAVIOR
> ==================
> It is expected to see the physical size of the snapshot file in physical_size 
> column of the table "snapshot_store_ref
> ACTUAL BEHAVIOR
> ==================
> In case of Xen Server ACS is storing physical-utilisation of the snapshot in 
> physical_size column of the table "snapshot_store_ref"



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to