"nova-manage volume delete" on a nova host works for this, though if the attach 
operation is still underway then this might cause some weirdness. If the attach 
cast to nova compute has timeouted out or been lost / errored then "nova-manage 
volume delete" should do the job.

-- 
Duncan Thomas
HP Cloud Services, Galway


> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On
> Behalf Of John Griffith
> Sent: 20 June 2012 05:02
> To: Lars Kellogg-Stedman
> Cc: [email protected]
> Subject: Re: [Openstack] Deleting a volume stuck in "attaching" state?
> 
> On Tue, Jun 19, 2012 at 7:40 PM, Lars Kellogg-Stedman
> <[email protected]> wrote:
> > I attempted to attach a volume to a running instance, but later
> > deleted the instance, leaving the volume stuck in the "attaching"
> > state:
> >
> >  # nova volume-list
> >  +----+-----------+--------------+------+-------------+-------------+
> >  | ID |   Status  | Display Name | Size | Volume Type | Attached to |
> >  +----+-----------+--------------+------+-------------+-------------+
> >  | 9  | attaching | None         | 1    | None        |             |
> >  +----+-----------+--------------+------+-------------+-------------+
> >
> > It doesn't appear to be possible to delete this with "nova
> > volume-delete":
> >
> >  # nova volume-delete
> >   nova volume-delete 9
> >   ERROR: Invalid volume: Volume status must be available or error
> (HTTP 400)
> >
> > Other than directly editing the database (and I've had to do that an
> > awful lot already), how do I recover from this situation?
> >
> > --
> > Lars Kellogg-Stedman <[email protected]>       |
> > Senior Technologist                                |
> http://ac.seas.harvard.edu/
> > Academic Computing                                 |
> http://code.seas.harvard.edu/
> > Harvard School of Engineering and Applied Sciences |
> >
> >
> > _______________________________________________
> > Mailing list: https://launchpad.net/~openstack
> > Post to     : [email protected]
> > Unsubscribe : https://launchpad.net/~openstack
> > More help   : https://help.launchpad.net/ListHelp
> 
> Hi Lars,
> 
> Unfortunately manipulating the database might be your best bet for
> now.  We do have plans to come up with another option in the Cinder
> project, but unfortunately that won't help you much right now.
> 
> If somebody has a better method, I'm sure they'll speak up and reply
> to this email, but I think right now that's your best bet.
> 
> Thanks,
> John
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to     : [email protected]
> Unsubscribe : https://launchpad.net/~openstack
> More help   : https://help.launchpad.net/ListHelp

_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp

Reply via email to