[Openstack] how to re-attach volume after vm and host down unexpectedly
mwjpiero at gmail.com
Wed Dec 28 07:23:35 UTC 2011
I have write a blog about re-attach
I think my way is stupid . Better way should exists.
The case is:
The vm using volume, and then host where vm is runnning down because some
reason. After host up, we can reboot vm using "nova reboot <server>", but
the disk(filesystem mounted) in vm will be lost. In novaclient, using "nova
volume-list", it show volume status is still in-used by this vm.
At first, I want to detach it and re-attach it again. This way can work if
we reboot vm in normal(host not down unexpectedly), but now it will show
error like this:
*2011-12-28 14:30:08,269 AUDIT nova.compute.manager
[661dae13-05ec-4365-9f44-15d9072e000a admin 1] Detach volume 6 from
mountpoint /dev/vdb on instance 74*
*(nova.rpc): TRACE: DiskNotFound: No disk at vdb*
I don't know how to write "vdb" to somewhere. But I think I can clear the
database about it.
So following steps I do:
- update nova database, volumes table, found this vm, set mountpoint to
NULL, set status='available' , set attach_status='detach'
- logout iscsi volume in host where vm running, like this:
$ sudo iscsiadm -m node -T
iqn.2010-10.org.openstack:volume-00000006 -p 10.200.200.5:23260 --logout
- attach volume again using "nova volume-attach <server> <volume>
It can work, but I want to know , is this way correct ?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Openstack