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

Sangeetha Hariharan commented on CLOUDSTACK-5406:
-------------------------------------------------

Thanks Sanjay for the detailed steps.

I now see that the snapshot_store_ref table and resource_count table reflect 
the correct physical size of the snapshots ( not the virtual size) when 
multiple snapshots are taken for Volumes belonging to the same account.

After this I see that with secondary Storage limits  set to 30 G, I am able to 
take multiple snapshots of ROOT volume which was created from a template that 
was 20 G ( virtual size) and ~ 1.7 G .

Like you have mentioned when there are multiple snapshots in progress , then we 
have accounted for the virtual size of these snapshots. During this time , when 
there is an attempt to take another snapshot , snapshots fails because of 
"Maximum number of resources of type 'secondary_storage' for account
name=test in domain id=1 has been exceeded."  I will log a different bug for 
this issue.



> Not able to take snapshot becasue of secondary_storage limit of 400 gb 
> exceeded even though we have not really consumed this limit in secondary 
> store.
> ------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-5406
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-5406
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>          Components: Management Server
>    Affects Versions: 4.3.0
>         Environment: Build from 4.3
>            Reporter: Sangeetha Hariharan
>            Assignee: Sanjay Tripathi
>            Priority: Critical
>             Fix For: 4.3.0
>
>         Attachments: management-server.rar, storage.rar
>
>
> Set up: 
> Xenserver setup with 2 NFS secondary stores.
> 1 account having 21 Vms.
> I am using the the default "secondary_storage" limit which is 400 gb.
>  
> Started hourly snapshot policy for all the ROOT volumes of the Vms which was 
> created from a template of size 20 gb. The actual used up size is 12 GB. 
> When  snapshot gets created , the full snapshot size is ~6.7 GB. 
>  After only  2  snapshots of ROOT volume , I hit the following excepton:
>  
> “2013-12-06 00:00:48,298 WARN  [c.c.s.s.SnapshotSchedulerImpl] 
> (SnapshotPollTask:ctx-a7ccb50a) Scheduling snapshot failed due to 
> com.cloud.exception.ResourceAllocationException: Maximum number of resources 
> of type 'secondary_storage' for account 
> name=test-TestParallelVolumeSnasohots-273V8U in domain id=1 has been 
> exceeded.”
>  
> How are we calculating this limit ? Do we query the actual secondary store / 
> do we calculate based on the ROOT volume size and # of Snapshots.
>  
> In case of Xenserve , we have Delta snapshots.We should not be 
>  
> mysql> select count(*) from snapshots where account_id=8 group by volume_id;
> +----------+
> | count(*) |
> +----------+
> |        2 |
> |        2 |
> |        2 |
> |        2 |
> |        2 |
> |        2 |
> |        2 |
> |        2 |
> |        2 |
> |        2 |
> |        2 |
> |        2 |
> |        2 |
> |        2 |
> |        2 |
> |        2 |
> |        2 |
> |        2 |
> |        2 |
> |        3 |
> |        3 |
> +----------+
> 21 rows in set (0.00 sec)
>  
>  
> [root@Rack3Host5 secondary]# du -h --max-depth=1
> 28G     ./snapshots
> 13G     ./template
> 4.0K    ./volumes
> 41G     .
>  
>  
> [root@Rack3Host8 secondary]# du -h --max-depth=1
> 12G     ./template
> 29G     ./snapshots
> 4.0K    ./volumes
> 41G     .
> [root@Rack3Host8 secondary]#
> mysql> select * from resource_limit;
> +----+-----------+------------+-------------------+---------------+
> | id | domain_id | account_id | type              | max           |
> +----+-----------+------------+-------------------+---------------+
> | 31 |      NULL |          8 | user_vm           |           200 |
> | 32 |      NULL |          8 | public_ip         |           200 |
> | 33 |      NULL |          8 | volume            |           200 |
> | 34 |      NULL |          8 | snapshot          |           200 |
> | 35 |      NULL |          8 | template          |           200 |
> | 36 |      NULL |          8 | vpc               |           200 |
> | 37 |      NULL |          8 | cpu               |            40 |
> | 38 |      NULL |          8 | memory            |         40960 |
> | 39 |      NULL |          8 | network           |            20 |
> | 40 |      NULL |          8 | primary_storage   |  214748364800 |
> | 41 |      NULL |          8 | secondary_storage | 4294967296000 |
> +----+-----------+------------+-------------------+---------------+
> 11 rows in set (0.00 sec)



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to