← Back to team overview

openstack team mailing list archive

Re: Deleting a volume stuck in "attaching" state?

 

"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: openstack-bounces+duncan.thomas=hp.com@xxxxxxxxxxxxxxxxxxx
> [mailto:openstack-bounces+duncan.thomas=hp.com@xxxxxxxxxxxxxxxxxxx] On
> Behalf Of John Griffith
> Sent: 20 June 2012 05:02
> To: Lars Kellogg-Stedman
> Cc: openstack@xxxxxxxxxxxxxxxxxxx
> Subject: Re: [Openstack] Deleting a volume stuck in "attaching" state?
> 
> On Tue, Jun 19, 2012 at 7:40 PM, Lars Kellogg-Stedman
> <lars@xxxxxxxxxxxxxxxx> 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 <lars@xxxxxxxxxxxxxxxx>       |
> > 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     : openstack@xxxxxxxxxxxxxxxxxxx
> > 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     : openstack@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~openstack
> More help   : https://help.launchpad.net/ListHelp


Follow ups

References