You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cloudstack.apache.org by "edison su (JIRA)" <ji...@apache.org> on 2013/12/30 21:03:51 UTC

[jira] [Commented] (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:comment-tabpanel&focusedCommentId=13859038#comment-13859038 ] 

edison su commented on CLOUDSTACK-5406:
---------------------------------------

>From the code:
 // Check account limits
                long accountLimit = findCorrectResourceLimitForAccount(account, type);
                long potentialCount = _resourceCountDao.getResourceCount(account.getId(), ResourceOwnerType.Account, type) + numResources;
                if (accountLimit != Resource.RESOURCE_UNLIMITED && potentialCount > accountLimit) {
                    String message = "Maximum number of resources of type '" + type + "' for account name=" + account.getAccountName()
                            + " in domain id=" + account.getDomainId() + " has been exceeded.";
                    if (projectFinal != null) {
                        message = "Maximum number of resources of type '" + type + "' for project name=" + projectFinal.getName()
                                + " in domain id=" + account.getDomainId() + " has been exceeded.";
                    }
                    throw new ResourceAllocationException(message, type);
                }
    


it will first check resource_limit table ,then check resource_count.
Seems the resource_count will be the problem. Do you remember what's the data in resource_count?

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