You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cloudstack.apache.org by "Sangeetha Hariharan (JIRA)" <ji...@apache.org> on 2014/01/07 02:48:52 UTC

[jira] [Reopened] (CLOUDSTACK-5406) 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.

     [ https://issues.apache.org/jira/browse/CLOUDSTACK-5406?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sangeetha Hariharan reopened CLOUDSTACK-5406:
---------------------------------------------


Hi Sanjay,

I tried the following use case with the latest build from 4.3 using Xenserver hosts.

Create a new account , test (account id =4).
Set its Secondary Storage limits (GiB) to 30.

As test , deploy a VM using default template ( Virtual size=20.00 GB and actual size= ~1.2 GB).
Take a snapshot of the ROOT volume.

After this , I see that 20 GB has been consumed from the resource_limit already.

mysql> select snapshot_id,size,store_role from snapshot_store_ref where snapshot_id in (select id from snapshots where account_id=4);
+-------------+-------------+------------+
| snapshot_id | size        | store_role |
+-------------+-------------+------------+
|          34 | 21474836480 | Primary    |
|          34 |  1767191040 | Image      |
+-------------+-------------+------------+


mysql> select * from resource_limit;
+----+-----------+------------+-------------------+----------------+
| id | domain_id | account_id | type              | max            |
+----+-----------+------------+-------------------+----------------+
|  1 |      NULL |          3 | user_vm           |            200 |
|  2 |      NULL |          3 | public_ip         |            200 |
|  3 |      NULL |          3 | volume            |            200 |
|  4 |      NULL |          3 | snapshot          |            200 |
|  5 |      NULL |          3 | template          |            200 |
|  6 |      NULL |          3 | vpc               |            200 |
|  7 |      NULL |          3 | primary_storage   | 21474836480000 |
|  8 |      NULL |          3 | secondary_storage |    10737418240 |
|  9 |      NULL |          3 | cpu               |             40 |
| 10 |      NULL |          3 | memory            |          40960 |
| 11 |      NULL |          3 | network           |             20 |
| 12 |      NULL |          4 | user_vm           |             20 |
| 13 |      NULL |          4 | public_ip         |             20 |
| 14 |      NULL |          4 | volume            |             20 |
| 15 |      NULL |          4 | snapshot          |             20 |
| 16 |      NULL |          4 | template          |             20 |
| 17 |      NULL |          4 | vpc               |             20 |
| 18 |      NULL |          4 | cpu               |             40 |
| 19 |      NULL |          4 | memory            |          40960 |
| 20 |      NULL |          4 | network           |             20 |
| 21 |      NULL |          4 | primary_storage   |   214748364800 |
| 22 |      NULL |          4 | secondary_storage |    32212254720 |
+----+-----------+------------+-------------------+----------------+
22 rows in set (0.00 sec)

Actual size occupied by account 4 is only 1.2 G.

[root@Rack3Host8 snapshots]# du --max-depth=1 -h
5.2G    ./3
1.2G    ./4
6.4G    .
[root@Rack3Host8 snapshots]#

When I try to create another snapshot , it fails with the following exception in management-server.log:
"2014-01-06 20:24:09,003 INFO  [c.c.a.ApiServer] (catalina-exec-3:ctx-2474e533 ctx-e709fe6a) Maximum number of resources of type 'secondary_storage' for account
name=test in domain id=1 has been exceeded."


> 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: 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)