Uploaded image for project: 'CloudStack'
  1. CloudStack
  2. CLOUDSTACK-8921

snapshot_store_ref table should store actual size of back snapshot in secondary storage

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 4.5.2
    • None
    • Snapshot, Usage
    • Security Level: Public (Anyone can view this level - this is the default.)
    • None
    • Hypervisor: Xen Server
      Hypervisor Version: 6.2 + SP1

    Description

      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-rr-. 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"

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              yvsubhash subhash yedugundla
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: