Return-Path: X-Original-To: apmail-cloudstack-users-archive@www.apache.org Delivered-To: apmail-cloudstack-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D6FF4102B2 for ; Fri, 10 Apr 2015 00:59:19 +0000 (UTC) Received: (qmail 91744 invoked by uid 500); 10 Apr 2015 00:59:19 -0000 Delivered-To: apmail-cloudstack-users-archive@cloudstack.apache.org Received: (qmail 91692 invoked by uid 500); 10 Apr 2015 00:59:19 -0000 Mailing-List: contact users-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@cloudstack.apache.org Delivered-To: mailing list users@cloudstack.apache.org Received: (qmail 91680 invoked by uid 99); 10 Apr 2015 00:59:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Apr 2015 00:59:18 +0000 X-ASF-Spam-Status: No, hits=2.6 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,URIBL_GREY X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of aemneina@gmail.com designates 209.85.212.175 as permitted sender) Received: from [209.85.212.175] (HELO mail-wi0-f175.google.com) (209.85.212.175) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Apr 2015 00:58:54 +0000 Received: by wiaa2 with SMTP id a2so8367957wia.0 for ; Thu, 09 Apr 2015 17:57:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=haxFMCfIzxVZCKDBqXC9J7wDXuk51E5RyGt6zSNKH14=; b=vwPZchdoI/rXLrDSbSTxMlpfv0DhIlLf7mLdnTht3/DWZ8D2xQNhbLI5eKnwNZZoFf 2Arodz9+THZlnAVxgs4WIO1i3SCP5Z764kDevBfwdaCHQqGRXeur3+ZffLNw4NZWam+j 1flvPudOpPf9a47abr+bo8qRXln90q6/ey6ceqSNalPDcdIu+ktP3FlmoN7VuKI9uXBW F6XIj7x90h94wtH65qGiAVWUIo48PaTWmJeUaNGnn4NALVZ+jSH567QcOhgav+tF6tZt EoEQxXeulkv2B438xjnkOgsSdWXZMjTIGD37xseVP7drfKjbQYZY3nvlkcPMU7mc8lQn iyWA== X-Received: by 10.180.214.99 with SMTP id nz3mr330181wic.82.1428627442811; Thu, 09 Apr 2015 17:57:22 -0700 (PDT) MIME-Version: 1.0 Received: by 10.180.39.225 with HTTP; Thu, 9 Apr 2015 17:57:02 -0700 (PDT) Reply-To: aemneina@gmail.com In-Reply-To: References: From: Ahmad Emneina Date: Thu, 9 Apr 2015 17:57:02 -0700 Message-ID: Subject: Re: ghost volumes belonging to a project To: Cloudstack users mailing list Content-Type: multipart/alternative; boundary=001a1135e9a83ecb510513543ff5 X-Virus-Checked: Checked by ClamAV on apache.org --001a1135e9a83ecb510513543ff5 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable This looks like a bug. You should look to file that here[0], with all the details you can (db dump if possible). [0] https://issues.apache.org/jira/secure/Dashboard.jspa On Thu, Apr 9, 2015 at 2:01 PM, Yiping Zhang wrote: > Hi, > > We always create VM instances in project context, so that all resources > are assigned to project instead of individual accounts. I have a script = to > call listProjects API to show project=E2=80=99s resource limits and curre= nt usages. > > Recently, I noticed that for a couple of projects, my script reports a > different number of volumes from what I can see in web UI for these > projects. Poking around in mysql db, it looks like web UI only reports > volumes in Ready state, while listProjects API reports volumes in both > Ready and Destroy states. > > Following is a project where UI says it has two volumes while listProject= s > API says it has nine: > > > mysql> select v.id, v.name, v.state, v.removed, v.path from volumes v, > projects p where v.account_id =3D p.project_account_id and p.name=3D'acti= vityservice' > and v.state !=3D 'Expunged'; > > > +------+-----------+---------+---------------------+---------------------= -----------------+ > > | id | name | state | removed | path > | > > > +------+-----------+---------+---------------------+---------------------= -----------------+ > > | 961 | ROOT-1053 | Destroy | 2015-03-02 21:36:09 | NULL > | > > | 965 | ROOT-1061 | Destroy | 2015-03-03 00:25:17 | NULL > | > > | 966 | ROOT-1063 | Destroy | 2015-03-03 00:28:16 | NULL > | > > | 967 | ROOT-1066 | Destroy | 2015-03-03 00:41:48 | NULL > | > > | 968 | ROOT-1067 | Destroy | 2015-03-03 00:49:11 | NULL > | > > | 969 | ROOT-1069 | Destroy | 2015-03-03 00:53:08 | NULL > | > > | 970 | ROOT-1070 | Destroy | 2015-03-03 00:53:52 | NULL > | > > | 1000 | ROOT-1100 | Ready | NULL | > 2c315f38-3a5f-4b2e-a765-332ddbe7a938 | > > | 1217 | ROOT-1314 | Ready | NULL | > 1d3f6716-d607-4d9d-b71c-93b7a88cd064 | > > > +------+-----------+---------+---------------------+---------------------= -----------------+ > > 9 rows in set (0.00 sec) > > > mysql> > > > These ghost volumes are counted into project=E2=80=99s total usage of pri= mary > storage, so I=E2=80=99d like to get rid of them to free up space for real= volumes. > > > How do I clean them up ? Is this a known issue ? > > > Thanks, > > > Yiping > --001a1135e9a83ecb510513543ff5--